mshfmt2.h
来自「算断裂的」· C头文件 代码 · 共 269 行
H
269 行
/*// ------------------------------------------------------------------// MshFmt2.h//// This file contains the definition of Cptc_MshDesc and subsidiary// structures, used to hold a simplicial complex.// ------------------------------------------------------------------// Authors: Paul "Wash" Wawrzynek, Chris Myers and Stephen A. VavasisRemarks:1. This is the header file for the data structures that define afinite element mesh. It is anticipated that these data structureswill be populated by a mesh generation routine.2. These data structures define nodes, elements, and thecorrespondence among local element topology and global topologyin the model description.3. Material properties and boundary conditions are NOT describedin these data structure, but rather are defined as properties, associated with topological entities in the geometry file.4. This is version 2 of the data structure. This data structure has been compressed compared to version 1.5. Local node, edge, and face numberings for the various elementtypes have not yet been defined. 6. This file stores only geometric information about meshes.P-order information is not stored.7. <deleted>8. Where an element's face, edge, or vertex is incident with a portionglobal topology and geometry of the defining solid, the incidentinformation is stored explicitly. 9. The mesh nodes have both topological and geometric incidence information.The higher-dimensional mesh entities have only topological incidence information. */#ifndef MshFmt_h#define MshFmt_h/* Cptc_Global_Node: * This is a node's global id number. */typedef int Cptc_Global_Node;/* Cptc_Mnode: * This information is stored for every mesh node. */typedef struct Cptc_Mnode_ { double coord[3]; /* realspace x,y,z of the node */ Cptc_Global_Node id; /* global id of this node */} Cptc_Mnode;/* Cptc_NodeCurveInc: * This is the data stored for a node incident on a curve * in the model */typedef struct Cptc_NodeCurveInc_ { Cptc_Global_Node id; /* global id of this node */ int curve_index; /* which curve of the edge owns the node */ double param; /* parametric coordinate on the curve */} Cptc_NodeCurveInc;/* Cptc_NodePatchInc: * This is the data stored for a node incident on a * patch in the model */typedef struct Cptc_NodePatchInc_ { Cptc_Global_Node id; /* global id of this node */ int patch_index; /* which patch of the surface owns the node */ double param[2]; /* parametric coordinates on the patch */} Cptc_NodePatchInc;/* Cptc_MeshTopVertexInfo: * This is the data stored for each topological vertex * of the model. */typedef struct Cptc_MeshTopVertexInfo_ { Cptc_Global_Node vtx; /* The mesh node lying on the top. vtx. */} Cptc_MeshTopVertexInfo;/* Cptc_MeshTopEdgeInfo: * This is the data stored for each topological edge * in the model. This data is a list of mesh nodes * and of mesh edges lying on the edge. */typedef struct Cptc_MeshTopEdgeInfo_ { int num_mnode; /* number of nodes on the edge */ Cptc_NodeCurveInc* incs; /* A malloc'd array of size num_mnode * that lists all the nodes on this * edge. No particular order. */ int num_medge; /* number of mesh edges on this edge */ Cptc_Global_Node (*edgelist)[2]; /* This is the list of * mesh edges on the edge. * This is a malloc'd array of * size num_medge. Each entry * is a two-integer array of * the edge's endpoints. * The edges themselves are * in no particular order. */} Cptc_MeshTopEdgeInfo;/* Cptc_MeshTopSurfaceInfo: * This is the data stored for each topological surface * in the model. This data is a list of mesh nodes * and of mesh facets lying on the surface. */typedef struct Cptc_MeshTopSurfaceInfo_ { int num_mnode; /* number of nodes on the edge */ Cptc_NodePatchInc* incs; /* A malloc'd array of size num_mnode * that lists all the nodes on this * surface. No particular order. */ int num_mtrifacet; /* number of mesh triangular facets on this surface */ Cptc_Global_Node (*trifacetlist)[3]; /* This is the list of * mesh triangular facets on the * surface. * This is a malloc'd array * of size num_mtrifacet. * Each entry is a 3-integer * array of the facet's vertices. * Each triple is ordered so that * the triangle's orientation agrees * with the orientation of the patches * of the top. surface. * The facets are in no particular * order. */ /* The next two fields are not used in QMG 2.0 but are * reserved for future expansion. */ int num_mquadfacet; /* number of mesh quad facets on this surface */ Cptc_Global_Node (*quadfacetlist)[4]; /* This is the list of * mesh quad facets on the * surface. * This is a malloc'd array * of size num_mtrifacet. * Each entry is a 4-integer * array of the facet's vertices. * The four nodes are ordered to agree * with the orientation of the patches * in the top. surface. * The quads are in no particular * order. */} Cptc_MeshTopSurfaceInfo;/* Cptc_TopRegionInfo: * This is the information associated with * each region in the geometric model. * It is a list of elements. */typedef struct Cptc_MeshTopRegionInfo_ { int num_tet; /* Number of tetrahedra in the region */ Cptc_Global_Node (*tets)[4]; /* The tetrahedral elements, * specified by their vertices. * malloc'd array of size num_tet. * These are oriented either right-handed (QMG) * or left-handed (jmesh). */ /* The remaining fields in this struct are not used * in QMG 2.0, but are reserved for future expansion. */ int num_pyramid; /* Number of pyramids in the region */ Cptc_Global_Node (*pyramids)[5]; /* The pyramid elements * specified by their vertices * malloc'd array of size num_pyramid. * Orientation/order not yet specified */ int num_prism; /* Number of prisms in the region. */ Cptc_Global_Node (*prisms)[6]; /* The prism elements * specified by their vertices * malloc'd array of size num_prism. * Orientation/order not yet specified */ int num_hex; /* Number of hexahedra (bricks) in the region. */ Cptc_Global_Node (*hexs)[8]; /* The hexahedral elements specified * by their vertices. * malloc'd array of size num_hex. * Orientation/order not yet specified */} Cptc_MeshTopRegionInfo; /* Cptc_MshDesc: * This is the mesh. */typedef struct Cptc_MshDesc_ { int intrinsic_dimension; /* Always 3 for CPTC */ int embedded_dimension; /* Always 3 for CPTC */ int num_prop_val; /* Number of property-value pairs * associated with the mesh. */ char** props; /* This is the list of property names. For instance, * geo_global_id is a valid property -- it refers to * the ID of the geo that gave rise to the mesh. * props is a malloc'd array of strings of size num_prop_val * Each string is malloc'd and null-terminated. */ char** vals; /* This is the corresponding list of values for each property. * This malloc'd array has size num_prop_val, and each string in the * array is malloc'd and null-terminated. */ int num_nodes; /* number of nodes */ int num_elems; /* total number of elements */ Cptc_Mnode* nodes; /* array of nodes. Size is num_nodes */ /* The following integers describe the geo. * This data duplicates info from the geo file. * But we need it here so that we can call malloc/free * on the mesh. */ int num_top_vertices ; /* number of topological vertices */ int num_top_edges ; /* number of topological edges */ int num_top_surfaces ; /* number of topological surfaces */ int num_top_regions ; /* number of topological regions */ Cptc_MeshTopVertexInfo* vtxinfo; /* Mesh info for top. vertices. * This is a malloc'd array * of size num_top_vertices. */ Cptc_MeshTopEdgeInfo* edgeinfo; /* Mesh info for top. edges. * This is a malloc'd array * of size num_top_edges. */ Cptc_MeshTopSurfaceInfo* surfinfo; /* Mesh info for top. surfaces. * This is a malloc'd array * of size num_top_surfaces. */ Cptc_MeshTopRegionInfo* regioninfo; /* Mesh info for top. surfaces. * NOTE: elements are here! * This is a malloc'd array * of size num_top_regions. */} Cptc_MshDesc;#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?