/[escript]/trunk/finley/src/NodeFile.c
ViewVC logotype

Diff of /trunk/finley/src/NodeFile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 616 by elspeth, Wed Mar 22 02:46:56 2006 UTC revision 776 by gross, Wed Jul 12 00:07:31 2006 UTC
# Line 29  Line 29 
29    
30  /*   allocates a node file to hold nodes */  /*   allocates a node file to hold nodes */
31  /*   use Finley_NodeFile_allocTable to allocate the node table (Id,Coordinatess). */  /*   use Finley_NodeFile_allocTable to allocate the node table (Id,Coordinatess). */
32    #ifdef PASO_MPI
33  Finley_NodeFile* Finley_NodeFile_alloc(int numDim){  Finley_NodeFile* Finley_NodeFile_alloc(dim_t numDim, Paso_MPIInfo *MPIInfo){
34    #else
35    Finley_NodeFile* Finley_NodeFile_alloc(dim_t numDim){
36    #endif
37    Finley_NodeFile *out;    Finley_NodeFile *out;
38        
39    /*  allocate the return value */    /*  allocate the return value */
# Line 48  Finley_NodeFile* Finley_NodeFile_alloc(i Line 51  Finley_NodeFile* Finley_NodeFile_alloc(i
51    out->degreeOfFreedom=NULL;    out->degreeOfFreedom=NULL;
52    out->reducedDegreeOfFreedom=NULL;    out->reducedDegreeOfFreedom=NULL;
53    out->toReduced=NULL;    out->toReduced=NULL;
54      out->status=FINLEY_INITIAL_STATUS;
55    #ifdef PASO_MPI
56      out->MPIInfo = Paso_MPIInfo_getReference( MPIInfo );
57      out->degreeOfFreedomDistribution = Finley_NodeDistribution_alloc( MPIInfo );
58      out->reducedDegreeOfFreedomDistribution = Finley_NodeDistribution_alloc( MPIInfo );
59      out->CommBuffer = Paso_CommBuffer_alloc( MPIInfo, __g_nodeTag++ );
60      out->reducedCommBuffer = Paso_CommBuffer_alloc( MPIInfo, __g_nodeTag++ );
61    #endif
62    return out;    return out;
63  }  }
64    
# Line 58  void Finley_NodeFile_dealloc(Finley_Node Line 69  void Finley_NodeFile_dealloc(Finley_Node
69       #ifdef Finley_TRACE       #ifdef Finley_TRACE
70       printf("node file is deallocated.\n");       printf("node file is deallocated.\n");
71       #endif       #endif
72       Finley_NodeFile_deallocTable(in);         Finley_NodeFile_deallocTable(in);
73    #ifdef PASO_MPI
74         Paso_MPIInfo_dealloc( in->MPIInfo );
75         Finley_NodeDistribution_dealloc( in->degreeOfFreedomDistribution );
76         Finley_NodeDistribution_dealloc( in->reducedDegreeOfFreedomDistribution );
77         Paso_CommBuffer_dealloc( in->CommBuffer );
78         Paso_CommBuffer_dealloc( in->reducedCommBuffer );
79    #endif
80       MEMFREE(in);             MEMFREE(in);      
81    }    }
82  }  }

Legend:
Removed from v.616  
changed lines
  Added in v.776

  ViewVC Help
Powered by ViewVC 1.1.26