#include <ReadUtil.hpp>
Public Member Functions | |
ReadUtil (Core *mdb, Error *error_handler) | |
Constructor takes Core pointer. More... | |
~ReadUtil () | |
Destructor. More... | |
ErrorCode | get_node_coords (const int num_arrays, const int num_nodes, const int preferred_start_id, EntityHandle &actual_start_handle, std::vector< double * > &arrays, int sequence_size=-1) |
Get arrays for coordinate data from the MB. More... | |
ErrorCode | get_element_connect (const int num_elements, const int verts_per_element, const EntityType mdb_type, const int preferred_start_id, EntityHandle &actual_start_handle, EntityHandle *&array, int sequence_size=-1) |
Get array for connectivity data from the MB. More... | |
ErrorCode | gather_related_ents (Range &partition, Range &related_ents, EntityHandle *file_set=NULL) |
Gather entities related to those in the partition Gather entities related to those in the input partition. Related means down-adjacent to, contained in, etc. More... | |
ErrorCode | create_entity_sets (EntityID num_sets, const unsigned *set_flags, EntityID preffered_start_id, EntityHandle &actual_start_handle) |
ErrorCode | update_adjacencies (const EntityHandle start_handle, const int number_elements, const int number_vertices_per_element, const EntityHandle *conn_array) |
Tell MB which elements have been added to the database. More... | |
ErrorCode | get_ordered_vertices (EntityHandle *bound_ents, int *sense, int num_bound, int dim, EntityHandle *bound_verts, EntityType &etype) |
Given an ordered list of bounding entities and the sense of those entities, return an ordered list of vertices. More... | |
ErrorCode | assign_ids (Tag id_tag, const Range &ents, int start=0) |
Assign sequential IDS to entities in range and store IDs in tag. More... | |
ErrorCode | assign_ids (Tag id_tag, const EntityHandle *ents, size_t num_ents, int start=0) |
Assign to each entity in an array the ID that is its position in the array plus the value of 'start'. For any non-zero handles in the array, store the ID value in the passed tag. More... | |
ErrorCode | create_gather_set (EntityHandle &gather_set) |
Create a new gather set with tag GATHER_SET. More... | |
ErrorCode | get_gather_set (EntityHandle &gather_set) |
Get entity handle of an existing gather set. More... | |
Public Member Functions inherited from moab::ReadUtilIface | |
ReadUtilIface () | |
Constructor. More... | |
virtual | ~ReadUtilIface () |
Destructor. More... | |
Private Attributes | |
Core * | mMB |
Pointer to the Core. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from moab::ReadUtilIface | |
static void | reorder (const int *order, EntityHandle *conn, int num_elem, int node_per_elem) |
Re-order incoming element connectivity. More... | |
Definition at line 31 of file ReadUtil.hpp.
|
inline |
|
virtual |
Assign to each entity in an array the ID that is its position in the array plus the value of 'start'. For any non-zero handles in the array, store the ID value in the passed tag.
Implements moab::ReadUtilIface.
Definition at line 335 of file ReadUtil.cpp.
References moab::check_int_tag(), ErrorCode, MB_SUCCESS, mMB, size, and moab::Core::tag_set_data().
Assign sequential IDS to entities in range and store IDs in tag.
Implements moab::ReadUtilIface.
Definition at line 314 of file ReadUtil.cpp.
References moab::check_int_tag(), moab::Range::clear(), ErrorCode, moab::Range::insert(), MB_SUCCESS, mMB, moab::Range::pair_begin(), moab::Range::pair_end(), and moab::Core::tag_set_data().
|
virtual |
Implements moab::ReadUtilIface.
Definition at line 116 of file ReadUtil.cpp.
References moab::SequenceManager::create_meshset_sequence(), moab::EntitySequence::end_handle(), moab::error(), ErrorCode, MB_INDEX_OUT_OF_RANGE, MB_SUCCESS, mMB, moab::Core::sequence_manager(), and moab::EntitySequence::start_handle().
|
virtual |
Create a new gather set with tag GATHER_SET.
Implements moab::ReadUtilIface.
Definition at line 365 of file ReadUtil.cpp.
References moab::Core::create_meshset(), ErrorCode, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MESHSET_SET, mMB, moab::Core::tag_get_handle(), and moab::Core::tag_set_data().
|
virtual |
Gather entities related to those in the partition Gather entities related to those in the input partition. Related means down-adjacent to, contained in, etc.
partition | Entities for which to gather related entities |
related_ents | Related entities |
all_sets | If non-NULL, all sets in mesh instance are returned in the pointed-to range |
Implements moab::ReadUtilIface.
Definition at line 162 of file ReadUtil.cpp.
References moab::Range::begin(), moab::Range::clear(), dim, moab::Range::empty(), moab::Range::end(), moab::Range::equal_range(), ErrorCode, moab::Range::find(), moab::Core::get_adjacencies(), moab::Core::get_child_meshsets(), moab::Core::get_entities_by_handle(), moab::Core::get_entities_by_type(), moab::Core::get_parent_meshsets(), moab::Range::insert(), moab::intersect(), MB_SUCCESS, MBENTITYSET, moab::Range::merge(), mMB, RR, moab::Range::size(), and moab::Interface::UNION.
|
virtual |
Get array for connectivity data from the MB.
Implements moab::ReadUtilIface.
Definition at line 76 of file ReadUtil.cpp.
References moab::SequenceManager::create_entity_sequence(), moab::EntitySequence::end_handle(), moab::error(), ErrorCode, MB_INDEX_OUT_OF_RANGE, MB_SUCCESS, mMB, moab::ElementSequence::nodes_per_element(), moab::Core::sequence_manager(), and moab::EntitySequence::start_handle().
|
virtual |
Get entity handle of an existing gather set.
Implements moab::ReadUtilIface.
Definition at line 381 of file ReadUtil.cpp.
References moab::Range::empty(), ErrorCode, moab::Core::get_entities_by_type_and_tag(), MB_ENTITY_NOT_FOUND, MB_SUCCESS, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, mMB, and moab::Core::tag_get_handle().
|
virtual |
Get arrays for coordinate data from the MB.
Implements moab::ReadUtilIface.
Definition at line 40 of file ReadUtil.cpp.
References moab::SequenceManager::create_entity_sequence(), moab::EntitySequence::end_handle(), moab::error(), ErrorCode, MB_INDEX_OUT_OF_RANGE, MB_SUCCESS, MBVERTEX, mMB, moab::Core::sequence_manager(), and moab::EntitySequence::start_handle().
|
virtual |
Given an ordered list of bounding entities and the sense of those entities, return an ordered list of vertices.
Implements moab::ReadUtilIface.
Definition at line 249 of file ReadUtil.cpp.
References dim, moab::CN::Dimension(), ErrorCode, moab::Core::get_connectivity(), moab::MAX_SUB_ENTITY_VERTICES, MB_SUCCESS, MBEDGE, MBENTITYSET, MBMAXTYPE, mMB, moab::CN::NumSubEntities(), moab::CN::SubEntityVertexIndices(), moab::TYPE_FROM_HANDLE(), and moab::CN::VerticesPerEntity().
|
virtual |
Tell MB which elements have been added to the database.
Implements moab::ReadUtilIface.
Definition at line 139 of file ReadUtil.cpp.
References moab::Core::a_entity_factory(), MB_SUCCESS, mMB, moab::AEntityFactory::notify_create_entity(), and moab::AEntityFactory::vert_elem_adjacencies().
|
private |
Pointer to the Core.
Definition at line 35 of file ReadUtil.hpp.
Referenced by assign_ids(), create_entity_sets(), create_gather_set(), gather_related_ents(), get_element_connect(), get_gather_set(), get_node_coords(), get_ordered_vertices(), and update_adjacencies().