MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Interface implemented in MOAB which provides memory for mesh reading utilities. More...
#include <ReadUtilIface.hpp>
Public Member Functions | |
ReadUtilIface () | |
Constructor. | |
virtual | ~ReadUtilIface () |
Destructor. | |
virtual 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, const int sequence_size=-1)=0 |
virtual 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)=0 |
virtual ErrorCode | gather_related_ents (Range &partition, Range &related_ents, EntityHandle *file_set=NULL)=0 |
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. | |
virtual ErrorCode | create_entity_sets (EntityID num_sets, const unsigned *set_flags, EntityID preffered_start_id, EntityHandle &actual_start_handle)=0 |
virtual ErrorCode | update_adjacencies (const EntityHandle start_handle, const int number_elements, const int number_vertices_per_element, const EntityHandle *conn_array)=0 |
virtual ErrorCode | get_ordered_vertices (EntityHandle *bound_ents, int *sense, int num_bound, int dim, EntityHandle *bound_verts, EntityType &etype)=0 |
virtual ErrorCode | assign_ids (Tag id_tag, const Range &ents, int start=0)=0 |
Assign sequential IDS to entities in range and store IDs in tag. | |
virtual ErrorCode | assign_ids (Tag id_tag, const EntityHandle *ents, size_t num_ents, int start=0)=0 |
virtual ErrorCode | create_gather_set (EntityHandle &gather_set)=0 |
Create a new gather set with tag GATHER_SET. | |
virtual ErrorCode | get_gather_set (EntityHandle &gather_set)=0 |
Get entity handle of an existing gather set. | |
Static Public Member Functions | |
static void | reorder (const int *order, EntityHandle *conn, int num_elem, int node_per_elem) |
Re-order incoming element connectivity. |
Interface implemented in MOAB which provides memory for mesh reading utilities.
Definition at line 30 of file ReadUtilIface.hpp.
moab::ReadUtilIface::ReadUtilIface | ( | ) | [inline] |
virtual moab::ReadUtilIface::~ReadUtilIface | ( | ) | [inline, virtual] |
virtual ErrorCode moab::ReadUtilIface::assign_ids | ( | Tag | id_tag, |
const Range & | ents, | ||
int | start = 0 |
||
) | [pure virtual] |
Assign sequential IDS to entities in range and store IDs in tag.
Implemented in moab::ReadUtil.
Referenced by moab::ReadSms::add_entities(), moab::ReadNASTRAN::assign_ids(), moab::ReadMCNP5::create_elements(), moab::NestedRefine::create_hm_storage_single_level(), moab::ReadIDEAS::create_vertices(), moab::ReadMCNP5::create_vertices(), moab::ReadTetGen::load_file(), moab::ReadSmf::load_file(), moab::ReadSTL::load_file(), moab::Tqdcfr::load_file(), moab::ReadSms::load_file_impl(), moab::ReadNCDF::read_elements(), moab::ReadNCDF::read_nodes(), and moab::ReadVtk::store_file_ids().
virtual ErrorCode moab::ReadUtilIface::assign_ids | ( | Tag | id_tag, |
const EntityHandle * | ents, | ||
size_t | num_ents, | ||
int | start = 0 |
||
) | [pure 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.
Implemented in moab::ReadUtil.
virtual ErrorCode moab::ReadUtilIface::create_entity_sets | ( | EntityID | num_sets, |
const unsigned * | set_flags, | ||
EntityID | preffered_start_id, | ||
EntityHandle & | actual_start_handle | ||
) | [pure virtual] |
Implemented in moab::ReadUtil.
Referenced by moab::BVHTree::convert_tree(), and moab::ReadHDF5::read_sets().
virtual ErrorCode moab::ReadUtilIface::create_gather_set | ( | EntityHandle & | gather_set | ) | [pure virtual] |
Create a new gather set with tag GATHER_SET.
Implemented in moab::ReadUtil.
Referenced by moab::NCHelperHOMME::create_mesh().
virtual ErrorCode moab::ReadUtilIface::gather_related_ents | ( | Range & | partition, |
Range & | related_ents, | ||
EntityHandle * | file_set = NULL |
||
) | [pure 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 |
file_set | If non-NULL, entity sets contained in this set will be checked; otherwise, all sets in the instance will be checked |
Implemented in moab::ReadUtil.
Referenced by moab::ReadParallel::delete_nonlocal_entities(), and gather_related_test().
virtual ErrorCode moab::ReadUtilIface::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 |
||
) | [pure virtual] |
Given requested number of elements, element type, and number of elements, returns pointer to memory space allocated to store connectivity of those elements; allows direct read of connectivity data into memory
num_elements | Number of elements being requested |
verts_per_element | Number of vertices per element (incl. higher-order nodes) |
mdb_type | Element type |
preferred_start_id | Preferred integer id for first element |
actual_start_handle | Actual integer id for first element (returned) |
array | Pointer to memory allocated for storing connectivity for these elements |
sequence_size | If specified, allocate this sequence size instead of SequenceManager::DEFAULT_VERTEX_SEQUENCE_SIZE |
Implemented in moab::ReadUtil.
Referenced by moab::ReadVtk::allocate_elements(), moab::MeshGeneration::BrickInstance(), compute_dual_mesh(), moab::TempestRemapper::convert_tempest_mesh_private(), create_3dtri_ucd_sequences(), create_coarse_mesh(), moab::ReadCGNS::create_elements(), moab::ReadGmsh::create_elements(), moab::ReadMCNP5::create_elements(), create_elements_block(), create_fine_mesh(), moab::NestedRefine::create_hm_storage_single_level(), moab::NCHelperDomain::create_mesh(), moab::NCHelperScrip::create_mesh(), moab::NCHelperHOMME::create_mesh(), create_mesh_no_holes(), create_mesh_with_holes(), create_regular_mesh(), IntxUtilsCSLAM::create_span_quads(), moab::SpectralMeshTool::create_spectral_elems(), moab::IntxUtils::deep_copy_set_with_quads(), iMOAB_CreateElements(), moab::ReadSmf::load_file(), moab::ReadSTL::load_file(), moab::ReadSms::load_file_impl(), main(), moab::ReadDamsel::process_ent_info(), moab::ReadTetGen::read_elem_file(), moab::ReadABAQUS::read_element_list(), moab::ReadTemplate::read_elements(), moab::ReadNCDF::read_elements(), moab::Tqdcfr::read_elements(), moab::ReadHDF5::read_elems(), moab::ReadHDF5::read_node_adj_elems(), ReadTriangleOutput(), test_coords_connect_iterate(), test_linear_tet(), test_write_invalid_elem(), testB(), and testE().
virtual ErrorCode moab::ReadUtilIface::get_gather_set | ( | EntityHandle & | gather_set | ) | [pure virtual] |
Get entity handle of an existing gather set.
Implemented in moab::ReadUtil.
Referenced by gather_one_cell_var(), test_gather_onevar(), and test_read_parallel().
virtual ErrorCode moab::ReadUtilIface::get_node_coords | ( | const int | num_arrays, |
const int | num_nodes, | ||
const int | preferred_start_id, | ||
EntityHandle & | actual_start_handle, | ||
std::vector< double * > & | arrays, | ||
const int | sequence_size = -1 |
||
) | [pure virtual] |
Given a requested number of vertices and number of coordinates, returns memory space which will be used to store vertex coordinates and information about what handles those new vertices are assigned; allows direct read of coordinate data into memory
num_arrays | Number of node position arrays requested |
num_nodes | Number of nodes |
preferred_start_id | Preferred integer id starting value |
actual_start_handle | Actual starting id value |
arrays | STL vector of double*'s, point to memory storage to be used for these vertices |
sequence_size | If specified, allocate this sequence size instead of SequenceManager::DEFAULT_VERTEX_SEQUENCE_SIZE |
Implemented in moab::ReadUtil.
Referenced by moab::ReadVtk::allocate_vertices(), moab::MeshGeneration::BrickInstance(), compute_dual_mesh(), moab::TempestRemapper::convert_tempest_mesh_private(), create_3dtri_ucd_sequences(), create_coarse_mesh(), moab::NestedRefine::create_hm_storage_single_level(), moab::ReadABAQUS::create_instance_of_part(), moab::NCHelperDomain::create_mesh(), moab::NCHelperScrip::create_mesh(), moab::NCHelperHOMME::create_mesh(), create_mesh_no_holes(), create_mesh_with_holes(), create_regular_mesh(), IntxUtilsCSLAM::create_span_quads(), moab::ReadIDEAS::create_vertices(), moab::ReadMCNP5::create_vertices(), moab::Core::create_vertices(), create_vertices_block(), moab::IntxUtils::deep_copy_set_with_quads(), moab::ReadCGNS::load_file(), moab::ReadGmsh::load_file(), moab::ReadSmf::load_file(), moab::ReadNASTRAN::load_file(), moab::ReadSTL::load_file(), moab::ReadSms::load_file_impl(), moab::ReadDamsel::process_ent_info(), moab::ReadTetGen::read_node_file(), moab::ReadABAQUS::read_node_list(), moab::ReadNCDF::read_nodes(), moab::ReadHDF5::read_nodes(), moab::Tqdcfr::read_nodes(), moab::ReadTemplate::read_vertices(), moab::ReadCCMIO::read_vertices(), ReadTriangleOutput(), test_write_invalid_elem(), testB(), and testE().
virtual ErrorCode moab::ReadUtilIface::get_ordered_vertices | ( | EntityHandle * | bound_ents, |
int * | sense, | ||
int | num_bound, | ||
int | dim, | ||
EntityHandle * | bound_verts, | ||
EntityType & | etype | ||
) | [pure virtual] |
Given an ordered list of bounding entities and the sense of those entities, return an ordered list of vertices
Implemented in moab::ReadUtil.
Referenced by moab::ReadSms::load_file_impl().
void moab::ReadUtilIface::reorder | ( | const int * | order, |
EntityHandle * | conn, | ||
int | num_elem, | ||
int | node_per_elem | ||
) | [inline, static] |
Re-order incoming element connectivity.
Permute the connectivity of each element such that the node order is that of MBCN rather than the target file format.
order | The permutation to use. Must be an array of 'node_per_elem' integers and be a permutation of the values [0..node_per_elem-1]. Such that for a single element: mbcn_conn[order[i]] == target_conn[i] |
conn | The connectivity array to re-order |
num_elem | The number of elements in the connectivity array |
node_per_elem | The number of nodes in each element's connectivity list. |
Definition at line 147 of file ReadUtilIface.hpp.
Referenced by moab::ReadNCDF::read_elements().
{ std::vector< EntityHandle > elem( node_per_elem ); EntityHandle* const end = conn + num_elem * node_per_elem; while( conn != end ) { std::copy( conn, conn + node_per_elem, elem.begin() ); for( int j = 0; j < node_per_elem; ++j ) conn[order[j]] = elem[j]; conn += node_per_elem; } }
virtual ErrorCode moab::ReadUtilIface::update_adjacencies | ( | const EntityHandle | start_handle, |
const int | number_elements, | ||
const int | number_vertices_per_element, | ||
const EntityHandle * | conn_array | ||
) | [pure virtual] |
Update adjacencies Given information about new elements, adjacency information will be updated in MOAB. Think of this function as a way of Readers telling MOAB what elements are new because we aren't using the Interface to create elements.
start_handle | Handle of first new element |
number_elements | Number of new elements |
number_vertices_per_element | Number of vertices in each new element |
conn_array | Connectivity of new elements |
Implemented in moab::ReadUtil.
Referenced by moab::MeshGeneration::BrickInstance(), moab::TempestRemapper::convert_tempest_mesh_private(), moab::ReadCGNS::create_elements(), moab::ReadGmsh::create_elements(), create_fine_mesh(), create_regular_mesh(), moab::IntxUtils::deep_copy_set_with_quads(), iMOAB_CreateElements(), moab::ReadSmf::load_file(), moab::ReadSTL::load_file(), moab::ReadTemplate::read_elements(), moab::ReadNCDF::read_elements(), moab::Tqdcfr::read_elements(), moab::ReadHDF5::read_elems(), moab::ReadHDF5::read_node_adj_elems(), test_adjacencies(), testB(), testE(), moab::ParallelComm::unpack_entities(), moab::ReadHDF5::update_connectivity(), moab::ReadVtk::vtk_create_structured_elems(), and moab::ReadVtk::vtk_read_unstructured_grid().