The MeshSet class stores one or more Mesquite::Mesh pointers and manages access to the mesh information. More...
#include <MeshSet.hpp>
Public Member Functions | |
MeshSet () | |
~MeshSet () | |
void | add_mesh (Mesquite::Mesh *mesh, MsqError &err) |
adds a mesh to the MeshSet. More... | |
void | set_domain_constraint (MeshDomain *domain, MsqError &err) |
Sets the geometrical domain for the MeshSet. More... | |
Mesquite::MeshDomain * | get_domain_constraint () |
Returns the domain associated with the MeshSet from which the Patch originates. More... | |
void | get_meshes (msq_std::list< Mesquite::Mesh * > &mesh_list) const |
returns the list of mesh pointers previously added. More... | |
int | space_dim () const |
Returns the number of coordinates in the Mesh's geometric coordinate system. More... | |
bool | get_next_patch (PatchData &pd, PatchDataUser *pd_user, MsqError &err) |
Gets the next PatchData. More... | |
bool | get_next_patch (PatchData &pd, PatchDataParameters &pd_params, MsqError &err) |
void | reset (MsqError &err) |
Resets the MeshSet object so that get_next_patch() will restart its iterations at the first vertex. More... | |
void | update_mesh (const PatchData &pd, MsqError &err) |
Updates the coordinates in the underlying mesh with the coordinates stored in PatchData. More... | |
void | set_flag_to_cull (MsqVertex::FlagMask f_m) |
Sets the cullFlag. More... | |
bool | clear_all_soft_fixed_flags (MsqError &err) |
void | write_vtk (const char *out_filebase, MsqError &err) |
void | write_gnuplot (const char *out_filebase, MsqError &err) |
Mesh * | get_current_mesh () |
MeshSet () | |
~MeshSet () | |
void | add_mesh (Mesquite::Mesh *mesh, MsqError &err) |
adds a mesh to the MeshSet. More... | |
void | set_domain_constraint (MeshDomain *domain, MsqError &err) |
Sets the geometrical domain for the MeshSet. More... | |
Mesquite::MeshDomain * | get_domain_constraint () |
Returns the domain associated with the MeshSet from which the Patch originates. More... | |
void | get_meshes (msq_std::list< Mesquite::Mesh * > &mesh_list) const |
returns the list of mesh pointers previously added. More... | |
int | space_dim () const |
Returns the number of coordinates in the Mesh's geometric coordinate system. More... | |
bool | get_next_patch (PatchData &pd, PatchDataUser *pd_user, MsqError &err) |
Gets the next PatchData. More... | |
bool | get_next_patch (PatchData &pd, PatchDataParameters &pd_params, MsqError &err) |
void | reset (MsqError &err) |
Resets the MeshSet object so that get_next_patch() will restart its iterations at the first vertex. More... | |
void | update_mesh (const PatchData &pd, MsqError &err) |
Updates the coordinates in the underlying mesh with the coordinates stored in PatchData. More... | |
void | set_flag_to_cull (MsqVertex::FlagMask f_m) |
Sets the cullFlag. More... | |
bool | clear_all_soft_fixed_flags (MsqError &err) |
void | write_vtk (const char *out_filebase, MsqError &err) |
void | write_gnuplot (const char *out_filebase, MsqError &err) |
Mesh * | get_current_mesh () |
Private Member Functions | |
bool | get_next_elem_on_vert_patch (PatchData &, PatchDataParameters &, MsqError &) |
bool | get_next_global_patch (PatchData &, PatchDataParameters &, MsqError &) |
bool | get_next_elem_on_vert_patch (PatchData &, PatchDataParameters &, MsqError &) |
bool | get_next_global_patch (PatchData &, PatchDataParameters &, MsqError &) |
Private Attributes | |
msq_std::list< Mesquite::Mesh * > | meshSet |
Meshes in this MeshSet. More... | |
msq_std::list< Mesquite::Mesh * > ::iterator | currentMesh |
Keeps track of which Mesh* we're currently working with in get_next_patch(). More... | |
Mesquite::VertexIterator * | vertexIterator |
Keeps track of where we are in the current mesh's vertex list. More... | |
int | spaceDim |
The number of coordinates in this mesh (2D or 3D) More... | |
Mesquite::EntityTopology | elementType |
The topological dimension of the elements in this MeshSet, where Mesquite::TRIANGLE indicates 2D elements (faces) and Mesquite::TETRAHEDRON indicates 3D elements (regions). More... | |
msq_stdc::size_t * | csrOffsets |
These are arrays that we cache so we don't have to reallocate at every patch. More... | |
Mesquite::EntityTopology * | elemTopologies |
bool * | vertexOnBoundary |
msq_stdc::size_t | csrOffsetsSize |
msq_stdc::size_t | vertArraySize |
msq_stdc::size_t | elemArraySize |
Mesquite::MeshDomain * | mDomain |
Mesquite::MsqVertex::FlagMask | cullFlag |
The MeshSet class stores one or more Mesquite::Mesh pointers and manages access to the mesh information.
MeshSet objects are passed to the various Mesquite algorithms in order to assess the quality, improve the mesh, etc...
Definition at line 69 of file includeLinks/MeshSet.hpp.
MeshSet | ( | ) |
Definition at line 65 of file Mesh/MeshSet.cpp.
References MeshSet::cullFlag, and MsqVertex::MSQ_SOFT_FIXED.
~MeshSet | ( | ) |
Definition at line 83 of file Mesh/MeshSet.cpp.
References MeshSet::csrOffsets, MeshSet::elemTopologies, MeshSet::meshSet, MeshSet::vertexIterator, and MeshSet::vertexOnBoundary.
MeshSet | ( | ) |
~MeshSet | ( | ) |
void add_mesh | ( | Mesquite::Mesh * | mh, |
MsqError & | err | ||
) |
adds a mesh to the MeshSet.
If several meshes are added, the mesh information will be retrieved seamlessly, as if dealing with a single mesh.
adds a Mesquite::Mesh to the MeshSet. If used several times, it concatenates the vertices from several meshes into one Mesquite::MeshSet.
Definition at line 108 of file Mesh/MeshSet.cpp.
References Mesh::get_geometric_dimension(), MsqError::INVALID_STATE, MeshSet::meshSet, MSQ_ERRRTN, MSQ_SETERR, and MeshSet::spaceDim.
Referenced by Rocmop::smooth_mesquite().
void add_mesh | ( | Mesquite::Mesh * | mesh, |
MsqError & | err | ||
) |
adds a mesh to the MeshSet.
If several meshes are added, the mesh information will be retrieved seamlessly, as if dealing with a single mesh.
bool clear_all_soft_fixed_flags | ( | MsqError & | err | ) |
Definition at line 596 of file Mesh/MeshSet.cpp.
References MeshSet::currentMesh, EntityIterator::is_at_end(), MeshSet::meshSet, MSQ_CHKERR, MeshSet::reset(), and MeshSet::vertexIterator.
Referenced by TerminationCriterion::cleanup().
bool clear_all_soft_fixed_flags | ( | MsqError & | err | ) |
|
inline |
Definition at line 146 of file includeLinks/MeshSet.hpp.
References MeshSet::currentMesh, and MeshSet::meshSet.
Referenced by CornerTagHandles::get_current_mesh().
|
inline |
Definition at line 146 of file src/Mesh/MeshSet.hpp.
References MeshSet::currentMesh, and MeshSet::meshSet.
|
inline |
Returns the domain associated with the MeshSet from which the Patch originates.
NULL if no domain is defined.
Definition at line 88 of file src/Mesh/MeshSet.hpp.
References MeshSet::mDomain.
|
inline |
Returns the domain associated with the MeshSet from which the Patch originates.
NULL if no domain is defined.
Definition at line 88 of file includeLinks/MeshSet.hpp.
References MeshSet::mDomain.
Referenced by PatchData::get_domain_normal_at_element(), PatchData::get_domain_normal_at_vertex(), PatchData::get_domain_normals_at_corners(), PatchData::set_mesh_set(), PatchData::snap_vertex_to_domain(), and PatchData::update_cached_normals().
|
inline |
returns the list of mesh pointers previously added.
Definition at line 92 of file includeLinks/MeshSet.hpp.
References MeshSet::meshSet.
|
inline |
returns the list of mesh pointers previously added.
Definition at line 92 of file src/Mesh/MeshSet.hpp.
References MeshSet::meshSet.
|
private |
|
private |
Definition at line 208 of file Mesh/MeshSet.cpp.
References MeshSet::csrOffsets, MeshSet::csrOffsetsSize, MeshSet::cullFlag, MeshSet::currentMesh, PatchData::domainHint, MeshSet::elemArraySize, PatchData::elemConnectivityArray, PatchData::elementArray, PatchData::elementHandlesArray, PatchData::ELEMENTS_ON_VERTEX_PATCH, MeshSet::elemTopologies, PatchDataParameters::get_culling_method_bits(), PatchData::get_element_array(), PatchDataParameters::get_nb_layers(), PatchData::get_vertex_array(), MeshDomain::hint(), i, PatchData::initialize_data(), EntityIterator::is_at_end(), MeshSet::mDomain, MeshSet::meshSet, MSQ_CHKERR, MSQ_ERRZERO, MsqVertex::MSQ_HARD_FIXED, MSQ_SETERR, PatchData::mType, PatchData::NO_BOUNDARY_VTX, Mesquite::NO_DOMAIN_HINT, PatchData::NO_INTERIOR_VTX, MsqError::NOT_IMPLEMENTED, MeshSet::reset(), PatchDataMem< X >::resize(), PatchData::vertexArray, MsqVertex::vertexBitFlags, PatchData::vertexHandlesArray, and MeshSet::vertexIterator.
Referenced by MeshSet::get_next_patch().
|
private |
Definition at line 425 of file Mesh/MeshSet.cpp.
References PatchData::domainHint, PatchData::elemConnectivityArray, PatchData::elementArray, PatchData::elementHandlesArray, PatchData::get_element_array(), PatchData::get_vertex_array(), PatchData::GLOBAL_PATCH, MeshDomain::hint(), i, PatchData::initialize_data(), MeshSet::mDomain, MeshSet::meshSet, MSQ_CHKERR, MSQ_ERRZERO, MsqVertex::MSQ_HARD_FIXED, MSQ_SETERR, PatchData::mType, Mesquite::NO_DOMAIN_HINT, MsqError::NOT_IMPLEMENTED, MeshSet::reset(), PatchDataMem< X >::resize(), PatchDataMem< X >::size(), MeshSet::vertArraySize, PatchData::vertexArray, MsqVertex::vertexBitFlags, PatchData::vertexHandlesArray, and MeshSet::vertexOnBoundary.
Referenced by MeshSet::get_next_patch().
|
private |
|
inline |
Gets the next PatchData.
The type of the patch is usually set on the algorithm with set_patch_type() and propagated to the MeshSet. This version of the get_next_patch() function is the most often used. It actually delegates to the original get_next_patch function, which has a slightly different signature.
Definition at line 107 of file src/Mesh/MeshSet.hpp.
References PatchDataUser::get_all_parameters(), and MeshSet::get_next_patch().
|
inline |
Gets the next PatchData.
The type of the patch is usually set on the algorithm with set_patch_type() and propagated to the MeshSet. This version of the get_next_patch() function is the most often used. It actually delegates to the original get_next_patch function, which has a slightly different signature.
Definition at line 107 of file includeLinks/MeshSet.hpp.
References PatchDataUser::get_all_parameters().
Referenced by TerminationCriterion::accumulate_outer(), TargetCalculator::compute_reference_corner_matrices(), WTargetCalculator::compute_target_matrices(), LVQDTargetCalculator::compute_target_matrices(), MeshSet::get_next_patch(), VertexMover::loop_over_mesh(), MeshTransform::loop_over_mesh(), QualityAssessor::loop_over_mesh(), TerminationCriterion::reset_outer(), InstructionQueue::run_instructions(), MeshSet::write_gnuplot(), and MeshSet::write_vtk().
bool get_next_patch | ( | PatchData & | pd, |
PatchDataParameters & | pd_params, | ||
MsqError & | err | ||
) |
This version of get_next_patch() is rarely used, but this is where the implementation actually is. See the most frequently used signature: get_next_patch(PatchData &pd, PatchDataUser* pd_user, MsqError &err).
bool get_next_patch | ( | PatchData & | pd, |
PatchDataParameters & | pd_params, | ||
MsqError & | err | ||
) |
This version of get_next_patch() is rarely used, but this is where the implementation actually is. See the most frequently used signature: get_next_patch(PatchData &pd, PatchDataUser* pd_user, MsqError &err).
Definition at line 175 of file Mesh/MeshSet.cpp.
References PatchData::clear(), PatchData::domainSet, PatchData::ELEMENTS_ON_VERTEX_PATCH, MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), PatchDataParameters::get_patch_type(), PatchData::GLOBAL_PATCH, MeshSet::mDomain, PatchData::meshSet, MSQ_CHKERR, MSQ_FUNCTION_TIMER, MSQ_SETERR, and MsqError::NOT_IMPLEMENTED.
void reset | ( | MsqError & | err | ) |
Resets the MeshSet object so that get_next_patch() will restart its iterations at the first vertex.
Resets the MeshSet object. The current vertex is set back to the first vertex in the first mesh handle.
Definition at line 131 of file Mesh/MeshSet.cpp.
References MeshSet::currentMesh, MeshSet::meshSet, MSQ_ERRRTN, EntityIterator::restart(), and MeshSet::vertexIterator.
Referenced by MeshSet::clear_all_soft_fixed_flags(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), VertexMover::loop_over_mesh(), and TargetCalculator::reset_reference_meshset().
void reset | ( | MsqError & | err | ) |
Resets the MeshSet object so that get_next_patch() will restart its iterations at the first vertex.
void set_domain_constraint | ( | MeshDomain * | domain, |
MsqError & | err | ||
) |
Sets the geometrical domain for the MeshSet.
This can only be used with surface meshes.
Definition at line 157 of file Mesh/MeshSet.cpp.
References MeshSet::mDomain.
void set_domain_constraint | ( | MeshDomain * | domain, |
MsqError & | err | ||
) |
Sets the geometrical domain for the MeshSet.
This can only be used with surface meshes.
|
inline |
Sets the cullFlag.
This flag is used to dermine which vertices should be culled. For local schemes, get_next_patch() will not build a patch around a a culled vertex.
Definition at line 135 of file src/Mesh/MeshSet.hpp.
References MeshSet::cullFlag.
|
inline |
Sets the cullFlag.
This flag is used to dermine which vertices should be culled. For local schemes, get_next_patch() will not build a patch around a a culled vertex.
Definition at line 135 of file includeLinks/MeshSet.hpp.
References MeshSet::cullFlag.
|
inline |
Returns the number of coordinates in the Mesh's geometric coordinate system.
Definition at line 98 of file src/Mesh/MeshSet.hpp.
References MeshSet::spaceDim.
|
inline |
Returns the number of coordinates in the Mesh's geometric coordinate system.
Definition at line 98 of file includeLinks/MeshSet.hpp.
References MeshSet::spaceDim.
Referenced by NonSmoothSteepestDescent::optimize_vertex_positions().
Updates the coordinates in the underlying mesh with the coordinates stored in PatchData.
Updates the coordinates in the underlying mesh with the coordinates stored in PatchData.
Definition at line 524 of file Mesh/MeshSet.cpp.
References PatchData::ELEMENTS_ON_VERTEX_PATCH, PatchData::GLOBAL_PATCH, i, EntityIterator::is_at_end(), MSQ_ERRRTN, MSQ_FUNCTION_TIMER, MsqVertex::MSQ_HARD_FIXED, MSQ_SETERR, MsqError::NOT_IMPLEMENTED, PatchData::num_nodes(), PatchData::type(), PatchData::vertexArray, and PatchData::vertexHandlesArray.
Referenced by PatchData::update_mesh().
void write_gnuplot | ( | const char * | out_filebase, |
MsqError & | err | ||
) |
void write_gnuplot | ( | const char * | out_filebase, |
Mesquite::MsqError & | err | ||
) |
Writes a gnuplot file directly from the MeshSet. This means that any mesh imported successfully into Mesquite can be outputed in gnuplot format.
Within gnuplot, use plot 'file1.gpt' w l, 'file2.gpt' w l
This is not geared for performance, since it has to load a global Patch from the mesh to write a mesh file.
Definition at line 755 of file Mesh/MeshSet.cpp.
References PatchData::elementArray, MsqError::FILE_ACCESS, MeshSet::get_next_patch(), PatchData::GLOBAL_PATCH, i, j, MSQ_ERRRTN, MSQ_SETERR, PatchDataParameters::no_culling_method(), PatchData::num_elements(), PatchDataParameters::set_patch_type(), and PatchData::vertexArray.
void write_vtk | ( | const char * | out_filebase, |
MsqError & | err | ||
) |
void write_vtk | ( | const char * | out_filename, |
Mesquite::MsqError & | err | ||
) |
Writes a VTK file directly from the MeshSet. This means that any mesh imported successfully into Mesquite can be outputed in VTK format. This is not geared for performance, since it has to load a global Patch from the mesh to write a mesh file.
Definition at line 651 of file Mesh/MeshSet.cpp.
References PatchData::elementArray, MsqError::FILE_ACCESS, MeshSet::get_next_patch(), PatchData::GLOBAL_PATCH, Mesquite::HEXAHEDRON, i, j, MSQ_ERRRTN, MSQ_SETERR, PatchDataParameters::no_culling_method(), MsqError::NOT_IMPLEMENTED, PatchData::num_elements(), PatchData::num_nodes(), Mesquite::QUADRILATERAL, PatchDataParameters::set_patch_type(), Mesquite::TETRAHEDRON, Mesquite::TRIANGLE, and PatchData::vertexArray.
|
private |
These are arrays that we cache so we don't have to reallocate at every patch.
Definition at line 172 of file includeLinks/MeshSet.hpp.
Referenced by MeshSet::get_next_elem_on_vert_patch(), and MeshSet::~MeshSet().
|
private |
Definition at line 178 of file includeLinks/MeshSet.hpp.
Referenced by MeshSet::get_next_elem_on_vert_patch().
|
private |
Definition at line 188 of file includeLinks/MeshSet.hpp.
Referenced by MeshSet::get_next_elem_on_vert_patch(), MeshSet::MeshSet(), and MeshSet::set_flag_to_cull().
|
private |
Keeps track of which Mesh* we're currently working with in get_next_patch().
Definition at line 158 of file includeLinks/MeshSet.hpp.
Referenced by MeshSet::clear_all_soft_fixed_flags(), MeshSet::get_current_mesh(), MeshSet::get_next_elem_on_vert_patch(), and MeshSet::reset().
|
private |
Definition at line 181 of file includeLinks/MeshSet.hpp.
Referenced by MeshSet::get_next_elem_on_vert_patch().
|
private |
The topological dimension of the elements in this MeshSet, where Mesquite::TRIANGLE indicates 2D elements (faces) and Mesquite::TETRAHEDRON indicates 3D elements (regions).
Must be the same for all meshes added with add_mesh().
Definition at line 168 of file includeLinks/MeshSet.hpp.
|
private |
Definition at line 176 of file includeLinks/MeshSet.hpp.
Referenced by MeshSet::get_next_elem_on_vert_patch(), and MeshSet::~MeshSet().
|
private |
Definition at line 184 of file includeLinks/MeshSet.hpp.
Referenced by MeshSet::get_domain_constraint(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), MeshSet::get_next_patch(), and MeshSet::set_domain_constraint().
|
private |
Meshes in this MeshSet.
Definition at line 155 of file includeLinks/MeshSet.hpp.
Referenced by MeshSet::add_mesh(), MeshSet::clear_all_soft_fixed_flags(), MeshSet::get_current_mesh(), MeshSet::get_meshes(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::get_next_global_patch(), MeshSet::reset(), and MeshSet::~MeshSet().
|
private |
The number of coordinates in this mesh (2D or 3D)
Definition at line 162 of file includeLinks/MeshSet.hpp.
Referenced by MeshSet::add_mesh(), and MeshSet::space_dim().
|
private |
Definition at line 180 of file includeLinks/MeshSet.hpp.
Referenced by MeshSet::get_next_global_patch().
|
private |
Keeps track of where we are in the current mesh's vertex list.
Definition at line 160 of file includeLinks/MeshSet.hpp.
Referenced by MeshSet::clear_all_soft_fixed_flags(), MeshSet::get_next_elem_on_vert_patch(), MeshSet::reset(), and MeshSet::~MeshSet().
|
private |
Definition at line 177 of file includeLinks/MeshSet.hpp.
Referenced by MeshSet::get_next_global_patch(), and MeshSet::~MeshSet().