37 #ifndef LagrangianEqn_H
38 #define LagrangianEqn_H
61 template<
template<
class>
class PrimitiveField>
100 template<
class OtherType>
104 template<
class OtherType>
108 template<
class OtherType>
112 template<
class OtherType>
116 template<
class OtherType>
123 template<
class OtherType>
145 template<
template<
class>
class PrimitiveField>
158 template<
template<
class>
class PrimitiveField>
171 template<
template<
class>
class PrimitiveField>
183 template<
template<
class>
class PrimitiveField>
195 template<
template<
class>
class PrimitiveField>
207 template<
template<
class>
class PrimitiveField>
275 template<
class EqOp,
class TypeB>
303 template<
template<
class>
class PrimitiveField>
326 void solve(
const bool final);
332 template<
class OtherType>
336 template<
class OtherType>
340 template<
class OtherType>
344 template<
class OtherType>
348 template<
template<
class>
class PrimitiveField>
352 template<
template<
class>
class PrimitiveField>
362 template<
template<
class>
class PrimitiveField>
366 template<
template<
class>
class PrimitiveField>
382 #define LAGRANGIAN_EQN_EQN_OPERATOR(Op) \
384 template<class Type, class TypeB> \
385 tmp<LagrangianEqn<Type>> operator Op \
387 const LagrangianEqn<Type>& a, \
388 const LagrangianEqn<TypeB>& b \
391 template<class Type, class TypeB> \
392 tmp<LagrangianEqn<Type>> operator Op \
394 const tmp<LagrangianEqn<Type>>& tA, \
395 const LagrangianEqn<TypeB>& b \
398 template<class Type, class TypeB> \
399 tmp<LagrangianEqn<Type>> operator Op \
401 const tmp<LagrangianEqn<Type>>& tA, \
402 const tmp<LagrangianEqn<TypeB>>& tB \
405 template<class Type, class TypeB> \
406 tmp<LagrangianEqn<Type>> operator Op \
408 const LagrangianEqn<Type>& a, \
409 const tmp<LagrangianEqn<TypeB>>& tB \
412 #define LAGRANGIAN_COMMUTATIVE_EQN_EQN_OPERATOR(Op) \
414 LAGRANGIAN_EQN_EQN_OPERATOR(Op) \
416 template<class Type> \
417 tmp<LagrangianEqn<Type>> operator Op \
419 const LagrangianEqn<Type>& a, \
420 const tmp<LagrangianEqn<Type>>& tB \
432 #undef LAGRANGIAN_EQN_EQN_OPERATOR
433 #undef LAGRANGIAN_COMMUTATIVE_EQN_EQN_OPERATOR
435 #define LAGRANGIAN_EQN_FIELD_OPERATOR(Op, LagrangianSubField) \
437 template<class Type> \
438 tmp<LagrangianEqn<Type>> operator Op \
440 const LagrangianEqn<Type>& eqn, \
441 const LagrangianSubField<Type>& field \
444 template<class Type> \
445 tmp<LagrangianEqn<Type>> operator Op \
447 const tmp<LagrangianEqn<Type>>& tEqn, \
448 const LagrangianSubField<Type>& field \
451 template<class Type> \
452 tmp<LagrangianEqn<Type>> operator Op \
454 const tmp<LagrangianEqn<Type>>& tEqn, \
455 const tmp<LagrangianSubField<Type>>& tField \
458 template<class Type> \
459 tmp<LagrangianEqn<Type>> operator Op \
461 const LagrangianEqn<Type>& eqn, \
462 const tmp<LagrangianSubField<Type>>& tField \
465 #define LAGRANGIAN_FIELD_EQN_OPERATOR(Op, LagrangianSubField) \
467 template<class Type> \
468 tmp<LagrangianEqn<Type>> operator Op \
470 const LagrangianSubField<Type>& field, \
471 const LagrangianEqn<Type>& eqn \
474 template<class Type> \
475 tmp<LagrangianEqn<Type>> operator Op \
477 const LagrangianSubField<Type>& field, \
478 const tmp<LagrangianEqn<Type>>& tEqn \
481 template<class Type> \
482 tmp<LagrangianEqn<Type>> operator Op \
484 const tmp<LagrangianSubField<Type>>& tField, \
485 const tmp<LagrangianEqn<Type>>& tEqn \
488 template<class Type> \
489 tmp<LagrangianEqn<Type>> operator Op \
491 const tmp<LagrangianSubField<Type>>& tField, \
492 const LagrangianEqn<Type>& eqn \
513 #undef LAGRANGIAN_EQN_FIELD_OPERATOR
514 #undef LAGRANGIAN_FIELD_EQN_OPERATOR
516 #define LAGRANGIAN_EQN_SCALAR_FIELD_OPERATOR(Op, LagrangianSubField) \
518 template<class Type> \
519 tmp<LagrangianEqn<Type>> operator Op \
521 const LagrangianEqn<Type>& eqn, \
522 const LagrangianSubField<scalar>& field \
525 template<class Type> \
526 tmp<LagrangianEqn<Type>> operator Op \
528 const tmp<LagrangianEqn<Type>>& tEqn, \
529 const LagrangianSubField<scalar>& field \
532 template<class Type> \
533 tmp<LagrangianEqn<Type>> operator Op \
535 const tmp<LagrangianEqn<Type>>& tEqn, \
536 const tmp<LagrangianSubField<scalar>>& tField \
539 template<class Type> \
540 tmp<LagrangianEqn<Type>> operator Op \
542 const LagrangianEqn<Type>& eqn, \
543 const tmp<LagrangianSubField<scalar>>& tField \
546 #define LAGRANGIAN_SCALAR_FIELD_EQN_OPERATOR(Op, LagrangianSubField) \
548 template<class Type> \
549 tmp<LagrangianEqn<Type>> operator Op \
551 const LagrangianSubField<scalar>& field, \
552 const LagrangianEqn<Type>& eqn \
555 template<class Type> \
556 tmp<LagrangianEqn<Type>> operator Op \
558 const LagrangianSubField<scalar>& field, \
559 const tmp<LagrangianEqn<Type>>& tEqn \
562 template<class Type> \
563 tmp<LagrangianEqn<Type>> operator Op \
565 const tmp<LagrangianSubField<scalar>>& tField, \
566 const tmp<LagrangianEqn<Type>>& tEqn \
569 template<class Type> \
570 tmp<LagrangianEqn<Type>> operator Op \
572 const tmp<LagrangianSubField<scalar>>& tField, \
573 const LagrangianEqn<Type>& eqn \
586 #undef LAGRANGIAN_EQN_SCALAR_FIELD_OPERATOR
587 #undef LAGRANGIAN_SCALAR_FIELD_EQN_OPERATOR
595 template<
template<
class>
class PrimitiveField>
608 template<
template<
class>
class OtherPrimitiveField>
614 return NullObjectRef<LagrangianSubField<Type, PrimitiveField>>();
#define LAGRANGIAN_COMMUTATIVE_EQN_EQN_OPERATOR(Op)
#define LAGRANGIAN_SCALAR_FIELD_EQN_OPERATOR(Op, LagrangianSubField)
#define LAGRANGIAN_EQN_SCALAR_FIELD_OPERATOR(Op, LagrangianSubField)
#define LAGRANGIAN_FIELD_EQN_OPERATOR(Op, LagrangianSubField)
#define LAGRANGIAN_EQN_EQN_OPERATOR(Op)
#define LAGRANGIAN_EQN_FIELD_OPERATOR(Op, LagrangianSubField)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
Non-templated base class for Lagrangian equations.
const LagrangianSubMesh & mesh() const
Return the mesh.
const word & name() const
Return the equation name.
This class stores the coefficients of a Lagrangian equation, and facilitates solving that equation an...
LagrangianCoeff< scalar, true > deltaTSp
Implicit time-coefficient.
LagrangianSp< Type > Sp
Implicit coefficient.
LagrangianCoeff< Type, false > Su
Explicit coefficient.
word psiGroup() const
Return the field group.
void solve(const bool final)
Solve.
tmp< LagrangianSp< Type > > allSp() const
Return the combined time and non-time implicit coefficient.
bool valid() const
Determine whether this matrix has any valid coefficients.
bool isPsi(const LagrangianSubField< Type, PrimitiveField > &) const
Return whether the given field is that of the equation.
tmp< LagrangianCoeff< scalar, true > > allDiagonalSp() const
Return the combined time and non-time implicit diagonal.
void operator-=(const LagrangianEqn< OtherType > &other)
Subtraction assignment.
~LagrangianEqn()
Destructor.
friend class LagrangianEqn
Declare friendship with Lagrangian equations of different types.
void operator/=(const LagrangianSubField< scalar, PrimitiveField > &)
Division assignment.
void operator+=(const LagrangianEqn< OtherType > &other)
Addition assignment.
tmp< LagrangianCoeff< Type, false > > allDiagonalSu() const
Return the combined time and non-time explicit diagonal.
tmp< LagrangianSubSubField< Type > > psi() const
Return the field.
void operator*=(const LagrangianSubField< scalar, PrimitiveField > &)
Multiply assignment.
static tmp< LagrangianEqn< Type > > NewEmpty(const LagrangianEqn< Type > &)
Construct from another equation, with empty coefficients.
LagrangianCoeff< Type, false > deltaTSu
Explicit time-coefficient.
const word & psiName() const
Return the field name.
tmp< LagrangianCoeff< Type, false > > allSu() const
Return the combined time and non-time explicit coefficient.
Wrapper around LagrangianCoeff to specialise for the implicit coefficient. Trivial at present....
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
Reference counter for various OpenFOAM components.
A class for managing temporary objects.
A class for handling words, derived from string.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
tmp< DimensionedField< Type, GeoMesh, Field > > operator-(const DimensionedField< Type, GeoMesh, PrimitiveField > &df1)
T & NullObjectNonConstRef()
Return non-const reference to the nullObject of type T.