This class stores the coefficients of a Lagrangian equation, and facilitates solving that equation and updating the associated field. It is designed to behave and be used similarly to fvMatrix. More...


Public Member Functions | |
| template<template< class > class PrimitiveField> | |
| LagrangianEqn (const word &name, const tmp< LagrangianSubScalarField > &tDeltaT, const LagrangianSubField< Type, PrimitiveField > &psi, LagrangianDynamicField< scalar > &deltaTSp0=NullObjectNonConstRef< LagrangianDynamicField< scalar >>(), LagrangianDynamicField< Type > &S0=NullObjectNonConstRef< LagrangianDynamicField< Type >>()) | |
| Construct for a const field and a tmp time-step with a name. More... | |
| template<template< class > class PrimitiveField> | |
| LagrangianEqn (const word &name, const LagrangianSubScalarField &deltaT, const LagrangianSubField< Type, PrimitiveField > &psi, LagrangianDynamicField< scalar > &deltaTSp0=NullObjectNonConstRef< LagrangianDynamicField< scalar >>(), LagrangianDynamicField< Type > &S0=NullObjectNonConstRef< LagrangianDynamicField< Type >>()) | |
| Construct for a const field and a time-step with a name. More... | |
| template<template< class > class PrimitiveField> | |
| LagrangianEqn (const word &name, const LagrangianSubField< Type, PrimitiveField > &psi, LagrangianDynamicField< scalar > &deltaTSp0=NullObjectNonConstRef< LagrangianDynamicField< scalar >>(), LagrangianDynamicField< Type > &S0=NullObjectNonConstRef< LagrangianDynamicField< Type >>()) | |
| Construct for a const field with a name. More... | |
| template<template< class > class PrimitiveField> | |
| LagrangianEqn (const tmp< LagrangianSubScalarField > &tDeltaT, const LagrangianSubField< Type, PrimitiveField > &psi, LagrangianDynamicField< scalar > &deltaTSp0=NullObjectNonConstRef< LagrangianDynamicField< scalar >>(), LagrangianDynamicField< Type > &S0=NullObjectNonConstRef< LagrangianDynamicField< Type >>()) | |
| Construct for a const field and a tmp time-step. Name will be null. More... | |
| template<template< class > class PrimitiveField> | |
| LagrangianEqn (const LagrangianSubScalarField &deltaT, const LagrangianSubField< Type, PrimitiveField > &psi, LagrangianDynamicField< scalar > &deltaTSp0=NullObjectNonConstRef< LagrangianDynamicField< scalar >>(), LagrangianDynamicField< Type > &S0=NullObjectNonConstRef< LagrangianDynamicField< Type >>()) | |
| Construct for a const field and a time-step. Name will be null. More... | |
| template<template< class > class PrimitiveField> | |
| LagrangianEqn (const LagrangianSubField< Type, PrimitiveField > &psi, LagrangianDynamicField< scalar > &deltaTSp0=NullObjectNonConstRef< LagrangianDynamicField< scalar >>(), LagrangianDynamicField< Type > &S0=NullObjectNonConstRef< LagrangianDynamicField< Type >>()) | |
| Construct for a const field. Name will be null. More... | |
| LagrangianEqn (const tmp< LagrangianSubScalarField > &tDeltaT, LagrangianSubSubField< Type > &psi, LagrangianDynamicField< scalar > &deltaTSp0=NullObjectNonConstRef< LagrangianDynamicField< scalar >>(), LagrangianDynamicField< Type > &S0=NullObjectNonConstRef< LagrangianDynamicField< Type >>()) | |
| Construct for a non-const field and a tmp time-step. Will be named. More... | |
| LagrangianEqn (const LagrangianSubScalarField &deltaT, LagrangianSubSubField< Type > &psi, LagrangianDynamicField< scalar > &deltaTSp0=NullObjectNonConstRef< LagrangianDynamicField< scalar >>(), LagrangianDynamicField< Type > &S0=NullObjectNonConstRef< LagrangianDynamicField< Type >>()) | |
| Construct for a non-const field and a time-step. Will be named. More... | |
| LagrangianEqn (LagrangianSubSubField< Type > &psi, LagrangianDynamicField< scalar > &deltaTSp0=NullObjectNonConstRef< LagrangianDynamicField< scalar >>(), LagrangianDynamicField< Type > &S0=NullObjectNonConstRef< LagrangianDynamicField< Type >>()) | |
| Construct for a non-const field. Will be named. More... | |
| LagrangianEqn (const LagrangianEqn< Type > &eqn) | |
| Copy construct. More... | |
| LagrangianEqn (LagrangianEqn< Type > &&eqn) | |
| Move construct. More... | |
| LagrangianEqn (const tmp< LagrangianEqn< Type >> &tEqn) | |
| Construct from tmp. More... | |
| ~LagrangianEqn () | |
| Destructor. More... | |
| tmp< LagrangianSubSubField< Type > > | psi () const |
| Return the field. More... | |
| const regIOobject & | psiIo () const |
| Return the field IO. More... | |
| const word & | psiName () const |
| Return the field name. More... | |
| template<template< class > class PrimitiveField> | |
| bool | isPsi (const LagrangianSubField< Type, PrimitiveField > &psi) const |
| Return whether the given field is that of the equation. More... | |
| void | op (const LagrangianEqn< Type > &other) |
| Check the operation with another equation. More... | |
| void | setPrevious (const tmp< LagrangianEqn< Type >> &tOther) |
| Set the previous field to that stored by another tmp equation. More... | |
| tmp< LagrangianCoeff< Type, false > > | allSu () const |
| Return the combined time and non-time explicit coefficient. More... | |
| tmp< LagrangianSp< Type > > | allSp () const |
| Return the combined time and non-time implicit coefficient. More... | |
| tmp< LagrangianCoeff< Type, false > > | allDiagonalSu () const |
| Return the combined time and non-time explicit diagonal. More... | |
| tmp< LagrangianCoeff< scalar, true > > | allDiagonalSp () const |
| Return the combined time and non-time implicit diagonal. More... | |
| void | solve (const bool final) |
| Solve. More... | |
| void | operator+= (const LagrangianEqn< Type > &other) |
| Addition assignment. More... | |
| void | operator+= (const tmp< LagrangianEqn< Type >> &tOther) |
| Addition assignment. More... | |
| void | operator-= (const LagrangianEqn< Type > &other) |
| Subtraction assignment. More... | |
| void | operator-= (const tmp< LagrangianEqn< Type >> &tOther) |
| Subtraction assignment. More... | |
Public Member Functions inherited from refCount | |
| int | count () const |
| Return the current reference count. More... | |
| bool | unique () const |
| Return true if the reference count is zero. More... | |
| void | operator++ () |
| Increment the reference count. More... | |
| void | operator++ (int) |
| Increment the reference count. More... | |
| void | operator-- () |
| Decrement the reference count. More... | |
| void | operator-- (int) |
| Decrement the reference count. More... | |
| void | operator= (const refCount &)=delete |
| Disallow bitwise assignment. More... | |
Public Member Functions inherited from LagrangianEqnBase | |
| const word & | name () const |
| Return the equation name. More... | |
| const LagrangianSubMesh & | mesh () const |
| Return the mesh. More... | |
Static Public Member Functions | |
| static tmp< LagrangianEqn< Type > > | NewEmpty (const LagrangianEqn< Type > &) |
| Construct from another equation, with empty coefficients. More... | |
Public Attributes | |
| LagrangianCoeff< Type, false > | deltaTSu |
| Explicit time-coefficient. More... | |
| LagrangianCoeff< scalar, true > | deltaTSp |
| Implicit time-coefficient. More... | |
| LagrangianCoeff< Type, false > | Su |
| Explicit coefficient. More... | |
| LagrangianSp< Type > | Sp |
| Implicit coefficient. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from refCount | |
| refCount () | |
| Construct null initialising count to 0. More... | |
| refCount (const refCount &)=delete | |
| Disallow copy. More... | |
Protected Member Functions inherited from LagrangianEqnBase | |
| LagrangianEqnBase (const word &name, const LagrangianSubMesh &mesh) | |
| Construct from components. More... | |
Protected Attributes inherited from LagrangianEqnBase | |
| word | name_ |
| Symbolic name of the equation or equation term. More... | |
| const LagrangianSubMesh & | mesh_ |
| Reference to the mesh. More... | |
This class stores the coefficients of a Lagrangian equation, and facilitates solving that equation and updating the associated field. It is designed to behave and be used similarly to fvMatrix.
Non-templated base class for Lagrangian equations.
Definition at line 52 of file LagrangianEqn.H.
| LagrangianEqn | ( | const word & | name, |
| const tmp< LagrangianSubScalarField > & | tDeltaT, | ||
| const LagrangianSubField< Type, PrimitiveField > & | psi, | ||
| LagrangianDynamicField< scalar > & | deltaTSp0 = NullObjectNonConstRef<LagrangianDynamicField<scalar>>(), |
||
| LagrangianDynamicField< Type > & | S0 = NullObjectNonConstRef<LagrangianDynamicField<Type>>() |
||
| ) |
Construct for a const field and a tmp time-step with a name.
Definition at line 34 of file LagrangianEqn.C.
| LagrangianEqn | ( | const word & | name, |
| const LagrangianSubScalarField & | deltaT, | ||
| const LagrangianSubField< Type, PrimitiveField > & | psi, | ||
| LagrangianDynamicField< scalar > & | deltaTSp0 = NullObjectNonConstRef<LagrangianDynamicField<scalar>>(), |
||
| LagrangianDynamicField< Type > & | S0 = NullObjectNonConstRef<LagrangianDynamicField<Type>>() |
||
| ) |
Construct for a const field and a time-step with a name.
Definition at line 59 of file LagrangianEqn.C.
| LagrangianEqn | ( | const word & | name, |
| const LagrangianSubField< Type, PrimitiveField > & | psi, | ||
| LagrangianDynamicField< scalar > & | deltaTSp0 = NullObjectNonConstRef<LagrangianDynamicField<scalar>>(), |
||
| LagrangianDynamicField< Type > & | S0 = NullObjectNonConstRef<LagrangianDynamicField<Type>>() |
||
| ) |
Construct for a const field with a name.
Definition at line 81 of file LagrangianEqn.C.
| LagrangianEqn | ( | const tmp< LagrangianSubScalarField > & | tDeltaT, |
| const LagrangianSubField< Type, PrimitiveField > & | psi, | ||
| LagrangianDynamicField< scalar > & | deltaTSp0 = NullObjectNonConstRef<LagrangianDynamicField<scalar>>(), |
||
| LagrangianDynamicField< Type > & | S0 = NullObjectNonConstRef<LagrangianDynamicField<Type>>() |
||
| ) |
Construct for a const field and a tmp time-step. Name will be null.
Definition at line 95 of file LagrangianEqn.C.
| LagrangianEqn | ( | const LagrangianSubScalarField & | deltaT, |
| const LagrangianSubField< Type, PrimitiveField > & | psi, | ||
| LagrangianDynamicField< scalar > & | deltaTSp0 = NullObjectNonConstRef<LagrangianDynamicField<scalar>>(), |
||
| LagrangianDynamicField< Type > & | S0 = NullObjectNonConstRef<LagrangianDynamicField<Type>>() |
||
| ) |
Construct for a const field and a time-step. Name will be null.
Definition at line 119 of file LagrangianEqn.C.
| LagrangianEqn | ( | const LagrangianSubField< Type, PrimitiveField > & | psi, |
| LagrangianDynamicField< scalar > & | deltaTSp0 = NullObjectNonConstRef<LagrangianDynamicField<scalar>>(), |
||
| LagrangianDynamicField< Type > & | S0 = NullObjectNonConstRef<LagrangianDynamicField<Type>>() |
||
| ) |
Construct for a const field. Name will be null.
Definition at line 133 of file LagrangianEqn.C.
| LagrangianEqn | ( | const tmp< LagrangianSubScalarField > & | tDeltaT, |
| LagrangianSubSubField< Type > & | psi, | ||
| LagrangianDynamicField< scalar > & | deltaTSp0 = NullObjectNonConstRef<LagrangianDynamicField<scalar>>(), |
||
| LagrangianDynamicField< Type > & | S0 = NullObjectNonConstRef<LagrangianDynamicField<Type>>() |
||
| ) |
Construct for a non-const field and a tmp time-step. Will be named.
automatically as the field name plus the suffix "Eqn".
Definition at line 145 of file LagrangianEqn.C.
| LagrangianEqn | ( | const LagrangianSubScalarField & | deltaT, |
| LagrangianSubSubField< Type > & | psi, | ||
| LagrangianDynamicField< scalar > & | deltaTSp0 = NullObjectNonConstRef<LagrangianDynamicField<scalar>>(), |
||
| LagrangianDynamicField< Type > & | S0 = NullObjectNonConstRef<LagrangianDynamicField<Type>>() |
||
| ) |
Construct for a non-const field and a time-step. Will be named.
automatically as the field name plus the suffix "Eqn".
Definition at line 168 of file LagrangianEqn.C.
| LagrangianEqn | ( | LagrangianSubSubField< Type > & | psi, |
| LagrangianDynamicField< scalar > & | deltaTSp0 = NullObjectNonConstRef<LagrangianDynamicField<scalar>>(), |
||
| LagrangianDynamicField< Type > & | S0 = NullObjectNonConstRef<LagrangianDynamicField<Type>>() |
||
| ) |
Construct for a non-const field. Will be named.
automatically as the field name plus the suffix "Eqn".
Definition at line 181 of file LagrangianEqn.C.
| LagrangianEqn | ( | const LagrangianEqn< Type > & | eqn | ) |
Copy construct.
Definition at line 193 of file LagrangianEqn.C.
| LagrangianEqn | ( | LagrangianEqn< Type > && | eqn | ) |
Move construct.
Definition at line 211 of file LagrangianEqn.C.
| LagrangianEqn | ( | const tmp< LagrangianEqn< Type >> & | tEqn | ) |
Construct from tmp.
Definition at line 232 of file LagrangianEqn.C.
Destructor.
Definition at line 294 of file LagrangianEqn.C.
References IOobject::group(), mesh, Foam::none, Foam::notNull(), Foam::fvc::Sp(), Foam::fvc::Su(), and Foam::Zero.

