27 #ifndef EWOMS_BASE_AUXILIARY_MODULE_HH 28 #define EWOMS_BASE_AUXILIARY_MODULE_HH 38 namespace Properties {
58 template <
class TypeTag>
61 typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
62 typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
63 typedef typename GET_PROP_TYPE(TypeTag, GlobalEqVector) GlobalEqVector;
64 typedef typename GET_PROP_TYPE(TypeTag, JacobianMatrix) JacobianMatrix;
67 typedef std::set<unsigned> NeighborSet;
77 virtual unsigned numDofs()
const = 0;
84 { dofOffset_ = value; }
91 {
return dofOffset_; }
99 assert(0 <= localDofIdx);
100 assert(localDofIdx <
numDofs());
101 return dofOffset_ + localDofIdx;
108 virtual void addNeighbors(std::vector<NeighborSet>& neighbors)
const = 0;
118 virtual void linearize(JacobianMatrix& matrix, GlobalEqVector& residual) = 0;
int dofOffset()
Return the offset in the global system of equations for the first degree of freedom of this auxiliary...
Definition: baseauxiliarymodule.hh:90
virtual void applyInitial()=0
Set the initial condition of the auxiliary module in the solution vector.
Definition: baseauxiliarymodule.hh:37
virtual void linearize(JacobianMatrix &matrix, GlobalEqVector &residual)=0
Linearize the auxiliary equation.
virtual unsigned numDofs() const =0
Returns the number of additional degrees of freedom required for the auxiliary module.
void setDofOffset(int value)
Set the offset in the global system of equations for the first degree of freedom of this auxiliary mo...
Definition: baseauxiliarymodule.hh:83
#define NEW_TYPE_TAG(...)
Define a new type tag.
Definition: propertysystem.hh:169
Declare the properties used by the infrastructure code of the finite volume discretizations.
virtual void addNeighbors(std::vector< NeighborSet > &neighbors) const =0
Specify the additional neighboring correlations caused by the auxiliary module.
Provides the magic behind the eWoms property system.
int localToGlobalDof(unsigned localDofIdx) const
Given a degree of freedom relative to the current auxiliary equation, return the corresponding index ...
Definition: baseauxiliarymodule.hh:97
#define NEW_PROP_TAG(PTagName)
Define a property tag.
Definition: propertysystem.hh:247
Base class for specifying auxiliary equations.
Definition: baseauxiliarymodule.hh:59