Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::mesh::LinkCOOData Class Reference

#include <LinkCOOData.hpp>

Public Member Functions

Constructors and destructor
 LinkCOOData ()=default
 Default constructor.
 LinkCOOData (const LinkCOOData &)=default
 Default copy or move constructors/operators.
 LinkCOOData (LinkCOOData &&)=default
LinkCOODataoperator= (const LinkCOOData &)=default
LinkCOODataoperator= (LinkCOOData &&)=default
 LinkCOOData (stk::mesh::BulkData &bulk_data, LinkMetaData &link_meta_data)
 Canonical constructor.
virtual ~LinkCOOData ()=default
 Destructor.
Getters
bool is_valid () const noexcept
 Get if the link data is valid.
const LinkMetaDatalink_meta_data () const
 Fetch the link meta data manager.
LinkMetaDatalink_meta_data ()
 Fetch the link meta data manager.
const stk::mesh::BulkDatabulk_data () const
 Fetch the bulk data manager we extend.
stk::mesh::BulkDatabulk_data ()
 Fetch the bulk data manager we extend.
stk::mesh::EntityRank link_rank () const noexcept
 Fetch the link rank.
Dynamic link to linked entity relationships
void declare_relation (const stk::mesh::Entity &linker, const stk::mesh::Entity &linked_entity, unsigned link_ordinal) const
 Declare a relation between a linker and a linked entity.
void destroy_relation (const stk::mesh::Entity &linker, unsigned link_ordinal) const
 Delete a relation between a linker and a linked entity.
stk::mesh::Entity get_linked_entity (const stk::mesh::Entity &linker, unsigned link_ordinal) const
 Get the linked entity for a given linker and link ordinal.
stk::mesh::FastMeshIndex get_linked_entity_index (const stk::mesh::Entity &linker, unsigned link_ordinal) const
 Get the linked entity index for a given linker and link ordinal.
stk::mesh::EntityId get_linked_entity_id (const stk::mesh::Entity &linker, unsigned link_ordinal) const
 Get the linked entity id for a given linker and link ordinal.
stk::mesh::EntityRank get_linked_entity_rank (const stk::mesh::Entity &linker, unsigned link_ordinal) const
 Get the linked entity rank for a given linker and link ordinal.

Friends

Friends <3
class LinkData

Internal restart helpers

stk::mesh::Entity get_linked_entity_crs (const stk::mesh::Entity &linker, unsigned link_ordinal) const
 Get the linked entity for a given linker and link ordinal (as last seen by the CSR connectivity).
bool get_link_crs_needs_updated (const stk::mesh::Entity &linker) const
 Get if the CSR connectivity for a link needs to be updated.

Constructor & Destructor Documentation

◆ LinkCOOData() [1/4]

mundy::mesh::LinkCOOData::LinkCOOData ( )
default

◆ LinkCOOData() [2/4]

mundy::mesh::LinkCOOData::LinkCOOData ( const LinkCOOData & )
default

◆ LinkCOOData() [3/4]

mundy::mesh::LinkCOOData::LinkCOOData ( LinkCOOData && )
default

◆ LinkCOOData() [4/4]

mundy::mesh::LinkCOOData::LinkCOOData ( stk::mesh::BulkData & bulk_data,
LinkMetaData & link_meta_data )
inlineexplicit

◆ ~LinkCOOData()

virtual mundy::mesh::LinkCOOData::~LinkCOOData ( )
virtualdefault

Member Function Documentation

◆ operator=() [1/2]

LinkCOOData & mundy::mesh::LinkCOOData::operator= ( const LinkCOOData & )
default

◆ operator=() [2/2]

LinkCOOData & mundy::mesh::LinkCOOData::operator= ( LinkCOOData && )
default

◆ is_valid()

bool mundy::mesh::LinkCOOData::is_valid ( ) const
inlinenoexcept

◆ link_meta_data() [1/2]

const LinkMetaData & mundy::mesh::LinkCOOData::link_meta_data ( ) const
inline

◆ link_meta_data() [2/2]

LinkMetaData & mundy::mesh::LinkCOOData::link_meta_data ( )
inline

◆ bulk_data() [1/2]

const stk::mesh::BulkData & mundy::mesh::LinkCOOData::bulk_data ( ) const
inline

◆ bulk_data() [2/2]

stk::mesh::BulkData & mundy::mesh::LinkCOOData::bulk_data ( )
inline

◆ link_rank()

stk::mesh::EntityRank mundy::mesh::LinkCOOData::link_rank ( ) const
inlinenoexcept

◆ declare_relation()

void mundy::mesh::LinkCOOData::declare_relation ( const stk::mesh::Entity & linker,
const stk::mesh::Entity & linked_entity,
unsigned link_ordinal ) const
inline

To explain ordinals:

If a linker has dimensionality 3 then it can have up to 3 linked entities. The first linked entity has ordinal 0, the second has ordinal 1, and so on.

Importantly, the relationship between links and its linked entities is static with fixed size. If you fetch the linked entities and have only declared the first two, then the third will be invalid. This is a slight deviation from STK, which would return a set of two valid entities and provide access to their ordinals.

How does a link attain a certain dimensionality?

A link's dimensionality is determined by the set of parts that it belongs to. When link parts are declared, they are assigned a dimensionality. If a link belongs to multiple link parts, then the maximum dimensionality of those parts is the link's dimensionality.

TODO(palmerb4): Bounds check the link ordinal.

Parameters
linker[in] The linker (must be valid and of the correct rank).
linked_entity[in] The linked entity (may be invalid).
link_ordinal[in] The ordinal of the linked entity.

◆ destroy_relation()

void mundy::mesh::LinkCOOData::destroy_relation ( const stk::mesh::Entity & linker,
unsigned link_ordinal ) const
inline
Parameters
linker[in] The linker (must be valid and of the correct rank).
link_ordinal[in] The ordinal of the linked entity.

◆ get_linked_entity()

stk::mesh::Entity mundy::mesh::LinkCOOData::get_linked_entity ( const stk::mesh::Entity & linker,
unsigned link_ordinal ) const
inline
Parameters
linker[in] The linker (must be valid and of the correct rank).
link_ordinal[in] The ordinal of the linked entity.

◆ get_linked_entity_index()

stk::mesh::FastMeshIndex mundy::mesh::LinkCOOData::get_linked_entity_index ( const stk::mesh::Entity & linker,
unsigned link_ordinal ) const
inline
Parameters
linker[in] The linker (must be valid and of the correct rank).
link_ordinal[in] The ordinal of the linked entity.

◆ get_linked_entity_id()

stk::mesh::EntityId mundy::mesh::LinkCOOData::get_linked_entity_id ( const stk::mesh::Entity & linker,
unsigned link_ordinal ) const
inline
Parameters
linker[in] The linker (must be valid and of the correct rank).
link_ordinal[in] The ordinal of the linked entity.

◆ get_linked_entity_rank()

stk::mesh::EntityRank mundy::mesh::LinkCOOData::get_linked_entity_rank ( const stk::mesh::Entity & linker,
unsigned link_ordinal ) const
inline
Parameters
linker[in] The linker (must be valid and of the correct rank).
link_ordinal[in] The ordinal of the linked entity.

◆ get_linked_entity_crs()

stk::mesh::Entity mundy::mesh::LinkCOOData::get_linked_entity_crs ( const stk::mesh::Entity & linker,
unsigned link_ordinal ) const
inlineprotected
Parameters
linker[in] The linker (must be valid and of the correct rank).
link_ordinal[in] The ordinal of the linked entity.

◆ get_link_crs_needs_updated()

bool mundy::mesh::LinkCOOData::get_link_crs_needs_updated ( const stk::mesh::Entity & linker) const
inlineprotected

◆ LinkData

friend class LinkData
friend