|
#include <GradVelocityField.h>
Public Member Functions | |
GradVelocityField () | |
Default constructor, sets all field values to zero. More... | |
GradVelocityField (const GradVelocityField &P)=default | |
Default copy constructor, copies the values of all fields. More... | |
~GradVelocityField ()=default | |
Destructor, it simply destructs the GradVelocityField 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... | |
GradVelocityField | getSquared () const |
Returns the square of all field values (to calculate standard deviation). More... | |
GradVelocityField & | operator= (const GradVelocityField &P) |
Copies all field values. More... | |
GradVelocityField & | operator+= (const GradVelocityField &P) |
Adds the field values on the RHS to the LHS of the equation. More... | |
GradVelocityField & | operator-= (const GradVelocityField &P) |
Subtracts the field values on the RHS from the LHS of the equation. More... | |
GradVelocityField & | operator/= (Mdouble a) |
Divides the field values on the LHS by the RHS of the equation. More... | |
GradVelocityField | 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 GradVelocityField ¤tInteraction) |
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 GradVelocityField ¤tInteraction) |
void | addInteractionStatistics (Mdouble psi, const GradVelocityField ¤tInteraction) |
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 GradVelocityField ¤tInteraction) |
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 | getDensity () const |
Vec3D | getMomentum () const |
Vec3D | getDDensity () const |
Matrix3D | getDMomentum () const |
Static Public Member Functions | |
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 () |
Private Attributes | |
Mdouble | density_ |
Vec3D | momentum_ |
Vec3D | ddensity_ |
Matrix3D | dmomentum_ |
CGFields::GradVelocityField::GradVelocityField | ( | ) |
Default constructor, sets all field values to zero.
References setZero().
|
default |
Default copy constructor, copies the values of all fields.
|
default |
Destructor, it simply destructs the GradVelocityField and all the objects it contains.
void CGFields::GradVelocityField::addContactPointStatistics | ( | Mdouble | phi, |
const GradVelocityField & | 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).
[in] | phi | the value of the cg function for the contact point of c and the current CGPoint |
[in] | c | the interaction which is used in the cg function |
void CGFields::GradVelocityField::addInteractionStatistics | ( | Mdouble | psi, |
const GradVelocityField & | 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).
[in] | psi | the value of the line integral from C to P at the current CGPoint |
[in] | c | the contact which is used in the line integral |
void CGFields::GradVelocityField::addParticleDifferentialStatistics | ( | Vec3D & | dphi, |
const GradVelocityField & | currentInteraction | ||
) |
References ddensity_, dmomentum_, Matrix3D::dyadic(), getDensity(), and getMomentum().
void CGFields::GradVelocityField::addParticleStatistics | ( | Mdouble | phi, |
const GradVelocityField & | 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).
[in] | phi | the value of the cg function at the current CGPoint |
[in] | p | the particle which is used in the cg function |
References density_, getDensity(), getMomentum(), and momentum_.
|
static |
Returns true if the class contains fields that are defined as a sum over all Interactions (e.g. stress), else returns false.
If the functions returns false, addInteractionStatistics and addContactPointStatistics are never called.
|
inlinestatic |
|
inline |
|
inline |
References density_.
Referenced by addParticleDifferentialStatistics(), and addParticleStatistics().
|
inline |
References dmomentum_.
|
inline |
References momentum_.
Referenced by addParticleDifferentialStatistics(), and addParticleStatistics().
GradVelocityField CGFields::GradVelocityField::getSquared | ( | ) | const |
Returns the square of all field values (to calculate standard deviation).
References ddensity_, density_, dmomentum_, momentum_, Global_Physical_Variables::P, Matrix3D::square(), mathsFunc::square(), and Vec3D::square().
|
inlinestatic |
GradVelocityField CGFields::GradVelocityField::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.
[in] | a | the scalar that we multiply with |
References ddensity_, density_, dmomentum_, and momentum_.
GradVelocityField & CGFields::GradVelocityField::operator+= | ( | const GradVelocityField & | P | ) |
Adds the field values on the RHS to the LHS of the equation.
[in] | P | the CGField that has to be added |
References ddensity_, density_, dmomentum_, momentum_, and Global_Physical_Variables::P.
GradVelocityField & CGFields::GradVelocityField::operator-= | ( | const GradVelocityField & | P | ) |
Subtracts the field values on the RHS from the LHS of the equation.
[in] | P | the CGField that has to be subtracted |
References ddensity_, density_, dmomentum_, momentum_, and Global_Physical_Variables::P.
GradVelocityField & CGFields::GradVelocityField::operator/= | ( | Mdouble | a | ) |
Divides the field values on the LHS by the RHS of the equation.
[in] | a | the scalar that we divide by |
References ddensity_, density_, dmomentum_, and momentum_.
|
default |
Copies all field values.
[in] | P | the CGField that has to be copied |
void CGFields::GradVelocityField::output | ( | std::ostream & | os | ) | const |
Writes human-readable class content into an output stream, typically a stat file.
[out] | os | the ostream into which the data is written. |
References ddensity_, density_, dmomentum_, and momentum_.
void CGFields::GradVelocityField::setCylindricalFields | ( | const BaseInteraction & | c, |
IntegralType | type | ||
) |
void CGFields::GradVelocityField::setCylindricalFields | ( | const BaseParticle & | p | ) |
References Vec3D::getCylindricalTensorField(), BaseInteractable::getPosition(), momentum_, and setFields().
void CGFields::GradVelocityField::setFields | ( | const BaseInteraction & | c, |
IntegralType | type | ||
) |
Referenced by setCylindricalFields().
void CGFields::GradVelocityField::setFields | ( | const BaseParticle & | p | ) |
References density_, BaseParticle::getMass(), BaseInteractable::getVelocity(), and momentum_.
void CGFields::GradVelocityField::setZero | ( | ) |
Sets all fields to zero.
References ddensity_, density_, dmomentum_, momentum_, Matrix3D::setZero(), and Vec3D::setZero().
Referenced by GradVelocityField().
void CGFields::GradVelocityField::write | ( | std::ostream & | os | ) | const |
Writes class content into an output stream, typically a stat file.
[out] | os | the ostream into which the data is written. |
References ddensity_, density_, dmomentum_, and momentum_.
|
static |
[out] | os | the ostream into which the data is written. |
|
private |
Referenced by addParticleDifferentialStatistics(), getDDensity(), getSquared(), operator*(), operator+=(), operator-=(), operator/=(), output(), setZero(), and write().
|
private |
Referenced by addParticleStatistics(), getDensity(), getSquared(), operator*(), operator+=(), operator-=(), operator/=(), output(), setFields(), setZero(), and write().
|
private |
Referenced by addParticleDifferentialStatistics(), getDMomentum(), getSquared(), operator*(), operator+=(), operator-=(), operator/=(), output(), setZero(), and write().
|
private |
Referenced by addParticleStatistics(), getMomentum(), getSquared(), operator*(), operator+=(), operator-=(), operator/=(), output(), setCylindricalFields(), setFields(), setZero(), and write().