int pmdb_write_ext_dx( char *filename, /* IN */ pMeshPB pmeshpb, /* IN */ char *cellfile, /* IN */ int celldim, /* IN */ char *nodefile, /* IN */ int nodedim, /* IN */ unsigned char flags /* IN */ )Write out a dx file of the current mesh. There is only one file containing a component for each processor's part of the mesh. Note that there is a serial version of this command in the Mesh Database called M_writeDXfile().
If cellfile is non-null, it specifies a file name template for cell data. The cellfile string must contain a %d which will be replaced with the processor number. You should create a separate cell data file for each processor. Each file should have one line for each cell (in order of M_nextRegion() ) with celldim numbers on each line. E.g. cellfile name "cell.%d.dat" will make dx look for cell data in cell.0.dat, cell.1.dat, etc. Cellfile may be NULL in which case there is no cell data attached to the dx object.
Likewise for nodefile and nodedim.
flags indicates any special options, such as a black and white file or a surface mesh only. The following (and some combinations) can be specified. Specify combinations with a bitwise "or" operation.
Flag | Description |
PMDB_DX_DEFAULT | Write default, three-dimensional full mesh, in color |
PMDB_DX_SURFACE | Write out only the surface mesh |
PMDB_DX_BW | Write out a black and white version of the mesh |
PMDB_DX_2D | Write out a 2D mesh |
Returns 0/nonzero for failure/success. It should catch ANY file i/o errors e.g. out of disk space Note: Failure to compress prints out a warning but does not cause the routine to return 0.
pmdb_write_2d_dx | 2D meshes, colored |
pmdb_write_dx | 3D meshes, colored |
pmdb_write_bw_dx | 3D meshes, black and white |
pmdb_write_sur_dx | surface of 3D meshes, colored |
pmdb_write_sur_bw_dx | surface of 3D meshes, black and white |
The arguments to these routines are the same and is given below:
char *file: | File prefix. Output is placed in file.dx |
pMesh mesh: | MDB mesh handle |
pMeshPB pmeshpb: | PMDB mesh handle. |