12#ifndef DUMUX_GRID_VARIABLES_HH
13#define DUMUX_GRID_VARIABLES_HH
25template<
class GG,
class GVC>
36 using Variables =
typename GridVariablesCache::Variables;
42 using Scalar =
typename PrimaryVariables::value_type;
44 template<
class Problem>
48 , curGridVars_(*problem)
49 , prevGridVars_(*problem)
53 template<
class SolutionVector>
54 void init(
const SolutionVector& curSol)
63 prevGridVars_ = curGridVars_;
67 template<
class SolutionVector>
68 void update(
const SolutionVector& curSol)
75 template<
class SolutionVector>
83 prevGridVars_ = curGridVars_;
92 prevGridVars_ = curGridVars_;
96 template<
class SolutionVector>
100 curGridVars_ = prevGridVars_;
105 {
return curGridVars_; }
109 {
return curGridVars_; }
113 {
return prevGridVars_; }
117 {
return prevGridVars_; }
The grid variables class for general schemes, storing variables and data.
Definition: discretization/gridvariables.hh:27
const GridVariablesCache & curGridVars() const
return the current variables
Definition: discretization/gridvariables.hh:104
void resetTimeStep(const SolutionVector &solution)
resets state to the one before time integration
Definition: discretization/gridvariables.hh:97
const GridGeometry & gridGeometry() const
return the grid discretization
Definition: discretization/gridvariables.hh:120
GG GridGeometry
export type of the grid discretization
Definition: discretization/gridvariables.hh:30
GridVariables(std::shared_ptr< Problem > problem, std::shared_ptr< const GridGeometry > gridGeometry)
Definition: discretization/gridvariables.hh:45
void update(const SolutionVector &curSol)
update all variables
Definition: discretization/gridvariables.hh:68
typename PrimaryVariables::value_type Scalar
export scalar
Definition: discretization/gridvariables.hh:42
std::shared_ptr< const GridGeometry > gridGeometry_
pointer to the constant grid geometry
Definition: discretization/gridvariables.hh:124
const GridVariablesCache & prevGridVars() const
return the variables of the previous time step (for instationary problems)
Definition: discretization/gridvariables.hh:112
GridVariablesCache & curGridVars()
return the current variables
Definition: discretization/gridvariables.hh:108
typename Variables::PrimaryVariables PrimaryVariables
export primary variable type
Definition: discretization/gridvariables.hh:39
GridVariablesCache & prevGridVars()
return the variables of the previous time step (for instationary problems)
Definition: discretization/gridvariables.hh:116
void advanceTimeStep()
Sets the current state as the previous for next time step.
Definition: discretization/gridvariables.hh:90
typename GridVariablesCache::Variables Variables
export type of the variables
Definition: discretization/gridvariables.hh:36
GVC GridVariablesCache
export type of the grid variables cache
Definition: discretization/gridvariables.hh:33
void updateAfterGridAdaption(const SolutionVector &curSol)
update all variables after grid adaption
Definition: discretization/gridvariables.hh:76
void init(const SolutionVector &curSol)
initialize all variables (stationary case)
Definition: discretization/gridvariables.hh:54
Definition: assembly/assembler.hh:44