/[escript]/branches/doubleplusgood/dudley/src/Mesh.cpp
ViewVC logotype

Diff of /branches/doubleplusgood/dudley/src/Mesh.cpp

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

revision 616 by elspeth, Wed Mar 22 02:46:56 2006 UTC revision 730 by bcumming, Mon May 15 04:03:49 2006 UTC
# Line 30  Line 30 
30    
31  extern Finley_RefElementInfo Finley_RefElement_InfoList[];  extern Finley_RefElementInfo Finley_RefElement_InfoList[];
32    
33  Finley_Mesh* Finley_Mesh_alloc(char* name,dim_t numDim, index_t order) {  #ifndef PASO_MPI
34    Finley_Mesh* Finley_Mesh_alloc(char* name,dim_t numDim, index_t order)
35    #else
36    Finley_Mesh* Finley_Mesh_alloc(char* name,dim_t numDim, index_t order, Paso_MPIInfo *mpi_info)
37    #endif
38    {
39    Finley_Mesh *out;    Finley_Mesh *out;
40        
41    /*  allocate the return value */    /*  allocate the return value */
# Line 49  Finley_Mesh* Finley_Mesh_alloc(char* nam Line 54  Finley_Mesh* Finley_Mesh_alloc(char* nam
54    out->FullReducedPattern=NULL;    out->FullReducedPattern=NULL;
55    out->ReducedFullPattern=NULL;    out->ReducedFullPattern=NULL;
56    out->ReducedReducedPattern=NULL;    out->ReducedReducedPattern=NULL;
57      
58    #ifdef PASO_MPI
59      out->MPIInfo = NULL;
60    
61      /* get MPI info */
62      out->MPIInfo = Paso_MPIInfo_getReference( mpi_info );
63      if (! Finley_noError()) {
64          Finley_Mesh_dealloc(out);
65          return NULL;
66      }
67    #endif
68    /*   copy name: */    /*   copy name: */
69        
70    out->Name=MEMALLOC(strlen(name)+1,char);    out->Name=MEMALLOC(strlen(name)+1,char);
# Line 60  Finley_Mesh* Finley_Mesh_alloc(char* nam Line 75  Finley_Mesh* Finley_Mesh_alloc(char* nam
75    strcpy(out->Name,name);    strcpy(out->Name,name);
76        
77    /*   allocate node table: */    /*   allocate node table: */
78      #ifdef PASO_MPI
79      out->Nodes=Finley_NodeFile_alloc( numDim, mpi_info );
80    #else
81    out->Nodes=Finley_NodeFile_alloc(numDim);    out->Nodes=Finley_NodeFile_alloc(numDim);
82    #endif
83    if (! Finley_noError()) {    if (! Finley_noError()) {
84        Finley_Mesh_dealloc(out);        Finley_Mesh_dealloc(out);
85        return NULL;        return NULL;
# Line 105  void Finley_Mesh_dealloc(Finley_Mesh* in Line 123  void Finley_Mesh_dealloc(Finley_Mesh* in
123         Paso_SystemMatrixPattern_dealloc(in->FullReducedPattern);         Paso_SystemMatrixPattern_dealloc(in->FullReducedPattern);
124         Paso_SystemMatrixPattern_dealloc(in->ReducedFullPattern);         Paso_SystemMatrixPattern_dealloc(in->ReducedFullPattern);
125         Paso_SystemMatrixPattern_dealloc(in->ReducedReducedPattern);         Paso_SystemMatrixPattern_dealloc(in->ReducedReducedPattern);
126    #ifdef PASO_MPI
127           Paso_MPIInfo_dealloc( in->MPIInfo );
128    #endif
129         MEMFREE(in);               MEMFREE(in);      
130       }       }
131    }    }

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

  ViewVC Help
Powered by ViewVC 1.1.26