LagrangianEqn< Type > Class Template Reference

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...

Inheritance diagram for LagrangianEqn< Type >:
Collaboration diagram for LagrangianEqn< Type >:

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 LagrangianSubMesh &mesh)
 Construct field-less equation. Essentially just a cache of. More...
 
 LagrangianEqn (const LagrangianEqn< Type > &eqn)
 Copy construct. More...
 
 LagrangianEqn (const tmp< LagrangianEqn< Type >> &tEqn)
 Construct from tmp. More...
 
 LagrangianEqn (LagrangianEqn< Type > &&eqn)
 Move construct. More...
 
template<class EqOp >
 LagrangianEqn (const tmp< LagrangianEqn< Type >> &tA, const tmp< LagrangianEqn< Type >> &tB, const EqOp &eqOp)
 Construct from a binary operation of two equations. More...
 
template<class EqOp , class TypeB >
 LagrangianEqn (const tmp< LagrangianEqn< Type >> &tA, const tmp< LagrangianEqn< TypeB >> &tB, const EqOp &eqOp)
 Construct from a binary operation of two equations. More...
 
 ~LagrangianEqn ()
 Destructor. More...
 
tmp< LagrangianSubSubField< Type > > psi () const
 Return the field. More...
 
const wordpsiName () const
 Return the field name. More...
 
word psiGroup () const
 Return the field group. More...
 
template<template< class > class PrimitiveField>
bool isPsi (const LagrangianSubField< Type, PrimitiveField > &) const
 Return whether the given field is that of the equation. More...
 
bool valid () const
 Determine whether this matrix has any valid coefficients. 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...
 
template<class OtherType >
void operator+= (const LagrangianEqn< OtherType > &other)
 Addition assignment. More...
 
template<class OtherType >
void operator+= (const tmp< LagrangianEqn< OtherType >> &tOther)
 Addition assignment. More...
 
template<class OtherType >
void operator-= (const LagrangianEqn< OtherType > &other)
 Subtraction assignment. More...
 
template<class OtherType >
void operator-= (const tmp< LagrangianEqn< OtherType >> &tOther)
 Subtraction assignment. More...
 
template<template< class > class PrimitiveField>
void operator*= (const LagrangianSubField< scalar, PrimitiveField > &)
 Multiply assignment. More...
 
template<template< class > class PrimitiveField>
void operator*= (const tmp< LagrangianSubField< scalar, PrimitiveField >> &)
 Multiply assignment. More...
 
void operator*= (const dimensioned< scalar > &)
 Multiply assignment. More...
 
void operator*= (const zero &)
 Multiply assignment. More...
 
template<template< class > class PrimitiveField>
void operator/= (const LagrangianSubField< scalar, PrimitiveField > &)
 Division assignment. More...
 
template<template< class > class PrimitiveField>
void operator/= (const tmp< LagrangianSubField< scalar, PrimitiveField >> &)
 Division assignment. More...
 
void operator/= (const dimensioned< scalar > &dt)
 Division 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 wordname () const
 Return the equation name. More...
 
const LagrangianSubMeshmesh () 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...
 

Friends

template<class OtherType >
class LagrangianEqn
 Declare friendship with Lagrangian equations of different types. 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 LagrangianSubMeshmesh_
 Reference to the mesh. More...
 

Detailed Description

template<class Type>
class Foam::LagrangianEqn< Type >

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.

Source files

Definition at line 52 of file LagrangianEqn.H.

Constructor & Destructor Documentation

◆ LagrangianEqn() [1/15]

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 184 of file LagrangianEqn.C.

◆ LagrangianEqn() [2/15]

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 209 of file LagrangianEqn.C.

◆ LagrangianEqn() [3/15]

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 231 of file LagrangianEqn.C.

◆ LagrangianEqn() [4/15]

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 245 of file LagrangianEqn.C.

◆ LagrangianEqn() [5/15]

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 269 of file LagrangianEqn.C.

◆ LagrangianEqn() [6/15]

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 283 of file LagrangianEqn.C.

◆ LagrangianEqn() [7/15]

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 295 of file LagrangianEqn.C.

◆ LagrangianEqn() [8/15]

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 318 of file LagrangianEqn.C.

◆ LagrangianEqn() [9/15]

Construct for a non-const field. Will be named.

automatically as the field name plus the suffix "Eqn".

Definition at line 331 of file LagrangianEqn.C.

◆ LagrangianEqn() [10/15]

LagrangianEqn ( const LagrangianSubMesh mesh)

Construct field-less equation. Essentially just a cache of.

coefficients.

Definition at line 343 of file LagrangianEqn.C.

◆ LagrangianEqn() [11/15]

LagrangianEqn ( const LagrangianEqn< Type > &  eqn)

Copy construct.

Definition at line 360 of file LagrangianEqn.C.

◆ LagrangianEqn() [12/15]

LagrangianEqn ( const tmp< LagrangianEqn< Type >> &  tEqn)

Construct from tmp.

Definition at line 367 of file LagrangianEqn.C.

◆ LagrangianEqn() [13/15]

LagrangianEqn ( LagrangianEqn< Type > &&  eqn)

Move construct.

Definition at line 422 of file LagrangianEqn.C.

◆ LagrangianEqn() [14/15]

LagrangianEqn ( const tmp< LagrangianEqn< Type >> &  tA,
const tmp< LagrangianEqn< Type >> &  tB,
const EqOp eqOp 
)

Construct from a binary operation of two equations.

Definition at line 442 of file LagrangianEqn.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::isNull(), and Foam::notNull().

Here is the call graph for this function:

◆ LagrangianEqn() [15/15]

LagrangianEqn ( const tmp< LagrangianEqn< Type >> &  tA,
const tmp< LagrangianEqn< TypeB >> &  tB,
const EqOp eqOp 
)

Construct from a binary operation of two equations.

Definition at line 565 of file LagrangianEqn.C.

◆ ~LagrangianEqn()

Destructor.

Definition at line 592 of file LagrangianEqn.C.

Member Function Documentation

◆ NewEmpty()

Foam::tmp< Foam::LagrangianEqn< Type > > NewEmpty ( const LagrangianEqn< Type > &  eqn)
static

Construct from another equation, with empty coefficients.

Definition at line 601 of file LagrangianEqn.C.

References Foam::notNull().

Here is the call graph for this function:

◆ psi()

Return the field.

Definition at line 618 of file LagrangianEqn.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::notNull(), and Foam::toSubField().

Referenced by PsiRef< Type >::ref(), and LagrangianSp< Type >::Su().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ psiName()

const Foam::word & psiName

Return the field name.

Definition at line 633 of file LagrangianEqn.C.

References Foam::notNull(), and word::null.

Here is the call graph for this function:

◆ psiGroup()

Foam::word psiGroup

Return the field group.

Definition at line 644 of file LagrangianEqn.C.

References Foam::notNull(), and word::null.

Here is the call graph for this function:

◆ isPsi()

bool isPsi ( const LagrangianSubField< Type, PrimitiveField > &  otherPsi) const

Return whether the given field is that of the equation.

Definition at line 656 of file LagrangianEqn.C.

References Foam::notNull().

Referenced by heatTransfer::addSup(), and pressureWork::addSup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valid()

bool valid

Determine whether this matrix has any valid coefficients.

Definition at line 678 of file LagrangianEqn.C.

References Foam::fvc::Sp(), and Foam::fvc::Su().

Referenced by dynamicParcel::calculate(), kinematicParcel::calculate(), multicomponentParcel::calculate(), and parcel::calculate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allSu()

Foam::tmp< Foam::LagrangianCoeff< Type, false > > allSu

Return the combined time and non-time explicit coefficient.

Definition at line 686 of file LagrangianEqn.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, tmp< T >::ref(), and Foam::fvc::Su().

Here is the call graph for this function:

◆ allSp()

Foam::tmp< Foam::LagrangianSp< Type > > allSp

Return the combined time and non-time implicit coefficient.

Definition at line 709 of file LagrangianEqn.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, tmp< T >::ref(), and Foam::fvc::Sp().

Here is the call graph for this function:

◆ allDiagonalSu()

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 730 of file LagrangianEqn.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, tmp< T >::ref(), Foam::fvc::Sp(), Foam::fvc::Su(), and Foam::blendedInterfacialModel::valid().

Referenced by CarrierEqn< Type >::operator+=(), and CarrierEqn< Type >::operator-=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allDiagonalSp()

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 757 of file LagrangianEqn.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, tmp< T >::ref(), Foam::fvc::Sp(), and Foam::blendedInterfacialModel::valid().

