/[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 3920 by jfenwick, Thu Jul 5 03:42:30 2012 UTC revision 3921 by jfenwick, Thu Jul 5 05:02:49 2012 UTC
# Line 367  Dudley_Mesh *Dudley_Mesh_readGmsh(char * Line 367  Dudley_Mesh *Dudley_Mesh_readGmsh(char *
367              index_t tag_key;              index_t tag_key;
368          scan_ret = fscanf(fileHandle_p, "%d", &numTags);          scan_ret = fscanf(fileHandle_p, "%d", &numTags);
369          FSCANF_CHECK(scan_ret, "fscanf: Dudley_Mesh_readGmsh");          FSCANF_CHECK(scan_ret, "fscanf: Dudley_Mesh_readGmsh");
370          if (! Finley_noError()) break;          if (! Dudley_noError()) break;
371          for (i0 = 0; i0 < numTags; i0++) {          for (i0 = 0; i0 < numTags; i0++) {
372              scan_ret = fscanf(fileHandle_p, "%d %d %s\n", &itmp, &tag_key, name);              scan_ret = fscanf(fileHandle_p, "%d %d %s\n", &itmp, &tag_key, name);
373              FSCANF_CHECK(scan_ret, "fscanf: Dudley_Mesh_readGmsh");              FSCANF_CHECK(scan_ret, "fscanf: Dudley_Mesh_readGmsh");
374              if (! (itmp == 2)) Finley_setError(IO_ERROR,"Dudley_Mesh_readGmsh: expecting two entries per physical name.");              if (! (itmp == 2)) Dudley_setError(IO_ERROR,"Dudley_Mesh_readGmsh: expecting two entries per physical name.");
375              if ( strlen(name) < 3 ) Finley_setError(IO_ERROR,"Dudley_Mesh_readGmsh: illegal tagname (\" missing?)");              if ( strlen(name) < 3 ) Dudley_setError(IO_ERROR,"Dudley_Mesh_readGmsh: illegal tagname (\" missing?)");
376              if (! Finley_noError()) break;              if (! Dudley_noError()) break;
377              name[strlen(name)-1]='\0';              name[strlen(name)-1]='\0';
378              Dudley_Mesh_addTagMap(mesh_p,&name[1],tag_key);              Dudley_Mesh_addTagMap(mesh_p,&name[1],tag_key);
379          }          }

Legend:
Removed from v.3920  
changed lines
  Added in v.3921

  ViewVC Help
Powered by ViewVC 1.1.26