~vcs-imports/escript-finley/trunk

« back to all changes in this revision

Viewing changes to finley/src/ElementFile.c

  • Committer: jfenwick
  • Date: 2010-10-11 01:48:14 UTC
  • Revision ID: svn-v4:77569008-7704-0410-b7a0-a92fef0b09fd:trunk:3259
Merging dudley and scons updates from branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
/**************************************************************/
27
27
 
28
 
Finley_ElementFile* Finley_ElementFile_alloc(Finley_ReferenceElementSet* referenceElementSet, Paso_MPIInfo *MPIInfo)
 
28
Finley_ElementFile* Finley_ElementFile_alloc(Finley_ReferenceElementSet* referenceElementSet, Esys_MPIInfo *MPIInfo)
29
29
{
30
30
  Finley_ElementFile *out;
31
31
  
53
53
  out->numTagsInUse=0;
54
54
  out->tagsInUse=NULL;
55
55
 
56
 
  out->MPIInfo = Paso_MPIInfo_getReference( MPIInfo );
 
56
  out->MPIInfo = Esys_MPIInfo_getReference( MPIInfo );
57
57
 
58
58
  out->jacobeans=Finley_ElementFile_Jacobeans_alloc(referenceElementSet->referenceElement->BasisFunctions);
59
59
  out->jacobeans_reducedQ=Finley_ElementFile_Jacobeans_alloc(referenceElementSet->referenceElementReducedQuadrature->BasisFunctions);
80
80
     Finley_ElementFile_Jacobeans_dealloc(in->jacobeans_reducedS);
81
81
     Finley_ElementFile_Jacobeans_dealloc(in->jacobeans_reducedQ);
82
82
     Finley_ElementFile_Jacobeans_dealloc(in->jacobeans_reducedS_reducedQ);
83
 
     Paso_MPIInfo_free( in->MPIInfo );
 
83
     Esys_MPIInfo_free( in->MPIInfo );
84
84
     MEMFREE(in);      
85
85
  }
86
86
}
87
87
void Finley_ElementFile_setElementDistribution(Finley_ElementFile* in, dim_t* distribution) {
88
88
  dim_t local_num_elements,e,num_elements=0, size;
89
 
  Paso_MPI_rank myRank;
 
89
  Esys_MPI_rank myRank;
90
90
  if (in == NULL) {
91
91
      distribution[0]=num_elements;
92
92
  } else {
104
104
            #pragma omp critical
105
105
            num_elements+=local_num_elements;
106
106
         }
107
 
         #ifdef PASO_MPI
 
107
         #ifdef ESYS_MPI
108
108
           MPI_Allgather(&num_elements,1,MPI_INT,distribution,1,MPI_INT,in->MPIInfo->comm);
109
109
         #else
110
110
           distribution[0]=num_elements;