/[escript]/trunk/dudley/src/Mesh_saveDX.c
ViewVC logotype

Diff of /trunk/dudley/src/Mesh_saveDX.c

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

revision 2548 by jfenwick, Mon Jul 20 06:20:06 2009 UTC revision 2748 by gross, Tue Nov 17 07:32:59 2009 UTC
# Line 170  void Finley_Mesh_saveDX(const char * fil Line 170  void Finley_Mesh_saveDX(const char * fil
170    }    }
171    
172    /* map finley element type to DX element type */    /* map finley element type to DX element type */
173    TypeId = elements->ReferenceElement->Type->TypeId;    TypeId = elements->referenceElementSet->referenceElement->Type->TypeId;
174    numDXNodesPerElement=0;    numDXNodesPerElement=0;
175    numCells = elements->numElements;    numCells = elements->numElements;
176    if (TypeId==Line2 || TypeId==Line3 || TypeId==Line4 ) {    if (TypeId==Line2 || TypeId==Line3 || TypeId==Line4 || TypeId==Line3Macro ) {
177       numDXNodesPerElement=2;       numDXNodesPerElement=2;
178       resortIndex=resort[0];       resortIndex=resort[0];
179       strcpy(elemTypeStr, "lines");       strcpy(elemTypeStr, "lines");
# Line 181  void Finley_Mesh_saveDX(const char * fil Line 181  void Finley_Mesh_saveDX(const char * fil
181       numDXNodesPerElement = 3;       numDXNodesPerElement = 3;
182       resortIndex=resort[1];       resortIndex=resort[1];
183       strcpy(elemTypeStr, "triangles");       strcpy(elemTypeStr, "triangles");
184     } else if (TypeId==Rec4 || TypeId==Rec8 || TypeId==Rec9 || TypeId==Rec12 || TypeId==Rec16 ) {     } else if (TypeId==Rec4 || TypeId==Rec8 || TypeId==Rec9 || TypeId==Rec12 || TypeId==Rec16 || TypeId==Rec9Macro ) {
185       numDXNodesPerElement = 4;       numDXNodesPerElement = 4;
186       resortIndex=resort[3];       resortIndex=resort[3];
187       strcpy(elemTypeStr, "quads");       strcpy(elemTypeStr, "quads");
188     } else if (TypeId==Tet4 || TypeId==Tet10 || TypeId==Tet16 ) {     } else if (TypeId==Tet4 || TypeId==Tet10 || TypeId==Tet16 || TypeId==Tet10Macro ) {
189       numDXNodesPerElement = 4;       numDXNodesPerElement = 4;
190       resortIndex=resort[2];       resortIndex=resort[2];
191       strcpy(elemTypeStr, "tetrahedra");       strcpy(elemTypeStr, "tetrahedra");
# Line 194  void Finley_Mesh_saveDX(const char * fil Line 194  void Finley_Mesh_saveDX(const char * fil
194       resortIndex=resort[4];       resortIndex=resort[4];
195       strcpy(elemTypeStr, "cubes");       strcpy(elemTypeStr, "cubes");
196     } else {     } else {
197       sprintf(error_msg,"saveDX: Element type %s is not supported by DX",elements->ReferenceElement->Type->Name);       sprintf(error_msg,"saveDX: Element type %s is not supported by DX",elements->referenceElementSet->referenceElement->Type->Name);
198       Finley_setError(VALUE_ERROR,error_msg);       Finley_setError(VALUE_ERROR,error_msg);
199       MEMFREE(isCellCentered);       MEMFREE(isCellCentered);
200       fclose(fileHandle_p);       fclose(fileHandle_p);
# Line 233  void Finley_Mesh_saveDX(const char * fil Line 233  void Finley_Mesh_saveDX(const char * fil
233           }           }
234           if (isCellCentered[i_data]) {           if (isCellCentered[i_data]) {
235               if (Finley_Assemble_reducedIntegrationOrder(data_pp[i_data])) {               if (Finley_Assemble_reducedIntegrationOrder(data_pp[i_data])) {
236                  numPointsPerSample=elements->ReferenceElementReducedOrder->numQuadNodes;                  numPointsPerSample=elements->referenceElementSet->referenceElementReducedQuadrature->Parametrization->numQuadNodes;
237               } else {               } else {
238                  numPointsPerSample=elements->ReferenceElement->numQuadNodes;                  numPointsPerSample=elements->referenceElementSet->referenceElement->Parametrization->numQuadNodes;
239               }               }
240               if (numPointsPerSample>0) {               if (numPointsPerSample>0) {
241          void* buffer=allocSampleBuffer(data_pp[i_data]);                  void* buffer=allocSampleBuffer(data_pp[i_data]);
242                  fprintf(fileHandle_p, "items %d data follows\n", numCells);                  fprintf(fileHandle_p, "items %d data follows\n", numCells);
243                  for (i=0;i<elements->numElements;i++) {                  for (i=0;i<elements->numElements;i++) {
244                      values=getSampleDataRO(data_pp[i_data],i,buffer);                      values=getSampleDataRO(data_pp[i_data],i,buffer);

Legend:
Removed from v.2548  
changed lines
  Added in v.2748

  ViewVC Help
Powered by ViewVC 1.1.26