#include <ReadDamsel.hpp>
Classes | |
class | subrange |
Public Member Functions | |
ErrorCode | load_file (const char *file_name, const EntityHandle *file_set, const FileOptions &opts, const SubsetList *subset_list=0, const Tag *file_id_tag=0) |
Load an NC file. More... | |
ReadDamsel (Interface *impl=NULL) | |
Constructor. More... | |
virtual | ~ReadDamsel () |
Destructor. More... | |
virtual ErrorCode | read_tag_values (const char *file_name, const char *tag_name, const FileOptions &opts, std::vector< int > &tag_values_out, const SubsetList *subset_list=0) |
Read tag values from a file. More... | |
Public Member Functions inherited from moab::ReaderIface | |
virtual | ~ReaderIface () |
Static Public Member Functions | |
static ReaderIface * | factory (Interface *) |
Private Member Functions | |
ErrorCode | get_contents (damsel_model m, damsel_container c, Range &ents) |
Get contents of the container (containing file-side handles) and translate to moab-side handles. More... | |
ErrorCode | get_contents (damsel_model m, damsel_container c, EntityHandle *ents) |
Get contents of the container (containing file-side handles) and translate to moab-side handles ents argument should point to already-allocated space. More... | |
ErrorCode | init () |
ErrorCode | parse_options (const FileOptions &opts, bool ¶llel) |
ErrorCode | process_tags (std::vector< damsel_tag_buf_type > &tag_infos) |
ErrorCode | process_ent_info (const damsel_entity_buf_type &einfo) |
ErrorCode | process_entity_tags (int count, damsel_container tag_container, damsel_container app_cont, Range &these_ents) |
ErrorCode | process_coll_infos (std::vector< damsel_collection_buf_type > &coll_infos) |
ErrorCode | container_to_handle_pairs (damsel_container &cont, std::vector< damsel_handle > &handle_pairs) |
Convert handles in a container into handle pairs, one pair per contiguous sequence of handles in the container. More... | |
ErrorCode | insert_into_map (std::vector< damsel_handle > &handle_pairs, EntityHandle start_handle) |
Store MOAB handles starting from start_handle, corresponding to store handles in handle_pairs, into the entity map. More... | |
Private Attributes | |
Interface * | mbImpl |
Interface instance. More... | |
ReadUtilIface * | readMeshIface |
UtilIface. More... | |
std::string | fileName |
File name. More... | |
bool | nativeParallel |
Whether this reader natively supports parallel semantics. More... | |
ParallelComm * | myPcomm |
Parallel info. More... | |
Tag | mGlobalIdTag |
Used to track file handles. More... | |
RangeMap< damsel_handle, EntityHandle, 0 > | dmHandleRMap |
map from damsel to moab handles More... | |
DamselUtil | dU |
Keep various damsel data. More... | |
Definition at line 36 of file ReadDamsel.hpp.
moab::ReadDamsel::ReadDamsel | ( | Interface * | impl = NULL | ) |
Constructor.
Definition at line 30 of file ReadDamsel.cpp.
References init().
Referenced by factory().
|
virtual |
Destructor.
Definition at line 36 of file ReadDamsel.cpp.
References moab::DamselUtil::dmslLib, dU, mbImpl, readMeshIface, and moab::Interface::release_interface().
|
private |
Convert handles in a container into handle pairs, one pair per contiguous sequence of handles in the container.
|
static |
Definition at line 25 of file ReadDamsel.cpp.
References iface, and ReadDamsel().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
private |
Get contents of the container (containing file-side handles) and translate to moab-side handles ents argument should point to already-allocated space.
Definition at line 489 of file ReadDamsel.cpp.
References CHK_DMSL_ERR, dmHandleRMap, moab::RangeMap< KeyType, ValType, NullVal >::end(), ErrorCode, moab::RangeMap< KeyType, ValType, NullVal >::find(), get_contents(), moab::RangeMap< KeyType, ValType, NullVal >::lower_bound(), and MB_SUCCESS.
|
private |
Get contents of the container (containing file-side handles) and translate to moab-side handles.
Definition at line 433 of file ReadDamsel.cpp.
References CHK_DMSL_ERR, dmHandleRMap, moab::RangeMap< KeyType, ValType, NullVal >::end(), ErrorCode, moab::RangeMap< KeyType, ValType, NullVal >::find(), moab::Range::insert(), moab::RangeMap< KeyType, ValType, NullVal >::lower_bound(), and MB_SUCCESS.
Referenced by get_contents(), and process_ent_info().
|
private |
Definition at line 43 of file ReadDamsel.cpp.
References MB_SUCCESS, mbImpl, moab::Interface::query_interface(), and readMeshIface.
Referenced by ReadDamsel().
|
private |
Store MOAB handles starting from start_handle, corresponding to store handles in handle_pairs, into the entity map.
|
virtual |
Load an NC file.
Implements moab::ReaderIface.
Definition at line 70 of file ReadDamsel.cpp.
References CHK_DMSL_ERR, moab::DamselUtil::dmslLib, moab::DamselUtil::dmslModel, dU, ErrorCode, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, myPcomm, nativeParallel, parse_options(), moab::ProcConfig::proc_comm(), moab::ParallelComm::proc_config(), process_ent_info(), and process_tags().
|
private |
Definition at line 51 of file ReadDamsel.cpp.
References ErrorCode, moab::FileOptions::get_null_option(), moab::FileOptions::match_option(), MB_ENTITY_NOT_FOUND, MB_NOT_IMPLEMENTED, MB_SET_ERR, MB_SUCCESS, and nativeParallel.
Referenced by load_file().
|
private |
|
private |
Definition at line 317 of file ReadDamsel.cpp.
References CHK_DMSL_ERR, moab::DamselUtil::container_to_range(), dmHandleRMap, moab::DamselUtil::dmslModel, moab::DamselUtil::dtom_entity_type, dU, ErrorCode, get_contents(), moab::ReadUtilIface::get_element_connect(), moab::ReadUtilIface::get_node_coords(), moab::Range::insert(), moab::RangeMap< KeyType, ValType, NullVal >::insert(), MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, moab::DamselUtil::tinfo::mTagh, process_entity_tags(), moab::Range::psize(), readMeshIface, moab::Range::size(), moab::DamselUtil::xcoordsTag, moab::DamselUtil::ycoordsTag, and moab::DamselUtil::zcoordsTag.
Referenced by load_file().
|
private |
Definition at line 400 of file ReadDamsel.cpp.
References moab::Range::begin(), CHK_DMSL_ERR, dU, moab::Range::end(), ErrorCode, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TAG_ANY, mbImpl, moab::Range::size(), moab::Interface::tag_iterate(), and moab::DamselUtil::tagMap.
Referenced by process_ent_info().
|
private |
Definition at line 260 of file ReadDamsel.cpp.
References moab::DamselUtil::childrenTag, moab::DamselUtil::collFlagsTag, moab::DamselUtil::dtom_data_type, dU, ErrorCode, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_OPAQUE, mbImpl, moab::DamselUtil::parentsTag, moab::Interface::tag_get_handle(), moab::DamselUtil::tagMap, moab::DamselUtil::xcoordsTag, moab::DamselUtil::ycoordsTag, and moab::DamselUtil::zcoordsTag.
Referenced by load_file().
|
virtual |
Read tag values from a file.
Read the list if all integer tag values from the file for a tag that is a single integer value per entity.
file_name | The file to read. |
tag_name | The tag for which to read values |
tag_values_out | Output: The list of tag values. |
subset_list | An array of tag name and value sets specifying the subset of the file to read. If multiple tags are specified, the sets that match all tags (intersection) should be read. |
subset_list_length | The length of the 'subset_list' array. |
Implements moab::ReaderIface.
Definition at line 251 of file ReadDamsel.cpp.
|
private |
map from damsel to moab handles
Definition at line 122 of file ReadDamsel.hpp.
Referenced by get_contents(), and process_ent_info().
|
private |
Keep various damsel data.
Definition at line 125 of file ReadDamsel.hpp.
Referenced by load_file(), process_ent_info(), process_entity_tags(), process_tags(), and ~ReadDamsel().
|
private |
File name.
Definition at line 110 of file ReadDamsel.hpp.
|
private |
Interface instance.
Definition at line 104 of file ReadDamsel.hpp.
Referenced by init(), process_entity_tags(), process_tags(), and ~ReadDamsel().
|
private |
Used to track file handles.
Definition at line 119 of file ReadDamsel.hpp.
|
private |
|
private |
Whether this reader natively supports parallel semantics.
Definition at line 113 of file ReadDamsel.hpp.
Referenced by load_file(), and parse_options().
|
private |
UtilIface.
Definition at line 107 of file ReadDamsel.hpp.
Referenced by init(), process_ent_info(), and ~ReadDamsel().