|
static |
Construct from another equation, with empty coefficients.
Definition at line 326 of file LagrangianEqn.C.
References Foam::notNull().

| Foam::tmp< Foam::LagrangianSubSubField< Type > > psi |
Return the field.
Definition at line 343 of file LagrangianEqn.C.
References Foam::notNull(), and Foam::toSubField().
Referenced by PsiRef< Type >::ref(), and LagrangianSp< Type >::Su().


| const Foam::regIOobject & psiIo |
Return the field IO.
Definition at line 353 of file LagrangianEqn.C.
References Foam::notNull().
Referenced by LagrangianEqn< Type >::op().


| const Foam::word & psiName |
Return the field name.
Definition at line 363 of file LagrangianEqn.C.
| bool isPsi | ( | const LagrangianSubField< Type, PrimitiveField > & | psi | ) | const |
Return whether the given field is that of the equation.
Definition at line 371 of file LagrangianEqn.C.
References psi.
Referenced by gravity::addSup().

| void op | ( | const LagrangianEqn< Type > & | other | ) |
Check the operation with another equation.
Definition at line 381 of file LagrangianEqn.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::isNull(), LagrangianEqnBase::name_, Foam::notNull(), word::null, and LagrangianEqn< Type >::psiIo().

| void setPrevious | ( | const tmp< LagrangianEqn< Type >> & | tOther | ) |
Set the previous field to that stored by another tmp equation.
Definition at line 424 of file LagrangianEqn.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::isNull(), and Foam::notNull().

| Foam::tmp< Foam::LagrangianCoeff< Type, false > > allSu |
Return the combined time and non-time explicit coefficient.
Definition at line 467 of file LagrangianEqn.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, tmp< T >::ref(), and Foam::fvc::Su().

| Foam::tmp< Foam::LagrangianSp< Type > > allSp |
Return the combined time and non-time implicit coefficient.
Definition at line 490 of file LagrangianEqn.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, tmp< T >::ref(), and Foam::fvc::Sp().

| Foam::tmp< Foam::LagrangianCoeff< Type, false > > allDiagonalSu |
Return the combined time and non-time explicit diagonal.
coefficient; i.e., with the off-diagonal parts of any tensor Sp coefficients converted into explicit values
Definition at line 511 of file LagrangianEqn.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, tmp< T >::ref(), Foam::fvc::Sp(), and Foam::fvc::Su().
Referenced by CarrierEqn< Type >::operator+=(), and CarrierEqn< Type >::operator-=().


| Foam::tmp< Foam::LagrangianCoeff< Foam::scalar, true > > allDiagonalSp |
Return the combined time and non-time implicit diagonal.
coefficient; i.e., with the off-diagonal parts of any tensor Sp coefficients removed
Definition at line 536 of file LagrangianEqn.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, tmp< T >::ref(), and Foam::fvc::Sp().
Referenced by CarrierEqn< Type >::operator+=(), and CarrierEqn< Type >::operator-=().


