A generic particle class, holding the position and a specified number of real and vector values.
More...
#include <CD_GenericParticle.H>
|
| GenericParticle () |
| Default constructor – initializes everything to zero.
|
|
| GenericParticle (const GenericParticle< M, N > &a_other) |
| Copy constructor. Copies all fields. More...
|
|
virtual | ~GenericParticle () |
| Destructor (deallocates runtime memory storage)
|
|
RealVect & | position () |
| Get the particle position. More...
|
|
const RealVect & | position () const |
| Get the particle position. More...
|
|
const std::array< Real, M > & | getReals () const noexcept |
| Get the M scalars. More...
|
|
std::array< Real, M > & | getReals () noexcept |
| Get the M scalars. More...
|
|
const std::array< RealVect, N > & | getVects () const noexcept |
| Get the N vectors. More...
|
|
std::array< RealVect, N > & | getVects () noexcept |
| Get the N vectors. More...
|
|
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 GenericParticle< M, N > &a_other) const |
| Comparison operator with other particle. More...
|
|
bool | operator!= (const GenericParticle< M, N > &a_other) const |
| Comparison operator with other particle. More...
|
|
bool | operator< (const GenericParticle< M, N > &a_other) const noexcept |
| Particle comparison operator. Returns lexicographical ordering.
|
|
virtual int | size () const |
| Returns the size, in number of bytes, of a flat representation of the data in this object.
|
|
virtual void | linearOut (void *a_buffer) const |
| Write a linear binary representation of the internal data. Assumes that sufficient memory for the buffer has already been allocated by the caller. More...
|
|
virtual void | linearIn (void *a_buffer) |
| Read a linear binary representation of the internal data. Assumes that the buffer has the correct data. More...
|
|
|
RealVect | m_position |
| Particle position.
|
|
std::array< Real, M > | m_scalars |
| Scalar storage array.
|
|
std::array< RealVect, N > | m_vectors |
| vector storage array
|
|
template<size_t M, size_t N>
class GenericParticle< M, N >
A generic particle class, holding the position and a specified number of real and vector values.
◆ GenericParticle()
template<size_t M, size_t N>
Copy constructor. Copies all fields.
- Parameters
-
[in] | a_other | Other particle. |
◆ getReals() [1/2]
template<size_t M, size_t N>
Get the M scalars.
- Returns
- m_scalars
◆ getReals() [2/2]
template<size_t M, size_t N>
Get the M scalars.
- Returns
- m_scalars
◆ getVects() [1/2]
template<size_t M, size_t N>
Get the N vectors.
- Returns
- m_vects
◆ getVects() [2/2]
template<size_t M, size_t N>
Get the N vectors.
- Returns
- m_vects
◆ linearIn()
template<size_t M, size_t N>
Read a linear binary representation of the internal data. Assumes that the buffer has the correct data.
- Parameters
-
[in] | a_buffer | Pointer to memory block |
Reimplemented in TracerParticle< M, N >.
◆ linearOut()
template<size_t M, size_t N>
Write a linear binary representation of the internal data. Assumes that sufficient memory for the buffer has already been allocated by the caller.
- Parameters
-
[in] | a_buffer | Pointer to memory block |
Reimplemented in TracerParticle< M, N >.
◆ operator!=()
template<size_t M, size_t N>
Comparison operator with other particle.
- Parameters
-
[in] | a_other | Other particle |
- Note
- Does not compare the M and N Reals and RealVects.
◆ operator==()
template<size_t M, size_t N>
Comparison operator with other particle.
- Parameters
-
[in] | a_other | Other particle |
- Note
- Does not compare the M and N Reals and RealVects.
◆ position() [1/2]
template<size_t M, size_t N>
Get the particle position.
- Returns
- m_position
◆ position() [2/2]
template<size_t M, size_t N>
Get the particle position.
- Returns
- m_position
◆ real() [1/2]
template<size_t M, size_t N>
template<size_t K>
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>
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>
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>
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: