Skip to content

Commit

Permalink
Namespace the mesh parts of DHM files
Browse files Browse the repository at this point in the history
  • Loading branch information
jedbrown committed May 29, 2011
1 parent ff187e9 commit 991e51a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/fs/impls/cont/contviewdhm.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,15 @@ dErr dFSView_Cont_DHM(dFS fs,dViewer viewer)
hflg = 0; /* Why can't I just check if the dataset exists? */
#endif
if (!hflg) { /* Save mesh to external file and create link to it */
char imeshpath[dNAME_LEN],*imeshpath_ptr = imeshpath;
const char *dhmpath;
char dhmpathbuf[dMAX_PATH_LEN],imeshpath[dMAX_PATH_LEN],*imeshpath_ptr = imeshpath;
iMesh_Instance mi;
err = PetscSNPrintf(imeshpath,sizeof imeshpath,"imesh-%s-%03d.h5m",meshname,meshstate);dCHK(err);
dInt slash,dot;
err = PetscViewerFileGetName(viewer,&dhmpath);dCHK(err);
err = dStrcpyS(dhmpathbuf,sizeof dhmpathbuf,dhmpath);dCHK(err);
err = dFilePathSplit(dhmpathbuf,&slash,&dot);dCHK(err);
dhmpathbuf[dot] = 0; // gets everything but the final '.'
err = PetscSNPrintf(imeshpath,sizeof imeshpath,"%s-imesh-%s-%03d.h5m",dhmpathbuf,meshname,meshstate);dCHK(err);
err = dMeshGetInstance(fs->mesh,&mi);dCHK(err);
iMesh_save(mi,0,imeshpath,"",&ierr,(int)strlen(imeshpath),0);dICHK(mi,ierr);
#if defined dH5_USE_EXTERNAL_LINK
Expand Down

0 comments on commit 991e51a

Please sign in to comment.