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

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

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

revision 730 by bcumming, Mon May 15 04:03:49 2006 UTC revision 751 by bcumming, Mon Jun 26 01:46:34 2006 UTC
# Line 29  Line 29 
29  /**************************************************************/  /**************************************************************/
30    
31  void Finley_ElementFile_optimizeDistribution(Finley_ElementFile** in) {  void Finley_ElementFile_optimizeDistribution(Finley_ElementFile** in) {
32    #ifdef PASO_MPI
33        /* TODO */
34        /* We will need to take care when reordering elements, because the internal/boundary status of an element is implicit in its
35           ordering.  */
36        return;
37    #else
38       Finley_Util_ValueAndIndex* item_list=NULL;       Finley_Util_ValueAndIndex* item_list=NULL;
39       Finley_ElementFile* out=NULL;       Finley_ElementFile* out=NULL;
40       dim_t e,i;       dim_t e,i;
41       index_t *index=NULL;       index_t *index=NULL;
   
42       if (*in != NULL) {       if (*in != NULL) {
43          if ((*in)->numElements<1) return;          if ((*in)->numElements<1) return;
44          dim_t NN=(*in)->ReferenceElement->Type->numNodes;          dim_t NN=(*in)->ReferenceElement->Type->numNodes;
45          item_list=TMPMEMALLOC((*in)->numElements,Finley_Util_ValueAndIndex);          item_list=TMPMEMALLOC((*in)->numElements,Finley_Util_ValueAndIndex);
46          index=TMPMEMALLOC((*in)->numElements,index_t);          index=TMPMEMALLOC((*in)->numElements,index_t);
47          if (! (Finley_checkPtr(item_list) || Finley_checkPtr(index)) ) {          if (! (Finley_checkPtr(item_list) || Finley_checkPtr(index)) ) {
48  #ifndef PASO_MPI  
49             out=Finley_ElementFile_alloc((*in)->ReferenceElement->Type->TypeId,(*in)->order);             out=Finley_ElementFile_alloc((*in)->ReferenceElement->Type->TypeId,(*in)->order);
 #else  
 /* TODO */  
 PASO_MPI_TODO;  
 #endif  
50             if (Finley_noError()) {             if (Finley_noError()) {
51                 Finley_ElementFile_allocTable(out,(*in)->numElements);                 Finley_ElementFile_allocTable(out,(*in)->numElements);
52                 if (Finley_noError()) {                 if (Finley_noError()) {
# Line 69  PASO_MPI_TODO; Line 70  PASO_MPI_TODO;
70          TMPMEMFREE(item_list);          TMPMEMFREE(item_list);
71          TMPMEMFREE(index);          TMPMEMFREE(index);
72     }     }
73    #endif
74  }  }
75  /*  /*
76  * $Log$  * $Log$

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

  ViewVC Help
Powered by ViewVC 1.1.26