chombo-discharge
Public Member Functions | Protected Attributes | List of all members
NonCommParticle< M, N > Class Template Reference

A generic non-communicated particle class. More...

#include <CD_NonCommParticle.H>

Public Member Functions

 NonCommParticle ()
 Default constructor – initializes everything to zero.
 
 NonCommParticle (const NonCommParticle< M, N > &a_other)
 Copy constructor. Copies all fields. More...
 
virtual ~NonCommParticle ()
 Destructor (deallocates runtime memory storage)
 
template<size_t K>
Real & real ()
 Get one of the scalars. More...
 
template<size_t K>
const Real & real () const
 Get one of the scalars. More...
 
template<size_t K>
RealVect & vect ()
 Get one of the RealVects. More...
 
template<size_t K>
const RealVect & vect () const
 Get one of the RealVects. More...
 
bool operator== (const NonCommParticle< M, N > &a_other) const
 Comparison operator with other particle. More...
 
bool operator!= (const NonCommParticle< M, N > &a_other) const
 Comparison operator with other particle. More...
 

Protected Attributes

std::array< Real, M > m_scalars
 Scalar storage array.
 
std::array< RealVect, N > m_vectors
 vector storage array
 

Detailed Description

template<size_t M, size_t N>
class NonCommParticle< M, N >

A generic non-communicated particle class.

Constructor & Destructor Documentation

◆ NonCommParticle()

template<size_t M, size_t N>
NonCommParticle< M, N >::NonCommParticle ( const NonCommParticle< M, N > &  a_other)
inline

Copy constructor. Copies all fields.

Parameters
[in]a_otherOther particle.

Member Function Documentation

◆ operator!=()

template<size_t M, size_t N>
bool NonCommParticle< M, N >::operator!= ( const NonCommParticle< M, N > &  a_other) const
inline

Comparison operator with other particle.

Parameters
[in]a_otherOther particle
Note
Does not compare the M and N Reals and RealVects.

◆ operator==()

template<size_t M, size_t N>
bool NonCommParticle< M, N >::operator== ( const NonCommParticle< M, N > &  a_other) const
inline

Comparison operator with other particle.

Parameters
[in]a_otherOther particle
Note
Does not compare the M and N Reals and RealVects.

◆ real() [1/2]

template<size_t M, size_t N>
template<size_t K>
Real & NonCommParticle< M, N >::real
inline

Get one of the scalars.

Template parameter is the position in the m_scalars array. This is templated so that compilers may throw compile-time errors if trying to fetch elements out of range.

Returns
m_scalars[K]

◆ real() [2/2]

template<size_t M, size_t N>
template<size_t K>
const Real & NonCommParticle< M, N >::real
inline

Get one of the scalars.

Template parameter is the position in the m_scalars array. This is templated so that compilers may throw compile-time errors if trying to fetch elements out of range.

Returns
m_scalars[K]

◆ vect() [1/2]

template<size_t M, size_t N>
template<size_t K>
RealVect & NonCommParticle< M, N >::vect
inline

Get one of the RealVects.

Template parameter is the position in the m_vectors array. This is templated so that compilers may throw compile-time errors if trying to fetch elements out of range.

Returns
m_vectors[K]

◆ vect() [2/2]

template<size_t M, size_t N>
template<size_t K>
const RealVect & NonCommParticle< M, N >::vect
inline

Get one of the RealVects.

Template parameter is the position in the m_vectors array. This is templated so that compilers may throw compile-time errors if trying to fetch elements out of range.

Returns
m_vectors[K]

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