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

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

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

revision 3258 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 25  Line 25 
25    
26  /**************************************************************/  /**************************************************************/
27    
28  Finley_ElementFile* Finley_ElementFile_alloc(Finley_ReferenceElementSet* referenceElementSet, Paso_MPIInfo *MPIInfo)  Finley_ElementFile* Finley_ElementFile_alloc(Finley_ReferenceElementSet* referenceElementSet, Esys_MPIInfo *MPIInfo)
29  {  {
30    Finley_ElementFile *out;    Finley_ElementFile *out;
31        
# Line 53  Finley_ElementFile* Finley_ElementFile_a Line 53  Finley_ElementFile* Finley_ElementFile_a
53    out->numTagsInUse=0;    out->numTagsInUse=0;
54    out->tagsInUse=NULL;    out->tagsInUse=NULL;
55    
56    out->MPIInfo = Paso_MPIInfo_getReference( MPIInfo );    out->MPIInfo = Esys_MPIInfo_getReference( MPIInfo );
57    
58    out->jacobeans=Finley_ElementFile_Jacobeans_alloc(referenceElementSet->referenceElement->BasisFunctions);    out->jacobeans=Finley_ElementFile_Jacobeans_alloc(referenceElementSet->referenceElement->BasisFunctions);
59    out->jacobeans_reducedQ=Finley_ElementFile_Jacobeans_alloc(referenceElementSet->referenceElementReducedQuadrature->BasisFunctions);    out->jacobeans_reducedQ=Finley_ElementFile_Jacobeans_alloc(referenceElementSet->referenceElementReducedQuadrature->BasisFunctions);
# Line 80  void Finley_ElementFile_free(Finley_Elem Line 80  void Finley_ElementFile_free(Finley_Elem
80       Finley_ElementFile_Jacobeans_dealloc(in->jacobeans_reducedS);       Finley_ElementFile_Jacobeans_dealloc(in->jacobeans_reducedS);
81       Finley_ElementFile_Jacobeans_dealloc(in->jacobeans_reducedQ);       Finley_ElementFile_Jacobeans_dealloc(in->jacobeans_reducedQ);
82       Finley_ElementFile_Jacobeans_dealloc(in->jacobeans_reducedS_reducedQ);       Finley_ElementFile_Jacobeans_dealloc(in->jacobeans_reducedS_reducedQ);
83       Paso_MPIInfo_free( in->MPIInfo );       Esys_MPIInfo_free( in->MPIInfo );
84       MEMFREE(in);             MEMFREE(in);      
85    }    }
86  }  }
87  void Finley_ElementFile_setElementDistribution(Finley_ElementFile* in, dim_t* distribution) {  void Finley_ElementFile_setElementDistribution(Finley_ElementFile* in, dim_t* distribution) {
88    dim_t local_num_elements,e,num_elements=0, size;    dim_t local_num_elements,e,num_elements=0, size;
89    Paso_MPI_rank myRank;    Esys_MPI_rank myRank;
90    if (in == NULL) {    if (in == NULL) {
91        distribution[0]=num_elements;        distribution[0]=num_elements;
92    } else {    } else {
# Line 104  void Finley_ElementFile_setElementDistri Line 104  void Finley_ElementFile_setElementDistri
104              #pragma omp critical              #pragma omp critical
105              num_elements+=local_num_elements;              num_elements+=local_num_elements;
106           }           }
107           #ifdef PASO_MPI           #ifdef ESYS_MPI
108             MPI_Allgather(&num_elements,1,MPI_INT,distribution,1,MPI_INT,in->MPIInfo->comm);             MPI_Allgather(&num_elements,1,MPI_INT,distribution,1,MPI_INT,in->MPIInfo->comm);
109           #else           #else
110             distribution[0]=num_elements;             distribution[0]=num_elements;

Legend:
Removed from v.3258  
changed lines
  Added in v.3259

  ViewVC Help
Powered by ViewVC 1.1.26