MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <MeshInterface.hpp>
Public Member Functions | |
MeshDomainAssoc (MBMesquite::Mesh *mesh, MBMesquite::MeshDomain *domain, bool full_compatibility_check=false, bool proceed=false, bool skip_compatibility_check=false) | |
Constructor. | |
~MeshDomainAssoc () | |
MBMesquite::Mesh * | get_mesh () |
get associated mesh | |
MBMesquite::MeshDomain * | get_domain () |
get associated domain | |
bool | are_compatible () |
Private Attributes | |
MBMesquite::Mesh * | mMesh |
MBMesquite::MeshDomain * | mMeshDomain |
bool | mesh_and_domain_are_compatible |
The MeshDomainAssoc class provides an association of a Mesh instance with a MeshDomain instance. The mesh is checked to verify that it is compatibile with the associated MeshDomain. If the two are not compatible, the MeshDomainAssoc instace is not created.
Definition at line 480 of file MeshInterface.hpp.
MBMesquite::MeshDomainAssoc::MeshDomainAssoc | ( | MBMesquite::Mesh * | mesh, |
MBMesquite::MeshDomain * | domain, | ||
bool | full_compatibility_check = false , |
||
bool | proceed = false , |
||
bool | skip_compatibility_check = false |
||
) | [inline] |
Constructor.
mesh | The mesh instance being associated param domain The domain being associated param full_compatibility_check Controls how many vertices will be checked for compatibility with the associated domain. When false, only the first vertex of the mesh is checked for compatibility. When true, all vertices of the mesh are checked. param proceed Controls what Mesquite will do if the compatibility check fails. When false, mesquite terminates i execution. When true, execution continues. param skip_compatibility_checki when true, does not perform the compatibility check. When false, the check is performed. |
Definition at line 497 of file MeshInterface.hpp.
References MBMesquite::Vector3D::distance_between(), and tolerance.
: mMesh( mesh ), mMeshDomain( domain ), mesh_and_domain_are_compatible( false ) { // check for real instance. If either value is NULL then it's just an // instance created to facilitate passing of just a mesh or domain // also, check if skipping the compatibility check was requested if( mesh && domain && !skip_compatibility_check ) { MsqError err; double tolerance = 1.0e-3; std::vector< Mesh::VertexHandle > vert_handles; mMesh->get_all_vertices( vert_handles, err ); MsqVertex mesh_vertex, domain_vertex; Vector3D normal; double distance; std::vector< int >::size_type i, times_to_loop; if( full_compatibility_check ) times_to_loop = vert_handles.size(); else times_to_loop = 1; mesh_and_domain_are_compatible = true; for( i = 0; i < times_to_loop; ++i ) { mMesh->vertices_get_coordinates( &vert_handles[i], &mesh_vertex, 1, err ); mMeshDomain->closest_point( vert_handles[i], Vector3D( mesh_vertex ), domain_vertex, normal, err ); distance = Vector3D::distance_between( mesh_vertex, domain_vertex ); if( distance > tolerance ) { mesh_and_domain_are_compatible = false; std::cout << "Warning: Mesh and Domain are not compatibile" << std::endl; if( !proceed ) { std::cout << "Terminating due to Mesh/Domain incompatibility" << std::endl; throw "Terminating due to Mesh/Domain incompatibility"; } break; // exits for loop when not compatbile but should not terminate } } } }
MBMesquite::MeshDomainAssoc::~MeshDomainAssoc | ( | ) | [inline] |
Definition at line 546 of file MeshInterface.hpp.
{};
bool MBMesquite::MeshDomainAssoc::are_compatible | ( | ) | [inline] |
Definition at line 572 of file MeshInterface.hpp.
{ return mesh_and_domain_are_compatible; };
get associated domain
Return the domain associated with this instance.
Definition at line 561 of file MeshInterface.hpp.
Referenced by MBMesquite::ObjectiveFunctionTemplate::initialize_block_coordinate_descent(), MBMesquite::Instruction::initialize_vertex_byte(), MBMesquite::TargetWriter::loop_over_mesh(), MBMesquite::VertexMover::loop_over_mesh(), MBMesquite::SlaveBoundaryVertices::loop_over_mesh(), MBMesquite::QualityAssessor::loop_over_mesh_internal(), MBMesquite::InstructionQueue::run_common(), run_global_smoother(), run_local_smoother2(), run_quality_optimizer(), run_solution_mesh_optimizer(), MBMesquite::ShapeImprover::run_wrapper(), ParShapeImprover::ParShapeImprovementWrapper::run_wrapper(), and MBMesquite::DeformingDomainWrapper::run_wrapper().
{ return mMeshDomain; };
MBMesquite::Mesh* MBMesquite::MeshDomainAssoc::get_mesh | ( | ) | [inline] |
get associated mesh
Return the mesh associated with this instance.
Definition at line 552 of file MeshInterface.hpp.
Referenced by MBMesquite::ObjectiveFunctionTemplate::initialize_block_coordinate_descent(), MBMesquite::TerminationCriterion::initialize_queue(), MBMesquite::Instruction::initialize_vertex_byte(), MBMesquite::TargetWriter::loop_over_mesh(), MBMesquite::VertexMover::loop_over_mesh(), MBMesquite::MeshTransform::loop_over_mesh(), MBMesquite::SlaveBoundaryVertices::loop_over_mesh(), MBMesquite::TagVertexMesh::loop_over_mesh(), MBMesquite::QualityAssessor::loop_over_mesh_internal(), MBMesquite::InstructionQueue::run_common(), run_global_smoother(), run_local_smoother(), run_local_smoother2(), run_quality_optimizer(), run_solution_mesh_optimizer(), MBMesquite::PaverMinEdgeLengthWrapper::run_wrapper(), MBMesquite::SizeAdaptShapeWrapper::run_wrapper(), MBMesquite::ViscousCFDTetShapeWrapper::run_wrapper(), MBMesquite::ShapeImprover::run_wrapper(), MBMesquite::UntangleWrapper::run_wrapper(), ParShapeImprover::ParShapeImprovementWrapper::run_wrapper(), and MBMesquite::DeformingDomainWrapper::run_wrapper().
{ return mMesh; };
bool MBMesquite::MeshDomainAssoc::mesh_and_domain_are_compatible [private] |
Definition at line 569 of file MeshInterface.hpp.
Definition at line 564 of file MeshInterface.hpp.
Definition at line 568 of file MeshInterface.hpp.