Loading [MathJax]/extensions/tex2jax.js
Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
moab::DamselUtil Class Reference

#include <DamselUtil.hpp>

+ Collaboration diagram for moab::DamselUtil:

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. More...
 

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. More...
 

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. More...
 
damsel_model dmslModel
 Damsel model id. More...
 
tinfo xcoordsTag
 Other conventional tags. More...
 
tinfo ycoordsTag
 
tinfo zcoordsTag
 
tinfo collFlagsTag
 
tinfo parentsTag
 
tinfo childrenTag
 
std::vector< tinfotagMap
 MOAB/damsel handles for dense [0], sparse [1], and conventional [2] tags. More...
 
damsel_handle_type moabHandleType
 Damsel handle type used in (this build of) MOAB. More...
 

Friends

class WriteDamsel
 
class ReadDamsel
 

Detailed Description

Definition at line 37 of file DamselUtil.hpp.

Constructor & Destructor Documentation

◆ DamselUtil()

moab::DamselUtil::DamselUtil ( )

Needs to be a constructor to initialize dtom_data_type.

Definition at line 60 of file DamselUtil.cpp.

61  : dmslLib( DAMSEL_LIBRARY_INVALID ), dmslModel( DAMSEL_MODEL_INVALID ), moabHandleType( DAMSEL_HANDLE_TYPE_INVALID ) 62 { 63 }

Member Function Documentation

◆ container_to_range()

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.

68 { 69  if( DMSLcontainer_get_type( c ) == DAMSEL_HANDLE_CONTAINER_TYPE_SEQUENCE ) 70  { 71  damsel_handle start; 72  size_t count, stride; 73  damsel_err_t err = DMSLcontainer_sequence_get_contents( m, c, &start, &count, &stride ); 74  CHK_DMSL_ERR_NM( err ); 75  for( damsel_handle i = start + ( count - 1 ) * stride; i >= start; i -= stride ) 76  r.insert( i ); 77  } 78  else if( DMSLcontainer_get_type( c ) == DAMSEL_HANDLE_CONTAINER_TYPE_VECTOR ) 79  { 80  damsel_handle* handle_ptr; 81  size_t count; 82  damsel_err_t err = DMSLcontainer_vector_get_contents( m, c, &handle_ptr, &count ); 83  CHK_DMSL_ERR_NM( err ); 84  for( int i = count - 1; i >= 0; i-- ) 85  r.insert( handle_ptr[i] ); 86  } 87  else if( DMSLcontainer_get_type( c ) == DAMSEL_HANDLE_CONTAINER_TYPE_TREE ) 88  { 89  damsel_handle_ptr node_ptr = NULL; 90  damsel_container cont = NULL; 91  damsel_err_t err = DMSLcontainer_tree_get_contents( m, c, &node_ptr, &cont ); 92  while( err.id == DMSL_OK.id && cont ) 93  { 94  ErrorCode rval = container_to_range( m, c, r ); 95  if( MB_SUCCESS != rval ) return rval; 96  err = DMSLcontainer_tree_get_contents( m, c, &node_ptr, &cont ); 97  } 98  } 99  100  return MB_SUCCESS; 101 }

References CHK_DMSL_ERR_NM, ErrorCode, moab::Range::insert(), and MB_SUCCESS.

Referenced by moab::ReadDamsel::process_ent_info().

Friends And Related Function Documentation

◆ ReadDamsel

friend class ReadDamsel
friend

Definition at line 41 of file DamselUtil.hpp.

◆ WriteDamsel

friend class WriteDamsel
friend

Definition at line 40 of file DamselUtil.hpp.

Member Data Documentation

◆ childrenTag

tinfo moab::DamselUtil::childrenTag
private

Definition at line 116 of file DamselUtil.hpp.

Referenced by moab::ReadDamsel::process_tags().

◆ collFlagsTag

◆ dmslLib

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

◆ dmslModel

◆ dtom_data_type

DataType moab::DamselUtil::dtom_data_type
static
Initial value:
= { 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 46 of file DamselUtil.hpp.

Referenced by moab::ReadDamsel::process_tags().

◆ dtom_entity_type

EntityType moab::DamselUtil::dtom_entity_type
static
Initial value:
= { MBVERTEX, MBEDGE, MBTRI, MBQUAD, MBPOLYGON, MBTET, MBPRISM, MBPYRAMID, MBHEX, MBPOLYHEDRON, MBMAXTYPE, MBMAXTYPE }

Definition at line 46 of file DamselUtil.hpp.

Referenced by moab::ReadDamsel::process_ent_info().

◆ moabHandleType

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

◆ mtod_data_type

damsel_data_type moab::DamselUtil::mtod_data_type
static
Initial value:
= { 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().

◆ mtod_entity_type

damsel_entity_type moab::DamselUtil::mtod_entity_type
static
Initial value:
= { 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 46 of file DamselUtil.hpp.

Referenced by moab::WriteDamsel::write_entities().

◆ parentsTag

tinfo moab::DamselUtil::parentsTag
private

Definition at line 116 of file DamselUtil.hpp.

Referenced by moab::ReadDamsel::process_tags().

◆ tagMap

std::vector< tinfo > moab::DamselUtil::tagMap
private

◆ xcoordsTag

◆ ycoordsTag

◆ zcoordsTag


The documentation for this class was generated from the following files: