chombo-discharge
Public Member Functions | List of all members
SimpleItoParticle Class Reference

A particle class for reducing HDF5 I/O file sizes when using ItoSolver. More...

#include <CD_SimpleItoParticle.H>

Inheritance diagram for SimpleItoParticle:
Inheritance graph
[legend]
Collaboration diagram for SimpleItoParticle:
Collaboration graph
[legend]

Public Member Functions

 SimpleItoParticle ()
 Default constructor. Should subsequently set weight/position/energy.
 
 SimpleItoParticle (const Real a_weight, const RealVect a_position, const Real a_energy)
 Constructor. Sets weight, position, and energy. More...
 
virtual ~SimpleItoParticle ()
 Destructor (does nothing)
 
void define (const Real a_weight, const RealVect a_position, const Real a_energy)
 Define function. Sets weight, position, and energy. More...
 
Real & weight ()
 Get weight. More...
 
const Real & weight () const
 Const retrieve weight. More...
 
Real & energy ()
 Get energy. More...
 
const Real & energy () const
 Const retrieve energy. More...
 
- Public Member Functions inherited from GenericParticle< 2, 0 >
 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...
 
Real & real ()
 Get one of the scalars. More...
 
const Real & real () const
 Get one of the scalars. More...
 
RealVect & vect ()
 Get one of the RealVects. More...
 
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...
 

Additional Inherited Members

- Protected Attributes inherited from GenericParticle< 2, 0 >
RealVect m_position
 Particle position.
 
std::array< Real, M > m_scalars
 Scalar storage array.
 
std::array< RealVect, N > m_vectors
 vector storage array
 

Detailed Description

A particle class for reducing HDF5 I/O file sizes when using ItoSolver.

This is a computational particle class which only stores the weight, position and energy of a particle. It is used with ItoSolver in order to reduce the file size of HDF5 files.

Constructor & Destructor Documentation

◆ SimpleItoParticle()

SimpleItoParticle::SimpleItoParticle ( const Real  a_weight,
const RealVect  a_position,
const Real  a_energy 
)
inline

Constructor. Sets weight, position, and energy.

Parameters
[in]a_weightComputational weight
[in]a_positionPosition in physical space.
[in]a_energyAverage particle energy

Member Function Documentation

◆ define()

void SimpleItoParticle::define ( const Real  a_weight,
const RealVect  a_position,
const Real  a_energy 
)
inline

Define function. Sets weight, position, and energy.

Parameters
[in]a_weightComputational weigth
[in]a_positionPosition in physical space.
[in]a_energyAverage particle energy

◆ energy() [1/2]

Real & SimpleItoParticle::energy ( )
inline

Get energy.

Returns
Returns m_energy

◆ energy() [2/2]

const Real & SimpleItoParticle::energy ( ) const
inline

Const retrieve energy.

Returns
Returns m_energy

◆ weight() [1/2]

Real & SimpleItoParticle::weight ( )
inline

Get weight.

Returns
Returns m_weight

◆ weight() [2/2]

const Real & SimpleItoParticle::weight ( ) const
inline

Const retrieve weight.

Returns
Returns m_weight

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