![]() |
Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
#include <DamselUtil.hpp>
Classes | |
struct | DtagP |
struct | MtagP |
class | tinfo |
struct to hold information on damsel/moab tags More... | |
Public Member Functions | |
DamselUtil () | |
Needs to be a constructor to initialize dtom_data_type. | |
Static Public Member Functions | |
static ErrorCode | container_to_range (damsel_model m, damsel_container &cont, Range &range) |
Convert handles in a container to a range; assumes EntityHandle and Damsel entity handles are the same size. | |
Static Public Attributes | |
static damsel_data_type | mtod_data_type [MB_MAX_DATA_TYPE+1] |
static enum DataType | dtom_data_type [DAMSEL_DATA_TYPE_PREDEFINED_WATERMARK+1] |
static enum damsel_entity_type | mtod_entity_type [MBMAXTYPE+1] |
static enum EntityType | dtom_entity_type [DAMSEL_ENTITY_TYPE_ALL_TYPES+1] |
Private Attributes | |
damsel_library | dmslLib |
Damsel library id. | |
damsel_model | dmslModel |
Damsel model id. | |
tinfo | xcoordsTag |
Other conventional tags. | |
tinfo | ycoordsTag |
tinfo | zcoordsTag |
tinfo | collFlagsTag |
tinfo | parentsTag |
tinfo | childrenTag |
std::vector< tinfo > | tagMap |
MOAB/damsel handles for dense [0], sparse [1], and conventional [2] tags. | |
damsel_handle_type | moabHandleType |
Damsel handle type used in (this build of) MOAB. | |
Friends | |
class | WriteDamsel |
class | ReadDamsel |
Definition at line 37 of file DamselUtil.hpp.
Needs to be a constructor to initialize dtom_data_type.
Definition at line 60 of file DamselUtil.cpp.
: dmslLib( DAMSEL_LIBRARY_INVALID ), dmslModel( DAMSEL_MODEL_INVALID ), moabHandleType( DAMSEL_HANDLE_TYPE_INVALID )
{
}
ErrorCode moab::DamselUtil::container_to_range | ( | damsel_model | m, |
damsel_container & | cont, | ||
Range & | range | ||
) | [static] |
Convert handles in a container to a range; assumes EntityHandle and Damsel entity handles are the same size.
Definition at line 67 of file DamselUtil.cpp.
References CHK_DMSL_ERR_NM, ErrorCode, moab::Range::insert(), and MB_SUCCESS.
Referenced by moab::ReadDamsel::process_ent_info().
{
if( DMSLcontainer_get_type( c ) == DAMSEL_HANDLE_CONTAINER_TYPE_SEQUENCE )
{
damsel_handle start;
size_t count, stride;
damsel_err_t err = DMSLcontainer_sequence_get_contents( m, c, &start, &count, &stride );
CHK_DMSL_ERR_NM( err );
for( damsel_handle i = start + ( count - 1 ) * stride; i >= start; i -= stride )
r.insert( i );
}
else if( DMSLcontainer_get_type( c ) == DAMSEL_HANDLE_CONTAINER_TYPE_VECTOR )
{
damsel_handle* handle_ptr;
size_t count;
damsel_err_t err = DMSLcontainer_vector_get_contents( m, c, &handle_ptr, &count );
CHK_DMSL_ERR_NM( err );
for( int i = count - 1; i >= 0; i-- )
r.insert( handle_ptr[i] );
}
else if( DMSLcontainer_get_type( c ) == DAMSEL_HANDLE_CONTAINER_TYPE_TREE )
{
damsel_handle_ptr node_ptr = NULL;
damsel_container cont = NULL;
damsel_err_t err = DMSLcontainer_tree_get_contents( m, c, &node_ptr, &cont );
while( err.id == DMSL_OK.id && cont )
{
ErrorCode rval = container_to_range( m, c, r );
if( MB_SUCCESS != rval ) return rval;
err = DMSLcontainer_tree_get_contents( m, c, &node_ptr, &cont );
}
}
return MB_SUCCESS;
}
friend class ReadDamsel [friend] |
Definition at line 41 of file DamselUtil.hpp.
friend class WriteDamsel [friend] |
Definition at line 40 of file DamselUtil.hpp.
tinfo moab::DamselUtil::childrenTag [private] |
Definition at line 116 of file DamselUtil.hpp.
Referenced by moab::ReadDamsel::process_tags().
tinfo moab::DamselUtil::collFlagsTag [private] |
Definition at line 116 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info(), moab::ReadDamsel::process_tags(), moab::WriteDamsel::write_sets(), and moab::WriteDamsel::WriteDamsel().
damsel_library moab::DamselUtil::dmslLib [private] |
Damsel library id.
Definition at line 110 of file DamselUtil.hpp.
Referenced by moab::ReadDamsel::load_file(), moab::WriteDamsel::write_file(), and moab::ReadDamsel::~ReadDamsel().
damsel_model moab::DamselUtil::dmslModel [private] |
Damsel model id.
Definition at line 113 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info(), moab::ReadDamsel::load_file(), moab::WriteDamsel::map_sparse_tags(), moab::ReadDamsel::process_ent_info(), moab::WriteDamsel::write_entities(), moab::WriteDamsel::write_file(), moab::WriteDamsel::write_sets(), and moab::WriteDamsel::write_vertices().
DataType moab::DamselUtil::dtom_data_type [static] |
{
MB_TYPE_OPAQUE,
MB_TYPE_OPAQUE,
MB_TYPE_INTEGER,
MB_TYPE_OPAQUE,
MB_TYPE_OPAQUE,
MB_TYPE_DOUBLE,
MB_TYPE_HANDLE,
MB_TYPE_OPAQUE,
MB_TYPE_OPAQUE,
MB_TYPE_OPAQUE
}
Definition at line 48 of file DamselUtil.hpp.
Referenced by moab::ReadDamsel::process_tags().
EntityType moab::DamselUtil::dtom_entity_type [static] |
{
MBVERTEX,
MBEDGE,
MBTRI,
MBQUAD,
MBPOLYGON,
MBTET,
MBPRISM,
MBPYRAMID,
MBHEX,
MBPOLYHEDRON,
MBMAXTYPE,
MBMAXTYPE
}
Definition at line 52 of file DamselUtil.hpp.
Referenced by moab::ReadDamsel::process_ent_info().
damsel_handle_type moab::DamselUtil::moabHandleType [private] |
Damsel handle type used in (this build of) MOAB.
Definition at line 122 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::WriteDamsel().
damsel_data_type moab::DamselUtil::mtod_data_type [static] |
{
DAMSEL_DATA_TYPE_BYTES,
DAMSEL_DATA_TYPE_INTEGER,
DAMSEL_DATA_TYPE_DOUBLE,
DAMSEL_DATA_TYPE_INVALID,
DAMSEL_DATA_TYPE_HANDLE
}
Definition at line 46 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info().
damsel_entity_type moab::DamselUtil::mtod_entity_type [static] |
{
DAMSEL_ENTITY_TYPE_VERTEX,
DAMSEL_ENTITY_TYPE_EDGE,
DAMSEL_ENTITY_TYPE_TRI,
DAMSEL_ENTITY_TYPE_QUAD,
DAMSEL_ENTITY_TYPE_POLYGON,
DAMSEL_ENTITY_TYPE_TET,
DAMSEL_ENTITY_TYPE_PYRAMID,
DAMSEL_ENTITY_TYPE_PRISM,
DAMSEL_ENTITY_TYPE_UNDEFINED,
DAMSEL_ENTITY_TYPE_HEX,
DAMSEL_ENTITY_TYPE_POLYHEDRON,
DAMSEL_ENTITY_TYPE_UNDEFINED
}
Definition at line 50 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::write_entities().
tinfo moab::DamselUtil::parentsTag [private] |
Definition at line 116 of file DamselUtil.hpp.
Referenced by moab::ReadDamsel::process_tags().
std::vector< tinfo > moab::DamselUtil::tagMap [private] |
MOAB/damsel handles for dense [0], sparse [1], and conventional [2] tags.
Definition at line 119 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info(), moab::WriteDamsel::map_dense_tags(), moab::WriteDamsel::map_sparse_tags(), moab::ReadDamsel::process_entity_tags(), moab::ReadDamsel::process_tags(), and moab::WriteDamsel::WriteDamsel().
tinfo moab::DamselUtil::xcoordsTag [private] |
Other conventional tags.
Definition at line 116 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info(), moab::ReadDamsel::process_ent_info(), moab::ReadDamsel::process_tags(), moab::WriteDamsel::write_vertices(), and moab::WriteDamsel::WriteDamsel().
tinfo moab::DamselUtil::ycoordsTag [private] |
Definition at line 116 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info(), moab::ReadDamsel::process_ent_info(), moab::ReadDamsel::process_tags(), moab::WriteDamsel::write_vertices(), and moab::WriteDamsel::WriteDamsel().
tinfo moab::DamselUtil::zcoordsTag [private] |
Definition at line 116 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info(), moab::ReadDamsel::process_ent_info(), moab::ReadDamsel::process_tags(), moab::WriteDamsel::write_vertices(), and moab::WriteDamsel::WriteDamsel().