Class that represents the variables of a model. We assume that models are formulated on the basis of primary and possibly secondary variables, where the latter may non-linearly depend on the former. Variables in Dumux represent the state of a numerical solution of a model, consisting of all primary/secondary variables and, if a transient problem is modeled, time information. More...
#include <dumux/experimental/common/variables.hh>
This class defines the interface that is expected of variable classes, and it provides the implementation for models that do not require storing any additional information besides the primary variables and (optionally) time.
X | The type used for solution vectors, i.e. all primary variables. |
Public Types | |
using | SolutionVector = X |
export the type of solution vector More... | |
using | Scalar = typename ScalarT< X >::type |
export the underlying scalar type More... | |
using | TimeLevel = Dumux::Experimental::TimeLevel< Scalar > |
export the time representation More... | |
Public Member Functions | |
Variables () | |
Default constructor. More... | |
Variables (const SolutionVector &x, const TimeLevel &t=TimeLevel{0.0}) | |
Construction from a solution. More... | |
Variables (SolutionVector &&x, const TimeLevel &t=TimeLevel{0.0}) | |
Construction from a solution. More... | |
template<class Initializer , std::enable_if_t<(std::is_invocable_r_v< void, Initializer, X & >), int > = 0> | |
Variables (const Initializer &initializeSolution, const TimeLevel &timeLevel=TimeLevel{0.0}) | |
Construction from initializer lambda. More... | |
const TimeLevel & | timeLevel () const |
Return the time level. More... | |
const SolutionVector & | dofs () const |
Return reference to the solution. More... | |
SolutionVector & | dofs () |
Non-const access still required for privar switch (TODO: Remove dependency) More... | |
void | update (const SolutionVector &x) |
Update the state to a new solution. More... | |
void | updateTime (const TimeLevel &t) |
Update the time level only. More... | |
void | update (const SolutionVector &x, const TimeLevel &t) |
Update the state to a new solution & time level. More... | |
using Dumux::Experimental::Variables< X >::Scalar = typename ScalarT<X>::type |
using Dumux::Experimental::Variables< X >::SolutionVector = X |
using Dumux::Experimental::Variables< X >::TimeLevel = Dumux::Experimental::TimeLevel<Scalar> |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |