/[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 964 by gross, Tue Feb 13 05:10:26 2007 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 */
40        
41    out=MEMALLOC(1,Finley_NodeFile);    out=MEMALLOC(1,Finley_NodeFile);
42    if (Finley_checkPtr(out)) return NULL;    if (Finley_checkPtr(out)) return NULL;
43      out->isPrepared=FINLEY_UNKNOWN;
44    out->numNodes=0;    out->numNodes=0;
45    out->numDegreesOfFreedom=0;    out->numDegreesOfFreedom=0;
46    out->reducedNumDegreesOfFreedom=0;    out->reducedNumDegreesOfFreedom=0;
# Line 46  Finley_NodeFile* Finley_NodeFile_alloc(i Line 50  Finley_NodeFile* Finley_NodeFile_alloc(i
50    out->Tag=NULL;    out->Tag=NULL;
51    out->Coordinates=NULL;    out->Coordinates=NULL;
52    out->degreeOfFreedom=NULL;    out->degreeOfFreedom=NULL;
53      out->degreeOfFreedomId=NULL;
54    out->reducedDegreeOfFreedom=NULL;    out->reducedDegreeOfFreedom=NULL;
55      out->reducedDegreeOfFreedomId=NULL;
56    out->toReduced=NULL;    out->toReduced=NULL;
57      out->status=FINLEY_INITIAL_STATUS;
58    #ifdef PASO_MPI
59      out->Dom=NULL;
60      out->MPIInfo = Paso_MPIInfo_getReference( MPIInfo );
61      out->degreeOfFreedomDistribution = Finley_NodeDistribution_alloc( MPIInfo );
62      out->reducedDegreeOfFreedomDistribution = Finley_NodeDistribution_alloc( MPIInfo );
63      out->CommBuffer = Paso_CommBuffer_alloc( MPIInfo, __g_nodeTag++ );
64      out->reducedCommBuffer = Paso_CommBuffer_alloc( MPIInfo, __g_nodeTag++ );
65    #endif
66    return out;    return out;
67  }  }
68    
# Line 58  void Finley_NodeFile_dealloc(Finley_Node Line 73  void Finley_NodeFile_dealloc(Finley_Node
73       #ifdef Finley_TRACE       #ifdef Finley_TRACE
74       printf("node file is deallocated.\n");       printf("node file is deallocated.\n");
75       #endif       #endif
76       Finley_NodeFile_deallocTable(in);         Finley_NodeFile_deallocTable(in);
77    #ifdef PASO_MPI
78         Paso_MPIInfo_dealloc( in->MPIInfo );
79         Finley_NodeDistribution_dealloc( in->degreeOfFreedomDistribution );
80         Finley_NodeDistribution_dealloc( in->reducedDegreeOfFreedomDistribution );
81         Paso_CommBuffer_dealloc( in->CommBuffer );
82         Paso_CommBuffer_dealloc( in->reducedCommBuffer );
83    #endif
84       MEMFREE(in);             MEMFREE(in);      
85    }    }
86  }  }
 /*  
 * $Log$  
 * Revision 1.5  2005/09/15 03:44:23  jgs  
 * Merge of development branch dev-02 back to main trunk on 2005-09-15  
 *  
 * Revision 1.4.2.1  2005/09/07 06:26:20  gross  
 * the solver from finley are put into the standalone package paso now  
 *  
 * Revision 1.4  2004/12/15 07:08:33  jgs  
 * *** empty log message ***  
 *  
 *  
 *  
 */  

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

  ViewVC Help
Powered by ViewVC 1.1.26