/[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 3911 by jfenwick, Thu Jun 14 01:01:03 2012 UTC revision 3920 by jfenwick, Thu Jul 5 03:42:30 2012 UTC
# Line 360  Dudley_Mesh *Dudley_Mesh_readGmsh(char * Line 360  Dudley_Mesh *Dudley_Mesh_readGmsh(char *
360          TMPMEMFREE(tag);          TMPMEMFREE(tag);
361          TMPMEMFREE(element_type);          TMPMEMFREE(element_type);
362          TMPMEMFREE(vertices);          TMPMEMFREE(vertices);
363          }          }      
364            /* name tags (thanks to Antoine Lefebvre, antoine.lefebvre2@mail.mcgill.ca ) */
365            else if (!strncmp(&line[1], "PhysicalNames", 13)) {
366                char name[LenString_MAX+1];
367                index_t tag_key;
368            scan_ret = fscanf(fileHandle_p, "%d", &numTags);
369            FSCANF_CHECK(scan_ret, "fscanf: Dudley_Mesh_readGmsh");
370            if (! Finley_noError()) break;
371            for (i0 = 0; i0 < numTags; i0++) {
372                scan_ret = fscanf(fileHandle_p, "%d %d %s\n", &itmp, &tag_key, name);
373                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.");
375                if ( strlen(name) < 3 ) Finley_setError(IO_ERROR,"Dudley_Mesh_readGmsh: illegal tagname (\" missing?)");
376                if (! Finley_noError()) break;
377                name[strlen(name)-1]='\0';
378                Dudley_Mesh_addTagMap(mesh_p,&name[1],tag_key);
379            }
380              }
381          /* serach for end of data block */          /* serach for end of data block */
382          do          do
383          {          {

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

  ViewVC Help
Powered by ViewVC 1.1.26