IOSS 2.0
Loading...
Searching...
No Matches
Iotm::TextMesh Class Reference

#include <Iotm_TextMesh.h>

Public Member Functions

 TextMesh (const std::string &parameters, IOSS_MAYBE_UNUSED int proc_count=1, int my_proc=0)
 
 TextMesh (int proc_count=1, int my_proc=0)
 
 TextMesh ()
 
 TextMesh (const TextMesh &)=delete
 
TextMeshoperator= (const TextMesh &)=delete
 
virtual ~TextMesh ()=default
 
virtual int64_t node_count () const
 
virtual int64_t node_count_proc () const
 
virtual int64_t block_count () const
 
virtual int64_t nodeset_count () const
 
int64_t nodeset_node_count (EntityId id) const
 
virtual int64_t nodeset_node_count_proc (EntityId id) const
 
virtual int64_t sideset_count () const
 
int64_t sideset_side_count (EntityId id) const
 
virtual int64_t sideset_side_count_proc (EntityId id) const
 
int64_t sideblock_side_count (EntityId id, const std::string &sideBlockName) const
 
virtual int64_t sideblock_side_count_proc (EntityId id, const std::string &sideBlockName) const
 
virtual int64_t element_count () const
 
int64_t element_count_proc () const
 
int64_t timestep_count () const
 
virtual int64_t element_count (EntityId block_number) const
 
int64_t element_count_proc (EntityId block_number) const
 
int64_t assembly_count () const
 
virtual std::pair< std::string, int > topology_type (EntityId block_number) const
 
virtual int64_t communication_node_count_proc () const
 
virtual void node_communication_map (Ioss::Int64Vector &map, std::vector< int > &proc)
 
virtual void owning_processor (int *owner, EntityId num_node)
 
virtual void node_map (Ioss::Int64Vector &map) const
 
virtual void node_map (Ioss::IntVector &map) const
 
virtual void element_map (EntityId block_number, Ioss::Int64Vector &map) const
 
virtual void element_map (EntityId block_number, Ioss::IntVector &map) const
 
virtual void element_map (Ioss::Int64Vector &map) const
 
virtual void element_map (Ioss::IntVector &map) const
 
void connectivity (EntityId block_number, Ioss::Int64Vector &connect) const
 
void connectivity (EntityId block_number, Ioss::IntVector &connect) const
 
void connectivity (EntityId block_number, EntityId *connect) const
 
virtual void connectivity (EntityId block_number, int *connect) const
 
virtual void coordinates (std::vector< double > &coord) const
 
virtual void coordinates (double *coord) const
 
virtual void coordinates (std::vector< double > &x, std::vector< double > &y, std::vector< double > &z) const
 
virtual void coordinates (int component, std::vector< double > &xyz) const
 
virtual void coordinates (int component, double *xyz) const
 
virtual void nodeset_nodes (EntityId id, Ioss::Int64Vector &nodes) const
 
virtual void sideset_elem_sides (EntityId id, Ioss::Int64Vector &elemSides) const
 
virtual void sideblock_elem_sides (EntityId sidesetId, const std::string &sideBlockName, Ioss::Int64Vector &elemSides) const
 
virtual std::vector< std::string > sideset_touching_blocks (EntityId set_id) const
 
size_t get_variable_count (Ioss::EntityType type) const
 
std::vector< std::string > get_part_names () const
 
EntityId get_part_id (const std::string &name) const
 
std::vector< std::string > get_nodeset_names () const
 
std::string get_nodeset_name (EntityId id) const
 
EntityId get_nodeset_id (const std::string &name) const
 
std::vector< std::string > get_sideset_names () const
 
std::string get_sideset_name (EntityId id) const
 
EntityId get_sideset_id (const std::string &name) const
 
std::vector< std::string > get_assembly_names () const
 
std::string get_assembly_name (EntityId id) const
 
EntityId get_assembly_id (const std::string &name) const
 
Ioss::EntityType get_assembly_type (const std::string &name) const
 
std::vector< std::string > get_assembly_members (const std::string &name) const
 
void update_block_omissions_from_assemblies (Ioss::Region *region, std::vector< std::string > &assemblyOmissions, std::vector< std::string > &assemblyInclusions, std::vector< std::string > &blockOmissions, std::vector< std::string > &blockInclusions) const
 
