IOSS 2.0
Loading...
Searching...
No Matches
Ioss::SideBlock Class Reference

A collection of element sides having the same topology. More...

#include <Ioss_SideBlock.h>

Inheritance diagram for Ioss::SideBlock:
[legend]
Collaboration diagram for Ioss::SideBlock:
[legend]

Public Member Functions

 SideBlock (DatabaseIO *io_database, const std::string &my_name, const std::string &side_type, const std::string &element_type, size_t side_count)
 Create a side block.
 
 SideBlock (const SideBlock &other)
 
IOSS_NODISCARD std::string type_string () const override
 Get the name of the particular type of entity.
 
IOSS_NODISCARD std::string short_type_string () const override
 Get a short name of the particular type of entity.
 
IOSS_NODISCARD std::string contains_string () const override
 What does this entity contain.
 
IOSS_NODISCARD EntityType type () const override
 Get the EntityType, which indicates the particular type of GroupingEntity this is.
 
IOSS_NODISCARD const SideSetowner () const
 
IOSS_NODISCARD const Ioss::GroupingEntitycontained_in () const override
 
void block_membership (Ioss::NameList &block_members) override
 Get list of blocks that the entities in this GroupingEntity "touch".
 
IOSS_NODISCARD Property get_implicit_property (const std::string &my_name) const override
 Calculate and get an implicit property.
 
IOSS_NODISCARD const ElementBlockparent_element_block () const
 
void set_parent_element_block (const ElementBlock *element_block)
 
IOSS_NODISCARD const EntityBlockparent_block () const
 
void set_parent_block (const EntityBlock *block)
 
IOSS_NODISCARD const ElementTopologyparent_element_topology () const
 
IOSS_NODISCARD int get_consistent_side_number () const
 
void set_consistent_side_number (int side)
 
IOSS_NODISCARD bool operator== (const SideBlock &rhs) const
 
IOSS_NODISCARD bool operator!= (const SideBlock &rhs) const
 
IOSS_NODISCARD bool equal (const SideBlock &rhs) const
 
- Public Member Functions inherited from Ioss::EntityBlock
EntityBlockoperator= (const EntityBlock &)=delete
 
IOSS_NODISCARD const ElementTopologytopology () const
 Get the topology of the entities in the block.
 
IOSS_NODISCARD bool contains (size_t local_id) const
 Determine whether the block contains the entity with a given id.
 
void set_offset (size_t offset)
 Set the 'offset' for the block.
 
IOSS_NODISCARD size_t get_offset () const
 Get the 'offset' for the block.
 
IOSS_NODISCARD bool operator== (const Ioss::EntityBlock &rhs) const
 
IOSS_NODISCARD bool operator!= (const Ioss::EntityBlock &rhs) const
 
IOSS_NODISCARD bool equal (const Ioss::EntityBlock &rhs) const
 
- Public Member Functions inherited from Ioss::GroupingEntity
 GroupingEntity ()=default
 
 GroupingEntity (DatabaseIO *io_database, const std::string &my_name, int64_t entity_count)
 Base class constructor adds "name" and "entity_count" properties to the entity.
 
 GroupingEntity (const GroupingEntity &other)
 
GroupingEntityoperator= (const GroupingEntity &rhs)=delete
 
virtual ~GroupingEntity ()
 
IOSS_NODISCARD State get_state () const
 Get the current Ioss::State of the entity.
 
IOSS_NODISCARD DatabaseIOget_database () const
 
void set_database (DatabaseIO *io_database)
 
void reset_database (DatabaseIO *io_database)
 
virtual void delete_database ()
 
IOSS_NODISCARD const std::string & name () const
 Get name of entity.
 
void set_name (const std::string &new_name)
 Set the name of the entity.
 
IOSS_NODISCARD std::string generic_name () const
 Get a generated name based on the type of the entity and the id.
 
IOSS_NODISCARD bool is_alias (const std::string &my_name) const
 
IOSS_NODISCARD std::string get_filename () const
 Get the file name associated with the database containing this entity.
 
void property_add (const Property &new_prop)
 Add a property to the entity's property manager.
 
void property_erase (const std::string &property_name)
 Remove a property from the entity's property manager.
 
IOSS_NODISCARD bool property_exists (const std::string &property_name) const
 Checks if a property exists in the entity's property manager.
 
IOSS_NODISCARD Property get_property (const std::string &property_name) const
 Get the Property from the property manager associated with the entity.
 
IOSS_NODISCARD int64_t get_optional_property (const std::string &property, int64_t optional_value) const
 
IOSS_NODISCARD std::string get_optional_property (const std::string &property_name, const std::string &optional_value) const
 
IOSS_NODISCARD NameList property_describe () const
 Get the names of all properties in the property manager for this entity.
 
int property_describe (NameList *names) const
 Get the names of all properties in the property manager for this entity.
 
IOSS_NODISCARD NameList property_describe (Ioss::Property::Origin origin) const
 
int property_describe (Ioss::Property::Origin origin, NameList *names) const
 
IOSS_NODISCARD size_t property_count () const
 Get the number of properties defined in the property manager for this entity.
 
void property_update (const std::string &property, int64_t value) const
 
void property_update (const std::string &property, const std::string &value) const
 
void field_add (Field new_field)
 Add a field to the entity's field manager.
 
void field_erase (const std::string &field_name)
 Remove a field from the entity's field manager.
 
void field_erase (Field::RoleType role)
 Remove all fields of type role from the entity's field manager.
 
IOSS_NODISCARD bool field_exists (const std::string &field_name) const
 Checks if a field with a given name exists in the entity's field manager.
 
IOSS_NODISCARD Field get_field (const std::string &field_name) const
 Get a field from the entity's field manager.
 
IOSS_NODISCARD const Fieldget_fieldref (const std::string &field_name) const
 Get a reference to a field from the entity's field manager.
 
int field_describe (NameList *names) const
 Get the names of all fields in the entity's field manager.
 
IOSS_NODISCARD NameList field_describe () const
 Get the names of all fields in the entity's field manager.
 
int field_describe (Field::RoleType role, NameList *names) const
 Get the names of all fields of a specified RoleType in the entity's field manager.
 
IOSS_NODISCARD NameList field_describe (Field::RoleType role) const
 Get the names of all fields of a specified RoleType in the entity's field manager.
 
IOSS_NODISCARD size_t field_count () const
 Get the number of fields in the entity's field manager.
 
IOSS_NODISCARD size_t field_count (Field::RoleType role) const
 Get the number of fields with the given role (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc.) in the entity's field manager.
 
IOSS_NODISCARD bool check_for_duplicate (const Ioss::Field &new_field) const
 
int64_t get_field_data (const std::string &field_name, void *data, size_t data_size) const
 Read field data from the database file into memory using a pointer.
 
int64_t put_field_data (const std::string &field_name, void *data, size_t data_size) const
 Write field data from memory into the database file using a pointer.
 
int64_t get_field_data (const std::string &field_name, void **data, size_t *data_size) const
 
template<typename T >
int64_t get_field_data (const std::string &field_name, std::vector< T > &data) const
 Read type 'T' field data from the database file into memory using a std::vector.
 
template<typename T >
int64_t put_field_data (const std::string &field_name, const std::vector< T > &data) const
 Write type 'T' field data from memory into the database file using a std::vector.
 
template<typename T >
int64_t put_field_data (const std::string &field_name, std::vector< T > &data) const
 
IOSS_NODISCARD Ioss::Field::BasicType field_int_type () const
 
IOSS_NODISCARD unsigned int hash () const
 
IOSS_NODISCARD int64_t entity_count () const
 
IOSS_NODISCARD bool operator!= (const GroupingEntity &rhs) const
 
IOSS_NODISCARD bool operator== (const GroupingEntity &rhs) const
 
IOSS_NODISCARD bool equal (const GroupingEntity &rhs) const
 

Static Public Member Functions

static IOSS_NODISCARD std::string generate_sideblock_name (const std::string &sideset_name, const std::string &block_or_element, const std::string &face_topology_name)
 

Protected Member Functions

int64_t internal_get_field_data (const Field &field, void *data, size_t data_size) const override
 
int64_t internal_put_field_data (const Field &field, void *data, size_t data_size) const override
 
int64_t internal_get_zc_field_data (const Field &field, void **data, size_t *data_size) const override
 
- Protected Member Functions inherited from Ioss::EntityBlock
 EntityBlock (DatabaseIO *io_database, const std::string &my_name, const std::string &entity_type, size_t entity_cnt)
 Constructor adds "name" and "entity_count" properties to the entity and specifies the topology type for the entity block.
 
 EntityBlock (const EntityBlock &)=default
 
bool equal_ (const Ioss::EntityBlock &rhs, bool quiet) const
 
- Protected Member Functions inherited from Ioss::GroupingEntity
void count_attributes () const
 
bool set_state (State new_state)
 
void really_delete_database ()
 
IOSS_NODISCARD bool equal_ (const GroupingEntity &rhs, bool quiet) const
 

Private Member Functions

bool equal_ (const SideBlock &rhs, bool quiet) const
 

Private Attributes

const SideSetowner_ {nullptr}
 
ElementTopologyparentTopology_ {nullptr}
 
const EntityBlockparentBlock_ {nullptr}
 
Ioss::NameList blockMembership {}
 
int consistentSideNumber {-1}
 

Friends

class SideSet
 

Additional Inherited Members

- Protected Attributes inherited from Ioss::EntityBlock
ElementTopologytopology_ {nullptr}
 
size_t idOffset {0}
 
- Protected Attributes inherited from Ioss::GroupingEntity
PropertyManager properties
 
FieldManager fields
 
int64_t entityCount = 0
 

Detailed Description

A collection of element sides having the same topology.

Constructor & Destructor Documentation

◆ SideBlock() [1/2]

Ioss::SideBlock::SideBlock ( Ioss::DatabaseIO * io_database,
const std::string & my_name,
const std::string & side_type,
const std::string & element_type,
size_t side_count )

Create a side block.

Parameters
[in]io_databaseThe database associated with the region containing the side block.
[in]my_nameThe side block's name.
[in]side_typeThe name of the side topology type for the side block.
[in]element_typeThe name of the element topology of the parent element type for the side block.
[in]side_countThe number of sides in the side block.

◆ SideBlock() [2/2]

Ioss::SideBlock::SideBlock ( const SideBlock & other)

Member Function Documentation

◆ block_membership()

void Ioss::SideBlock::block_membership ( Ioss::NameList & )
overridevirtual

Get list of blocks that the entities in this GroupingEntity "touch".

For a SideSet, returns a list of the element blocks that the elements in the set belong to. For others, it returns an empty vector. Entries are pushed onto the "block_members" vector, so it will be appended to if it is not empty at entry to the function.

Reimplemented from Ioss::GroupingEntity.

◆ contained_in()

IOSS_NODISCARD const Ioss::GroupingEntity * Ioss::SideBlock::contained_in ( ) const
inlineoverridevirtual

Return the GroupingEntity pointer of the "object" that this entity is contained in. For example, a SideBlock would return the SideSet that "owns" the SideBlock. Most GroupingEntities would return the containing Region A region would return itself(?) A NodeBlock containing the subset of nodes in a StructuredBlock would return that StructuredBlock.

Reimplemented from Ioss::GroupingEntity.

◆ contains_string()

IOSS_NODISCARD std::string Ioss::SideBlock::contains_string ( ) const
inlineoverridevirtual

What does this entity contain.

Returns
The name of the thing this entity contains.

Implements Ioss::GroupingEntity.

◆ equal()

bool Ioss::SideBlock::equal ( const SideBlock & rhs) const

◆ equal_()

bool Ioss::SideBlock::equal_ ( const SideBlock & rhs,
bool quiet ) const
private

◆ generate_sideblock_name()

std::string Ioss::SideBlock::generate_sideblock_name ( const std::string & sideset_name,
const std::string & block_or_element,
const std::string & face_topology_name )
static

For externally defined sidesets/sideblocks, attempt to provide the sideblock name that will be generated if the database is read and the sideblocks are generated from the sideset at the read phase. Since sideblocks are not explicitly stored on some of the database types (e.g. exodus), the IOSS code generates the sideblocks from the sidesets when reading the database. We want to maximize the possibility that the same sideblock names will be generated at that read step as the application is using for sideblocks that it generates internally to be output to a restart file that is later read...

Parameters
[in]sideset_nameThe name of the sideset that this sideblock will be a member of.
[in]block_or_elementDepending on the SurfaceSplitType behavior for this database, this is either the name of the element block that the sideblock is applied to (SPLIT_BY_ELEMENT_BLOCK) or the topology name of the elements that the sideblock faces are part of (SPLIT_BY_TOPOLOGIES) or "UNKNOWN" if mixed topology (SPLIT_BY_DONT_SPLIT)
[in]face_topology_nameThe name of the topology of the sideblock faces. "UNKNOWN" if not homogeneous.
Returns
The generated sideblock name.

◆ get_consistent_side_number()

int Ioss::SideBlock::get_consistent_side_number ( ) const

◆ get_implicit_property()

Ioss::Property Ioss::SideBlock::get_implicit_property ( const std::string & my_name) const
overridevirtual

Calculate and get an implicit property.

These are calculated from data stored in the EntityBlock instead of having an explicit value assigned. An example would be 'topology_node_count' for an ElementBlock. Note that even though this is a pure virtual function, an implementation is provided to return properties that are common to all 'block'-type grouping entities. Derived classes should call 'EntityBlock::get_implicit_property' if the requested property is not specific to their type.

Implements Ioss::EntityBlock.

◆ internal_get_field_data()

int64_t Ioss::SideBlock::internal_get_field_data ( const Field & field,
void * data,
size_t data_size ) const
overrideprotectedvirtual

Implements Ioss::GroupingEntity.

◆ internal_get_zc_field_data()

int64_t Ioss::SideBlock::internal_get_zc_field_data ( const Field & field,
void ** data,
size_t * data_size ) const
overrideprotectedvirtual

Implements Ioss::GroupingEntity.

◆ internal_put_field_data()

int64_t Ioss::SideBlock::internal_put_field_data ( const Field & field,
void * data,
size_t data_size ) const
overrideprotectedvirtual

Implements Ioss::GroupingEntity.

◆ operator!=()

bool Ioss::SideBlock::operator!= ( const SideBlock & rhs) const

◆ operator==()

bool Ioss::SideBlock::operator== ( const SideBlock & rhs) const

◆ owner()

IOSS_NODISCARD const SideSet * Ioss::SideBlock::owner ( ) const
inline

◆ parent_block()

IOSS_NODISCARD const EntityBlock * Ioss::SideBlock::parent_block ( ) const
inline

◆ parent_element_block()

IOSS_NODISCARD const ElementBlock * Ioss::SideBlock::parent_element_block ( ) const
inline

◆ parent_element_topology()

IOSS_NODISCARD const ElementTopology * Ioss::SideBlock::parent_element_topology ( ) const
inline

◆ set_consistent_side_number()

void Ioss::SideBlock::set_consistent_side_number ( int side)
inline

◆ set_parent_block()

void Ioss::SideBlock::set_parent_block ( const EntityBlock * block)
inline

◆ set_parent_element_block()

void Ioss::SideBlock::set_parent_element_block ( const ElementBlock * element_block)
inline

◆ short_type_string()

IOSS_NODISCARD std::string Ioss::SideBlock::short_type_string ( ) const
inlineoverridevirtual

Get a short name of the particular type of entity.

Returns
The short name of the particular type of entity.

Implements Ioss::GroupingEntity.

◆ type()

IOSS_NODISCARD EntityType Ioss::SideBlock::type ( ) const
inlineoverridevirtual

Get the EntityType, which indicates the particular type of GroupingEntity this is.

Returns
The particular EntityType of this GroupingEntity.

Implements Ioss::GroupingEntity.

◆ type_string()

IOSS_NODISCARD std::string Ioss::SideBlock::type_string ( ) const
inlineoverridevirtual

Get the name of the particular type of entity.

Returns
The name of the particular type of entity.

Implements Ioss::GroupingEntity.

Friends And Related Symbol Documentation

◆ SideSet

friend class SideSet
friend

Member Data Documentation

◆ blockMembership

Ioss::NameList Ioss::SideBlock::blockMembership {}
private

◆ consistentSideNumber

int Ioss::SideBlock::consistentSideNumber {-1}
mutableprivate

◆ owner_

const SideSet* Ioss::SideBlock::owner_ {nullptr}
private

◆ parentBlock_

const EntityBlock* Ioss::SideBlock::parentBlock_ {nullptr}
private

◆ parentTopology_

ElementTopology* Ioss::SideBlock::parentTopology_ {nullptr}
private

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