| void solve | ( | const bool | final | ) |
Solve.
Definition at line 559 of file LagrangianEqn.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::isNull(), Foam::fvc::Sp(), Foam::fvc::Su(), and Foam::Zero.
Referenced by kinematicParcel::calculate(), kinematicParticle::calculate(), parcel::calculate(), and particle::calculate().


| void operator+= | ( | const LagrangianEqn< Type > & | other | ) |
Addition assignment.
Definition at line 601 of file LagrangianEqn.C.
References LagrangianEqn< Type >::deltaTSp, LagrangianEqn< Type >::deltaTSu, Foam::fvc::Sp(), LagrangianEqn< Type >::Sp, Foam::fvc::Su(), and LagrangianEqn< Type >::Su.

| void operator+= | ( | const tmp< LagrangianEqn< Type >> & | tOther | ) |
Addition assignment.
Definition at line 611 of file LagrangianEqn.C.
References Foam::operator+=().

| void operator-= | ( | const LagrangianEqn< Type > & | other | ) |
Subtraction assignment.
Definition at line 622 of file LagrangianEqn.C.
References LagrangianEqn< Type >::deltaTSp, LagrangianEqn< Type >::deltaTSu, Foam::fvc::Sp(), LagrangianEqn< Type >::Sp, Foam::fvc::Su(), and LagrangianEqn< Type >::Su.

| void operator-= | ( | const tmp< LagrangianEqn< Type >> & | tOther | ) |
Subtraction assignment.
Definition at line 632 of file LagrangianEqn.C.
References Foam::operator-=().

| LagrangianCoeff<Type, false> deltaTSu |
Explicit time-coefficient.
Definition at line 94 of file LagrangianEqn.H.
Referenced by LagrangianEqn< Type >::operator+=(), and LagrangianEqn< Type >::operator-=().
| LagrangianCoeff<scalar, true> deltaTSp |
Implicit time-coefficient.
Definition at line 97 of file LagrangianEqn.H.
Referenced by LagrangianEqn< Type >::operator+=(), and LagrangianEqn< Type >::operator-=().
| LagrangianCoeff<Type, false> Su |
Explicit coefficient.
Definition at line 100 of file LagrangianEqn.H.
Referenced by gravity::addSup(), turbulentDispersion::addSup(), LagrangianEqn< Type >::operator+=(), and LagrangianEqn< Type >::operator-=().
| LagrangianSp<Type> Sp |
Implicit coefficient.
Definition at line 103 of file LagrangianEqn.H.
Referenced by LagrangianEqn< Type >::operator+=(), and LagrangianEqn< Type >::operator-=().