unsigned spatial_dimension () const
 
std::vector< SideBlockInfoget_side_block_info_for_sideset (const std::string &name) const
 
std::vector< size_t > get_local_side_block_indices (const std::string &name, const SideBlockInfo &info) const
 
SplitType get_sideset_split_type (const std::string &name) const
 
void compute_block_membership (const std::string &sideSetName, const std::string &sideBlockName, std::vector< std::string > &block_membership) const
 

Static Public Member Functions

static Ioss::EntityType assembly_type_to_entity_type (const AssemblyType type)
 

Private Member Functions

template<typename INT >
void raw_element_map (EntityId block_number, std::vector< INT > &map) const
 
template<typename INT >
void raw_element_map (std::vector< INT > &map) const
 
template<typename INT >
void raw_connectivity (EntityId block_number, INT *connect) const
 
template<typename INT >
void raw_node_map (std::vector< INT > &map) const
 
void set_variable_count (const std::string &type, size_t count)
 
void initialize ()
 
void build_part_to_topology_map ()
 
void build_block_partition_map ()
 
void build_element_connectivity_map ()
 
std::vector< EntityIdget_part_ids (const std::vector< std::string > &partNames)
 
std::vector< size_t > get_part_offsets (const std::vector< EntityId > &partIds)
 
Topology get_topology_for_part (EntityId id) const
 
std::set< EntityIdget_local_element_ids_for_block (EntityId id) const
 
std::set< std::string > get_blocks_touched_by_sideset (const SidesetData *sideset) const
 
void compute_block_membership_impl (const SidesetData &sidesetData, const SideBlockInfo &sideBlock, std::vector< std::string > &sideBlockTouchingBlockParts) const
 

Private Attributes

size_t m_myProcessor {0}
 
size_t m_timestepCount {0}
 
std::map< Ioss::EntityType, size_t > m_variableCount
 
TextMeshData m_data
 
ErrorHandler m_errorHandler
 
std::unordered_map< std::string, Topologym_partToTopology
 
std::unordered_map< EntityId, BlockPartitionm_blockPartition
 
std::unordered_map< EntityId, std::vector< EntityId > > m_elementConnectivity
 

Constructor & Destructor Documentation

◆ TextMesh() [1/4]

Iotm::TextMesh::TextMesh ( const std::string & parameters,
IOSS_MAYBE_UNUSED int proc_count = 1,
int my_proc = 0 )
explicit

◆ TextMesh() [2/4]

Iotm::TextMesh::TextMesh ( int proc_count = 1,
int my_proc = 0 )
explicit

◆ TextMesh() [3/4]

Iotm::TextMesh::TextMesh ( )

◆ TextMesh() [4/4]

Iotm::TextMesh::TextMesh ( const TextMesh & )
delete

◆ ~TextMesh()

virtual Iotm::TextMesh::~TextMesh ( )
virtualdefault

Member Function Documentation

◆ assembly_count()

int64_t Iotm::TextMesh::assembly_count ( ) const

Return number of assemblies in the entire model.

◆ assembly_type_to_entity_type()

Ioss::EntityType Iotm::TextMesh::assembly_type_to_entity_type ( const AssemblyType type)
static

◆ block_count()

int64_t Iotm::TextMesh::block_count ( ) const
virtual

Return number of element blocks in the entire model.

◆ build_block_partition_map()

void Iotm::TextMesh::build_block_partition_map ( )
private

◆ build_element_connectivity_map()

void Iotm::TextMesh::build_element_connectivity_map ( )
private

◆ build_part_to_topology_map()

void Iotm::TextMesh::build_part_to_topology_map ( )
private

◆ communication_node_count_proc()

int64_t Iotm::TextMesh::communication_node_count_proc ( ) const
virtual

◆ compute_block_membership()

void Iotm::TextMesh::compute_block_membership ( const std::string & sideSetName,
const std::string & sideBlockName,
std::vector< std::string > & block_membership ) const

◆ compute_block_membership_impl()

void Iotm::TextMesh::compute_block_membership_impl ( const SidesetData & sidesetData,
const SideBlockInfo & sideBlock,
std::vector< std::string > & sideBlockTouchingBlockParts ) const
private

