/[escript]/branches/domexper/dudley/src/Mesh.c
ViewVC logotype

Diff of /branches/domexper/dudley/src/Mesh.c

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

revision 3205 by jfenwick, Tue Sep 7 05:30:39 2010 UTC revision 3206 by jfenwick, Fri Sep 24 03:20:22 2010 UTC
# Line 137  int  Dudley_Mesh_getStatus(Dudley_Mesh* Line 137  int  Dudley_Mesh_getStatus(Dudley_Mesh*
137    
138  void Mesh_setOrders(Dudley_Mesh *in)  void Mesh_setOrders(Dudley_Mesh *in)
139  {  {
140     const dim_t order_max=9999999;     in->approximationOrder=1;    // order of shapeFunctions is always 1 in Dudley
141     dim_t locals[3];     in->reducedApproximationOrder=1;
142     #ifdef PASO_MPI     in->integrationOrder=2;
143         dim_t globals[3];     in->reducedIntegrationOrder=0;
    #endif  
    locals[0]=order_max; locals[1]=order_max; locals[2]=order_max;  
   
   if ( in->Elements!=NULL) {  
      if (in->Elements->numElements > 0) {  
          locals[0]=MIN(locals[0], in->Elements->referenceElementSet->referenceElement->BasisFunctions->Type->numOrder);  
          locals[1]=MIN(locals[1], in->Elements->referenceElementSet->referenceElement->integrationOrder);  
          locals[2]=MIN(locals[2], in->Elements->referenceElementSet->referenceElementReducedQuadrature->integrationOrder);  
      }  
   }  
   if ( in->FaceElements!=NULL) {  
      if (in->FaceElements->numElements > 0) {  
          locals[0]=MIN(locals[0], in->FaceElements->referenceElementSet->referenceElement->BasisFunctions->Type->numOrder);  
          locals[1]=MIN(locals[1], in->FaceElements->referenceElementSet->referenceElement->integrationOrder);  
          locals[2]=MIN(locals[2], in->FaceElements->referenceElementSet->referenceElementReducedQuadrature->integrationOrder);  
      }  
   
   
   }  
   
    #ifdef PASO_MPI  
        MPI_Allreduce( locals, globals, 3, MPI_INT, MPI_MIN, in->MPIInfo->comm );  
        in->approximationOrder=(globals[0] < order_max ? globals[0] : -1 );  
        in->reducedApproximationOrder=in->approximationOrder;  
        in->integrationOrder=(globals[1] < order_max ? globals[1] : -1 );  
        in->reducedIntegrationOrder=(globals[2] < order_max ? globals[2] : -1 );  
    #else  
        in->approximationOrder=(locals[0] < order_max ? locals[0] : -1 );  
        in->reducedApproximationOrder=(locals[0] < order_max ? locals[0] : -1 );  
        in->integrationOrder=(locals[1] < order_max ? locals[1] : -1 );  
        in->reducedIntegrationOrder=(locals[2] < order_max ? locals[2] : -1 );  
    #endif  
144    
145    
146  }  }

Legend:
Removed from v.3205  
changed lines
  Added in v.3206

  ViewVC Help
Powered by ViewVC 1.1.26