3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Classes | Public Types | Public Member Functions | List of all members
Dumux::Experimental::Variables< X > Class Template Reference

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/common/variables.hh>

Inheritance diagram for Dumux::Experimental::Variables< X >:

Description

template<class X>
class Dumux::Experimental::Variables< X >

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.

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.

Template Parameters
XThe 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 TimeLeveltimeLevel () const
 Return the time level. More...
 
const SolutionVectordofs () const
 Return reference to the solution. More...
 
SolutionVectordofs ()
 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...
 

Member Typedef Documentation

◆ Scalar

template<class X >
using Dumux::Experimental::Variables< X >::Scalar = typename ScalarT<X>::type

export the underlying scalar type

◆ SolutionVector

template<class X >
using Dumux::Experimental::Variables< X >::SolutionVector = X

export the type of solution vector

◆ TimeLevel

template<class X >
using Dumux::Experimental::Variables< X >::TimeLevel = Dumux::Experimental::TimeLevel<Scalar>

export the time representation

Constructor & Destructor Documentation

◆ Variables() [1/4]

template<class X >
Dumux::Experimental::Variables< X >::Variables ( )
inlineexplicit

Default constructor.

◆ Variables() [2/4]

template<class X >
Dumux::Experimental::Variables< X >::Variables ( const SolutionVector x,
const TimeLevel t = TimeLevel{0.0} 
)
inlineexplicit

Construction from a solution.

◆ Variables() [3/4]

template<class X >
Dumux::Experimental::Variables< X >::Variables ( SolutionVector &&  x,
const TimeLevel t = TimeLevel{0.0} 
)
inlineexplicit

Construction from a solution.

◆ Variables() [4/4]

template<class X >
template<class Initializer , std::enable_if_t<(std::is_invocable_r_v< void, Initializer, X & >), int > = 0>
Dumux::Experimental::Variables< X >::Variables ( const Initializer &  initializeSolution,
const TimeLevel timeLevel = TimeLevel{0.0} 
)
inlineexplicit

Construction from initializer lambda.

Member Function Documentation

◆ dofs() [1/2]

template<class X >
SolutionVector & Dumux::Experimental::Variables< X >::dofs ( )
inline

Non-const access still required for privar switch (TODO: Remove dependency)

◆ dofs() [2/2]

template<class X >
const SolutionVector & Dumux::Experimental::Variables< X >::dofs ( ) const
inline

Return reference to the solution.

◆ timeLevel()

template<class X >
const TimeLevel & Dumux::Experimental::Variables< X >::timeLevel ( ) const
inline

Return the time level.

◆ update() [1/2]

template<class X >
void Dumux::Experimental::Variables< X >::update ( const SolutionVector x)
inline

Update the state to a new solution.

◆ update() [2/2]

template<class X >
void Dumux::Experimental::Variables< X >::update ( const SolutionVector x,
const TimeLevel t 
)
inline

Update the state to a new solution & time level.

◆ updateTime()

template<class X >
void Dumux::Experimental::Variables< X >::updateTime ( const TimeLevel t)
inline

Update the time level only.


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