◆ connectivity() [1/4]

void Iotm::TextMesh::connectivity ( EntityId block_number,
EntityId * connect ) const

◆ connectivity() [2/4]

void Iotm::TextMesh::connectivity ( EntityId block_number,
int * connect ) const
virtual

◆ connectivity() [3/4]

void Iotm::TextMesh::connectivity ( EntityId block_number,
Ioss::Int64Vector & connect ) const

Return the connectivity for the elements on this processor in the block with id 'block_number'. If the elements in this block have 'npe' nodes per element, then the first 'npe' entries in the 'conn' vector will be the nodal connectivity for the first element; the next 'npe' entries are the nodal connectivity for the second element. The 'connect' vector will be resized to the size required to contain the nodal connectivity for the specified block; all information in 'connect' will be overwritten.

◆ connectivity() [4/4]

void Iotm::TextMesh::connectivity ( EntityId block_number,
Ioss::IntVector & connect ) const

◆ coordinates() [1/5]

void Iotm::TextMesh::coordinates ( double * coord) const
virtual

◆ coordinates() [2/5]

void Iotm::TextMesh::coordinates ( int component,
double * xyz ) const
virtual

◆ coordinates() [3/5]

void Iotm::TextMesh::coordinates ( int component,
std::vector< double > & xyz ) const
virtual

Return the coordinates for component 'comp' (1=x, 2=y, 3=z) for all nodes on this processor. The vector will be resized to the size required to contain the nodal coordinates; all information in the vector will be overwritten. It is an error to request the coordinates via this function if a rotation is defined.

◆ coordinates() [4/5]

void Iotm::TextMesh::coordinates ( std::vector< double > & coord) const
virtual

Return the coordinates for all nodes on this processor. The first 3 entries in the 'coord' vector are the x, y, and z coordinates of the first node, etc. The 'coord' vector will be resized to the size required to contain the nodal coordinates; all information in 'coord' will be overwritten.

◆ coordinates() [5/5]

void Iotm::TextMesh::coordinates ( std::vector< double > & x,
std::vector< double > & y,
std::vector< double > & z ) const
virtual

Return the coordinates for all nodes on this processor in separate vectors. The vectors will be resized to the size required to contain the nodal coordinates; all information in the vectors will be overwritten.

◆ element_count() [1/2]

int64_t Iotm::TextMesh::element_count ( ) const
virtual

Return number of elements in all element blocks in the model.

◆ element_count() [2/2]

int64_t Iotm::TextMesh::element_count ( EntityId block_number) const
virtual

Return number of elements in the element block with id 'block_number'.

◆ element_count_proc() [1/2]

int64_t Iotm::TextMesh::element_count_proc ( ) const

Return number of elements in all element blocks on this processor.

◆ element_count_proc() [2/2]

int64_t Iotm::TextMesh::element_count_proc ( EntityId block_number) const

Return number of elements on this processor in the element block with id 'block_number'.

◆ element_map() [1/4]

void Iotm::TextMesh::element_map ( EntityId block_number,
Ioss::Int64Vector & map ) const
virtual

Fill the passed in 'map' argument with the element map "map[local_position] = global_id" for the elements on this processor in block "block_number".

◆ element_map() [2/4]

void Iotm::TextMesh::element_map ( EntityId block_number,
Ioss::IntVector & map ) const
virtual

◆ element_map() [3/4]

void Iotm::TextMesh::element_map ( Ioss::Int64Vector & map) const
virtual

Fill the passed in 'map' argument with the element map "map[local_position] = global_id" for all elements on this processor

◆ element_map() [4/4]

void Iotm::TextMesh::element_map ( Ioss::IntVector & map) const
virtual

◆ get_assembly_id()

EntityId Iotm::TextMesh::get_assembly_id ( const std::string & name) const

◆ get_assembly_members()

std::vector< std::string > Iotm::TextMesh::get_assembly_members ( const std::string & name) const

◆ get_assembly_name()

std::string Iotm::TextMesh::get_assembly_name ( EntityId id) const

◆ get_assembly_names()

std::vector< std::string > Iotm::TextMesh::get_assembly_names ( ) const

◆ get_assembly_type()

Ioss::EntityType Iotm::TextMesh::get_assembly_type ( const std::string & name) const

◆ get_blocks_touched_by_sideset()

std::set< std::string > Iotm::TextMesh::get_blocks_touched_by_sideset ( const SidesetData * sideset) const
private

◆ get_local_element_ids_for_block()

std::set< EntityId > Iotm::TextMesh::get_local_element_ids_for_block ( EntityId id) const
private

◆ get_local_side_block_indices()

std::vector< size_t > Iotm::TextMesh::get_local_side_block_indices ( const std::string & name,
const SideBlockInfo & info ) const

◆ get_nodeset_id()

EntityId Iotm::TextMesh::get_nodeset_id ( const std::string & name) const

◆ get_nodeset_name()

std::string Iotm::TextMesh::get_nodeset_name ( EntityId id) const

◆ get_nodeset_names()

std::vector< std::string > Iotm::TextMesh::get_nodeset_names ( ) const

◆ get_part_id()

EntityId Iotm::TextMesh::get_part_id ( const std::string & name) const

◆ get_part_ids()

std::vector< EntityId > Iotm::TextMesh::get_part_ids ( const std::vector< std::string > & partNames)
private

◆ get_part_names()

std::vector< std::string > Iotm::TextMesh::get_part_names ( ) const

◆ get_part_offsets()

std::vector< size_t > Iotm::TextMesh::get_part_offsets ( const std::vector< EntityId > & partIds)
private

◆ get_side_block_info_for_sideset()

std::vector< SideBlockInfo > Iotm::TextMesh::get_side_block_info_for_sideset ( const std::string & name) const

◆ get_sideset_id()

EntityId Iotm::TextMesh::get_sideset_id ( const std::string & name) const

◆ get_sideset_name()

std::string Iotm::TextMesh::get_sideset_name ( EntityId id) const

◆ get_sideset_names()

std::vector< std::string > Iotm::TextMesh::get_sideset_names ( ) const

◆ get_sideset_split_type()

SplitType Iotm::TextMesh::get_sideset_split_type ( const std::string & name) const

◆ get_topology_for_part()

Topology Iotm::TextMesh::get_topology_for_part ( EntityId id) const
private

◆ get_variable_count()

size_t Iotm::TextMesh::get_variable_count ( Ioss::EntityType type) const
inline

◆ initialize()

void Iotm::TextMesh::initialize ( )
private

◆ node_communication_map()

void Iotm::TextMesh::node_communication_map ( Ioss::Int64Vector & map,
std::vector< int > & proc )
virtual

◆ node_count()

int64_t Iotm::TextMesh::node_count ( ) const
virtual

Return number of nodes in the entire model.

◆ node_count_proc()

int64_t Iotm::TextMesh::node_count_proc ( ) const
virtual

Return number of nodes on this processor.

◆ node_map() [1/2]

void Iotm::TextMesh::node_map ( Ioss::Int64Vector & map) const
virtual

Fill the passed in 'map' argument with the node map "map[local_position] = global_id" for the nodes on this processor.

◆ node_map() [2/2]

void Iotm::TextMesh::node_map ( Ioss::IntVector & map) const
virtual

◆ nodeset_count()

int64_t Iotm::TextMesh::nodeset_count ( ) const
virtual

Return number of nodesets in the entire model.

◆ nodeset_node_count()

int64_t Iotm::TextMesh::nodeset_node_count ( EntityId id) const

Return number of nodeset nodes on nodeset 'id'

◆ nodeset_node_count_proc()

int64_t Iotm::TextMesh::nodeset_node_count_proc ( EntityId id) const
virtual

Return number of nodeset nodes on nodeset 'id' on the current processor

◆ nodeset_nodes()

void Iotm::TextMesh::nodeset_nodes ( EntityId id,
Ioss::Int64Vector & nodes ) const
virtual

Return the list of nodes in nodeset 'id' on this processor. The 'nodes' vector will be resized to the size required to contain the node list. The ids are global ids.

◆ operator=()

TextMesh & Iotm::TextMesh::operator= ( const TextMesh & )
delete

◆ owning_processor()

void Iotm::TextMesh::owning_processor ( int * owner,
EntityId num_node )
virtual

◆ raw_connectivity()

template<typename INT >
void Iotm::TextMesh::raw_connectivity ( EntityId block_number,
INT * connect ) const
private

