30 template<
class Type,
bool Implicit>
37 new LagrangianSubField<Type>
41 eqn_.name() +
":S" + (Implicit ?
'p' :
'u'),
42 eqn_.mesh().mesh().time().name(),
49 dimensioned<Type>(dims,
Zero)
57 template<
class Type,
bool Implicit>
67 template<
class Type,
bool Implicit>
80 template<
class Type,
bool Implicit>
93 template<
class Type,
bool Implicit>
105 template<
class Type,
bool Implicit>
106 template<
template<
class>
class PrimitiveField>
118 template<
class Type,
bool Implicit>
119 template<
template<
class>
class PrimitiveField>
127 S_(tS.isTmp() ? tS.ptr() : tS().
clone().ptr())
133 template<
class Type,
bool Implicit>
141 template<
class Type,
bool Implicit>
148 template<
class Type,
bool Implicit>
156 template<
class Type,
bool Implicit>
159 if (
valid()) S_() = -S_();
165 template<
class Type,
bool Implicit>
166 template<
template<
class>
class PrimitiveField>
172 initialise(
S.dimensions());
177 template<
class Type,
bool Implicit>
178 template<
template<
class>
class PrimitiveField>
189 template<
class Type,
bool Implicit>
195 if (!coeff.valid())
return;
200 template<
class Type,
bool Implicit>
201 template<
class OtherType>
207 if (!coeff.valid())
return;
211 << (Implicit ?
"implicit" :
"explicit")
212 <<
" coefficient to equation " << eqn().
name()
217 template<
class Type,
bool Implicit>
223 initialise(dt.dimensions());
228 template<
class Type,
bool Implicit>
233 template<
class Type,
bool Implicit>
234 template<
template<
class>
class PrimitiveField>
240 initialise(
S.dimensions());
245 template<
class Type,
bool Implicit>
246 template<
template<
class>
class PrimitiveField>
257 template<
class Type,
bool Implicit>
263 if (!coeff.valid())
return;
268 template<
class Type,
bool Implicit>
269 template<
class OtherType>
275 if (!coeff.valid())
return;
279 << (Implicit ?
"implicit" :
"explicit")
280 <<
" coefficient from equation " << eqn().
name()
285 template<
class Type,
bool Implicit>
291 initialise(dt.dimensions());
296 template<
class Type,
bool Implicit>
301 template<
class Type,
bool Implicit>
302 template<
template<
class>
class PrimitiveField>
308 if (!
valid())
return;
313 template<
class Type,
bool Implicit>
314 template<
template<
class>
class PrimitiveField>
320 if (!
valid())
return;
326 template<
class Type,
bool Implicit>
332 if (!
valid())
return;
337 template<
class Type,
bool Implicit>
344 template<
class Type,
bool Implicit>
345 template<
template<
class>
class PrimitiveField>
351 if (!
valid())
return;
356 template<
class Type,
bool Implicit>
357 template<
template<
class>
class PrimitiveField>
363 if (!
valid())
return;
369 template<
class Type,
bool Implicit>
375 if (!
valid())
return;
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Class to store a coefficient of a Lagrangian equation.
bool valid() const
Determine whether this coefficient has values or not.
LagrangianCoeff(const LagrangianEqnBase &eqn)
Construct empty.
void operator-=(const LagrangianSubField< Type, PrimitiveField > &)
Subtraction assignment.
const LagrangianEqnBase & eqn() const
Access the equation.
void operator*=(const LagrangianSubField< scalar, PrimitiveField > &)
Multiply assignment.
void operator+=(const LagrangianSubField< Type, PrimitiveField > &)
Addition assignment.
void negate()
In-place negation.
const LagrangianSubField< Type > & S() const
Access the coefficient.
Non-templated base class for Lagrangian equations.
const word & name() const
Return the equation name.
Generic dimensioned Type class.
Traits class for primitives.
Reference counter for various OpenFOAM components.
A class for managing temporary objects.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool valid(const PtrList< ModelType > &l)
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const VolField< Type > &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
void operator+=(fvMatrix< Type > &fvEqn, const CarrierEqn< Type > &cEqn)
Add to a finite-volume equation.
void operator-=(fvMatrix< Type > &fvEqn, const CarrierEqn< Type > &cEqn)
Subtract from a finite-volume equation.