next up previous
Next: Geometric Model Entity Up: PMDB User's Manual Previous: Introduction

Mesh Loading, Partitioning and Saving

  These routines operate on the files which have the following standard suffixes:

All the routines described below have the following common arguments:

filePrefix name of mesh files ; file.sms and file.smd.
meshInitially null MDB mesh handle ; on return it contains the loaded mesh.
ppmeshpbPMDB handle, pointer returned.

Any additional arguments are given separately.


void pmdb_inertia_rb(
char     *file,          /* IN    */
pMesh     mesh,          /* OUT   */
pMeshPB  *ppmeshpb)      /* OUT   */

This routine loads the whole mesh on processor 0 and recursively partitions it in parallel by bisecting it along the principal axis of inertia matrix.


void pmdb_init_load_mesh(
char    *file,               /* IN   */
pMesh    mesh,               /* OUT  */
pMeshPB *ppmeshpb,           /* OUT  */
int      num_load_procs)     /* IN   */

num_load_procsnumber of processors that will load the mesh. Processors with id i=0..num_load_procs-1 load the mesh.


void pmdb_empty_pmeshpb(
pMesh    mesh,               /* OUT  */
pMeshPB *ppmeshpb)           /* OUT  */

Create an empty parallel mesh structure for insertion of entities and links by hand - useful in parallel mesh generation


void pmdb_load_split_sms(
char     *file,             /* IN  */
pMesh     mesh,             /* OUT */
pMeshPB  *ppmeshpb)         /* OUT */

This routine loads a split mesh produced by the splitter

program and sets up the ip-links by internally calling pmdb_geom_setuplinks routine. This operator currently works on 3D all-tetrahedron or 2D all-face meshes.


void pmdb_ortho_rb(
char     *file,            /* IN  */
int       num_axes,        /* IN  */
int      *axes,            /* IN  */
pMesh     mesh,            /* OUT */
pMeshPB  *ppmeshpb)        /* OUT */

This operator loads and partitions a mesh using orthogonal recursive bisection[]. The partitioning axes can be given as a parameter by the user. If the axes[i] are given, the partitioner will cyclically use the axes given as the line of bisection.

num_axesnumber of bisection axes.
axesInteger array of axes with the encoding 0=x, 1=y, 2=z


void pmdb_part_already(
char     *file,        /* IN  */
pMesh     mesh,        /* IN  */
pMeshPB  *ppmeshpb)    /* OUT */

This function loads an already partitioned mesh. This operator expects, in addition to the .sms and .smd files, a color file suffixed .P.col. Here P is the number of partitions. The color file can be produced, for example, by a sequential mesh partitioner Chaco []. See sms2chaco for further details on producing input files to Chaco from .sms files.


void pmdb_read_msh_par(
char     *file,           /* IN  */
pMesh     mesh,           /* IN  */
pMeshPB  *ppmeshpb)       /* OUT */

This operator reads in the mesh which has been saved by pmdb_write_msh_par routine. It reads files of the form file.i.sms and file.i.pmdb with i=0..num_of_processors-1, when passed the file prefix.


void pmdb_write_msh_par(
char     *file,            /* IN */
pMeshPB   pmeshpb)         /* IN */

This operator saves a distributed mesh on the processors in the files file.i.sms and file.i.pmdb where i=0,..,num_of_procs-1. The file file.i.sms is the MDB file and file.i.pmdb contains the information necessary to set up the links when the mesh is later loaded with pmdb_read_msh_par.



void pmdb_unlink_msh_par(
char     *file,            /* IN */
int      warn)             /* IN */

This operator deletes the files written by pmdb_write_msh_par - the files file.i.sms and file.i.pmdb where i=0,..,num_of_procs-1. If warn is non-zero, a warning is printed if the files cannot be deleted.



next up previous
Next: Geometric Model Entity Up: PMDB User's Manual Previous: Introduction



Jim Teresco
Thu May 23 08:34:43 EDT 1996