#include <CMLTetMesher.hpp>
Public Member Functions | |
Constructor/Destructor | |
| CMLTetMesher (CML::OutputMsg msg_level=CML::STANDARD) | |
| A class constructor with an optional output parameter. | |
| virtual | ~CMLTetMesher () |
| A virtual destructor for the class. | |
Mesh input | |
| bool | set_boundary_mesh (int num_points_in, double *const points, int num_tris, int *const tris, int num_free_points=0, double *const el_size=NULL, int *const point_ids=NULL) |
| Supply the surface mesh describing the volume boundary. | |
| bool | set_free_edges (int num_edges, int *const edges) |
| Supply interior edges that will be included in the tetrahedral mesh. | |
| bool | set_free_tris (int num_tris, int *const tris) |
| Supply interior triangles that will be included in the tetrahedral mesh. | |
| bool | set_tet_mesh (int num_points_in, double *const points, int num_tris, int *const tris, int num_tets, int *const tets, int num_free_points=0, double *const el_size=NULL, int *const point_ids=NULL) |
| Supply an initial tetrahedral mesh for remeshing. | |
| bool | set_background_mesh (int num_pnts_bgr, double *const pnts_bgr, int num_tets_bgr, int *const tets_bgr, double *const el_size_bgr) |
| Supply a background mesh to the tet-mesher for adaptive meshing. | |
Core mesher | |
| bool | generate_mesh (int &num_points_out, int &num_tets) |
| Generate a tetrahedral mesh for the volume. | |
| bool | regenerate_mesh (int &num_points_out, int &num_tets) |
| Regenerate a tetrahedral mesh for the volume. | |
Mesh output | |
| bool | get_mesh (int num_points_out, double *const points, int num_tets, int *const tets, double *const el_size=NULL) |
| Retrieve the generated tetrahedral mesh. | |
| int | get_points_buf (int buf_size, double *const points, int start_index=0) |
| Retrieve the generated points one buffer at a time. | |
| int | get_tets_buf (int buf_size, int *const tets, int start_index=0) |
| Retrieve the generated tetrahedrons one buffer at a time. | |
| int | get_sizes_buf (int buf_size, double *const el_size, int start_index=0) |
| Retrieve the generated element size at corresponding points one buffer at a time. | |
Mesher properties | |
| void | set_field_points (bool enable) |
| Enables or disables generation of field points. | |
| bool | get_field_points () |
| Returns the current setting for field points. | |
Message output control | |
| virtual CML::OutputMsg | get_msg_level () const |
| Get the value of the message level flag. | |
| virtual void | set_msg_level (CML::OutputMsg level) |
| Set the value of the message level flag. | |
| virtual void | open_log_file (const char *filename, bool append=false) |
| Open a log file to record algorithm output. | |
| virtual void | close_log_file () |
| Close an open log file. | |
| virtual void | set_message_handler (CubitMessageHandler *h) |
| Use an alternate output message handler. | |
CAMAL version | |
| virtual int | get_major_version () const |
| Returns the major version number. | |
| virtual int | get_minor_version () const |
| Returns the minor version number. | |
| virtual int | get_subminor_version () const |
| Returns the subminor version (patch) number. | |
| virtual int | get_allint_version () const |
| Returns version number as one integer. | |
| virtual const char * | get_version_string () |
| Returns version number as a string. | |
Mesher properties | |
| virtual void | set_sizing_function (CML::SizingType type, double size1=-1.0, double size2=-1.0) |
| Set a sizing function and its parameters. | |
An existing tetrahedral mesh may be used a input also. If it is, then the tetrahedral mesher attempts to improve the mesh by adding additional field points and elements.
| CMLTetMesher::CMLTetMesher | ( | CML::OutputMsg | msg_level = CML::STANDARD |
) |
A class constructor with an optional output parameter.
| msg_level | An enumberated constant that controls the amount of output. The default value CML::STANDARD. A value of CML::NONE causes the tet-mesher to suppress all output. |
| virtual void CMLTetMesher::close_log_file | ( | ) | [virtual] |
| bool CMLTetMesher::generate_mesh | ( | int & | num_points_out, | |
| int & | num_tets | |||
| ) |
Generate a tetrahedral mesh for the volume.
| num_points_out | The total number of point generated including the input points | |
| num_tets | The number of tetrahedra generated |
| bool CMLTetMesher::get_mesh | ( | int | num_points_out, | |
| double *const | points, | |||
| int | num_tets, | |||
| int *const | tets, | |||
| double *const | el_size = NULL | |||
| ) |
Retrieve the generated tetrahedral mesh.
| num_points_out | The number of points to retrieve. This should be the same number returned by generate_mesh(). | |
| points | An array of points in the generated mesh (array size = 3 * num_points_out.) The first three array values are the x, y and z coordinates of the first point. The next three are for the second point, then the third, etc. | |
| num_tets | The number of tetrahedra to retrieve. This should be the same number returned by generate_mesh(). | |
| tets | An array defining the connectivity of the generated mesh (array size = 4 * num_tets.) The first four array values are the indices in the points array of the first tetrahedron's corner points. The second four describes the second tetrahedron, then the third, etc. The first three indices of a tetrahedron are entered in a counter-clockwise direction around one face when viewed from outside the tetrahedron. The fourth index is the corner opposite this face. Indices range from 0 to num_points_out - 1 since the points array is zero-based. | |
| el_size | An optional array of edge lengths corresponding to the points (array size = num_points_out.) This array of edge lengths may be useful in a subsequent call to the adaptive tet-mesher. |
| virtual CML::OutputMsg CMLTetMesher::get_msg_level | ( | ) | const [virtual] |
Get the value of the message level flag.
| int CMLTetMesher::get_points_buf | ( | int | buf_size, | |
| double *const | points, | |||
| int | start_index = 0 | |||
| ) |
Retrieve the generated points one buffer at a time.
| buf_size | The length of the points array. | |
| points | The output buffer for points. A maximum of length/3 points will be copied to this buffer. | |
| start_index | The index of the first output point. |
| int CMLTetMesher::get_sizes_buf | ( | int | buf_size, | |
| double *const | el_size, | |||
| int | start_index = 0 | |||
| ) |
Retrieve the generated element size at corresponding points one buffer at a time.
| buf_size | The length of the el_size array. | |
| el_size | The output buffer for element size. A maximum of length size values will be copied to this buffer. | |
| start_index | The index of the first output size value. |
| int CMLTetMesher::get_tets_buf | ( | int | buf_size, | |
| int *const | tets, | |||
| int | start_index = 0 | |||
| ) |
Retrieve the generated tetrahedrons one buffer at a time.
| buf_size | The length of the tets buffer array. | |
| tets | The output buffer for tetrahedrons. A maximum of length/4 tetrahedrons will be copied to this buffer. | |
| start_index | The index of the first output tetrahedron. |
| virtual void CMLTetMesher::open_log_file | ( | const char * | filename, | |
| bool | append = false | |||
| ) | [virtual] |
Open a log file to record algorithm output.
| filename | The log file name | |
| append | Appends to the file filename if it exists |
| bool CMLTetMesher::regenerate_mesh | ( | int & | num_points_out, | |
| int & | num_tets | |||
| ) |
Regenerate a tetrahedral mesh for the volume.
| num_points_out | The total number of point generated including the input points | |
| num_tets | The number of tetrahedra generated |
| bool CMLTetMesher::set_background_mesh | ( | int | num_pnts_bgr, | |
| double *const | pnts_bgr, | |||
| int | num_tets_bgr, | |||
| int *const | tets_bgr, | |||
| double *const | el_size_bgr | |||
| ) |
Supply a background mesh to the tet-mesher for adaptive meshing.
| num_pnts_bgr | The number of points in the background mesh. | |
| pnts_bgr | The points in the background mesh (array size = 3 * num_pnts_bgr.) The first three array values are the x, y and z coordinates of the first point in the background mesh. The next three are for the second point, then the third, etc. | |
| num_tets_bgr | The number of tetrahedra in the background mesh. | |
| tets_bgr | Connectivity of the tetrahedra in the background mesh (array size = 4 * num_tets_bgr.) The first four array values are the indices in the points array of the first tetrahedron's corner points. The second four describes the second tetrahedron, then the third, etc. The first three indices of a tetrahedron are entered in a counter-clockwise direction around one face when viewed from outside the tetrahedron. The fourth index is the corner opposite this face. Indices range from 0 to num_points_out - 1 since the points array is zero-based. | |
| el_size_bgr | The desired edge length at each point in the background mesh (array size = num_pnts_bgr.) Each value in the element size array cooresponds to the point at the same index. |
| bool CMLTetMesher::set_boundary_mesh | ( | int | num_points_in, | |
| double *const | points, | |||
| int | num_tris, | |||
| int *const | tris, | |||
| int | num_free_points = 0, |
|||
| double *const | el_size = NULL, |
|||
| int *const | point_ids = NULL | |||
| ) |
Supply the surface mesh describing the volume boundary.
| num_points_in | The number of points in the surface mesh plus any optional free interior points. | |
| points | An array of points (array size = 3 * num_points_in.) The first three array values are the x, y and z coordinates of the first point. The next three are for the second point, then the third, etc. Free interior points, if any, will appear in the final tetrahedral mesh. | |
| num_tris | The number of triangles in the surface mesh. | |
| tris | An array defining the connectivity of the surface mesh (array size = 3 * num_tris.) The first three array values (triplet) are the indices in the points array of the first triangle's corner points. The second triplet describes the second triangle, then the third, etc. The indices are entered in a counter-clockwise direction when viewed from outside the volume. Indices range from 0 to num_points_in - 1 since the points array is zero-based. | |
| num_free_points | The number of optional interior points that will appear in the final tetrahedral mesh. These points may be used to define free edges and free triangles that are not part of the boundary surface. These edges and triangles will also appear in the final mesh. |
| el_size | An optional array of edge lengths cooresponding to the points (array size = num_points_in.) Edge lengths at free points define the size of internal tetrahedra. All others may be 0. There is no reason to specify this array if the model has no free interior points. | |
| point_ids | An optional array whose values are the user's identifiers for the points (array size = num_points_in.) Messages generated by the tet-mesher use this array to translate from internal point identifiers to user identifiers. |
| void CMLTetMesher::set_field_points | ( | bool | enable | ) |
Enables or disables generation of field points.
| enable | True to enable generation of field points; false to disable. The default setting is true. |
| bool CMLTetMesher::set_free_edges | ( | int | num_edges, | |
| int *const | edges | |||
| ) |
Supply interior edges that will be included in the tetrahedral mesh.
| num_edges | The number of edges interior to the volume. | |
| edges | An array defining the end points of the free edges (array size = 2 * num_edges.) The first two array values are the indices of the points at each end of the first edge. The next two are the indices of the second edge's end-points, then the third, etc. Indices range from 0 to num_points_in - 1 since the points array is zero-based. |
| bool CMLTetMesher::set_free_tris | ( | int | num_tris, | |
| int *const | tris | |||
| ) |
Supply interior triangles that will be included in the tetrahedral mesh.
| num_tris | The number of triangles interior to the volume. | |
| tris | An array defining the connectivity of the free triangles (array size = 3 * num_tris.) The first three array values (triplet) are the indices in the points array of the first triangle's corner points. The second triplet describes the second triangle, then the third, etc. Indices range from 0 to num_points_in - 1 since the points array is zero-based. |
| virtual void CMLTetMesher::set_message_handler | ( | CubitMessageHandler * | h | ) | [virtual] |
Use an alternate output message handler.
| h | A pointer to a message handler derived from CubitMessageHandler. |
| virtual void CMLTetMesher::set_msg_level | ( | CML::OutputMsg | level | ) | [virtual] |
Set the value of the message level flag.
| level | The value of the message level is an enumerated constant. The default value is CML::STANDARD and generates minimal output. A value of CML::VERBOSE generates more output, and a value of CML::DEBUG generates output helpful to developers. A value of CML::NONE causes the mesher to suppress all output. |
| virtual void CMLTetMesher::set_sizing_function | ( | CML::SizingType | type, | |
| double | size1 = -1.0, |
|||
| double | size2 = -1.0 | |||
| ) | [virtual] |
Set a sizing function and its parameters.
| type | The enum of sizing function for the triangle mesher or paver. | |
| size1 | The constant size for CONSTANT_SIZING function and the minimum size for all others. | |
| size2 | The maximum size for all sizing functions. |
| bool CMLTetMesher::set_tet_mesh | ( | int | num_points_in, | |
| double *const | points, | |||
| int | num_tris, | |||
| int *const | tris, | |||
| int | num_tets, | |||
| int *const | tets, | |||
| int | num_free_points = 0, |
|||
| double *const | el_size = NULL, |
|||
| int *const | point_ids = NULL | |||
| ) |
Supply an initial tetrahedral mesh for remeshing.
| num_points_in | The number of points in the surface mesh plus any optional free interior points. | |
| points | An array of points (array size = 3 * num_points_in.) The first three array values are the x, y and z coordinates of the first point. The next three are for the second point, then the third, etc. Free interior points, if any, will appear in the final tetrahedral mesh. | |
| num_tris | The number of triangles in the surface mesh. | |
| tris | An array defining the connectivity of the surface mesh (array size = 3 * num_tris.) The first three array values (triplet) are the indices in the points array of the first triangle's corner points. The second triplet describes the second triangle, then the third, etc. The indices are entered in a counter-clockwise direction when viewed from outside the volume. Indices range from 0 to num_points_in - 1 since the points array is zero-based. | |
| num_tets | The number of tetrahedra in the initial mesh. | |
| tets | Connectivity of the tetrahedra in the initial mesh (array size = 4 * num_tets_bgr.) The first four array values are the indices in the points array of the first tetrahedron's corner points. The second four describes the second tetrahedron, then the third, etc. The first three indices of a tetrahedron are entered in a counter-clockwise direction around one face when viewed from outside the tetrahedron. The fourth index is the corner opposite this face. Indices range from 0 to num_points_out - 1 since the points array is zero-based. | |
| num_free_points | The number of optional interior points that will appear in the final tetrahedral mesh. These points may be used to define free edges and free triangles that are not part of the boundary surface. These edges and triangles will also appear in the final mesh. |
| el_size | An optional array of edge lengths cooresponding to the points (array size = num_points_in.) Edge lengths at free points define the size of internal tetrahedra. All others may be 0. There is no reason to specify this array if the model has no free interior points. | |
| point_ids | An optional array whose values are the user's identifiers for the points (array size = num_points_in.) Messages generated by the tet-mesher use this array to translate from internal point identifiers to user identifiers. |
CAMAL 5.2-0 documentation created on 1 Jun 2010
Comments to csimsoft.com