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

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

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

revision 1028 by gross, Wed Mar 14 00:15:24 2007 UTC revision 1062 by gross, Mon Mar 26 06:17:53 2007 UTC
# Line 39  Finley_Mesh* Finley_Mesh_merge(dim_t num Line 39  Finley_Mesh* Finley_Mesh_merge(dim_t num
39    dim_t numContactElements=0;    dim_t numContactElements=0;
40    dim_t numPoints=0;    dim_t numPoints=0;
41    dim_t i;    dim_t i;
42    index_t order;    index_t order, reduced_order;
43    dim_t numDim;    dim_t numDim;
44    ElementTypeId elementTypeId=NoType;    ElementTypeId elementTypeId=NoType;
45    ElementTypeId faceElementTypeId=NoType;    ElementTypeId faceElementTypeId=NoType;
# Line 54  Finley_Mesh* Finley_Mesh_merge(dim_t num Line 54  Finley_Mesh* Finley_Mesh_merge(dim_t num
54       Finley_setError(VALUE_ERROR,"__FILE__: Empty mesh list");       Finley_setError(VALUE_ERROR,"__FILE__: Empty mesh list");
55    } else {    } else {
56      order=msh[0]->order;      order=msh[0]->order;
57        reduced_order=msh[0]->reduced_order;
58      numDim=msh[0]->Nodes->numDim;      numDim=msh[0]->Nodes->numDim;
59      strcpy(newName,"");      strcpy(newName,"");
60      for (i=0;i<numMsh;i++) {      for (i=0;i<numMsh;i++) {
61         /* check if all mesh have the same type and dimensions */         /* check if all mesh have the same type and dimensions */
62         order=MAX(order,msh[i]->order);         order=MAX(order,msh[i]->order);
63           reduced_order=MIN(reduced_order,msh[i]->reduced_order);
64         numNodes+=msh[i]->Nodes->numNodes;         numNodes+=msh[i]->Nodes->numNodes;
65         if (numDim!=msh[i]->Nodes->numDim) {         if (numDim!=msh[i]->Nodes->numDim) {
66            Finley_setError(TYPE_ERROR,"__FILE__: Spatial dimensions of meshes don't match.");            Finley_setError(TYPE_ERROR,"__FILE__: Spatial dimensions of meshes don't match.");
# Line 116  Finley_Mesh* Finley_Mesh_merge(dim_t num Line 118  Finley_Mesh* Finley_Mesh_merge(dim_t num
118    
119  #ifndef PASO_MPI  #ifndef PASO_MPI
120      if (Finley_noError())      if (Finley_noError())
121        out=Finley_Mesh_alloc(newName,numDim,order);        out=Finley_Mesh_alloc(newName,numDim,order,reduced_order);
122    
123      out->Elements=Finley_ElementFile_alloc(elementTypeId,out->order);      out->Elements=Finley_ElementFile_alloc(elementTypeId,out->order, out->reduced_order);
124      out->FaceElements=Finley_ElementFile_alloc(faceElementTypeId,out->order);      out->FaceElements=Finley_ElementFile_alloc(faceElementTypeId,out->order, out->reduced_order);
125      out->Points=Finley_ElementFile_alloc(pointTypeId,out->order);      out->Points=Finley_ElementFile_alloc(pointTypeId,out->order, out->reduced_order);
126      out->ContactElements=Finley_ElementFile_alloc(contactTypeId,out->order);      out->ContactElements=Finley_ElementFile_alloc(contactTypeId,out->order, out->reduced_order);
127    
128      /* allocate new tables */      /* allocate new tables */
129    

Legend:
Removed from v.1028  
changed lines
  Added in v.1062

  ViewVC Help
Powered by ViewVC 1.1.26