24#ifndef DUMUX_STAGGERED_GRID_VARIABLES_HH
25#define DUMUX_STAGGERED_GRID_VARIABLES_HH
36template<
class ActualGr
idVariables>
96 [[deprecated(
"Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
120template<
class ActualGr
idVariables>
125 using ParentType::ParentType;
128 template<
class SolVector>
129 void init(
const SolVector& curSol)
137 template<
class SolVector>
138 [[deprecated(
"Use init with one argument")]]
139 void init(
const SolVector& curSol,
const SolVector& initSol)
145 template<
class SolVector>
153 template<
class SolVector>
166template<
class ActualGr
idVariables>
171 using ParentType::ParentType;
174 template<
class SolVector>
175 void init(
const SolVector& curSol)
182 template<
class SolVector>
183 [[deprecated(
"Use init with one argument")]]
184 void init(
const SolVector& curSol,
const SolVector& initSol)
190 template<
class SolVector>
197 template<
class SolVector>
214template<
class GG,
class GVV,
class GFVC,
class GFV>
221 static constexpr auto cellCenterIdx = GG::cellCenterIdx();
222 static constexpr auto faceIdx = GG::faceIdx();
238 template<
class Problem>
242 , curGridFaceVariables_(*problem)
243 , prevGridFaceVariables_(*problem)
247 template<
class SolutionVector>
248 void update(
const SolutionVector& curSol)
251 curGridFaceVariables_.update(*this->
gridGeometry_, curSol[faceIdx]);
255 template<
class SolutionVector>
256 void init(
const SolutionVector& curSol)
259 curGridFaceVariables_.update(*this->
gridGeometry_, curSol[faceIdx]);
260 prevGridFaceVariables_.update(*this->
gridGeometry_, curSol[faceIdx]);
264 template<
class SolutionVector>
265 [[deprecated(
"Use init with one argument")]]
266 void init(
const SolutionVector& curSol,
const SolutionVector& initSol)
276 prevGridFaceVariables_ = curGridFaceVariables_;
280 template<
class SolutionVector>
284 curGridFaceVariables_ = prevGridFaceVariables_;
289 {
return curGridFaceVariables_; }
293 {
return prevGridFaceVariables_; }
297 {
return curGridFaceVariables_; }
301 {
return prevGridFaceVariables_; }
306 return std::make_unique<CellCenterGridVariablesView<ThisType>>(
this);
312 return std::make_unique<FaceGridVariablesView<ThisType>>(
this);
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
The grid variable class for finite volume schemes storing variables on scv and scvf (volume and flux ...
Definition: discretization/fvgridvariables.hh:42
GG GridGeometry
export type of the finite volume grid geometry
Definition: discretization/fvgridvariables.hh:45
std::shared_ptr< const GridGeometry > gridGeometry_
pointer to the constant grid geometry
Definition: discretization/fvgridvariables.hh:175
void advanceTimeStep()
Sets the current state as the previous for next time step.
Definition: discretization/fvgridvariables.hh:124
GVV GridVolumeVariables
export type of the finite volume grid geometry
Definition: discretization/fvgridvariables.hh:48
void init(const SolutionVector &curSol)
initialize all variables (stationary case)
Definition: discretization/fvgridvariables.hh:73
const GridGeometry & gridGeometry() const
return the finite volume grid geometry
Definition: discretization/fvgridvariables.hh:170
GFVC GridFluxVariablesCache
export type of the finite volume grid geometry
Definition: discretization/fvgridvariables.hh:60
void resetTimeStep(const SolutionVector &solution)
resets state to the one before time integration
Definition: discretization/fvgridvariables.hh:131
void update(const SolutionVector &curSol, bool forceFluxCacheUpdate=false)
update all variables
Definition: discretization/fvgridvariables.hh:99
Base class for cell center of face specific auxiliary GridVariables classes. Provides a common interf...
Definition: discretization/staggered/gridvariables.hh:38
typename ActualGridVariables::GridFaceVariables GridFaceVariables
Definition: discretization/staggered/gridvariables.hh:41
GridFaceVariables & curGridFaceVars()
return the current face variables
Definition: discretization/staggered/gridvariables.hh:88
typename ActualGridVariables::GridGeometry GridGeometry
Definition: discretization/staggered/gridvariables.hh:49
ActualGridVariables & gridVariables()
Definition: discretization/staggered/gridvariables.hh:108
const GridFaceVariables & prevGridFaceVars() const
return the previous face variables
Definition: discretization/staggered/gridvariables.hh:84
const GridFluxVariablesCache & gridFluxVarsCache() const
return the flux variables cache
Definition: discretization/staggered/gridvariables.hh:56
GridFluxVariablesCache & gridFluxVarsCache()
return the flux variables cache
Definition: discretization/staggered/gridvariables.hh:60
GridVolumeVariables & curGridVolVars()
return the current volume variables
Definition: discretization/staggered/gridvariables.hh:68
typename ActualGridVariables::GridFluxVariablesCache GridFluxVariablesCache
Definition: discretization/staggered/gridvariables.hh:42
const GridGeometry & gridGeometry() const
return the fv grid geometry
Definition: discretization/staggered/gridvariables.hh:100
const GridVolumeVariables & curGridVolVars() const
return the current volume variables
Definition: discretization/staggered/gridvariables.hh:64
GridFaceVariables & prevGridFaceVars()
return the previous face variables
Definition: discretization/staggered/gridvariables.hh:92
typename VolumeVariables::PrimaryVariables PrimaryVariables
export primary variable type
Definition: discretization/staggered/gridvariables.hh:48
const GridFaceVariables & curGridFaceVars() const
return the current face variables
Definition: discretization/staggered/gridvariables.hh:80
const GridGeometry & fvGridGeometry() const
return the fv grid geometry
Definition: discretization/staggered/gridvariables.hh:97
const ActualGridVariables & gridVariables() const
Definition: discretization/staggered/gridvariables.hh:104
const GridVolumeVariables & prevGridVolVars() const
return the volume variables of the previous time step (for instationary problems)
Definition: discretization/staggered/gridvariables.hh:72
StaggeredGridVariablesView(ActualGridVariables *gridVariables)
Definition: discretization/staggered/gridvariables.hh:52
GridVolumeVariables & prevGridVolVars()
return the volume variables of the previous time step (for instationary problems)
Definition: discretization/staggered/gridvariables.hh:76
ActualGridVariables * gridVariables_
Definition: discretization/staggered/gridvariables.hh:112
typename GridVolumeVariables::VolumeVariables VolumeVariables
export type of the volume variables
Definition: discretization/staggered/gridvariables.hh:45
typename ActualGridVariables::GridVolumeVariables GridVolumeVariables
Definition: discretization/staggered/gridvariables.hh:40
GridGeometry FVGridGeometry
Definition: discretization/staggered/gridvariables.hh:50
Cell center specific auxiliary GridVariables classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/gridvariables.hh:122
void init(const SolVector &curSol)
initialize all variables (stationary case)
Definition: discretization/staggered/gridvariables.hh:129
void init(const SolVector &curSol, const SolVector &initSol)
initialize all variables (instationary case)
Definition: discretization/staggered/gridvariables.hh:139
void update(const SolVector &curSol)
update the volume variables and the flux variables cache
Definition: discretization/staggered/gridvariables.hh:146
void resetTimeStep(const SolVector &sol)
resets state to the one before time integration
Definition: discretization/staggered/gridvariables.hh:154
Face specific auxiliary GridVariables classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/gridvariables.hh:168
void init(const SolVector &curSol, const SolVector &initSol)
initialize all variables (instationary case)
Definition: discretization/staggered/gridvariables.hh:184
void init(const SolVector &curSol)
initialize all variables (stationary case)
Definition: discretization/staggered/gridvariables.hh:175
void update(const SolVector &curSol)
update the face variables
Definition: discretization/staggered/gridvariables.hh:191
void resetTimeStep(const SolVector &sol)
resets state to the one before time integration
Definition: discretization/staggered/gridvariables.hh:198
Class storing data associated to scvs and scvfs.
Definition: discretization/staggered/gridvariables.hh:216
void init(const SolutionVector &curSol, const SolutionVector &initSol)
initialize all variables (instationary case)
Definition: discretization/staggered/gridvariables.hh:266
GFV GridFaceVariables
export the type of the grid face variables
Definition: discretization/staggered/gridvariables.hh:233
void update(const SolutionVector &curSol)
update all variables
Definition: discretization/staggered/gridvariables.hh:248
StaggeredGridVariables(std::shared_ptr< Problem > problem, std::shared_ptr< GridGeometry > gridGeometry)
Constructor.
Definition: discretization/staggered/gridvariables.hh:239
void init(const SolutionVector &curSol)
initialize all variables (stationary case)
Definition: discretization/staggered/gridvariables.hh:256
const GridFaceVariables & curGridFaceVars() const
return the current face variables
Definition: discretization/staggered/gridvariables.hh:288
FaceGridVariablesView< ThisType > faceGridVariables() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/gridvariables.hh:322
void resetTimeStep(const SolutionVector &solution)
resets state to the one before time integration
Definition: discretization/staggered/gridvariables.hh:281
void advanceTimeStep()
Definition: discretization/staggered/gridvariables.hh:273
CellCenterGridVariablesView< ThisType > cellCenterGridVariables() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/gridvariables.hh:316
GridFaceVariables & prevGridFaceVars()
return the previous face variables
Definition: discretization/staggered/gridvariables.hh:300
GridFaceVariables & curGridFaceVars()
return the current face variables
Definition: discretization/staggered/gridvariables.hh:296
std::unique_ptr< CellCenterGridVariablesView< ThisType > > cellCenterGridVariablesPtr()
Returns a pointer the cell center specific auxiliary class. Required for the multi-domain FVAssembler...
Definition: discretization/staggered/gridvariables.hh:304
const GridFaceVariables & prevGridFaceVars() const
return the previous face variables
Definition: discretization/staggered/gridvariables.hh:292
std::unique_ptr< FaceGridVariablesView< ThisType > > faceGridVariablesPtr()
Returns a pointer the face specific auxiliary class. Required for the multi-domain FVAssembler's ctor...
Definition: discretization/staggered/gridvariables.hh:310
The grid variable class for finite volume schemes storing variables on scv and scvf (volume and flux ...