Block-Structured AMR Software Framework
amrex::ArrayOfStructs< T_ParticleType, Allocator > Class Template Reference

#include <AMReX_ArrayOfStructs.H>

Public Types

using ParticleType = T_ParticleType
 
using RealType = typename ParticleType::RealType
 
using ParticleVector = amrex::PODVector< ParticleType, Allocator< ParticleType > >
 
using Iterator = typename ParticleVector::iterator
 
using ConstIterator = typename ParticleVector::const_iterator
 

Public Member Functions

const ParticleVectoroperator() () const
 
ParticleVectoroperator() ()
 
std::size_t size () const
 Returns the total number of particles (real and neighbor) More...
 
int numParticles () const
 Returns the number of real particles (excluding neighbors) More...
 
int numRealParticles () const
 Returns the number of real particles (excluding neighbors) More...
 
int numNeighborParticles () const
 Returns the number of neighbor particles (excluding reals) More...
 
int numTotalParticles () const
 Returns the total number of particles (real and neighbor) More...
 
void setNumNeighbors (int num_neighbors)
 
int getNumNeighbors () const
 
bool empty () const
 
const ParticleTypedata () const
 
ParticleTypedata ()
 
const ParticleTypedataPtr () const
 
ParticleTypedataPtr ()
 
std::pair< int, intdataShape () const
 
void push_back (const ParticleType &p)
 
void pop_back ()
 
bool empty ()
 
const ParticleTypeback () const
 
ParticleTypeback ()
 
const ParticleTypeoperator[] (int i) const
 
ParticleTypeoperator[] (int i)
 
void swap (ArrayOfStructs &other) noexcept
 
void resize (size_t count)
 
Iterator erase (ConstIterator first, ConstIterator second)
 
template<class InputIt >
void insert (Iterator pos, InputIt first, InputIt last)
 
ParticleVector::iterator begin ()
 
ParticleVector::const_iterator begin () const
 
ParticleVector::const_iterator cbegin () const
 
ParticleVector::iterator end ()
 
ParticleVector::const_iterator end () const
 
ParticleVector::const_iterator cend () const
 

Public Attributes

int m_num_neighbor_particles {0}
 

Static Public Attributes

static constexpr int SizeInReal = sizeof(ParticleType) / sizeof(RealType)
 

Private Attributes

ParticleVector m_data
 

Member Typedef Documentation

◆ ConstIterator

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
using amrex::ArrayOfStructs< T_ParticleType, Allocator >::ConstIterator = typename ParticleVector::const_iterator

◆ Iterator

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
using amrex::ArrayOfStructs< T_ParticleType, Allocator >::Iterator = typename ParticleVector::iterator

◆ ParticleType

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
using amrex::ArrayOfStructs< T_ParticleType, Allocator >::ParticleType = T_ParticleType

◆ ParticleVector

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
using amrex::ArrayOfStructs< T_ParticleType, Allocator >::ParticleVector = amrex::PODVector<ParticleType, Allocator<ParticleType> >

◆ RealType

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
using amrex::ArrayOfStructs< T_ParticleType, Allocator >::RealType = typename ParticleType::RealType

Member Function Documentation

◆ back() [1/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
ParticleType& amrex::ArrayOfStructs< T_ParticleType, Allocator >::back ( )
inline

◆ back() [2/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
const ParticleType& amrex::ArrayOfStructs< T_ParticleType, Allocator >::back ( ) const
inline

◆ begin() [1/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
ParticleVector::iterator amrex::ArrayOfStructs< T_ParticleType, Allocator >::begin ( )
inline

◆ begin() [2/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
ParticleVector::const_iterator amrex::ArrayOfStructs< T_ParticleType, Allocator >::begin ( ) const
inline

◆ cbegin()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
ParticleVector::const_iterator amrex::ArrayOfStructs< T_ParticleType, Allocator >::cbegin ( ) const
inline

◆ cend()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
ParticleVector::const_iterator amrex::ArrayOfStructs< T_ParticleType, Allocator >::cend ( ) const
inline

◆ data() [1/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
ParticleType* amrex::ArrayOfStructs< T_ParticleType, Allocator >::data ( )
inline

◆ data() [2/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
const ParticleType* amrex::ArrayOfStructs< T_ParticleType, Allocator >::data ( ) const
inline

◆ dataPtr() [1/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
ParticleType* amrex::ArrayOfStructs< T_ParticleType, Allocator >::dataPtr ( )
inline

◆ dataPtr() [2/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
const ParticleType* amrex::ArrayOfStructs< T_ParticleType, Allocator >::dataPtr ( ) const
inline

◆ dataShape()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
std::pair<int,int> amrex::ArrayOfStructs< T_ParticleType, Allocator >::dataShape ( ) const
inline

◆ empty() [1/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
bool amrex::ArrayOfStructs< T_ParticleType, Allocator >::empty ( )
inline

◆ empty() [2/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
bool amrex::ArrayOfStructs< T_ParticleType, Allocator >::empty ( ) const
inline

◆ end() [1/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
ParticleVector::iterator amrex::ArrayOfStructs< T_ParticleType, Allocator >::end ( )
inline

◆ end() [2/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
ParticleVector::const_iterator amrex::ArrayOfStructs< T_ParticleType, Allocator >::end ( ) const
inline

◆ erase()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
Iterator amrex::ArrayOfStructs< T_ParticleType, Allocator >::erase ( ConstIterator  first,
ConstIterator  second 
)
inline

◆ getNumNeighbors()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
int amrex::ArrayOfStructs< T_ParticleType, Allocator >::getNumNeighbors ( ) const
inline

◆ insert()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
template<class InputIt >
void amrex::ArrayOfStructs< T_ParticleType, Allocator >::insert ( Iterator  pos,
InputIt  first,
InputIt  last 
)
inline

◆ numNeighborParticles()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
int amrex::ArrayOfStructs< T_ParticleType, Allocator >::numNeighborParticles ( ) const
inline

Returns the number of neighbor particles (excluding reals)

◆ numParticles()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
int amrex::ArrayOfStructs< T_ParticleType, Allocator >::numParticles ( ) const
inline

Returns the number of real particles (excluding neighbors)

◆ numRealParticles()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
int amrex::ArrayOfStructs< T_ParticleType, Allocator >::numRealParticles ( ) const
inline

Returns the number of real particles (excluding neighbors)

◆ numTotalParticles()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
int amrex::ArrayOfStructs< T_ParticleType, Allocator >::numTotalParticles ( ) const
inline

Returns the total number of particles (real and neighbor)

◆ operator()() [1/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
ParticleVector& amrex::ArrayOfStructs< T_ParticleType, Allocator >::operator() ( )
inline

◆ operator()() [2/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
const ParticleVector& amrex::ArrayOfStructs< T_ParticleType, Allocator >::operator() ( ) const
inline

◆ operator[]() [1/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
ParticleType& amrex::ArrayOfStructs< T_ParticleType, Allocator >::operator[] ( int  i)
inline

◆ operator[]() [2/2]

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
const ParticleType& amrex::ArrayOfStructs< T_ParticleType, Allocator >::operator[] ( int  i) const
inline

◆ pop_back()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
void amrex::ArrayOfStructs< T_ParticleType, Allocator >::pop_back ( )
inline

◆ push_back()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
void amrex::ArrayOfStructs< T_ParticleType, Allocator >::push_back ( const ParticleType p)
inline

◆ resize()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
void amrex::ArrayOfStructs< T_ParticleType, Allocator >::resize ( size_t  count)
inline

◆ setNumNeighbors()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
void amrex::ArrayOfStructs< T_ParticleType, Allocator >::setNumNeighbors ( int  num_neighbors)
inline

◆ size()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
std::size_t amrex::ArrayOfStructs< T_ParticleType, Allocator >::size ( ) const
inline

Returns the total number of particles (real and neighbor)

◆ swap()

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
void amrex::ArrayOfStructs< T_ParticleType, Allocator >::swap ( ArrayOfStructs< T_ParticleType, Allocator > &  other)
inlinenoexcept

Member Data Documentation

◆ m_data

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
ParticleVector amrex::ArrayOfStructs< T_ParticleType, Allocator >::m_data
private

◆ m_num_neighbor_particles

template<typename T_ParticleType , template< class > class Allocator = DefaultAllocator>
int amrex::ArrayOfStructs< T_ParticleType, Allocator >::m_num_neighbor_particles {0}

◆ SizeInReal

template<typename ParticleType , template< class > class Allocator>
constexpr int amrex::ArrayOfStructs< ParticleType, Allocator >::SizeInReal = sizeof(ParticleType) / sizeof(RealType)
staticconstexpr

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