/[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 3125 by jfenwick, Thu Aug 5 05:07:58 2010 UTC revision 3126 by jfenwick, Wed Sep 1 00:37:53 2010 UTC
# Line 37  Dudley_Mesh* Dudley_Mesh_alloc(char* nam Line 37  Dudley_Mesh* Dudley_Mesh_alloc(char* nam
37    out->Elements=NULL;      out->Elements=NULL;  
38    out->FaceElements=NULL;    out->FaceElements=NULL;
39    out->Points=NULL;          out->Points=NULL;      
   out->ContactElements=NULL;        
40    out->TagMap=NULL;          out->TagMap=NULL;      
41    out->reference_counter=0;    out->reference_counter=0;
42    
# Line 73  Dudley_Mesh* Dudley_Mesh_alloc(char* nam Line 72  Dudley_Mesh* Dudley_Mesh_alloc(char* nam
72    out->Elements=NULL;    out->Elements=NULL;
73    out->FaceElements=NULL;    out->FaceElements=NULL;
74    out->Points=NULL;    out->Points=NULL;
   out->ContactElements=NULL;  
75    out->reference_counter++;    out->reference_counter++;
76    return out;    return out;
77  }  }
# Line 95  void Dudley_Mesh_free(Dudley_Mesh* in) { Line 93  void Dudley_Mesh_free(Dudley_Mesh* in) {
93         Dudley_NodeFile_free(in->Nodes);         Dudley_NodeFile_free(in->Nodes);
94         Dudley_ElementFile_free(in->FaceElements);         Dudley_ElementFile_free(in->FaceElements);
95         Dudley_ElementFile_free(in->Elements);           Dudley_ElementFile_free(in->Elements);  
        Dudley_ElementFile_free(in->ContactElements);  
96         Dudley_ElementFile_free(in->Points);         Dudley_ElementFile_free(in->Points);
97         Dudley_TagMap_free(in->TagMap);         Dudley_TagMap_free(in->TagMap);
98         Paso_SystemMatrixPattern_free(in->FullFullPattern);         Paso_SystemMatrixPattern_free(in->FullFullPattern);
# Line 124  void Dudley_Mesh_setFaceElements(Dudley_ Line 121  void Dudley_Mesh_setFaceElements(Dudley_
121      Dudley_ElementFile_free(self->FaceElements);      Dudley_ElementFile_free(self->FaceElements);
122      self->FaceElements=elements;      self->FaceElements=elements;
123  }  }
 void Dudley_Mesh_setContactElements(Dudley_Mesh* self,Dudley_ElementFile *elements) {  
     Dudley_ElementFile_free(self->ContactElements);  
     self->ContactElements=elements;  
 }  
124  void Dudley_Mesh_setPoints(Dudley_Mesh* self,Dudley_ElementFile *elements) {  void Dudley_Mesh_setPoints(Dudley_Mesh* self,Dudley_ElementFile *elements) {
125      Dudley_ElementFile_free(self->Points);      Dudley_ElementFile_free(self->Points);
126      self->Points=elements;      self->Points=elements;
# Line 169  void Mesh_setOrders(Dudley_Mesh *in) Line 162  void Mesh_setOrders(Dudley_Mesh *in)
162    
163    
164    }    }
   if ( in->ContactElements!=NULL) {  
      if (in->ContactElements->numElements > 0) {  
          locals[0]=MIN(locals[0], in->ContactElements->referenceElementSet->referenceElement->BasisFunctions->Type->numOrder);  
          locals[1]=MIN(locals[1], in->ContactElements->referenceElementSet->referenceElement->LinearBasisFunctions->Type->numOrder);  
          locals[2]=MIN(locals[2], in->ContactElements->referenceElementSet->referenceElement->integrationOrder);  
          locals[3]=MIN(locals[3], in->ContactElements->referenceElementSet->referenceElementReducedQuadrature->integrationOrder);  
      }  
   
   }  
165    
166     #ifdef PASO_MPI     #ifdef PASO_MPI
167         MPI_Allreduce( locals, globals, 4, MPI_INT, MPI_MIN, in->MPIInfo->comm );         MPI_Allreduce( locals, globals, 4, MPI_INT, MPI_MIN, in->MPIInfo->comm );

Legend:
Removed from v.3125  
changed lines
  Added in v.3126

  ViewVC Help
Powered by ViewVC 1.1.26