Block-Structured AMR Software Framework
amrex::AlgVector< T, Allocator > Class Template Reference

#include <AMReX_AlgVector.H>

Public Types

using value_type = T
 
using allocator_type = Allocator
 
using Vec = PODVector< T, Allocator >
 

Public Member Functions

 AlgVector ()=default
 
 AlgVector (Long global_size)
 
 AlgVector (AlgPartition partition)
 
 AlgVector (AlgVector< T, Allocator > const &)=delete
 
AlgVectoroperator= (AlgVector< T, Allocator > const &)=delete
 
 AlgVector (AlgVector< T, Allocator > &&) noexcept=default
 
AlgVectoroperator= (AlgVector< T, Allocator > &&) noexcept=default
 
 ~AlgVector ()=default
 
void define (Long global_size)
 
void define (AlgPartition partition)
 
bool empty () const
 
AlgPartition const & partition () const
 
Long numLocalRows () const
 
Long numGlobalRows () const
 
Long globalBegin () const
 Inclusive global index begin. More...
 
Long globalEnd () const
 Exclusive global index end. More...
 
T const * data () const
 
T * data ()
 
AMREX_FORCE_INLINE Table1D< T const, Long > view () const
 
AMREX_FORCE_INLINE Table1D< T const, Long > const_view () const
 
AMREX_FORCE_INLINE Table1D< T, Long > view ()
 
void setVal (T val)
 
void setValAsync (T val)
 
void copy (AlgVector< T > const &rhs)
 
void copyAsync (AlgVector< T > const &rhs)
 
void plus (AlgVector< T > const &rhs)
 
void plusAsync (AlgVector< T > const &rhs)
 
void scale (T scale_factor)
 
void scaleAsync (T scale_factor)
 
sum (bool local=false) const
 
norminf (bool local=false) const
 
norm2 (bool local=false) const
 
template<typename FAB , std::enable_if_t< amrex::IsBaseFab< FAB >::value &&std::is_same_v< T, typename FAB::value_type >, int > = 0>
void copyFrom (FabArray< FAB > const &fa)
 
template<typename FAB , std::enable_if_t< amrex::IsBaseFab< FAB >::value &&std::is_same_v< T, typename FAB::value_type >, int > = 0>
void copyTo (FabArray< FAB > &fa) const
 
void printToFile (std::string const &file) const
 

Private Attributes

AlgPartition m_partition
 
Long m_begin = 0
 
Long m_end = 0
 
Vec m_data
 

Member Typedef Documentation

◆ allocator_type

template<typename T , typename Allocator = DefaultAllocator<T>>
using amrex::AlgVector< T, Allocator >::allocator_type = Allocator

◆ value_type

template<typename T , typename Allocator = DefaultAllocator<T>>
using amrex::AlgVector< T, Allocator >::value_type = T

◆ Vec

template<typename T , typename Allocator = DefaultAllocator<T>>
using amrex::AlgVector< T, Allocator >::Vec = PODVector<T,Allocator>

Constructor & Destructor Documentation

◆ AlgVector() [1/5]

template<typename T , typename Allocator = DefaultAllocator<T>>
amrex::AlgVector< T, Allocator >::AlgVector ( )
default

◆ AlgVector() [2/5]

template<typename T , typename Allocator >
amrex::AlgVector< T, Allocator >::AlgVector ( Long  global_size)
explicit

◆ AlgVector() [3/5]

template<typename T , typename Allocator >
amrex::AlgVector< T, Allocator >::AlgVector ( AlgPartition  partition)
explicit

◆ AlgVector() [4/5]

template<typename T , typename Allocator = DefaultAllocator<T>>
amrex::AlgVector< T, Allocator >::AlgVector ( AlgVector< T, Allocator > const &  )
delete

◆ AlgVector() [5/5]

template<typename T , typename Allocator = DefaultAllocator<T>>
amrex::AlgVector< T, Allocator >::AlgVector ( AlgVector< T, Allocator > &&  )
defaultnoexcept

◆ ~AlgVector()

template<typename T , typename Allocator = DefaultAllocator<T>>
amrex::AlgVector< T, Allocator >::~AlgVector ( )
default

Member Function Documentation

◆ const_view()

template<typename T , typename Allocator = DefaultAllocator<T>>
AMREX_FORCE_INLINE Table1D<T const, Long> amrex::AlgVector< T, Allocator >::const_view ( ) const
inline

◆ copy()

template<typename T , typename Allocator >
void amrex::AlgVector< T, Allocator >::copy ( AlgVector< T > const &  rhs)

◆ copyAsync()

template<typename T , typename Allocator >
void amrex::AlgVector< T, Allocator >::copyAsync ( AlgVector< T > const &  rhs)

◆ copyFrom()

template<typename T , typename Allocator >
template<typename FAB , std::enable_if_t< amrex::IsBaseFab< FAB >::value &&std::is_same_v< T, typename FAB::value_type >, int > >
void amrex::AlgVector< T, Allocator >::copyFrom ( FabArray< FAB > const &  fa)

◆ copyTo()

template<typename T , typename Allocator >
template<typename FAB , std::enable_if_t< amrex::IsBaseFab< FAB >::value &&std::is_same_v< T, typename FAB::value_type >, int > >
void amrex::AlgVector< T, Allocator >::copyTo ( FabArray< FAB > &  fa) const

◆ data() [1/2]

template<typename T , typename Allocator = DefaultAllocator<T>>
T* amrex::AlgVector< T, Allocator >::data ( )
inline

◆ data() [2/2]

template<typename T , typename Allocator = DefaultAllocator<T>>
T const* amrex::AlgVector< T, Allocator >::data ( ) const
inline

◆ define() [1/2]

template<typename T , typename Allocator >
void amrex::AlgVector< T, Allocator >::define ( AlgPartition  partition)

◆ define() [2/2]

template<typename T , typename Allocator >
void amrex::AlgVector< T, Allocator >::define ( Long  global_size)

◆ empty()

template<typename T , typename Allocator = DefaultAllocator<T>>
bool amrex::AlgVector< T, Allocator >::empty ( ) const
inline

◆ globalBegin()

template<typename T , typename Allocator = DefaultAllocator<T>>
Long amrex::AlgVector< T, Allocator >::globalBegin ( ) const
inline

Inclusive global index begin.

◆ globalEnd()

template<typename T , typename Allocator = DefaultAllocator<T>>
Long amrex::AlgVector< T, Allocator >::globalEnd ( ) const
inline

Exclusive global index end.

◆ norm2()

template<typename T , typename Allocator >
T amrex::AlgVector< T, Allocator >::norm2 ( bool  local = false) const

◆ norminf()

template<typename T , typename Allocator >
T amrex::AlgVector< T, Allocator >::norminf ( bool  local = false) const

◆ numGlobalRows()

template<typename T , typename Allocator = DefaultAllocator<T>>
Long amrex::AlgVector< T, Allocator >::numGlobalRows ( ) const
inline

◆ numLocalRows()

template<typename T , typename Allocator = DefaultAllocator<T>>
Long amrex::AlgVector< T, Allocator >::numLocalRows ( ) const
inline

◆ operator=() [1/2]

template<typename T , typename Allocator = DefaultAllocator<T>>
AlgVector& amrex::AlgVector< T, Allocator >::operator= ( AlgVector< T, Allocator > &&  )
defaultnoexcept

◆ operator=() [2/2]

template<typename T , typename Allocator = DefaultAllocator<T>>
AlgVector& amrex::AlgVector< T, Allocator >::operator= ( AlgVector< T, Allocator > const &  )
delete

◆ partition()

template<typename T , typename Allocator = DefaultAllocator<T>>
AlgPartition const& amrex::AlgVector< T, Allocator >::partition ( ) const
inline

◆ plus()

template<typename T , typename Allocator >
void amrex::AlgVector< T, Allocator >::plus ( AlgVector< T > const &  rhs)

◆ plusAsync()

template<typename T , typename Allocator >
void amrex::AlgVector< T, Allocator >::plusAsync ( AlgVector< T > const &  rhs)

◆ printToFile()

template<typename T , typename Allocator >
void amrex::AlgVector< T, Allocator >::printToFile ( std::string const &  file) const

◆ scale()

template<typename T , typename Allocator >
void amrex::AlgVector< T, Allocator >::scale ( scale_factor)

◆ scaleAsync()

template<typename T , typename Allocator >
void amrex::AlgVector< T, Allocator >::scaleAsync ( scale_factor)

◆ setVal()

template<typename T , typename Allocator >
void amrex::AlgVector< T, Allocator >::setVal ( val)

◆ setValAsync()

template<typename T , typename Allocator >
void amrex::AlgVector< T, Allocator >::setValAsync ( val)

◆ sum()

template<typename T , typename Allocator >
T amrex::AlgVector< T, Allocator >::sum ( bool  local = false) const

◆ view() [1/2]

template<typename T , typename Allocator = DefaultAllocator<T>>
AMREX_FORCE_INLINE Table1D<T, Long> amrex::AlgVector< T, Allocator >::view ( )
inline

◆ view() [2/2]

template<typename T , typename Allocator = DefaultAllocator<T>>
AMREX_FORCE_INLINE Table1D<T const, Long> amrex::AlgVector< T, Allocator >::view ( ) const
inline

Member Data Documentation

◆ m_begin

template<typename T , typename Allocator = DefaultAllocator<T>>
Long amrex::AlgVector< T, Allocator >::m_begin = 0
private

◆ m_data

template<typename T , typename Allocator = DefaultAllocator<T>>
Vec amrex::AlgVector< T, Allocator >::m_data
private

◆ m_end

template<typename T , typename Allocator = DefaultAllocator<T>>
Long amrex::AlgVector< T, Allocator >::m_end = 0
private

◆ m_partition

template<typename T , typename Allocator = DefaultAllocator<T>>
AlgPartition amrex::AlgVector< T, Allocator >::m_partition
private

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