MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <Settings.hpp>
Public Types | |
enum | FixedVertexMode { FIXED_FLAG = 4, FIXED_VERTEX = 0, FIXED_CURVE = 1, FIXED_SURFACE = 2 } |
enum | HigherOrderSlaveMode { SLAVE_NONE, SLAVE_ALL, SLAVE_CALCULATED, SLAVE_FLAG } |
Public Member Functions | |
Settings () | |
Initialize to default settings. | |
Settings (const Settings &other) | |
Copy existing settings. | |
~Settings () | |
Settings & | operator= (const Settings &other) |
Copy existing settings. | |
void | set_mapping_function (const MappingFunction *func) |
Set the mapping function for a single element topology. | |
void | set_mapping_function (const MappingFunction2D *func) |
void | set_mapping_function (const MappingFunction3D *func) |
void | set_mapping_functions (const MappingFunction *const array[], size_t array_size) |
Set the mapping function for one or more element topologies. | |
void | set_mapping_functions (const MappingFunction2D *const array[], size_t array_size) |
void | set_mapping_functions (const MappingFunction3D *const array[], size_t array_size) |
const MappingFunction * | get_mapping_function (EntityTopology element_type) const |
Get the mapping function for an element topology. | |
const MappingFunction2D * | get_mapping_function_2D (EntityTopology element_type) const |
const MappingFunction3D * | get_mapping_function_3D (EntityTopology element_type) const |
void | set_fixed_vertex_mode (FixedVertexMode mode) |
Change how Mesquite determines which vertices are fixed. | |
FixedVertexMode | get_fixed_vertex_mode () const |
Get the setting for how Mesquite determines which vertices are fixed. | |
void | set_slaved_ho_node_mode (HigherOrderSlaveMode mode) |
Set the slaved higher-order node setting. | |
HigherOrderSlaveMode | get_slaved_ho_node_mode () const |
Get the slaved higher-order node setting. | |
void | trap_floating_point_exception (bool enable) |
Generate SIGFPE whenever a floating point exception occurs. | |
bool | trap_floating_point_exception () const |
Private Attributes | |
SettingData * | mData |
Definition at line 46 of file Settings.hpp.
FIXED_FLAG |
Ask application which vertices are fixed by calling Mesh::vertices_get_fixed_flag |
FIXED_VERTEX |
Treat all vertices for which the mesh domain is topologically 0-dimensional as fixed. |
FIXED_CURVE |
Treat all vertices for which the mesh domain is topologically 1-dimensional as fixed. |
FIXED_SURFACE |
Treat all vertices for which the corresponding mesh domain has a topological dimension *less than* or equal to 2 as fixed. |
Definition at line 70 of file Settings.hpp.
{ FIXED_FLAG = 4, //!< Ask application which vertices are fixed by //!< calling Mesh::vertices_get_fixed_flag FIXED_VERTEX = 0, //!< Treat all vertices for which the mesh domain //!< is topologically 0-dimensional as fixed. FIXED_CURVE = 1, //!< Treat all vertices for which the mesh domain //!< is topologically 1-dimensional as fixed. FIXED_SURFACE = 2 //!< Treat all vertices for which the corresponding //!< mesh domain has a topological dimension *less than* //!< or equal to 2 as fixed. };
SLAVE_NONE |
All higher-order nodes are treated either as fixed or as free variables in the optimization. |
SLAVE_ALL |
Treat all non-fixed higher-order nodes as slave vertices. The node location will be updated automatically to the position of the mapping function evaluated at the logical location of the node evaluated as if the element did not contain the node. |
SLAVE_CALCULATED |
A utility (e.g. SlaveBoundaryVertices) will be inserted into the instruction queue that will determine which vertices are slaved and store that state as the appropriate bit in the vertex byte. |
SLAVE_FLAG |
The results of a call to Mesh::vertices_get_slaved_flag will be used to establish free vs. slaved. |
Definition at line 87 of file Settings.hpp.
{ SLAVE_NONE, //!< All higher-order nodes are treated either //!< as fixed or as free variables in the optimization. SLAVE_ALL, //!< Treat all non-fixed higher-order nodes as slave //!< vertices. The node location will be updated //!< automatically to the position of the mapping //!< function evaluated at the logical location of //!< the node evaluated as if the element did not //!< contain the node. SLAVE_CALCULATED, //!< A utility (e.g. SlaveBoundaryVertices) will be //!< inserted into the instruction queue that will //!< determine which vertices are slaved and store //!< that state as the appropriate bit in the vertex //!< byte. SLAVE_FLAG //!< The results of a call to Mesh::vertices_get_slaved_flag //!< will be used to establish free vs. slaved. };
Initialize to default settings.
Definition at line 126 of file Settings.cpp.
: mData( new SettingData ) {}
MBMesquite::Settings::Settings | ( | const Settings & | other | ) |
Copy existing settings.
Definition at line 127 of file Settings.cpp.
: mData( new SettingData( *other.mData ) ) {}
Get the setting for how Mesquite determines which vertices are fixed.
Definition at line 203 of file Settings.cpp.
References MBMesquite::SettingData::fixedMode, and mData.
Referenced by MBMesquite::Instruction::initialize_vertex_byte(), and MBMesquite::SlaveBoundaryVertices::loop_over_mesh().
const MappingFunction * MBMesquite::Settings::get_mapping_function | ( | EntityTopology | element_type | ) | const |
Get the mapping function for an element topology.
Definition at line 183 of file Settings.cpp.
References MBMesquite::SettingData::mapArray, and mData.
Referenced by MBMesquite::PatchData::get_mapping_function(), and MBMesquite::PatchData::get_samples().
const MappingFunction2D * MBMesquite::Settings::get_mapping_function_2D | ( | EntityTopology | element_type | ) | const |
Definition at line 188 of file Settings.cpp.
References MBMesquite::SettingData::mapArray2D, and mData.
Referenced by MBMesquite::PatchData::get_mapping_function_2D().
{ return (size_t)type < mData->mapArray2D.size() ? mData->mapArray2D[type] : 0; }
const MappingFunction3D * MBMesquite::Settings::get_mapping_function_3D | ( | EntityTopology | element_type | ) | const |
Definition at line 193 of file Settings.cpp.
References MBMesquite::SettingData::mapArray3D, and mData.
Referenced by MBMesquite::PatchData::get_mapping_function_3D().
{ return (size_t)type < mData->mapArray3D.size() ? mData->mapArray3D[type] : 0; }
Get the slaved higher-order node setting.
Definition at line 213 of file Settings.cpp.
References mData, and MBMesquite::SettingData::slaveMode.
Referenced by MBMesquite::PatchData::fill(), MBMesquite::Instruction::initialize_vertex_byte(), MBMesquite::SlaveBoundaryVertices::loop_over_mesh(), and InstructionQueueTest::test_add_remove_vertex_slaver().
Copy existing settings.
Definition at line 132 of file Settings.cpp.
References mData.
{ *mData = *( other.mData ); return *this; }
Change how Mesquite determines which vertices are fixed.
Definition at line 198 of file Settings.cpp.
References MBMesquite::SettingData::fixedMode, and mData.
Referenced by PatchDataTest::test_fixed_by_geom_dim().
void MBMesquite::Settings::set_mapping_function | ( | const MappingFunction * | func | ) |
Set the mapping function for a single element topology.
Definition at line 138 of file Settings.cpp.
References MBMesquite::MappingFunction::element_topology(), MBMesquite::SettingData::mapArray, MBMesquite::SettingData::mapArray2D, MBMesquite::SettingData::mapArray3D, and mData.
Referenced by main(), and run_example().
{ EntityTopology type = func->element_topology(); if( mData->mapArray.size() <= (size_t)type ) mData->mapArray.resize( type + 1, 0 ); mData->mapArray[type] = func; if( TopologyInfo::dimension( type ) == 2 && mData->mapArray2D.size() > (size_t)type ) mData->mapArray2D[type] = 0; else if( TopologyInfo::dimension( type ) == 3 && mData->mapArray3D.size() > (size_t)type ) mData->mapArray3D[type] = 0; }
void MBMesquite::Settings::set_mapping_function | ( | const MappingFunction2D * | func | ) |
Definition at line 149 of file Settings.cpp.
References MBMesquite::MappingFunction::element_topology(), MBMesquite::SettingData::mapArray, MBMesquite::SettingData::mapArray2D, and mData.
{ unsigned type = func->element_topology(); if( mData->mapArray.size() <= type ) mData->mapArray.resize( type + 1, 0 ); mData->mapArray[type] = func; if( mData->mapArray2D.size() <= type ) mData->mapArray2D.resize( type + 1, 0 ); mData->mapArray2D[type] = func; }
void MBMesquite::Settings::set_mapping_function | ( | const MappingFunction3D * | func | ) |
Definition at line 158 of file Settings.cpp.
References MBMesquite::MappingFunction::element_topology(), MBMesquite::SettingData::mapArray, MBMesquite::SettingData::mapArray3D, and mData.
{ unsigned type = func->element_topology(); if( mData->mapArray.size() <= type ) mData->mapArray.resize( type + 1, 0 ); mData->mapArray[type] = func; if( mData->mapArray3D.size() <= type ) mData->mapArray3D.resize( type + 1, 0 ); mData->mapArray3D[type] = func; }
void MBMesquite::Settings::set_mapping_functions | ( | const MappingFunction *const | array[], |
size_t | array_size | ||
) |
Set the mapping function for one or more element topologies.
void MBMesquite::Settings::set_mapping_functions | ( | const MappingFunction2D *const | array[], |
size_t | array_size | ||
) |
void MBMesquite::Settings::set_mapping_functions | ( | const MappingFunction3D *const | array[], |
size_t | array_size | ||
) |
Set the slaved higher-order node setting.
Definition at line 208 of file Settings.cpp.
References mData, and MBMesquite::SettingData::slaveMode.
Referenced by MBMesquite::InstructionQueue::add_vertex_slaver(), check_global_patch_slaved(), PatchDataTest::check_higher_order_vertices_slaved(), MBMesquite::create_ideal_element_patch(), do_smooth_ho(), do_test(), main(), MBMesquite::InstructionQueue::remove_vertex_slaver(), run_example(), tag_patch_slaved(), SlaveBoundaryVerticesTest::test_fail_if_slaves_not_calculated(), PatchDataTest::test_quad8_patch(), and SlaveBoundaryVerticesTest::test_slaved_common().
void MBMesquite::Settings::trap_floating_point_exception | ( | bool | enable | ) |
Generate SIGFPE whenever a floating point exception occurs.
Generate a FPE signal when overflow, divbyzero, etc. occur during floating-point arithmatic. This is intended for debugging purposes only, as enabling this will typically result in a crash when such arithmatic errors occur.
If this option is enabled, Mesquite will attempt to set platform-specific flags such that a SIGFPE is generated for floating point errors while the instruction queue is running. If this option ins disabled, Mesquite will not change the flags. There is no option to explicitly disable such flags because that is the default behavior on most platforms, and presumably if the application has enabled such flags it makes little sense to disable them while Mesquite is running.
This functionality may not be supported on all platforms. If it is not supported, this option has no effect.
Definition at line 218 of file Settings.cpp.
References mData, and MBMesquite::SettingData::trapFPE.
Referenced by MBMesquite::InstructionQueue::run_common().
bool MBMesquite::Settings::trap_floating_point_exception | ( | ) | const |
Definition at line 222 of file Settings.cpp.
References mData, and MBMesquite::SettingData::trapFPE.
SettingData* MBMesquite::Settings::mData [private] |
Definition at line 137 of file Settings.hpp.
Referenced by get_fixed_vertex_mode(), get_mapping_function(), get_mapping_function_2D(), get_mapping_function_3D(), get_slaved_ho_node_mode(), operator=(), set_fixed_vertex_mode(), set_mapping_function(), set_slaved_ho_node_mode(), trap_floating_point_exception(), and ~Settings().