Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
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 ParticleVector & operator() () const
ParticleVector & operator() ()
std::size_t size () const
 Returns the total number of particles (real and neighbor).
int numParticles () const
 Returns the number of real particles (excluding neighbors).
int numRealParticles () const
 Returns the number of real particles (excluding neighbors).
int numNeighborParticles () const
 Returns the number of neighbor particles (excluding reals).
int numTotalParticles () const
 Returns the total number of particles (real and neighbor).
void setNumNeighbors (int num_neighbors)
int getNumNeighbors () const
bool empty () const
const ParticleType * data () const
ParticleType * data ()
const ParticleType * dataPtr () const
ParticleType * dataPtr ()
std::pair< int, int > dataShape () const
void push_back (const ParticleType &p)
void pop_back ()
bool empty ()
const ParticleType & back () const
ParticleType & back ()
const ParticleType & operator[] (int i) const
ParticleType & operator[] (int i)
void swap (ArrayOfStructs &other) noexcept
void resize (size_t count, GrowthStrategy strategy=GrowthStrategy::Poisson)
void reserve (size_t capacity, GrowthStrategy strategy=GrowthStrategy::Poisson)
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
void collectVectors (Vector< ParticleVector * > &pvs)

Public Attributes

int m_num_neighbor_particles {0}

Static Public Attributes

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

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 ( )
inlinenodiscard

◆ back() [2/2]

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

◆ begin() [1/2]

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

◆ begin() [2/2]

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

◆ cbegin()

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

◆ cend()

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

◆ collectVectors()

template<typename T_ParticleType, template< class > class Allocator = DefaultAllocator>
void amrex::ArrayOfStructs< T_ParticleType, Allocator >::collectVectors ( Vector< ParticleVector * > & pvs)
inline

◆ data() [1/2]

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

◆ data() [2/2]

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

◆ dataPtr() [1/2]

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

◆ dataPtr() [2/2]

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

◆ dataShape()

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

◆ empty() [1/2]

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

◆ empty() [2/2]

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

◆ end() [1/2]

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

◆ end() [2/2]

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

◆ 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
inlinenodiscard

◆ 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
inlinenodiscard

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
inlinenodiscard

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
inlinenodiscard

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
inlinenodiscard

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() ( )
inlinenodiscard

◆ operator()() [2/2]

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

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

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

◆ 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

◆ reserve()

template<typename T_ParticleType, template< class > class Allocator = DefaultAllocator>
void amrex::ArrayOfStructs< T_ParticleType, Allocator >::reserve ( size_t capacity,
GrowthStrategy strategy = GrowthStrategy::Poisson )
inline

◆ resize()

template<typename T_ParticleType, template< class > class Allocator = DefaultAllocator>
void amrex::ArrayOfStructs< T_ParticleType, Allocator >::resize ( size_t count,
GrowthStrategy strategy = GrowthStrategy::Poisson )
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
inlinenodiscard

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_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 T_ParticleType, template< class > class Allocator = DefaultAllocator>
int amrex::ArrayOfStructs< T_ParticleType, Allocator >::SizeInReal = sizeof(ParticleType) / sizeof(RealType)
staticconstexpr

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