Referenced by CarrierEqn< Type >::operator+=(), and CarrierEqn< Type >::operator-=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ solve()

◆ operator+=() [1/2]

void operator+= ( const LagrangianEqn< OtherType > &  other)

Addition assignment.

Definition at line 825 of file LagrangianEqn.C.

References LagrangianEqn< Type >::deltaTSu, Foam::fvc::Sp(), and Foam::fvc::Su().

Here is the call graph for this function:

◆ operator+=() [2/2]

void operator+= ( const tmp< LagrangianEqn< OtherType >> &  tOther)

Addition assignment.

Definition at line 839 of file LagrangianEqn.C.

References Foam::operator+=().

Here is the call graph for this function:

◆ operator-=() [1/2]

void operator-= ( const LagrangianEqn< OtherType > &  other)

Subtraction assignment.

Definition at line 851 of file LagrangianEqn.C.

References LagrangianEqn< Type >::deltaTSu, Foam::fvc::Sp(), and Foam::fvc::Su().

Here is the call graph for this function:

◆ operator-=() [2/2]

void operator-= ( const tmp< LagrangianEqn< OtherType >> &  tOther)

Subtraction assignment.

Definition at line 865 of file LagrangianEqn.C.

References Foam::operator-=().

Here is the call graph for this function:

◆ operator*=() [1/4]

void operator*= ( const LagrangianSubField< scalar, PrimitiveField > &  S)

Multiply assignment.

Definition at line 877 of file LagrangianEqn.C.

References Foam::fvm::S(), Foam::fvc::Sp(), and Foam::fvc::Su().

Here is the call graph for this function:

◆ operator*=() [2/4]

void operator*= ( const tmp< LagrangianSubField< scalar, PrimitiveField >> &  tS)

Multiply assignment.

Definition at line 892 of file LagrangianEqn.C.

References Foam::operator*=().

Here is the call graph for this function:

◆ operator*=() [3/4]

void operator*= ( const dimensioned< scalar > &  dt)

Multiply assignment.

Definition at line 903 of file LagrangianEqn.C.

References Foam::fvc::Sp(), and Foam::fvc::Su().

Here is the call graph for this function:

◆ operator*=() [4/4]

void operator*= ( const zero z)

Multiply assignment.

Definition at line 914 of file LagrangianEqn.C.

References Foam::fvc::Sp(), and Foam::fvc::Su().

Here is the call graph for this function:

◆ operator/=() [1/3]

void operator/= ( const LagrangianSubField< scalar, PrimitiveField > &  S)

Division assignment.

Definition at line 926 of file LagrangianEqn.C.

References Foam::fvm::S(), Foam::fvc::Sp(), and Foam::fvc::Su().

Here is the call graph for this function:

◆ operator/=() [2/3]

void operator/= ( const tmp< LagrangianSubField< scalar, PrimitiveField >> &  tS)

Division assignment.

Definition at line 941 of file LagrangianEqn.C.

◆ operator/=() [3/3]

void operator/= ( const dimensioned< scalar > &  dt)

Division assignment.

Definition at line 952 of file LagrangianEqn.C.

References Foam::fvc::Sp(), and Foam::fvc::Su().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ LagrangianEqn

friend class LagrangianEqn
friend

Declare friendship with Lagrangian equations of different types.

Definition at line 123 of file LagrangianEqn.H.

Member Data Documentation

◆ deltaTSu

LagrangianCoeff<Type, false> deltaTSu

Explicit time-coefficient.

Definition at line 129 of file LagrangianEqn.H.

Referenced by LagrangianEqn< Type >::operator+=(), and LagrangianEqn< Type >::operator-=().

◆ deltaTSp

LagrangianCoeff<scalar, true> deltaTSp

Implicit time-coefficient.

Definition at line 132 of file LagrangianEqn.H.

Referenced by collisionPhaseTransfer::addSup().

◆ Su

LagrangianCoeff<Type, false> Su

Explicit coefficient.

Definition at line 135 of file LagrangianEqn.H.

Referenced by heatTransfer::addSup(), gravity::addSup(), and turbulentDispersion::addSup().

◆ Sp

LagrangianSp<Type> Sp

Implicit coefficient.

Definition at line 138 of file LagrangianEqn.H.


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