MOAB: Mesh Oriented datABase  (version 5.4.1)
MBMesquite::Settings Class Reference

#include <Settings.hpp>

+ Inheritance diagram for MBMesquite::Settings:
+ Collaboration diagram for MBMesquite::Settings:

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 ()
Settingsoperator= (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 MappingFunctionget_mapping_function (EntityTopology element_type) const
 Get the mapping function for an element topology.
const MappingFunction2Dget_mapping_function_2D (EntityTopology element_type) const
const MappingFunction3Dget_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

SettingDatamData

Detailed Description

Definition at line 46 of file Settings.hpp.


Member Enumeration Documentation

Enumerator:
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.
    };
Enumerator:
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.
    };

Constructor & Destructor Documentation

Initialize to default settings.

Definition at line 126 of file Settings.cpp.

: mData( new SettingData ) {}

Copy existing settings.

Definition at line 127 of file Settings.cpp.

: mData( new SettingData( *other.mData ) ) {}

Definition at line 128 of file Settings.cpp.

References mData.

{
    delete mData;
}

Member Function Documentation

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().

{
    return (size_t)type < mData->mapArray.size() ? mData->mapArray[type] : 0;
}

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;
}

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;
}
Settings & MBMesquite::Settings::operator= ( const Settings other)

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().

{
    mData->fixedMode = mode;
}

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;
}

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;
}

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 
)

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().

{
    mData->trapFPE = enable;
}

Definition at line 222 of file Settings.cpp.

References mData, and MBMesquite::SettingData::trapFPE.

{
    return mData->trapFPE;
}

Member Data Documentation

List of all members.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines