Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar > Class Template Reference

ArborX dense 2D neighbor list whose stored entries carry per-object periodic image shifts. More...

#include <ArborX2dNeighborList.hpp>

Inheritance diagram for mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >:
[legend]

Public Types

Aliases
using memory_space = MemorySpace
using execution_space = typename MemorySpace::execution_space
using image_shift_scalar = ImageShiftScalar
using size_type = size_t
using source_index_type = size_type
using image_shift_type = mundy::Vector3<image_shift_scalar>
using entity_view_t = Kokkos::View<stk::mesh::Entity*, memory_space>
using count_view_t = Kokkos::View<size_type*, memory_space>
using source_index_view_t = Kokkos::View<source_index_type**, memory_space>
using image_shift_view_t = Kokkos::View<image_shift_type**, memory_space>
using target_shift_view_t = Kokkos::View<image_shift_type*, memory_space>

Public Member Functions

Constructors
 PeriodicArborX2dNeighborList ()=default
 Default constructor.
 PeriodicArborX2dNeighborList (const PeriodicArborX2dNeighborList &)=default
 Default copy and move constructors/operators.
 PeriodicArborX2dNeighborList (PeriodicArborX2dNeighborList &&)=default
PeriodicArborX2dNeighborListoperator= (const PeriodicArborX2dNeighborList &)=default
PeriodicArborX2dNeighborListoperator= (PeriodicArborX2dNeighborList &&)=default
 PeriodicArborX2dNeighborList (const stk::mesh::Selector &target_selector, const stk::mesh::Selector &source_selector, const entity_view_t &target_entities, const entity_view_t &source_entities, const target_shift_view_t &target_image_shifts, const count_view_t &neighbor_counts, const source_index_view_t &source_owner_indices, const image_shift_view_t &source_image_shifts)
 Construct a periodic list from already-built dense storage.
Accessors
size_type num_targets () const noexcept
 Get the number of enumerable target owners.
size_type num_sources () const noexcept
 Get the number of enumerable source owners.
const stk::mesh::Selector & target_selector () const noexcept
 Get the selector defining the target owner chunk.
const stk::mesh::Selector & source_selector () const noexcept
 Get the selector defining the source owner chunk.
size_type size () const noexcept
 Get the total number of stored periodic neighbor pairs.
size_type max_neighbors_per_target () const noexcept
 Get the allocated row width for each target owner.
size_type num_neighbors (size_type target_index) const
 Get the number of neighbors for a target owner ordinal.
source_index_type source_index (size_type target_index, size_type neighbor_ordinal) const
 Get the source owner ordinal for a target owner and neighbor ordinal.
image_shift_type source_image_shift (size_type target_index, size_type neighbor_ordinal) const
 Get the source owner's image shift for a stored pair (displacement from its original to its imaged reference point).
image_shift_type target_image_shift (size_type target_index) const
 Get a target owner's image shift: the displacement from its original to its imaged reference point.
stk::mesh::Entity get_neighbor (size_type target_index, size_type neighbor_ordinal) const
 Get the neighbor owner entity for a target owner and neighbor ordinal.
stk::mesh::Entity target_entity (size_type target_index) const
 Get the target owner entity for a target owner ordinal.
stk::mesh::Entity source_entity (source_index_type source_index) const
 Get the source owner entity for a source owner ordinal.
entity_view_t target_entities () const noexcept
 Get the raw target owner entity view.
entity_view_t source_entities () const noexcept
 Get the raw source owner entity view.
count_view_t neighbor_counts () const noexcept
 Get the raw per-target-owner neighbor count view.
source_index_view_t source_owner_indices () const noexcept
 Get the raw dense source-owner ordinal view.
image_shift_view_t source_image_shifts () const noexcept
 Get the raw dense source-image-shift view.
target_shift_view_t target_image_shifts () const noexcept
 Get the raw per-target-owner image-shift view.

Detailed Description

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
class mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >

The uniform per-target row width suits GPU pair-parallel dispatch.

Member Typedef Documentation

◆ memory_space

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
using mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::memory_space = MemorySpace

◆ execution_space

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
using mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::execution_space = typename MemorySpace::execution_space

◆ image_shift_scalar

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
using mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::image_shift_scalar = ImageShiftScalar

◆ size_type

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
using mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::size_type = size_t

◆ source_index_type

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
using mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::source_index_type = size_type

◆ image_shift_type

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
using mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::image_shift_type = mundy::Vector3<image_shift_scalar>

◆ entity_view_t

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
using mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::entity_view_t = Kokkos::View<stk::mesh::Entity*, memory_space>

◆ count_view_t

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
using mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::count_view_t = Kokkos::View<size_type*, memory_space>

◆ source_index_view_t

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
using mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::source_index_view_t = Kokkos::View<source_index_type**, memory_space>

◆ image_shift_view_t

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
using mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::image_shift_view_t = Kokkos::View<image_shift_type**, memory_space>

◆ target_shift_view_t

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
using mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::target_shift_view_t = Kokkos::View<image_shift_type*, memory_space>

Constructor & Destructor Documentation

◆ PeriodicArborX2dNeighborList() [1/4]

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::PeriodicArborX2dNeighborList ( )
default

◆ PeriodicArborX2dNeighborList() [2/4]

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::PeriodicArborX2dNeighborList ( const PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar > & )
default

◆ PeriodicArborX2dNeighborList() [3/4]

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::PeriodicArborX2dNeighborList ( PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar > && )
default

◆ PeriodicArborX2dNeighborList() [4/4]

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::PeriodicArborX2dNeighborList ( const stk::mesh::Selector & target_selector,
const stk::mesh::Selector & source_selector,
const entity_view_t & target_entities,
const entity_view_t & source_entities,
const target_shift_view_t & target_image_shifts,
const count_view_t & neighbor_counts,
const source_index_view_t & source_owner_indices,
const image_shift_view_t & source_image_shifts )
inline
Parameters
target_selector[in] Selector defining the target owner chunk used during the build.
source_selector[in] Selector defining the source owner chunk used during the build.
target_entities[in] Target owner entities indexed by dense target owner ordinal.
source_entities[in] Source owner entities indexed by dense source owner ordinal.
neighbor_counts[in] Number of valid entries in each target owner row.
target_image_shifts[in] Per-target-owner image shift (target's original→wrapped reference point).
source_owner_indices[in] Dense source owner ordinals in target-by-neighbor rows.
source_image_shifts[in] Per-pair source owner image shift (original → imaged reference point), in target-by-neighbor rows.

Member Function Documentation

◆ operator=() [1/2]

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
PeriodicArborX2dNeighborList & mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::operator= ( const PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar > & )
default

◆ operator=() [2/2]

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
PeriodicArborX2dNeighborList & mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::operator= ( PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar > && )
default

◆ num_targets()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
size_type mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::num_targets ( ) const
inlinenoexcept

◆ num_sources()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
size_type mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::num_sources ( ) const
inlinenoexcept

◆ target_selector()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
const stk::mesh::Selector & mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::target_selector ( ) const
inlinenoexcept

◆ source_selector()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
const stk::mesh::Selector & mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::source_selector ( ) const
inlinenoexcept

◆ size()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
size_type mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::size ( ) const
inlinenoexcept

◆ max_neighbors_per_target()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
size_type mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::max_neighbors_per_target ( ) const
inlinenoexcept

◆ num_neighbors()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
size_type mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::num_neighbors ( size_type target_index) const
inline
Parameters
target_index[in] Dense target owner ordinal.

◆ source_index()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
source_index_type mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::source_index ( size_type target_index,
size_type neighbor_ordinal ) const
inline
Parameters
target_index[in] Dense target owner ordinal.
neighbor_ordinal[in] Ordinal in the target's neighbor range.

◆ source_image_shift()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
image_shift_type mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::source_image_shift ( size_type target_index,
size_type neighbor_ordinal ) const
inline
Parameters
target_index[in] Dense target owner ordinal.
neighbor_ordinal[in] Ordinal in the target's neighbor range.

◆ target_image_shift()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
image_shift_type mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::target_image_shift ( size_type target_index) const
inline
Parameters
target_index[in] Dense target owner ordinal.

◆ get_neighbor()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
stk::mesh::Entity mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::get_neighbor ( size_type target_index,
size_type neighbor_ordinal ) const
inline
Parameters
target_index[in] Dense target owner ordinal.
neighbor_ordinal[in] Ordinal in the target's neighbor range.

◆ target_entity()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
stk::mesh::Entity mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::target_entity ( size_type target_index) const
inline
Parameters
target_index[in] Dense target owner ordinal.

◆ source_entity()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
stk::mesh::Entity mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::source_entity ( source_index_type source_index) const
inline
Parameters
source_index[in] Dense source owner ordinal.

◆ target_entities()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
entity_view_t mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::target_entities ( ) const
inlinenoexcept

◆ source_entities()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
entity_view_t mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::source_entities ( ) const
inlinenoexcept

◆ neighbor_counts()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
count_view_t mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::neighbor_counts ( ) const
inlinenoexcept

◆ source_owner_indices()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
source_index_view_t mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::source_owner_indices ( ) const
inlinenoexcept

◆ source_image_shifts()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
image_shift_view_t mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::source_image_shifts ( ) const
inlinenoexcept

◆ target_image_shifts()

template<typename MemorySpace = stk::ngp::MemSpace, typename ImageShiftScalar = float>
target_shift_view_t mundy::search::PeriodicArborX2dNeighborList< MemorySpace, ImageShiftScalar >::target_image_shifts ( ) const
inlinenoexcept