#include <WriteDamsel.hpp>
Inheritance diagram for moab::WriteDamsel:
Collaboration diagram for moab::WriteDamsel:Public Types | |
| enum | { DAMSEL_IS_TRACKING = 0x1 } |
Public Member Functions | |
| WriteDamsel (Interface *impl) | |
| Constructor. More... | |
| virtual | ~WriteDamsel () |
| Destructor. More... | |
| ErrorCode | write_file (const char *file_name, const bool, const FileOptions &opts, const EntityHandle *meshset_list, const int num_sets, const std::vector< std::string > &, const Tag *=NULL, int=0, int=3) |
| Primary interface function. More... | |
Public Member Functions inherited from moab::WriterIface | |
| virtual | ~WriterIface () |
Static Public Member Functions | |
| static WriterIface * | factory (Interface *iface) |
| Factory function, for ReaderWriter. More... | |
Public Attributes | |
| enum moab::WriteDamsel:: { ... } | DAMSEL_FLAGS |
Private Member Functions | |
| ErrorCode | init_tag_info () |
| Initialize global information about dense/sparse/conventional tags, once for entire write_file call. More... | |
| ErrorCode | write_subrange (RangeSeqIntersectIter &rsi) |
| Write a subrange of entities/sets; just a wrapper to write_[vertices, entities, sets]. More... | |
| ErrorCode | write_vertices (RangeSeqIntersectIter &rsi) |
| Write the vertices in the model, for the handles in the specified RangeSeqIntersectIter. More... | |
| ErrorCode | write_entities (RangeSeqIntersectIter &rsi) |
| Write the entities in the model, for the handles in the specified RangeSeqIntersectIter. More... | |
| ErrorCode | write_sets (RangeSeqIntersectIter &rsi) |
| Write the sets in the model, for the handles in the specified RangeSeqIntersectIter. More... | |
| ErrorCode | map_dense_tags (RangeSeqIntersectIter &rsi, damsel_container &ent_cont) |
| Map dense tags for the specified entities, using the specified damsel entity container. More... | |
| ErrorCode | map_sparse_tags () |
| Map sparse tags for all entities. More... | |
Private Attributes | |
| Interface * | mbImpl |
| Interface instance. More... | |
| WriteUtilIface * | mWriteIface |
| WriteUtil object used in this writer. More... | |
| SequenceManager * | sequenceManager |
| Used to initialize the RangeSeqIntersectIter. More... | |
| std::string | fileName |
| File name. More... | |
| DamselUtil | dU |
| Utility for storing damsel-specific stuff. More... | |
Definition at line 41 of file WriteDamsel.hpp.
| anonymous enum |
| Enumerator | |
|---|---|
| DAMSEL_IS_TRACKING | |
Definition at line 73 of file WriteDamsel.hpp.
| moab::WriteDamsel::WriteDamsel | ( | Interface * | impl | ) |
Constructor.
Definition at line 74 of file WriteDamsel.cpp.
References moab::DamselUtil::collFlagsTag, dU, ErrorCode, MB_CHK_SET_ERR_CONT, MB_TAG_ANY, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, MB_TYPE_INTEGER, mbImpl, moab::DamselUtil::moabHandleType, moab::DamselUtil::tinfo::mTagh, mWriteIface, moab::Interface::query_interface(), sequenceManager, moab::Interface::tag_get_handle(), moab::DamselUtil::tagMap, moab::DamselUtil::tinfo::tagType, moab::DamselUtil::xcoordsTag, moab::DamselUtil::ycoordsTag, and moab::DamselUtil::zcoordsTag.
Referenced by factory().
|
virtual |
Destructor.
Definition at line 121 of file WriteDamsel.cpp.
References mbImpl, mWriteIface, and moab::Interface::release_interface().
|
static |
Factory function, for ReaderWriter.
Definition at line 69 of file WriteDamsel.cpp.
References iface, and WriteDamsel().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
private |
Initialize global information about dense/sparse/conventional tags, once for entire write_file call.
Definition at line 195 of file WriteDamsel.cpp.
References CHK_DMSL_ERR, moab::DamselUtil::collFlagsTag, moab::DamselUtil::dmslModel, dU, moab::TagInfo::get_name(), moab::TagInfo::get_storage_type(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_ANY, MB_TAG_DENSE, MB_TAG_SPARSE, MB_TYPE_DOUBLE, MB_TYPE_INTEGER, MB_VARIABLE_DATA_LENGTH, mbImpl, moab::DamselUtil::tinfo::mTagh, moab::DamselUtil::mtod_data_type, moab::Interface::tag_get_length(), moab::Interface::tag_get_tags(), moab::DamselUtil::tagMap, moab::DamselUtil::xcoordsTag, moab::DamselUtil::ycoordsTag, and moab::DamselUtil::zcoordsTag.
Referenced by write_file().
|
private |
Map dense tags for the specified entities, using the specified damsel entity container.
Definition at line 418 of file WriteDamsel.cpp.
References CHK_DMSL_ERR, dU, ErrorCode, moab::DenseTag::get_array(), moab::RangeSeqIntersectIter::get_sequence(), moab::RangeSeqIntersectIter::get_start_handle(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_DENSE, and moab::DamselUtil::tagMap.
Referenced by write_entities(), write_sets(), and write_vertices().
|
private |
Map sparse tags for all entities.
Definition at line 449 of file WriteDamsel.cpp.
References moab::Range::begin(), CHK_DMSL_ERR, moab::DamselUtil::dmslModel, dU, moab::Range::empty(), moab::Range::end(), ErrorCode, moab::TagInfo::get_name(), moab::TagInfo::get_size(), moab::SparseTag::get_tagged_entities(), MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TAG_SPARSE, mbImpl, sequenceManager, moab::Range::size(), moab::Interface::tag_get_data(), and moab::DamselUtil::tagMap.
Referenced by write_file().
|
private |
Write the entities in the model, for the handles in the specified RangeSeqIntersectIter.
| rsi | Range sequence iterator defining range of entities/sets to be written |
Definition at line 373 of file WriteDamsel.cpp.
References moab::Range::begin(), CHK_DMSL_ERR, moab::Interface::connect_iterate(), moab::DamselUtil::dmslModel, dU, moab::Range::end(), moab::RangeSeqIntersectIter::get_end_handle(), moab::RangeSeqIntersectIter::get_sequence(), moab::RangeSeqIntersectIter::get_start_handle(), map_dense_tags(), MB_CHK_ERR, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mbImpl, MBMAXTYPE, moab::DamselUtil::mtod_entity_type, moab::Range::size(), moab::Interface::type_from_handle(), and moab::EntitySequence::values_per_entity().
Referenced by write_subrange().
|
virtual |
Primary interface function.
| file_name | Filename being written |
| overwrite | If true and the file exists, an error is returned |
| opts | File options, e.g. whether and how to write in parallel |
| meshset_list | If non-NULL, a vector of sets defining what is to be written |
| num_sets | The number of sets to be written, only used if meshset_list is non-NULL |
| qa_records | Strings defining provenance information |
| tag_list | If non-NULL, only these tags should be written |
| num_tags | The number of tag handles in tag_list, used only if tag_list is non-NULL |
| requested_output_dimension | Dimension used for coordinates |
Implements moab::WriterIface.
Definition at line 126 of file WriteDamsel.cpp.
References moab::Range::begin(), CHK_DMSL_ERR, moab::DamselUtil::dmslLib, moab::DamselUtil::dmslModel, dU, moab::Range::empty(), moab::Range::end(), ErrorCode, moab::WriteUtilIface::gather_entities(), moab::RangeSeqIntersectIter::init(), init_tag_info(), map_sparse_tags(), MB_CHK_ERR, MB_CHK_SET_ERR, MB_ENTITY_NOT_FOUND, MB_SUCCESS, mWriteIface, sequenceManager, moab::RangeSeqIntersectIter::step(), and write_subrange().
|
private |
Write the sets in the model, for the handles in the specified RangeSeqIntersectIter.
| rsi | Range sequence iterator defining range of entities/sets to be written |
Definition at line 497 of file WriteDamsel.cpp.
References CHK_DMSL_ERR, moab::DamselUtil::collFlagsTag, moab::DamselUtil::dmslModel, dU, ErrorCode, moab::RangeSeqIntersectIter::get_end_handle(), moab::Interface::get_entities_by_handle(), moab::Interface::get_meshset_options(), moab::RangeSeqIntersectIter::get_start_handle(), map_dense_tags(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, MESHSET_SET, MESHSET_TRACK_OWNER, and moab::DamselUtil::tinfo::mTagh.
|
inlineprivate |
Write a subrange of entities/sets; just a wrapper to write_[vertices, entities, sets].
Definition at line 120 of file WriteDamsel.hpp.
References ErrorCode, moab::RangeSeqIntersectIter::get_start_handle(), MB_SUCCESS, MBENTITYSET, mbImpl, MBVERTEX, moab::Interface::type_from_handle(), write_entities(), and write_vertices().
Referenced by write_file().
|
private |
Write the vertices in the model, for the handles in the specified RangeSeqIntersectIter.
| rsi | Range sequence iterator defining range of entities/sets to be written |
Definition at line 308 of file WriteDamsel.cpp.
References moab::Range::begin(), CHK_DMSL_ERR, moab::Interface::coords_iterate(), moab::DamselUtil::dmslModel, dU, moab::Range::end(), moab::RangeSeqIntersectIter::get_end_handle(), moab::RangeSeqIntersectIter::get_start_handle(), map_dense_tags(), MB_CHK_ERR, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mbImpl, moab::DamselUtil::tinfo::mTagh, moab::Range::size(), moab::DamselUtil::xcoordsTag, moab::DamselUtil::ycoordsTag, and moab::DamselUtil::zcoordsTag.
Referenced by write_subrange().
| enum { ... } moab::WriteDamsel::DAMSEL_FLAGS |
|
private |
Utility for storing damsel-specific stuff.
Definition at line 117 of file WriteDamsel.hpp.
Referenced by init_tag_info(), map_dense_tags(), map_sparse_tags(), write_entities(), write_file(), write_sets(), write_vertices(), and WriteDamsel().
|
private |
File name.
Definition at line 114 of file WriteDamsel.hpp.
|
private |
Interface instance.
Definition at line 105 of file WriteDamsel.hpp.
Referenced by init_tag_info(), map_sparse_tags(), write_entities(), write_sets(), write_subrange(), write_vertices(), WriteDamsel(), and ~WriteDamsel().
|
private |
WriteUtil object used in this writer.
Definition at line 108 of file WriteDamsel.hpp.
Referenced by write_file(), WriteDamsel(), and ~WriteDamsel().
|
private |
Used to initialize the RangeSeqIntersectIter.
Definition at line 111 of file WriteDamsel.hpp.
Referenced by map_sparse_tags(), write_file(), and WriteDamsel().