Block-Structured AMR Software Framework
amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu > Struct Template Reference

#include <AMReX_StructOfArrays.H>

Public Types

using IdCPU = amrex::PODVector< uint64_t, Allocator< uint64_t > >
 
using RealVector = amrex::PODVector< ParticleReal, Allocator< ParticleReal > >
 
using IntVector = amrex::PODVector< int, Allocator< int > >
 

Public Member Functions

void define (int a_num_runtime_real, int a_num_runtime_int)
 
int NumRealComps () const noexcept
 
int NumIntComps () const noexcept
 
IdCPUGetIdCPUData ()
 
std::array< RealVector, NReal > & GetRealData ()
 
std::array< IntVector, NInt > & GetIntData ()
 
const IdCPUGetIdCPUData () const
 
const std::array< RealVector, NReal > & GetRealData () const
 
const std::array< IntVector, NInt > & GetIntData () const
 
RealVectorGetRealData (const int index)
 
const RealVectorGetRealData (const int index) const
 
IntVectorGetIntData (const int index)
 
const IntVectorGetIntData (const int index) const
 
std::size_t size () const
 Returns the total number of particles (real and neighbor) More...
 
bool empty () const
 Returns whether the SoA is empty (i.e. has size() == 0) 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
 
void resize (size_t count)
 
uint64_t * idcpuarray ()
 
GpuArray< ParticleReal *, NReal > realarray ()
 
GpuArray< int *, NInt > intarray ()
 

Public Attributes

int m_num_neighbor_particles {0}
 

Private Attributes

IdCPU m_idcpu
 
std::array< RealVector, NReal > m_rdata
 
std::array< IntVector, NInt > m_idata
 
std::vector< RealVectorm_runtime_rdata
 
std::vector< IntVectorm_runtime_idata
 
bool m_defined {false}
 

Member Typedef Documentation

◆ IdCPU

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
using amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::IdCPU = amrex::PODVector<uint64_t, Allocator<uint64_t> >

◆ IntVector

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
using amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::IntVector = amrex::PODVector<int, Allocator<int> >

◆ RealVector

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
using amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::RealVector = amrex::PODVector<ParticleReal, Allocator<ParticleReal> >

Member Function Documentation

◆ define()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
void amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::define ( int  a_num_runtime_real,
int  a_num_runtime_int 
)
inline

◆ empty()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
bool amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::empty ( ) const
inline

Returns whether the SoA is empty (i.e. has size() == 0)

◆ GetIdCPUData() [1/2]

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
IdCPU& amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::GetIdCPUData ( )
inline

◆ GetIdCPUData() [2/2]

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
const IdCPU& amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::GetIdCPUData ( ) const
inline

Get access to the particle id/cpu Arrays

◆ GetIntData() [1/4]

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
std::array< IntVector, NInt>& amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::GetIntData ( )
inline

◆ GetIntData() [2/4]

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
const std::array< IntVector, NInt>& amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::GetIntData ( ) const
inline

Get access to the particle Int Arrays (only compile-time components)

◆ GetIntData() [3/4]

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
IntVector& amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::GetIntData ( const int  index)
inline

Get access to a particle Int component Array (compile-time and runtime component)

Parameters
indexcomponent with 0...NInt-1 compile-time and NInt... runtime arguments

◆ GetIntData() [4/4]

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
const IntVector& amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::GetIntData ( const int  index) const
inline

Get access to a particle Int component Array (compile-time and runtime component)

Parameters
indexcomponent with 0...NInt-1 compile-time and NInt... runtime arguments
Returns

◆ getNumNeighbors()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
int amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::getNumNeighbors ( ) const
inline

◆ GetRealData() [1/4]

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
std::array<RealVector, NReal>& amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::GetRealData ( )
inline

◆ GetRealData() [2/4]

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
const std::array<RealVector, NReal>& amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::GetRealData ( ) const
inline

Get access to the particle Real Arrays (only compile-time components)

◆ GetRealData() [3/4]

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
RealVector& amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::GetRealData ( const int  index)
inline

Get access to a particle Real component Array (compile-time and runtime component)

Parameters
indexcomponent with 0...NReal-1 compile-time and NReal... runtime arguments

◆ GetRealData() [4/4]

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
const RealVector& amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::GetRealData ( const int  index) const
inline

Get access to a particle Real component Array (compile-time and runtime component)

Parameters
indexcomponent with 0...NReal-1 compile-time and NReal... runtime arguments

◆ idcpuarray()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
uint64_t* amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::idcpuarray ( )
inline

◆ intarray()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
GpuArray<int*, NInt> amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::intarray ( )
inline

◆ NumIntComps()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
int amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::NumIntComps ( ) const
inlinenoexcept

◆ numNeighborParticles()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
int amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::numNeighborParticles ( ) const
inline

Returns the number of neighbor particles (excluding reals)

◆ numParticles()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
int amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::numParticles ( ) const
inline

Returns the number of real particles (excluding neighbors)

◆ NumRealComps()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
int amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::NumRealComps ( ) const
inlinenoexcept

◆ numRealParticles()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
int amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::numRealParticles ( ) const
inline

Returns the number of real particles (excluding neighbors)

◆ numTotalParticles()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
int amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::numTotalParticles ( ) const
inline

Returns the total number of particles (real and neighbor)

◆ realarray()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
GpuArray<ParticleReal*, NReal> amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::realarray ( )
inline

◆ resize()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
void amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::resize ( size_t  count)
inline

◆ setNumNeighbors()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
void amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::setNumNeighbors ( int  num_neighbors)
inline

◆ size()

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
std::size_t amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::size ( ) const
inline

Returns the total number of particles (real and neighbor)

Member Data Documentation

◆ m_defined

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
bool amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::m_defined {false}
private

◆ m_idata

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
std::array< IntVector, NInt> amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::m_idata
private

◆ m_idcpu

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
IdCPU amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::m_idcpu
private

◆ m_num_neighbor_particles

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
int amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::m_num_neighbor_particles {0}

◆ m_rdata

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
std::array<RealVector, NReal> amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::m_rdata
private

◆ m_runtime_idata

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
std::vector<IntVector > amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::m_runtime_idata
private

◆ m_runtime_rdata

template<int NReal, int NInt, template< class > class Allocator = DefaultAllocator, bool use64BitIdCpu = false>
std::vector<RealVector> amrex::StructOfArrays< NReal, NInt, Allocator, use64BitIdCpu >::m_runtime_rdata
private

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