◆ raw_element_map() [1/2]

template<typename INT >
void Iotm::TextMesh::raw_element_map ( EntityId block_number,
std::vector< INT > & map ) const
private

◆ raw_element_map() [2/2]

template<typename INT >
void Iotm::TextMesh::raw_element_map ( std::vector< INT > & map) const
private

◆ raw_node_map()

template<typename INT >
void Iotm::TextMesh::raw_node_map ( std::vector< INT > & map) const
private

◆ set_variable_count()

void Iotm::TextMesh::set_variable_count ( const std::string & type,
size_t count )
private

◆ sideblock_elem_sides()

void Iotm::TextMesh::sideblock_elem_sides ( EntityId sidesetId,
const std::string & sideBlockName,
Ioss::Int64Vector & elemSides ) const
virtual

◆ sideblock_side_count()

int64_t Iotm::TextMesh::sideblock_side_count ( EntityId id,
const std::string & sideBlockName ) const

Return number of sideblock 'sides' on sideset 'id' and sideblock 'sideBlockName'

◆ sideblock_side_count_proc()

int64_t Iotm::TextMesh::sideblock_side_count_proc ( EntityId id,
const std::string & sideBlockName ) const
virtual

Return number of sideset 'sides' on sideset 'id' and sideblock 'sideBlockName' on the current processor.

◆ sideset_count()

int64_t Iotm::TextMesh::sideset_count ( ) const
virtual

Return number of sidesets in the entire model.

◆ sideset_elem_sides()

void Iotm::TextMesh::sideset_elem_sides ( EntityId id,
Ioss::Int64Vector & elemSides ) const
virtual

Return the list of the face/ordinal pairs "elem_sides[local_position] = element global_id" and "elem_sides[local_position+1] = element local face id (0-based)" for the faces in sideset 'id' on this processor. The 'elem_sides' vector will be resized to the size required to contain the list. The element ids are global ids, the side ordinal is 0-based.

◆ sideset_side_count()

int64_t Iotm::TextMesh::sideset_side_count ( EntityId id) const

Return number of sideset 'sides' on sideset 'id'

◆ sideset_side_count_proc()

int64_t Iotm::TextMesh::sideset_side_count_proc ( EntityId id) const
virtual

Return number of sideset 'sides' on sideset 'id' on the current processor.

◆ sideset_touching_blocks()

std::vector< std::string > Iotm::TextMesh::sideset_touching_blocks ( EntityId set_id) const
virtual

◆ spatial_dimension()

unsigned Iotm::TextMesh::spatial_dimension ( ) const

◆ timestep_count()

int64_t Iotm::TextMesh::timestep_count ( ) const
inline

◆ topology_type()

std::pair< std::string, int > Iotm::TextMesh::topology_type ( EntityId block_number) const
virtual

Returns pair containing "topology type string" and "number of nodes / element". The topology type string will be "hex8" for the hex element block and "shell4" for the shell element blocks.

◆ update_block_omissions_from_assemblies()

void Iotm::TextMesh::update_block_omissions_from_assemblies ( Ioss::Region * region,
std::vector< std::string > & assemblyOmissions,
std::vector< std::string > & assemblyInclusions,
std::vector< std::string > & blockOmissions,
std::vector< std::string > & blockInclusions ) const

Member Data Documentation

◆ m_blockPartition

std::unordered_map<EntityId, BlockPartition> Iotm::TextMesh::m_blockPartition
private

◆ m_data

TextMeshData Iotm::TextMesh::m_data
private

◆ m_elementConnectivity

std::unordered_map<EntityId, std::vector<EntityId> > Iotm::TextMesh::m_elementConnectivity
private

◆ m_errorHandler

ErrorHandler Iotm::TextMesh::m_errorHandler
private

◆ m_myProcessor

size_t Iotm::TextMesh::m_myProcessor {0}
private

◆ m_partToTopology

std::unordered_map<std::string, Topology> Iotm::TextMesh::m_partToTopology
private

◆ m_timestepCount

size_t Iotm::TextMesh::m_timestepCount {0}
private

◆ m_variableCount

std::map<Ioss::EntityType, size_t> Iotm::TextMesh::m_variableCount
private

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