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 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 regIOobjectpsiIo () const
 Return the field IO. More...
 
const wordpsiName () 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 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...
 

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.

Non-templated base class for Lagrangian equations.

Source files

Source files

Definition at line 52 of file LagrangianEqn.H.

Constructor & Destructor Documentation

◆ LagrangianEqn() [1/12]

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() [2/12]

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() [3/12]

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() [4/12]

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() [5/12]

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() [6/12]

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() [7/12]

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() [8/12]

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() [9/12]

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() [10/12]

LagrangianEqn ( const LagrangianEqn< Type > &  eqn)

Copy construct.

Definition at line 193 of file LagrangianEqn.C.

◆ LagrangianEqn() [11/12]

LagrangianEqn ( LagrangianEqn< Type > &&  eqn)

Move construct.

Definition at line 211 of file LagrangianEqn.C.

◆ LagrangianEqn() [12/12]

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

Construct from tmp.

Definition at line 232 of file LagrangianEqn.C.

◆ ~LagrangianEqn()

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.

Here is the call graph for this function:

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

References Foam::notNull().

Here is the call graph for this function:

◆ 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().

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

◆ psiIo()

const Foam::regIOobject & psiIo

Return the field IO.

Definition at line 353 of file LagrangianEqn.C.

References Foam::notNull().

Referenced by LagrangianEqn< Type >::op().

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

◆ isPsi()

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

Here is the caller graph for this function:

◆ op()

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

Here is the call graph for this function:

◆ setPrevious()

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

Here is the call graph for this function:

◆ allSu()

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

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 490 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 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-=().

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 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-=().

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

◆ solve()

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

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

◆ operator+=() [1/2]

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.

Here is the call graph for this function:

◆ operator+=() [2/2]

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

Addition assignment.

Definition at line 611 of file LagrangianEqn.C.

References Foam::operator+=().

Here is the call graph for this function:

◆ operator-=() [1/2]

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.

Here is the call graph for this function:

◆ operator-=() [2/2]

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

Subtraction assignment.

Definition at line 632 of file LagrangianEqn.C.

References Foam::operator-=().

Here is the call graph for this function:

Member Data Documentation

◆ deltaTSu

LagrangianCoeff<Type, false> deltaTSu

Explicit time-coefficient.

Definition at line 94 of file LagrangianEqn.H.

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

◆ deltaTSp

LagrangianCoeff<scalar, true> deltaTSp

Implicit time-coefficient.

Definition at line 97 of file LagrangianEqn.H.

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

◆ Su

◆ Sp

LagrangianSp<Type> Sp

Implicit coefficient.

Definition at line 103 of file LagrangianEqn.H.

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


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