Commit 1dd76044 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

rename GlobalVolumeVariables -> GridVariables

This commit affects all properties and member variables
parent 3510bffe
......@@ -57,7 +57,7 @@ class BoxLocalAssembler<TypeTag,
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix);
......@@ -431,12 +431,12 @@ private:
}
private:
template<class T = TypeTag>
static typename std::enable_if<!GET_PROP_VALUE(T, EnableGlobalVolumeVariablesCache), VolumeVariables&>::type
static typename std::enable_if<!GET_PROP_VALUE(T, EnableGridVolumeVariablesCache), VolumeVariables&>::type
getVolVarAccess(GridVolumeVariables& gridVolVars, ElementVolumeVariables& elemVolVars, const SubControlVolume& scv)
{ return elemVolVars[scv]; }
template<class T = TypeTag>
static typename std::enable_if<GET_PROP_VALUE(T, EnableGlobalVolumeVariablesCache), VolumeVariables&>::type
static typename std::enable_if<GET_PROP_VALUE(T, EnableGridVolumeVariablesCache), VolumeVariables&>::type
getVolVarAccess(GridVolumeVariables& gridVolVars, ElementVolumeVariables& elemVolVars, const SubControlVolume& scv)
{ return gridVolVars.volVars(scv.elementIndex(), scv.indexInElement()); }
......@@ -456,7 +456,7 @@ class BoxLocalAssembler<TypeTag,
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix);
......@@ -798,12 +798,12 @@ private:
}
private:
template<class T = TypeTag>
static typename std::enable_if<!GET_PROP_VALUE(T, EnableGlobalVolumeVariablesCache), VolumeVariables&>::type
static typename std::enable_if<!GET_PROP_VALUE(T, EnableGridVolumeVariablesCache), VolumeVariables&>::type
getVolVarAccess(GridVolumeVariables& gridVolVars, ElementVolumeVariables& elemVolVars, const SubControlVolume& scv)
{ return elemVolVars[scv]; }
template<class T = TypeTag>
static typename std::enable_if<GET_PROP_VALUE(T, EnableGlobalVolumeVariablesCache), VolumeVariables&>::type
static typename std::enable_if<GET_PROP_VALUE(T, EnableGridVolumeVariablesCache), VolumeVariables&>::type
getVolVarAccess(GridVolumeVariables& gridVolVars, ElementVolumeVariables& elemVolVars, const SubControlVolume& scv)
{ return gridVolVars.volVars(scv.elementIndex(), scv.indexInElement()); }
......@@ -823,7 +823,7 @@ class BoxLocalAssembler<TypeTag,
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix);
......@@ -1135,7 +1135,7 @@ class BoxLocalAssembler<TypeTag,
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix);
......
......@@ -55,7 +55,7 @@ class CCLocalAssembler<TypeTag,
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix);
......@@ -577,12 +577,12 @@ private:
}
private:
template<class T = TypeTag>
static typename std::enable_if<!GET_PROP_VALUE(T, EnableGlobalVolumeVariablesCache), VolumeVariables&>::type
static typename std::enable_if<!GET_PROP_VALUE(T, EnableGridVolumeVariablesCache), VolumeVariables&>::type
getVolVarAccess(GridVolumeVariables& gridVolVars, ElementVolumeVariables& elemVolVars, const SubControlVolume& scv)
{ return elemVolVars[scv]; }
template<class T = TypeTag>
static typename std::enable_if<GET_PROP_VALUE(T, EnableGlobalVolumeVariablesCache), VolumeVariables&>::type
static typename std::enable_if<GET_PROP_VALUE(T, EnableGridVolumeVariablesCache), VolumeVariables&>::type
getVolVarAccess(GridVolumeVariables& gridVolVars, ElementVolumeVariables& elemVolVars, const SubControlVolume& scv)
{ return gridVolVars.volVars(scv); }
};
......@@ -600,7 +600,7 @@ class CCLocalAssembler<TypeTag,
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix);
......@@ -917,12 +917,12 @@ private:
}
private:
template<class T = TypeTag>
static typename std::enable_if<!GET_PROP_VALUE(T, EnableGlobalVolumeVariablesCache), VolumeVariables&>::type
static typename std::enable_if<!GET_PROP_VALUE(T, EnableGridVolumeVariablesCache), VolumeVariables&>::type
getVolVarAccess(GridVolumeVariables& gridVolVars, ElementVolumeVariables& elemVolVars, const SubControlVolume& scv)
{ return elemVolVars[scv]; }
template<class T = TypeTag>
static typename std::enable_if<GET_PROP_VALUE(T, EnableGlobalVolumeVariablesCache), VolumeVariables&>::type
static typename std::enable_if<GET_PROP_VALUE(T, EnableGridVolumeVariablesCache), VolumeVariables&>::type
getVolVarAccess(GridVolumeVariables& gridVolVars, ElementVolumeVariables& elemVolVars, const SubControlVolume& scv)
{ return gridVolVars.volVars(scv); }
};
......@@ -942,7 +942,7 @@ class CCLocalAssembler<TypeTag,
using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix);
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
......@@ -1204,7 +1204,7 @@ class CCLocalAssembler<TypeTag,
using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix);
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
......
......@@ -61,7 +61,7 @@ class StaggeredLocalAssembler<TypeTag,
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix);
......@@ -599,12 +599,12 @@ static void updateGlobalJacobian_(SubMatrix& matrix,
private:
template<class T = TypeTag>
static typename std::enable_if<!GET_PROP_VALUE(T, EnableGlobalVolumeVariablesCache), VolumeVariables&>::type
static typename std::enable_if<!GET_PROP_VALUE(T, EnableGridVolumeVariablesCache), VolumeVariables&>::type
getVolVarAccess(GridVolumeVariables& gridVolVars, ElementVolumeVariables& elemVolVars, const SubControlVolume& scv)
{ return elemVolVars[scv]; }
template<class T = TypeTag>
static typename std::enable_if<GET_PROP_VALUE(T, EnableGlobalVolumeVariablesCache), VolumeVariables&>::type
static typename std::enable_if<GET_PROP_VALUE(T, EnableGridVolumeVariablesCache), VolumeVariables&>::type
getVolVarAccess(GridVolumeVariables& gridVolVars, ElementVolumeVariables& elemVolVars, const SubControlVolume& scv)
{ return gridVolVars.volVars(scv); }
......
......@@ -91,8 +91,8 @@ NEW_PROP_TAG(EnableFVGridGeometryCache); //! specifies if geometric da
NEW_PROP_TAG(VolumeVariables); //! The secondary variables within a sub-control volume
NEW_PROP_TAG(ElementVolumeVariables); //! The type for a local (element/stencil) container for the volume variables
NEW_PROP_TAG(GlobalVolumeVariables); //! The type for a global container for the volume variables
NEW_PROP_TAG(EnableGlobalVolumeVariablesCache); //! If disabled, the volume variables are not stored (reduces memory, but is slower)
NEW_PROP_TAG(GridVolumeVariables); //! The type for a global container for the volume variables
NEW_PROP_TAG(EnableGridVolumeVariablesCache); //! If disabled, the volume variables are not stored (reduces memory, but is slower)
NEW_PROP_TAG(FluxVariables); //! Container storing the different types of flux variables
NEW_PROP_TAG(FluxVariablesCache); //! Stores data associated with flux vars
NEW_PROP_TAG(ElementFluxVariablesCache); //! A local vector of flux variable caches per element
......
......@@ -33,7 +33,7 @@ namespace Dumux
* \ingroup ImplicitModel
* \brief Base class for the volume variables vector
*/
template<class TypeTag, bool enableGlobalVolVarsCache>
template<class TypeTag, bool enableGridVolVarsCache>
class BoxElementVolumeVariables
{};
......@@ -45,7 +45,7 @@ class BoxElementVolumeVariables<TypeTag,/*enableGlobalVolVarCache*/true>
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using GlobalVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using IndexType = typename GridView::IndexSet::IndexType;
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
......@@ -57,14 +57,14 @@ class BoxElementVolumeVariables<TypeTag,/*enableGlobalVolVarCache*/true>
public:
//! Constructor
BoxElementVolumeVariables(const GlobalVolumeVariables& globalVolVars)
: globalVolVarsPtr_(&globalVolVars) {}
BoxElementVolumeVariables(const GridVolumeVariables& gridVolVars)
: gridVolVarsPtr_(&gridVolVars) {}
const VolumeVariables& operator [](IndexType scvIdx) const
{ return globalVolVars().volVars(eIdx_, scvIdx); }
{ return gridVolVars().volVars(eIdx_, scvIdx); }
const VolumeVariables& operator [](const SubControlVolume& scv) const
{ return globalVolVars().volVars(eIdx_, scv.indexInElement()); }
{ return gridVolVars().volVars(eIdx_, scv.indexInElement()); }
// For compatibility reasons with the case of not storing the vol vars.
// function to be called before assembling an element, preparing the vol vars within the stencil
......@@ -84,11 +84,11 @@ public:
}
//! The global volume variables object we are a restriction of
const GlobalVolumeVariables& globalVolVars() const
{ return *globalVolVarsPtr_; }
const GridVolumeVariables& gridVolVars() const
{ return *gridVolVarsPtr_; }
private:
const GlobalVolumeVariables* globalVolVarsPtr_;
const GridVolumeVariables* gridVolVarsPtr_;
IndexType eIdx_;
};
......@@ -101,7 +101,7 @@ class BoxElementVolumeVariables<TypeTag, /*enableGlobalVolVarCache*/false>
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using GlobalVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using IndexType = typename GridView::IndexSet::IndexType;
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
......@@ -112,8 +112,8 @@ class BoxElementVolumeVariables<TypeTag, /*enableGlobalVolVarCache*/false>
public:
//! Constructor
BoxElementVolumeVariables(const GlobalVolumeVariables& globalVolVars)
: globalVolVarsPtr_(&globalVolVars) {}
BoxElementVolumeVariables(const GridVolumeVariables& gridVolVars)
: gridVolVarsPtr_(&gridVolVars) {}
// specialization for box models, simply forwards to the bindElement method
void bind(const Element& element,
......@@ -136,8 +136,8 @@ public:
for (auto&& scv : scvs(fvGeometry))
{
// TODO: INTERFACE SOLVER
// globalVolVars().problem().model().boxInterfaceConditionSolver().updateScvVolVars(element, scv, sol);
volumeVariables_[scv.indexInElement()].update(elemSol, globalVolVars().problem(), element, scv);
// gridVolVars().problem().model().boxInterfaceConditionSolver().updateScvVolVars(element, scv, sol);
volumeVariables_[scv.indexInElement()].update(elemSol, gridVolVars().problem(), element, scv);
}
}
......@@ -154,11 +154,11 @@ public:
{ return volumeVariables_[scv.indexInElement()]; }
//! The global volume variables object we are a restriction of
const GlobalVolumeVariables& globalVolVars() const
{ return *globalVolVarsPtr_; }
const GridVolumeVariables& gridVolVars() const
{ return *gridVolVarsPtr_; }
private:
const GlobalVolumeVariables* globalVolVarsPtr_;
const GridVolumeVariables* gridVolVarsPtr_;
std::vector<VolumeVariables> volumeVariables_;
};
......
......@@ -47,7 +47,7 @@ class BoxGlobalFluxVariablesCache<TypeTag, true>
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using IndexType = typename GridView::IndexSet::IndexType;
using Element = typename GridView::template Codim<0>::Entity;
using FluxVariablesCache = typename GET_PROP_TYPE(TypeTag, FluxVariablesCache);
......@@ -121,7 +121,7 @@ class BoxGlobalFluxVariablesCache<TypeTag, false>
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using IndexType = typename GridView::IndexSet::IndexType;
using Element = typename GridView::template Codim<0>::Entity;
using FluxVariablesCache = typename GET_PROP_TYPE(TypeTag, FluxVariablesCache);
......
......@@ -32,13 +32,13 @@ namespace Dumux
* \ingroup ImplicitModel
* \brief Base class for the volume variables vector
*/
template<class TypeTag, bool enableGlobalVolVarsCache>
class BoxGlobalVolumeVariables
template<class TypeTag, bool enableGridVolVarsCache>
class BoxGridVolumeVariables
{};
// specialization in case of storing the volume variables
template<class TypeTag>
class BoxGlobalVolumeVariables<TypeTag,/*enableGlobalVolVarCache*/true>
class BoxGridVolumeVariables<TypeTag,/*enableGlobalVolVarCache*/true>
{
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
......@@ -55,7 +55,7 @@ class BoxGlobalVolumeVariables<TypeTag,/*enableGlobalVolVarCache*/true>
using Element = typename GridView::template Codim<0>::Entity;
public:
BoxGlobalVolumeVariables(const Problem& problem) : problemPtr_(&problem) {}
BoxGridVolumeVariables(const Problem& problem) : problemPtr_(&problem) {}
void update(const FVGridGeometry& fvGridGeometry, const SolutionVector& sol)
{
......@@ -82,7 +82,7 @@ public:
* The local object is only functional after calling its bind/bindElement method
* This is a free function that will be found by means of ADL
*/
friend inline ElementVolumeVariables localView(const BoxGlobalVolumeVariables& global)
friend inline ElementVolumeVariables localView(const BoxGridVolumeVariables& global)
{ return ElementVolumeVariables(global); }
const VolumeVariables& volVars(const IndexType eIdx, const IndexType scvIdx) const
......@@ -102,7 +102,7 @@ private:
// Specialization when the current volume variables are not stored
template<class TypeTag>
class BoxGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarCache*/false>
class BoxGridVolumeVariables<TypeTag, /*enableGlobalVolVarCache*/false>
{
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
......@@ -111,7 +111,7 @@ class BoxGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarCache*/false>
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
public:
BoxGlobalVolumeVariables(const Problem& problem) : problemPtr_(&problem) {}
BoxGridVolumeVariables(const Problem& problem) : problemPtr_(&problem) {}
void update(const FVGridGeometry& fvGridGeometry, const SolutionVector& sol) {}
......@@ -120,7 +120,7 @@ public:
* The local object is only functional after calling its bind/bindElement method
* This is a free function that will be found by means of ADL
*/
friend inline ElementVolumeVariables localView(const BoxGlobalVolumeVariables& global)
friend inline ElementVolumeVariables localView(const BoxGridVolumeVariables& global)
{ return ElementVolumeVariables(global); }
const Problem& problem() const
......
......@@ -160,12 +160,12 @@ SET_TYPE_PROP(BoxModel, ElementSolutionVector, BoxElementSolution<TypeTag>);
SET_TYPE_PROP(BoxModel, ElementBoundaryTypes, BoxElementBoundaryTypes<TypeTag>);
//! The global volume variables vector class
SET_TYPE_PROP(BoxModel, GlobalVolumeVariables, BoxGlobalVolumeVariables<TypeTag,
GET_PROP_VALUE(TypeTag, EnableGlobalVolumeVariablesCache)>);
SET_TYPE_PROP(BoxModel, GridVolumeVariables, BoxGridVolumeVariables<TypeTag,
GET_PROP_VALUE(TypeTag, EnableGridVolumeVariablesCache)>);
//! The element volume variables vector class
SET_TYPE_PROP(BoxModel, ElementVolumeVariables, BoxElementVolumeVariables<TypeTag,
GET_PROP_VALUE(TypeTag, EnableGlobalVolumeVariablesCache)>);
GET_PROP_VALUE(TypeTag, EnableGridVolumeVariablesCache)>);
//! The global flux variables cache vector class
SET_TYPE_PROP(BoxModel, GlobalFluxVariablesCache, BoxGlobalFluxVariablesCache<TypeTag,
......
......@@ -32,13 +32,13 @@ namespace Dumux
* \ingroup ImplicitModel
* \brief Base class for the volume variables vector
*/
template<class TypeTag, bool enableGlobalVolVarsCache>
class CCGlobalVolumeVariables
template<class TypeTag, bool enableGridVolVarsCache>
class CCGridVolumeVariables
{};
//! specialization in case of storing the volume variables
template<class TypeTag>
class CCGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/true>
class CCGridVolumeVariables<TypeTag, /*enableGridVolVarsCache*/true>
{
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
......@@ -54,7 +54,7 @@ class CCGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/true>
using Element = typename GridView::template Codim<0>::Entity;
public:
CCGlobalVolumeVariables(const Problem& problem) : problemPtr_(&problem) {}
CCGridVolumeVariables(const Problem& problem) : problemPtr_(&problem) {}
void update(const FVGridGeometry& fvGridGeometry, const SolutionVector& sol)
{
......@@ -102,7 +102,7 @@ public:
* The local object is only functional after calling its bind/bindElement method
* This is a free function that will be found by means of ADL
*/
friend inline ElementVolumeVariables localView(const CCGlobalVolumeVariables& global)
friend inline ElementVolumeVariables localView(const CCGridVolumeVariables& global)
{ return ElementVolumeVariables(global); }
const VolumeVariables& volVars(const IndexType scvIdx) const
......@@ -137,7 +137,7 @@ private:
//! Specialization when the current volume variables are not stored globally
template<class TypeTag>
class CCGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/false>
class CCGridVolumeVariables<TypeTag, /*enableGridVolVarsCache*/false>
{
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
......@@ -145,7 +145,7 @@ class CCGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/false>
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
public:
CCGlobalVolumeVariables(const Problem& problem) : problemPtr_(&problem) {}
CCGridVolumeVariables(const Problem& problem) : problemPtr_(&problem) {}
void update(const FVGridGeometry& fvGridGeometry, const SolutionVector& sol) {}
......@@ -154,7 +154,7 @@ public:
* The local object is only functional after calling its bind/bindElement method
* This is a free function that will be found by means of ADL
*/
friend inline ElementVolumeVariables localView(const CCGlobalVolumeVariables& global)
friend inline ElementVolumeVariables localView(const CCGridVolumeVariables& global)
{ return ElementVolumeVariables(global); }
//! The problem we are solving
......
......@@ -30,20 +30,20 @@ namespace Dumux
* \ingroup ImplicitModel
* \brief Base class for the local volume variables vector
*/
template<class TypeTag, bool enableGlobalVolVarsCache>
template<class TypeTag, bool enableGridVolVarsCache>
class CCMpfaElementVolumeVariables
{};
// specialization in case of storing the volume variables globally
template<class TypeTag>
class CCMpfaElementVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/true>
class CCMpfaElementVolumeVariables<TypeTag, /*enableGridVolVarsCache*/true>
{
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using GlobalVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using IndexType = typename GridView::IndexSet::IndexType;
......@@ -52,16 +52,16 @@ class CCMpfaElementVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/true>
public:
//! Constructor
CCMpfaElementVolumeVariables(const GlobalVolumeVariables& globalVolVars)
: globalVolVarsPtr_(&globalVolVars) {}
CCMpfaElementVolumeVariables(const GridVolumeVariables& gridVolVars)
: gridVolVarsPtr_(&gridVolVars) {}
const VolumeVariables& operator [](const SubControlVolume& scv) const
{ return globalVolVars().volVars(scv.dofIndex()); }
{ return gridVolVars().volVars(scv.dofIndex()); }
// operator for the access with an index
// needed for cc methods for the access to the boundary volume variables
const VolumeVariables& operator [](const IndexType scvIdx) const
{ return globalVolVars().volVars(scvIdx); }
{ return gridVolVars().volVars(scvIdx); }
// For compatibility reasons with the case of not storing the vol vars.
// function to be called before assembling an element, preparing the vol vars within the stencil
......@@ -75,17 +75,17 @@ public:
const SolutionVector& sol) {}
//! The global volume variables object we are a restriction of
const GlobalVolumeVariables& globalVolVars() const
{ return *globalVolVarsPtr_; }
const GridVolumeVariables& gridVolVars() const
{ return *gridVolVarsPtr_; }
private:
const GlobalVolumeVariables* globalVolVarsPtr_;
const GridVolumeVariables* gridVolVarsPtr_;
};
// Specialization when the current volume variables are not stored
template<class TypeTag>
class CCMpfaElementVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/false>
class CCMpfaElementVolumeVariables<TypeTag, /*enableGridVolVarsCache*/false>
{
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
......@@ -93,7 +93,7 @@ class CCMpfaElementVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/false>
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using ElementSolution = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using GlobalVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using IndexType = typename GridView::IndexSet::IndexType;
......@@ -104,8 +104,8 @@ class CCMpfaElementVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/false>
public:
//! Constructor
CCMpfaElementVolumeVariables(const GlobalVolumeVariables& globalVolVars)
: globalVolVarsPtr_(&globalVolVars) {}
CCMpfaElementVolumeVariables(const GridVolumeVariables& gridVolVars)
: gridVolVarsPtr_(&gridVolVars) {}
// Binding of an element, prepares the volume variables within the element stencil
// called by the local jacobian to prepare element assembly
......@@ -113,7 +113,7 @@ public:
const FVElementGeometry& fvGeometry,
const SolutionVector& sol)
{
const auto& problem = globalVolVars().problem();
const auto& problem = gridVolVars().problem();
const auto& fvGridGeometry = fvGeometry.fvGridGeometry();
const auto& gridIvIndexSets = fvGridGeometry.gridInteractionVolumeIndexSets();
......@@ -245,7 +245,7 @@ public:
// update the volume variables of the element
const auto& scv = fvGeometry.scv(eIdx);
volumeVariables_[0].update(ElementSolution(sol[scv.dofIndex()]),
globalVolVars().problem(),
gridVolVars().problem(),
element,
scv);
volVarIndices_[0] = scv.dofIndex();
......@@ -264,11 +264,11 @@ public:
{ return volumeVariables_[getLocalIdx_(scvIdx)]; }
//! The global volume variables object we are a restriction of
const GlobalVolumeVariables& globalVolVars() const
{ return *globalVolVarsPtr_; }
const GridVolumeVariables& gridVolVars() const
{ return *gridVolVarsPtr_; }
private:
const GlobalVolumeVariables* globalVolVarsPtr_;
const GridVolumeVariables* gridVolVarsPtr_;
//! Computes how many boundary vol vars come into play for flux calculations
//! on this element. This number is probably almost always higher than the actually
......
......@@ -53,7 +53,7 @@ class CCMpfaGlobalFluxVariablesCache<TypeTag, true>
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
using IndexType = typename GridView::IndexSet::IndexType;
using FluxVariablesCache = typename GET_PROP_TYPE(TypeTag, FluxVariablesCache);
......@@ -211,7 +211,7 @@ class CCMpfaGlobalFluxVariablesCache<TypeTag, false>
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GridVolumeVariables);
using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
public:
......
......@@ -33,13 +33,13 @@ namespace Dumux
* \ingroup ImplicitModel
* \brief Base class for the volume variables vector
*/
template<class TypeTag, bool enableGlobalVolVarsCache>
class CCMpfaGlobalVolumeVariables
template<class TypeTag, bool enableGridVolVarsCache>
class CCMpfaGridVolumeVariables
{};
//! specialization in case of storing the volume variables
template<class TypeTag>
class CCMpfaGlobalVolumeVariables<TypeTag, /*enableGlobalVolVarsCache*/true>
class CCMpfaGridVolumeVariables<TypeTag, /*enableGridVolVarsCache*/true>
{
// The local class needs to access and change volVars
friend typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
......@@ -108,7 +108,7 @@ public:
* The local object is only functional after calling its bind/bindElement method
* This is a free function that will be found by means of ADL
*/
friend inline ElementVolumeVariables localView(const CCMpfaGlobalVolumeVariables& global)
friend inline ElementVolumeVariables localView(const CCMpfaGridVolumeVariables& global)
{ return ElementVolumeVariables(global); }