Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::search::Neighbors< NeighborListType > Class Template Reference

Lightweight neighbor-range view for one target.

#include <Neighbors.hpp>

Public Types

Aliases
using neighbor_list_type = NeighborListType
using size_type = typename neighbor_list_type::size_type
using source_index_type = typename neighbor_list_type::source_index_type

Public Member Functions

Constructors
 Neighbors ()=default
 Default constructor.
 Neighbors (const neighbor_list_type &list, size_type target_index)
 Construct a neighbor range for a target.
Accessors
size_type size () const
 Get the number of neighbors for the target.
stk::mesh::Entity operator[] (size_type neighbor_ordinal) const
 Get the neighbor entity for a neighbor ordinal.
stk::mesh::Entity operator() (size_type neighbor_ordinal) const
 Get the neighbor entity for a neighbor ordinal.
source_index_type source_index (size_type neighbor_ordinal) const
 Get the source ordinal for a neighbor ordinal.
stk::mesh::Entity target_entity () const
 Get the target STK entity for this neighbor range.
size_type target_index () const noexcept
 Get the dense target ordinal associated with this range.
const neighbor_list_typelist () const noexcept
 Get the underlying concrete neighbor list.

Member Typedef Documentation

◆ neighbor_list_type

template<typename NeighborListType>
using mundy::search::Neighbors< NeighborListType >::neighbor_list_type = NeighborListType

◆ size_type

template<typename NeighborListType>
using mundy::search::Neighbors< NeighborListType >::size_type = typename neighbor_list_type::size_type

◆ source_index_type

template<typename NeighborListType>
using mundy::search::Neighbors< NeighborListType >::source_index_type = typename neighbor_list_type::source_index_type

Constructor & Destructor Documentation

◆ Neighbors() [1/2]

template<typename NeighborListType>
mundy::search::Neighbors< NeighborListType >::Neighbors ( )
default

◆ Neighbors() [2/2]

template<typename NeighborListType>
mundy::search::Neighbors< NeighborListType >::Neighbors ( const neighbor_list_type & list,
size_type target_index )
inline
Parameters
list[in] Concrete neighbor list to view.
target_index[in] Dense target ordinal.

Member Function Documentation

◆ size()

template<typename NeighborListType>
size_type mundy::search::Neighbors< NeighborListType >::size ( ) const
inline

◆ operator[]()

template<typename NeighborListType>
stk::mesh::Entity mundy::search::Neighbors< NeighborListType >::operator[] ( size_type neighbor_ordinal) const
inline
Parameters
neighbor_ordinal[in] Ordinal in [0, size()).

◆ operator()()

template<typename NeighborListType>
stk::mesh::Entity mundy::search::Neighbors< NeighborListType >::operator() ( size_type neighbor_ordinal) const
inline
Parameters
neighbor_ordinal[in] Ordinal in [0, size()).

◆ source_index()

template<typename NeighborListType>
source_index_type mundy::search::Neighbors< NeighborListType >::source_index ( size_type neighbor_ordinal) const
inline
Parameters
neighbor_ordinal[in] Ordinal in [0, size()).

◆ target_entity()

template<typename NeighborListType>
stk::mesh::Entity mundy::search::Neighbors< NeighborListType >::target_entity ( ) const
inline

◆ target_index()

template<typename NeighborListType>
size_type mundy::search::Neighbors< NeighborListType >::target_index ( ) const
inlinenoexcept

◆ list()

template<typename NeighborListType>
const neighbor_list_type & mundy::search::Neighbors< NeighborListType >::list ( ) const
inlinenoexcept

Use this escape hatch when you need type-specific behavior not provided by the common Neighbors surface, such as reading image shifts directly from a periodic list type.