CGPoint< Coordinates, Fields > Class Template Reference

Combines the position of the CGPoint (e.g. x, y, z), the parameters of the coarse-graining function (e.g. width and cutoff) and the fields to be evaluated (e.g., density, momentum, stress). More...

#include <CGPoint.h>

+ Inheritance diagram for CGPoint< Coordinates, Fields >:

Public Types

typedef Coordinates CoordinatesType
 

Public Member Functions

 CGPoint ()=default
 
 CGPoint (const CGPoint &orig)=default
 
virtual ~CGPoint ()=default
 
void write (std::ostream &os) const
 Combines the write functions of the two base classes Coordinates and Fields. More...
 
- Public Member Functions inherited from CGFields::StandardFields
 StandardFields ()
 Default constructor, sets all field values to zero. More...
 
 StandardFields (const StandardFields &P)=default
 Default copy constructor, copies the values of all fields. More...
 
 ~StandardFields ()=default
 Destructor, it simply destructs the StandardFields and all the objects it contains. More...
 
void write (std::ostream &os) const
 Writes class content into an output stream, typically a stat file. More...
 
void output (std::ostream &os) const
 Writes human-readable class content into an output stream, typically a stat file. More...
 
void setZero ()
 Sets all fields to zero. More...
 
StandardFields getSquared () const
 Returns the square of all field values (to calculate standard deviation). More...
 
StandardFieldsoperator= (const StandardFields &P)
 Copies all field values. More...
 
StandardFieldsoperator+= (const StandardFields &P)
 Adds the field values on the RHS to the LHS of the equation. More...
 
StandardFieldsoperator-= (const StandardFields &P)
 Subtracts the field values on the RHS from the LHS of the equation. More...
 
StandardFieldsoperator/= (Mdouble a)
 Divides the field values on the LHS by the RHS of the equation. More...
 
StandardFields operator* (Mdouble a) const
 Multiplies the field values on the left of the '*' by the scalar value on the right of the '*' and returns the answer. More...
 
void addParticleStatistics (Mdouble phi, const StandardFields &currentInteraction)
 This function should be called from within a loop over all particles to compute all the fields that are defined as a sum over all particles (e.g. density, momentum). More...
 
void addParticleDifferentialStatistics (Vec3D &dphi, const StandardFields &currentInteraction)
 
void addInteractionStatistics (Mdouble psi, const StandardFields &currentInteraction)
 This function should be called from within a loop over all Interactions to compute all the fields that are defined as a sum over all Interactions (e.g. stress). More...
 
void addContactPointStatistics (Mdouble phi, const StandardFields &currentInteraction)
 This function should be called from within a loop over all Interactions to compute all the fields that are defined as a sum over all Interactions with external objects (e.g. IFD). More...
 
void setFields (const BaseInteraction &c, IntegralType type)
 
void setCylindricalFields (const BaseInteraction &c, IntegralType type)
 
void setFields (const BaseParticle &p)
 
void setCylindricalFields (const BaseParticle &p)
 
Mdouble getVolumeFraction () const
 
Mdouble getDensity () const
 
Vec3D getMomentum () const
 
MatrixSymmetric3D getMomentumFlux () const
 
Matrix3D getContactStress () const
 
Vec3D getInteractionForceDensity () const
 
Mdouble getParticleSizeDensity (size_t i) const
 
std::array< Mdouble, 6 > getParticleSizeDensity () const
 
std::array< Mdouble, 6 > getParticleSizeMomenta () const
 
std::array< Mdouble, 6 > getCentralParticleSizeMomenta () const
 
std::array< Mdouble, 6 > getStandardisedParticleSizeMomenta () const
 
void outputStandardisedParticleSizeMomenta (std::ostream &os) const
 

Public Attributes

Coordinates coordinates
 

Additional Inherited Members

- Static Public Member Functions inherited from CGFields::StandardFields
static void writeNames (std::ostream &os, unsigned countVariables)
 
static bool doInteractionStatistics ()
 Returns true if the class contains fields that are defined as a sum over all Interactions (e.g. stress), else returns false. More...
 
static bool evaluateFixedParticles ()
 
static bool isDifferentialField ()
 

Detailed Description

template<class Coordinates, class Fields = CGFields::StandardFields>
class CGPoint< Coordinates, Fields >

Combines the position of the CGPoint (e.g. x, y, z), the parameters of the coarse-graining function (e.g. width and cutoff) and the fields to be evaluated (e.g., density, momentum, stress).

The class is combines the properties of a StandardFields and a CGFunctions class. It contains two functions that depend on both the fields and the cg function, evaluateParticle and evaluateContact.

See StandardFields and CGFunctions for more details.

Member Typedef Documentation

◆ CoordinatesType

template<class Coordinates , class Fields = CGFields::StandardFields>
typedef Coordinates CGPoint< Coordinates, Fields >::CoordinatesType

Constructor & Destructor Documentation

◆ CGPoint() [1/2]

template<class Coordinates , class Fields = CGFields::StandardFields>
CGPoint< Coordinates, Fields >::CGPoint ( )
default

◆ CGPoint() [2/2]

template<class Coordinates , class Fields = CGFields::StandardFields>
CGPoint< Coordinates, Fields >::CGPoint ( const CGPoint< Coordinates, Fields > &  orig)
default

◆ ~CGPoint()

template<class Coordinates , class Fields = CGFields::StandardFields>
virtual CGPoint< Coordinates, Fields >::~CGPoint ( )
virtualdefault

Member Function Documentation

◆ write()

template<class Coordinates , class Fields = CGFields::StandardFields>
void CGPoint< Coordinates, Fields >::write ( std::ostream &  os) const
inline

Combines the write functions of the two base classes Coordinates and Fields.

59  {
60  coordinates.write(os);
61  Fields::write(os);
62  }
Coordinates coordinates
Definition: CGPoint.h:66

References CGPoint< Coordinates, Fields >::coordinates.

Member Data Documentation

◆ coordinates

template<class Coordinates , class Fields = CGFields::StandardFields>
Coordinates CGPoint< Coordinates, Fields >::coordinates

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