|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
#include <LinkCSRData.hpp>
Public Types | |
Aliases | |
| using | entity_value_t = stk::mesh::Entity::entity_value_type |
| using | ConnectedEntities = stk::util::StridedArray<const stk::mesh::Entity> |
| using | LinkCSRPartition = LinkCSRPartitionT<MemSpace> |
| using | LinkCSRPartitionView = Kokkos::View<LinkCSRPartition*, stk::ngp::UVMMemSpace> |
| using | LinkBucketToPartitionIdMap = Kokkos::UnorderedMap<unsigned, unsigned, MemSpace> |
| using | SelectorToPartitionsMap = std::map<stk::mesh::Selector, LinkCSRPartitionView> |
| using | PartitionKeyToIdMap = std::map<impl::PartitionKey, unsigned> |
Public Member Functions | |
Constructors and destructor | |
| LinkCSRDataT ()=default | |
| Default constructor. | |
| LinkCSRDataT (const LinkCSRDataT &)=default | |
| Default copy or move constructors/operators. | |
| LinkCSRDataT (LinkCSRDataT &&)=default | |
| LinkCSRDataT & | operator= (const LinkCSRDataT &)=default |
| LinkCSRDataT & | operator= (LinkCSRDataT &&)=default |
| LinkCSRDataT (stk::mesh::BulkData &bulk_data, LinkMetaData &link_meta_data) | |
| Construct from scratch. | |
| template<typename OtherMemSpace> | |
| LinkCSRDataT (LinkCSRDataT< OtherMemSpace > &other) | |
| Construct from a LinkCSRDataT with a different memory space. Does NOT perform a deep copy. Simply steals their pointers to the bulk data and meta data. | |
| virtual | ~LinkCSRDataT () |
| Destructor. | |
Getters | |
| bool | is_valid () const noexcept |
| Get if the link data is valid. | |
| const LinkMetaData & | link_meta_data () const |
| Fetch the link meta data manager. | |
| LinkMetaData & | link_meta_data () |
| Fetch the link meta data manager. | |
| const stk::mesh::BulkData & | bulk_data () const |
| Fetch the bulk data manager we extend. | |
| stk::mesh::BulkData & | bulk_data () |
| Fetch the bulk data manager we extend. | |
| stk::mesh::EntityRank | link_rank () const noexcept |
| Fetch the link rank. | |
CSR Partition management | |
| const LinkCSRPartitionView & | get_all_crs_partitions () const noexcept |
| Get all CSR partitions. | |
| const LinkCSRPartitionView & | get_or_create_crs_partitions (const stk::mesh::Selector &selector) const |
| Get the CSR partitions for a given link subset selector (Memoized/host only/not thread safe). | |
| LinkBucketToPartitionIdMap | get_updated_stk_link_bucket_to_partition_id_map () |
| Get the map from link bucket id to partition id (memoized/host only/not thread safe). | |
| void | update_stk_link_bucket_to_partition_id_map () |
| Update the map from link bucket id to partition id (host only/not thread safe). | |
| void | clear_structural_caches () |
| Clear all memoized CSR structure. The next partition request rebuilds from current mesh buckets. | |
| void | mark_crs_bucket_conns_dirty (const stk::mesh::Selector &selector) |
| Mark every CSR bucket-connection in the selected partitions as dirty. | |
| void | mark_all_crs_bucket_conns_dirty () |
| Mark every CSR bucket-connection in every partition as dirty. | |
| template<typename OtherMemSpace> | |
| void | synchronize_with (LinkCSRDataT< OtherMemSpace > &src) |
| stk::mesh::Selector | all_selector () const |
Protected Member Functions | |
Internal methods | |
| unsigned | get_linker_dimensionality (const stk::mesh::Entity &linker) const |
| Get the dimensionality of a linker. | |
| unsigned | get_linker_dimensionality (const stk::mesh::Bucket &linker_bucket) const |
| Get the dimensionality of a linker bucket. | |
| unsigned | get_linker_dimensionality (const impl::PartitionKey &partition_key) const |
| Get the dimensionality of a linker partition. | |
| void | destroy_partition_view (LinkCSRPartitionView &view) const |
| void | clear_partitions_and_views () |
| void | clear_stk_link_bucket_to_partition_id_map () |
| Clear the memoized map from STK link bucket id to partition id. | |
| using mundy::mesh::LinkCSRDataT< MemSpace >::entity_value_t = stk::mesh::Entity::entity_value_type |
| using mundy::mesh::LinkCSRDataT< MemSpace >::ConnectedEntities = stk::util::StridedArray<const stk::mesh::Entity> |
| using mundy::mesh::LinkCSRDataT< MemSpace >::LinkCSRPartition = LinkCSRPartitionT<MemSpace> |
| using mundy::mesh::LinkCSRDataT< MemSpace >::LinkCSRPartitionView = Kokkos::View<LinkCSRPartition*, stk::ngp::UVMMemSpace> |
| using mundy::mesh::LinkCSRDataT< MemSpace >::LinkBucketToPartitionIdMap = Kokkos::UnorderedMap<unsigned, unsigned, MemSpace> |
| using mundy::mesh::LinkCSRDataT< MemSpace >::SelectorToPartitionsMap = std::map<stk::mesh::Selector, LinkCSRPartitionView> |
| using mundy::mesh::LinkCSRDataT< MemSpace >::PartitionKeyToIdMap = std::map<impl::PartitionKey, unsigned> |
|
default |
|
default |
|
default |
|
inline |
|
inlineexplicit |
This constructor exists so that we can use NgpLinkCSRData(LinkCSRData) to perform a shallow copy if NgpMemSpace == MemSpace and this operator otherwise.
|
inlinevirtual |
|
default |
|
default |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
Safety: This view is always safe to use and the reference is valid as long as the LinkData is valid, which has the same lifetime as the bulk data manager. It remains valid even during mesh modifications.
|
inline |
This is the only way for either Mundy or users to create a new partition. The returned view is persistent but its contents/size will change dynamically as new partitions are created and destroyed. The only promise we will make is to never delete a partition outside of a modification cycle.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
| linker | [in] The linker (must be valid and of the correct rank). |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |