📄 tetgen.h
字号:
REAL transmat[4][4]; int numberofpointpairs; int *pointpairlist; } pbcgroup; public: // Items are numbered starting from 'firstnumber' (0 or 1), default is 0. int firstnumber; // Dimension of the mesh (2 or 3), default is 3. int mesh_dim; // `pointlist': An array of point coordinates. The first point's x // coordinate is at index [0] and its y coordinate at index [1], its // z coordinate is at index [2], followed by the coordinates of the // remaining points. Each point occupies three REALs. // `pointattributelist': An array of point attributes. Each point's // attributes occupy `numberofpointattributes' REALs. // 'addpointlist': An array of additional point coordinates. // 'addpointattributelist': An array of attributes for addition points. // `pointmarkerlist': An array of point markers; one int per point. REAL *pointlist; REAL *pointattributelist; REAL *addpointlist; REAL *addpointattributelist; int *pointmarkerlist; int numberofpoints; int numberofpointattributes; int numberofaddpoints; // `elementlist': An array of element (triangle or tetrahedron) corners. // The first element's first corner is at index [0], followed by its // other corners in counterclockwise order, followed by any other // nodes if the element represents a nonlinear element. Each element // occupies `numberofcorners' ints. // `elementattributelist': An array of element attributes. Each // element's attributes occupy `numberofelementattributes' REALs. // `elementconstraintlist': An array of constraints, i.e. triangle's // area or tetrahedron's volume; one REAL per element. Input only. // `neighborlist': An array of element neighbors; 3 or 4 ints per // element. Output only. int *tetrahedronlist; REAL *tetrahedronattributelist; REAL *tetrahedronvolumelist; int *neighborlist; int numberoftetrahedra; int numberofcorners; int numberoftetrahedronattributes; // `facetlist': An array of facets. Each entry is a structure of facet. // `facetmarkerlist': An array of facet markers; one int per facet. facet *facetlist; int *facetmarkerlist; int numberoffacets; // `holelist': An array of holes. The first hole's x, y and z // coordinates are at indices [0], [1] and [2], followed by the // remaining holes. Three REALs per hole. REAL *holelist; int numberofholes; // `regionlist': An array of regional attributes and volume constraints. // The first constraint's x, y and z coordinates are at indices [0], // [1] and [2], followed by the regional attribute at index [3], foll- // owed by the maximum volume at index [4]. Five REALs per constraint. // Note that each regional attribute is used only if you select the `A' // switch, and each volume constraint is used only if you select the // `a' switch (with no number following). REAL *regionlist; int numberofregions; // `facetconstraintlist': An array of facet maximal area constraints. // Two REALs per constraint. The first one is the facet marker (cast // it to int), the second is its maximum area bound. // Note the 'facetconstraintlist' is used only for the 'q' switch. REAL *facetconstraintlist; int numberoffacetconstraints; // `segmentconstraintlist': An array of segment max. length constraints. // Three REALs per constraint. The first two are the indices (pointing // into 'pointlist') of the endpoints of the segment, the third is its // maximum length bound. // Note the 'segmentconstraintlist' is used only for the 'q' switch. REAL *segmentconstraintlist; int numberofsegmentconstraints; // `nodeconstraintlist': An array of segment length constraints. Two // REALs per constraint. The first one is the index (pointing into // 'pointlist') of the node, the second is its edge length bound. // Note the 'nodeconstraintlist' is used only for the 'q' switch. REAL *nodeconstraintlist; int numberofnodeconstraints; // 'pbcgrouplist': An array of periodic boundary condition groups. pbcgroup *pbcgrouplist; int numberofpbcgroups; // `trifacelist': An array of triangular face endpoints. The first // face's endpoints are at indices [0], [1] and [2], followed by the // remaining faces. Three ints per face. // `adjtetlist': An array of adjacent tetrahedra to the faces of // trifacelist. Each face has at most two adjacent tets, the first // face's adjacent tets are at [0], [1]. Two ints per face. A '-1' // indicates outside (no adj. tet). This list is output when '-n' // switch is used. // `trifacemarkerlist': An array of face markers; one int per face. int *trifacelist; int *adjtetlist; int *trifacemarkerlist; int numberoftrifaces; // `edgelist': An array of edge endpoints. The first edge's endpoints // are at indices [0] and [1], followed by the remaining edges. Two // ints per edge. // `edgemarkerlist': An array of edge markers; one int per edge. int *edgelist; int *edgemarkerlist; int numberofedges; public: // Initialize routine. void initialize(); void deinitialize(); // Input & output routines. bool load_node_call(FILE* infile, int markers, char* nodefilename); bool load_node(char* filename); bool load_addnodes(char* filename); bool load_pbc(char* filename); bool load_var(char* filename); bool load_mtr(char* filename); bool load_poly(char* filename); bool load_off(char* filename); bool load_ply(char* filename); bool load_stl(char* filename); bool load_medit(char* filename); bool load_plc(char* filename, int object); bool load_tetmesh(char* filename); void save_nodes(char* filename); void save_elements(char* filename); void save_faces(char* filename); void save_edges(char* filename); void save_neighbors(char* filename); void save_poly(char* filename); // Read line and parse string functions. char *readline(char* string, FILE* infile, int *linenumber); char *findnextfield(char* string); char *readnumberline(char* string, FILE* infile, char* infilename); char *findnextnumber(char* string); // Constructor and destructor. tetgenio() {initialize();} ~tetgenio() {deinitialize();}};///////////////////////////////////////////////////////////////////////////////// //// The tetgenbehavior data type //// //// Used to parse command line switches and file names. //// //// It includes a list of variables corresponding to the commandline switches //// for control the behavior of TetGen. These varibales are all initialized //// to their default values. //// //// parse_commandline() provides an simple interface to set the vaules of the //// variables. It accepts the standard parameters (e.g., 'argc' and 'argv') //// that pass to C/C++ main() function. Alternatively a string which contains //// the command line options can be used as its parameter. //// //// You don't need to understand this data type. It can be implicitly called //// by the global function "tetrahedralize()" defined below. The necessary //// thing you need to know is the meaning of command line switches of TetGen. //// They are described in the third section of the user's manual. //// /////////////////////////////////////////////////////////////////////////////////class tetgenbehavior { public: // Labels define the objects which are acceptable by TetGen. They are // recognized by the file extensions. // - NODES, a list of nodes (.node); // - POLY, a piecewise linear complex (.poly or .smesh); // - OFF, a polyhedron (.off, Geomview's file format); // - PLY, a polyhedron (.ply, file format from gatech); // - STL, a surface mesh (.stl, stereolithography format); // - MEDIT, a surface mesh (.mesh, Medit's file format); // - MESH, a tetrahedral mesh (.ele). // If no extension is available, the imposed commandline switch // (-p or -r) implies the object. enum objecttype {NONE, NODES, POLY, OFF, PLY, STL, MEDIT, MESH}; // Variables of command line switches. Each variable is corresponding // to a specific switch and will be properly initialized. Read the // user's manul to find out the meaning of these switches. int plc; // '-p' switch, 0. int refine; // '-r' switch, 0. int quality; // '-q' switch, 0. int smooth; // '-s' switch, 0. int metric; // '-m' switch, 0. int bgmesh; // '-b' switch, 0. int varvolume; // '-a' switch without number, 0. int fixedvolume; // '-a' switch with number, 0. int insertaddpoints; // '-i' switch, 0. int regionattrib; // '-A' switch, 0. int offcenter; // '-R' switch, 0. int conformdel; // '-D' switch, 0. int diagnose; // '-d' switch, 0. int zeroindex; // '-z' switch, 0. int order; // element order, specified after '-o' switch, 1. int facesout; // '-f' switch, 0. int edgesout; // '-e' switch, 0. int neighout; // '-n' switch, 0. int meditview; // '-g' switch, 0. int gidview; // '-G' switch, 0. int geomview; // '-O' switch, 0. int nobound; // '-B' switch, 0. int nonodewritten; // '-N' switch, 0. int noelewritten; // '-E' switch, 0. int nofacewritten; // '-F' switch, 0. int noiterationnum; // '-I' switch, 0. int nomerge; // count of how often '-M' switch is selected, 0.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -