/[escript]/branches/doubleplusgood/dudley/src/Mesh_readGmsh.cpp
ViewVC logotype

Diff of /branches/doubleplusgood/dudley/src/Mesh_readGmsh.cpp

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

revision 4261 by jfenwick, Wed Feb 27 06:09:33 2013 UTC revision 4335 by jfenwick, Thu Mar 21 07:35:48 2013 UTC
# Line 149  Dudley_Mesh *Dudley_Mesh_readGmsh(char * Line 149  Dudley_Mesh *Dudley_Mesh_readGmsh(char *
149          scan_ret = fscanf(fileHandle_p, "%d", &totalNumElements);          scan_ret = fscanf(fileHandle_p, "%d", &totalNumElements);
150          FSCANF_CHECK(scan_ret, "fscanf: Dudley_Mesh_readGmsh");          FSCANF_CHECK(scan_ret, "fscanf: Dudley_Mesh_readGmsh");
151    
152          id = TMPMEMALLOC(totalNumElements, index_t);          id = new  index_t[totalNumElements];
153          tag = TMPMEMALLOC(totalNumElements, index_t);          tag = new  index_t[totalNumElements];
154    
155          element_type = TMPMEMALLOC(totalNumElements, Dudley_ElementTypeId);          element_type = new  Dudley_ElementTypeId[totalNumElements];
156          vertices = TMPMEMALLOC(totalNumElements * MAX_numNodes_gmsh, index_t);          vertices = new  index_t[totalNumElements * MAX_numNodes_gmsh];
157          if (!          if (!
158              (Dudley_checkPtr(id) || Dudley_checkPtr(tag) || Dudley_checkPtr(element_type)              (Dudley_checkPtr(id) || Dudley_checkPtr(tag) || Dudley_checkPtr(element_type)
159               || Dudley_checkPtr(vertices)))               || Dudley_checkPtr(vertices)))
# Line 358  Dudley_Mesh *Dudley_Mesh_readGmsh(char * Line 358  Dudley_Mesh *Dudley_Mesh_readGmsh(char *
358              }              }
359          }          }
360          /* and clean up */          /* and clean up */
361          TMPMEMFREE(id);          delete[] id;
362          TMPMEMFREE(tag);          delete[] tag;
363          TMPMEMFREE(element_type);          delete[] element_type;
364          TMPMEMFREE(vertices);          delete[] vertices;
365          }                }      
366          /* name tags (thanks to Antoine Lefebvre, antoine.lefebvre2@mail.mcgill.ca ) */          /* name tags (thanks to Antoine Lefebvre, antoine.lefebvre2@mail.mcgill.ca ) */
367          else if (!strncmp(&line[1], "PhysicalNames", 13)) {          else if (!strncmp(&line[1], "PhysicalNames", 13)) {

Legend:
Removed from v.4261  
changed lines
  Added in v.4335

  ViewVC Help
Powered by ViewVC 1.1.26