Commit 008b8832 authored by Katharina Heck's avatar Katharina Heck
Browse files

Merge branch 'cleanup/use-gridgeometry-locally' into 'master'

replace local names `FV(fv)GridGeometry` by `G(g)ridGeometry`

See merge request !1743
parents c3b9b2ea ee7da122
......@@ -49,7 +49,7 @@ class GridAdaptInitializationIndicator
using Element = typename GridView::Traits::template Codim<0>::Entity;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
static constexpr bool isBox = GetPropType<TypeTag, Properties::GridGeometry>::discMethod == DiscretizationMethod::box;
......@@ -66,14 +66,14 @@ public:
* - Adaptive.RefineAtSource If to refine where source terms are specified (default: true)
* - Adaptive.BCRefinementThreshold The threshold above which fluxes are treated as non-zero (default: 1e-10)
* \param problem The problem object
* \param fvGridGeometry The finite volume geometry of the grid
* \param gridGeometry The finite volume geometry of the grid
* \param gridVariables The secondary variables on the grid
*/
GridAdaptInitializationIndicator(std::shared_ptr<const Problem> problem,
std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<const GridGeometry> gridGeometry,
std::shared_ptr<const GridVariables> gridVariables)
: problem_(problem)
, fvGridGeometry_(fvGridGeometry)
, gridGeometry_(gridGeometry)
, gridVariables_(gridVariables)
, minLevel_(getParamFromGroup<int>(problem->paramGroup(), "Adaptive.MinLevel"))
, maxLevel_(getParamFromGroup<int>(problem->paramGroup(), "Adaptive.MaxLevel"))
......@@ -141,11 +141,11 @@ public:
void calculate(const SolutionVector& sol)
{
//! prepare an indicator for refinement
indicatorVector_.assign(fvGridGeometry_->gridView().size(0), false);
indicatorVector_.assign(gridGeometry_->gridView().size(0), false);
for (const auto& element : elements(fvGridGeometry_->gridView()))
for (const auto& element : elements(gridGeometry_->gridView()))
{
const auto eIdx = fvGridGeometry_->elementMapper().index(element);
const auto eIdx = gridGeometry_->elementMapper().index(element);
//! refine any element being below the minimum level
if (element.level() < minLevel_)
......@@ -163,7 +163,7 @@ public:
continue;
// get the fvGeometry and elementVolVars needed for the bc and source interfaces
auto fvGeometry = localView(*fvGridGeometry_);
auto fvGeometry = localView(*gridGeometry_);
fvGeometry.bind(element);
auto elemVolVars = localView(gridVariables_->curGridVolVars());
......@@ -274,14 +274,14 @@ public:
*/
int operator() (const Element& element) const
{
if (indicatorVector_[fvGridGeometry_->elementMapper().index(element)])
if (indicatorVector_[gridGeometry_->elementMapper().index(element)])
return 1;
return 0;
}
private:
std::shared_ptr<const Problem> problem_; //!< The problem to be solved
std::shared_ptr<const FVGridGeometry> fvGridGeometry_; //!< The finite volume grid geometry
std::shared_ptr<const GridGeometry> gridGeometry_; //!< The finite volume grid geometry
std::shared_ptr<const GridVariables> gridVariables_; //!< The secondary variables on the grid
std::vector<bool> indicatorVector_; //!< Indicator for BCs/sources
......
......@@ -137,8 +137,8 @@ class CCLocalAssembler<TypeTag, Assembler, DiffMethod::numeric, /*implicit=*/tru
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
using Element = typename GetPropType<TypeTag, Properties::GridView>::template Codim<0>::Entity;
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using FVElementGeometry = typename FVGridGeometry::LocalView;
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using FVElementGeometry = typename GridGeometry::LocalView;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using JacobianMatrix = GetPropType<TypeTag, Properties::JacobianMatrix>;
......@@ -146,7 +146,7 @@ class CCLocalAssembler<TypeTag, Assembler, DiffMethod::numeric, /*implicit=*/tru
enum { dim = GetPropType<TypeTag, Properties::GridView>::dimension };
using FluxStencil = Dumux::FluxStencil<FVElementGeometry>;
static constexpr int maxElementStencilSize = FVGridGeometry::maxElementStencilSize;
static constexpr int maxElementStencilSize = GridGeometry::maxElementStencilSize;
static constexpr bool enableGridFluxVarsCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
public:
......@@ -170,13 +170,13 @@ public:
// get some aliases for convenience
const auto& element = this->element();
const auto& fvGeometry = this->fvGeometry();
const auto& fvGridGeometry = this->assembler().gridGeometry();
const auto& gridGeometry = this->assembler().gridGeometry();
auto&& curElemVolVars = this->curElemVolVars();
auto&& elemFluxVarsCache = this->elemFluxVarsCache();
// get stencil informations
const auto globalI = fvGridGeometry.elementMapper().index(element);
const auto& connectivityMap = fvGridGeometry.connectivityMap();
const auto globalI = gridGeometry.elementMapper().index(element);
const auto& connectivityMap = gridGeometry.connectivityMap();
const auto numNeighbors = connectivityMap[globalI].size();
// container to store the neighboring elements
......@@ -203,7 +203,7 @@ public:
unsigned int j = 1;
for (const auto& dataJ : connectivityMap[globalI])
{
neighborElements[j-1] = fvGridGeometry.element(dataJ.globalJ);
neighborElements[j-1] = gridGeometry.element(dataJ.globalJ);
for (const auto scvfIdx : dataJ.scvfsJ)
origResiduals[j] += evalNeighborFlux(neighborElements[j-1], fvGeometry.scvf(scvfIdx));
......@@ -221,7 +221,7 @@ public:
const auto origVolVars = curVolVars;
// element solution container to be deflected
auto elemSol = elementSolution(element, curSol, fvGridGeometry);
auto elemSol = elementSolution(element, curSol, gridGeometry);
// derivatives in the neighbors with repect to the current elements
// in index 0 we save the derivative of the element residual with respect to it's own dofs
......@@ -349,11 +349,11 @@ public:
// get some aliases for convenience
const auto& element = this->element();
const auto& fvGeometry = this->fvGeometry();
const auto& fvGridGeometry = this->assembler().gridGeometry();
const auto& gridGeometry = this->assembler().gridGeometry();
auto&& curElemVolVars = this->curElemVolVars();
// reference to the element's scv (needed later) and corresponding vol vars
const auto globalI = fvGridGeometry.elementMapper().index(element);
const auto globalI = gridGeometry.elementMapper().index(element);
const auto& scv = fvGeometry.scv(globalI);
auto& curVolVars = ParentType::getVolVarAccess(gridVariables.curGridVolVars(), curElemVolVars, scv);
......@@ -364,7 +364,7 @@ public:
const auto origVolVars = curVolVars;
// element solution container to be deflected
auto elemSol = elementSolution(element, curSol, fvGridGeometry);
auto elemSol = elementSolution(element, curSol, gridGeometry);
NumEqVector partialDeriv;
......
......@@ -50,7 +50,7 @@ class FVLocalResidual
using Element = typename GridView::template Codim<0>::Entity;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
......@@ -88,18 +88,18 @@ public:
* \param problem The problem to solve
* \param element The DUNE Codim<0> entity for which the storage
* term ought to be calculated
* \param fvGridGeometry The finite-volume grid geometry
* \param gridGeometry The finite-volume grid geometry
* \param gridVariables The grid variables (volume and flux variables)
* \param sol The solution vector
*/
ElementResidualVector evalStorage(const Problem& problem,
const Element &element,
const FVGridGeometry& fvGridGeometry,
const GridGeometry& gridGeometry,
const GridVariables& gridVariables,
const SolutionVector& sol) const
{
// make sure FVElementGeometry and volume variables are bound to the element
auto fvGeometry = localView(fvGridGeometry);
auto fvGeometry = localView(gridGeometry);
fvGeometry.bind(element);
auto elemVolVars = localView(gridVariables.curGridVolVars());
......
......@@ -99,10 +99,10 @@ template<class Assembler>
class PartialReassemblerEngine<Assembler, DiscretizationMethod::box>
{
using Scalar = typename Assembler::Scalar;
using FVGridGeometry = typename Assembler::GridGeometry;
using GridGeometry = typename Assembler::GridGeometry;
using JacobianMatrix = typename Assembler::JacobianMatrix;
using VertexMapper = typename FVGridGeometry::VertexMapper;
static constexpr int dim = FVGridGeometry::GridView::dimension;
using VertexMapper = typename GridGeometry::VertexMapper;
static constexpr int dim = GridGeometry::GridView::dimension;
public:
PartialReassemblerEngine(const Assembler& assembler)
......@@ -115,10 +115,10 @@ public:
const std::vector<Scalar>& distanceFromLastLinearization,
Scalar threshold)
{
const auto& fvGridGeometry = assembler.gridGeometry();
const auto& gridView = fvGridGeometry.gridView();
const auto& elementMapper = fvGridGeometry.elementMapper();
const auto& vertexMapper = fvGridGeometry.vertexMapper();
const auto& gridGeometry = assembler.gridGeometry();
const auto& gridView = gridGeometry.gridView();
const auto& elementMapper = gridGeometry.elementMapper();
const auto& vertexMapper = gridGeometry.vertexMapper();
// set all vertices to green
vertexColor_.assign(vertexColor_.size(), EntityColor::green);
......@@ -305,7 +305,7 @@ template<class Assembler>
class PartialReassemblerEngine<Assembler, DiscretizationMethod::cctpfa>
{
using Scalar = typename Assembler::Scalar;
using FVGridGeometry = typename Assembler::GridGeometry;
using GridGeometry = typename Assembler::GridGeometry;
using JacobianMatrix = typename Assembler::JacobianMatrix;
public:
......@@ -318,9 +318,9 @@ public:
const std::vector<Scalar>& distanceFromLastLinearization,
Scalar threshold)
{
const auto& fvGridGeometry = assembler.gridGeometry();
const auto& gridView = fvGridGeometry.gridView();
const auto& elementMapper = fvGridGeometry.elementMapper();
const auto& gridGeometry = assembler.gridGeometry();
const auto& gridView = gridGeometry.gridView();
const auto& elementMapper = gridGeometry.elementMapper();
// mark the red elements
for (const auto& element : elements(gridView))
......@@ -340,7 +340,7 @@ public:
}
// mark the neighbors also red
const auto& connectivityMap = fvGridGeometry.connectivityMap();
const auto& connectivityMap = gridGeometry.connectivityMap();
for (unsigned eIdx = 0; eIdx < elementColor_.size(); ++eIdx)
{
if (elementColor_[eIdx] == EntityColor::red)
......@@ -423,11 +423,11 @@ template<class Assembler>
class PartialReassembler
{
using Scalar = typename Assembler::Scalar;
using FVGridGeometry = typename Assembler::GridGeometry;
using GridGeometry = typename Assembler::GridGeometry;
using JacobianMatrix = typename Assembler::JacobianMatrix;
using VertexMapper = typename FVGridGeometry::VertexMapper;
using VertexMapper = typename GridGeometry::VertexMapper;
static constexpr DiscretizationMethod discMethod = FVGridGeometry::discMethod;
static constexpr DiscretizationMethod discMethod = GridGeometry::discMethod;
using Engine = PartialReassemblerEngine<Assembler, discMethod>;
public:
......@@ -440,9 +440,9 @@ public:
: engine_(assembler)
, greenElems_(0)
{
const auto& fvGridGeometry = assembler.gridGeometry();
totalElems_ = fvGridGeometry.elementMapper().size();
totalElems_ = fvGridGeometry.gridView().comm().sum(totalElems_);
const auto& gridGeometry = assembler.gridGeometry();
totalElems_ = gridGeometry.elementMapper().size();
totalElems_ = gridGeometry.gridView().comm().sum(totalElems_);
}
/*!
......
......@@ -101,12 +101,12 @@ public:
//! The constructor for instationary problems
StaggeredFVAssembler(std::shared_ptr<const Problem> problem,
std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<const GridGeometry> gridGeometry,
std::shared_ptr<GridVariables> gridVariables,
std::shared_ptr<const TimeLoop> timeLoop,
const SolutionVector& prevSol)
: ParentType(std::make_tuple(problem, problem),
std::make_tuple(fvGridGeometry->cellCenterFVGridGeometryPtr(), fvGridGeometry->faceFVGridGeometryPtr()),
std::make_tuple(gridGeometry->cellCenterFVGridGeometryPtr(), gridGeometry->faceFVGridGeometryPtr()),
std::make_tuple(gridVariables->cellCenterGridVariablesPtr(), gridVariables->faceGridVariablesPtr()),
std::make_shared<CouplingManager>(),
timeLoop,
......@@ -129,7 +129,7 @@ public:
{ return gridGeometry(); }
const GridGeometry& gridGeometry() const
{ return ParentType::gridGeometry(Dune::index_constant<0>()).actualfvGridGeometry(); }
{ return ParentType::gridGeometry(Dune::index_constant<0>()).actualGridGeometry(); }
};
......
......@@ -50,9 +50,9 @@ class FVProblem
{
using Implementation = GetPropType<TypeTag, Properties::Problem>;
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using FVElementGeometry = typename FVGridGeometry::LocalView;
using GridView = typename FVGridGeometry::GridView;
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using FVElementGeometry = typename GridGeometry::LocalView;
using GridView = typename GridGeometry::GridView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using Element = typename GridView::template Codim<0>::Entity;
......@@ -72,8 +72,8 @@ class FVProblem
using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>;
static constexpr bool isBox = FVGridGeometry::discMethod == DiscretizationMethod::box;
static constexpr bool isStaggered = FVGridGeometry::discMethod == DiscretizationMethod::staggered;
static constexpr bool isBox = GridGeometry::discMethod == DiscretizationMethod::box;
static constexpr bool isStaggered = GridGeometry::discMethod == DiscretizationMethod::staggered;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
......@@ -92,11 +92,11 @@ public:
/*!
* \brief Constructor
* \param fvGridGeometry The finite volume grid geometry
* \param gridGeometry The finite volume grid geometry
* \param paramGroup The parameter group in which to look for runtime parameters first (default is "")
*/
FVProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, const std::string& paramGroup = "")
: fvGridGeometry_(fvGridGeometry)
FVProblem(std::shared_ptr<const GridGeometry> gridGeometry, const std::string& paramGroup = "")
: gridGeometry_(gridGeometry)
, paramGroup_(paramGroup)
{
// set a default name for the problem
......@@ -439,7 +439,7 @@ public:
{
NumEqVector source(0);
auto scvIdx = scv.indexInElement();
auto key = std::make_pair(fvGridGeometry_->elementMapper().index(element), scvIdx);
auto key = std::make_pair(gridGeometry_->elementMapper().index(element), scvIdx);
if (pointSourceMap_.count(key))
{
// call the solDependent function. Herein the user might fill/add values to the point sources
......@@ -493,7 +493,7 @@ public:
if (!sources.empty())
{
// calculate point source locations and save them in a map
PointSourceHelper::computePointSourceMap(*fvGridGeometry_,
PointSourceHelper::computePointSourceMap(*gridGeometry_,
sources,
pointSourceMap_);
}
......@@ -581,12 +581,12 @@ public:
//! The finite volume grid geometry
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const FVGridGeometry& fvGridGeometry() const
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
//! The finite volume grid geometry
const FVGridGeometry& gridGeometry() const
{ return *fvGridGeometry_; }
const GridGeometry& gridGeometry() const
{ return *gridGeometry_; }
//! The parameter group in which to retrieve runtime parameters
const std::string& paramGroup() const
......@@ -607,8 +607,8 @@ private:
*/
void applyInitialSolutionImpl_(SolutionVector& sol, /*isBox=*/std::true_type) const
{
const auto numDofs = fvGridGeometry_->vertexMapper().size();
const auto numVert = fvGridGeometry_->gridView().size(dim);
const auto numDofs = gridGeometry_->vertexMapper().size();
const auto numVert = gridGeometry_->gridView().size(dim);
sol.resize(numDofs);
// if there are more dofs than vertices (enriched nodal dofs), we have to
......@@ -616,11 +616,11 @@ private:
if (numDofs != numVert)
{
std::vector<bool> dofVisited(numDofs, false);
for (const auto& element : elements(fvGridGeometry_->gridView()))
for (const auto& element : elements(gridGeometry_->gridView()))
{
for (int i = 0; i < element.subEntities(dim); ++i)
{
const auto dofIdxGlobal = fvGridGeometry_->vertexMapper().subIndex(element, i, dim);
const auto dofIdxGlobal = gridGeometry_->vertexMapper().subIndex(element, i, dim);
// forward to implementation if value at dof is not set yet
if (!dofVisited[dofIdxGlobal])
......@@ -635,9 +635,9 @@ private:
// otherwise we directly loop over the vertices
else
{
for (const auto& vertex : vertices(fvGridGeometry_->gridView()))
for (const auto& vertex : vertices(gridGeometry_->gridView()))
{
const auto dofIdxGlobal = fvGridGeometry_->vertexMapper().index(vertex);
const auto dofIdxGlobal = gridGeometry_->vertexMapper().index(vertex);
sol[dofIdxGlobal] = asImp_().initial(vertex);
}
}
......@@ -648,16 +648,16 @@ private:
*/
void applyInitialSolutionImpl_(SolutionVector& sol, /*isBox=*/std::false_type) const
{
sol.resize(fvGridGeometry_->numDofs());
for (const auto& element : elements(fvGridGeometry_->gridView()))
sol.resize(gridGeometry_->numDofs());
for (const auto& element : elements(gridGeometry_->gridView()))
{
const auto dofIdxGlobal = fvGridGeometry_->elementMapper().index(element);
const auto dofIdxGlobal = gridGeometry_->elementMapper().index(element);
sol[dofIdxGlobal] = asImp_().initial(element);
}
}
//! The finite volume grid geometry
std::shared_ptr<const FVGridGeometry> fvGridGeometry_;
std::shared_ptr<const GridGeometry> gridGeometry_;
//! The parameter group in which to retrieve runtime parameters
std::string paramGroup_;
......
......@@ -276,14 +276,14 @@ class BoundingBoxTreePointSourceHelper
{
public:
//! calculate a DOF index to point source map from given vector of point sources
template<class FVGridGeometry, class PointSource, class PointSourceMap>
static void computePointSourceMap(const FVGridGeometry& fvGridGeometry,
template<class GridGeometry, class PointSource, class PointSourceMap>
static void computePointSourceMap(const GridGeometry& gridGeometry,
std::vector<PointSource>& sources,
PointSourceMap& pointSourceMap)
{
constexpr bool isBox = FVGridGeometry::discMethod == DiscretizationMethod::box;
constexpr bool isBox = GridGeometry::discMethod == DiscretizationMethod::box;
const auto& boundingBoxTree = fvGridGeometry.boundingBoxTree();
const auto& boundingBoxTree = gridGeometry.boundingBoxTree();
for (auto&& source : sources)
{
......@@ -298,7 +298,7 @@ public:
{
// check in which subcontrolvolume(s) we are
const auto element = boundingBoxTree.entitySet().entity(eIdx);
auto fvGeometry = localView(fvGridGeometry);
auto fvGeometry = localView(gridGeometry);
fvGeometry.bindElement(element);
const auto globalPos = source.position();
......
......@@ -55,8 +55,8 @@ class StaggeredFVProblem : public FVProblem<TypeTag>
using ElementFaceVariables = typename GridFaceVariables::LocalView;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using FVElementGeometry = typename FVGridGeometry::LocalView;
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using FVElementGeometry = typename GridGeometry::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
......@@ -64,8 +64,8 @@ class StaggeredFVProblem : public FVProblem<TypeTag>
using CoordScalar = typename GridView::ctype;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
static constexpr auto cellCenterIdx = FVGridGeometry::cellCenterIdx();
static constexpr auto faceIdx = FVGridGeometry::faceIdx();
static constexpr auto cellCenterIdx = GridGeometry::cellCenterIdx();
static constexpr auto faceIdx = GridGeometry::faceIdx();
static constexpr auto numEqCellCenter = getPropValue<TypeTag, Properties::NumEqCellCenter>();
static constexpr auto numEqFace = getPropValue<TypeTag, Properties::NumEqFace>();
......@@ -73,11 +73,11 @@ class StaggeredFVProblem : public FVProblem<TypeTag>
public:
/*!
* \brief Constructor
* \param fvGridGeometry The finite volume grid geometry
* \param gridGeometry The finite volume grid geometry
* \param paramGroup The parameter group in which to look for runtime parameters first (default is "")
*/
StaggeredFVProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, const std::string& paramGroup = "")
: ParentType(fvGridGeometry, paramGroup)
StaggeredFVProblem(std::shared_ptr<const GridGeometry> gridGeometry, const std::string& paramGroup = "")
: ParentType(gridGeometry, paramGroup)
{ }
/*!
......
......@@ -52,8 +52,8 @@ public:
const Element &element,
const FVElementGeometry &fvGeometry)
{
using FVGridGeometry = typename FVElementGeometry::GridGeometry;
using GridView = typename FVGridGeometry::GridView;
using GridGeometry = typename FVElementGeometry::GridGeometry;
using GridView = typename GridGeometry::GridView;
vertexBCTypes_.resize( element.subEntities(GridView::dimension) );
......
......@@ -37,8 +37,8 @@ namespace Dumux {
template<class FVElementGeometry, class PV>
class BoxElementSolution
{
using FVGridGeometry = typename FVElementGeometry::GridGeometry;
using GridView = typename FVGridGeometry::GridView;
using GridGeometry = typename FVElementGeometry::GridGeometry;
using GridView = typename GridGeometry::GridView;
using Element = typename GridView::template Codim<0>::Entity;
public:
......@@ -51,9 +51,9 @@ public:
//! Constructor with element and solution and grid geometry
template<class SolutionVector>
BoxElementSolution(const Element& element, const SolutionVector& sol,
const FVGridGeometry& fvGridGeometry)
const GridGeometry& gridGeometry)
{
update(element, sol, fvGridGeometry);
update(element, sol, gridGeometry);
}
//! Constructor with element and elemVolVars and fvGeometry
......@@ -70,12 +70,12 @@ public:
//! extract the element solution from the solution vector using a mapper
template<class SolutionVector>
void update(const Element& element, const SolutionVector& sol,
const FVGridGeometry& fvGridGeometry)
const GridGeometry& gridGeometry)
{
const auto numVert = element.subEntities(GridView::dimension);
priVars_.resize(numVert);
for (int vIdx = 0; vIdx < numVert; ++vIdx)
priVars_[vIdx] = sol[fvGridGeometry.vertexMapper().subIndex(element, vIdx, GridView::dimension)];
priVars_[vIdx] = sol[gridGeometry.vertexMapper().subIndex(element, vIdx, GridView::dimension)];
}
//! extract the element solution from the solution vector using a local fv geometry
......@@ -111,15 +111,15 @@ private:
* \ingroup BoxDiscretization
* \brief Make an element solution for box schemes
*/
template<class Element, class SolutionVector, class FVGridGeometry>
auto elementSolution(const Element& element, const SolutionVector& sol, const FVGridGeometry& gg)
-> std::enable_if_t<FVGridGeometry::discMethod == DiscretizationMethod::box,
BoxElementSolution<typename FVGridGeometry::LocalView,
template<class Element, class SolutionVector, class GridGeometry>
auto elementSolution(const Element& element, const SolutionVector& sol, const GridGeometry& gg)
-> std::enable_if_t<GridGeometry::discMethod == DiscretizationMethod::box,
BoxElementSolution<typename GridGeometry::LocalView,
std::decay_t<decltype(std::declval<SolutionVector>()[0])>>
>
{
using PrimaryVariables = std::decay_t<decltype(std::declval<SolutionVector>()[0])>;
return BoxElementSolution<typename FVGridGeometry::LocalView, PrimaryVariables>(element, sol, gg);
return BoxElementSolution<typename GridGeometry::LocalView, PrimaryVariables>(element, sol, gg);
}
/*!
......
......@@ -35,15 +35,15 @@ namespace Dumux {
* For the box scheme, this class does not contain any physics-/process-dependent
* data. It solely stores disretization-/grid-related data.
*/
template< class Scalar, class FVGridGeometry >
template< class Scalar, class GridGeometry >
class BoxFluxVariablesCache
{
using GridView = typename FVGridGeometry::GridView;
using GridView = typename GridGeometry::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using FVElementGeometry = typename FVGridGeometry::LocalView;
using SubControlVolumeFace = typename FVGridGeometry::SubControlVolumeFace;
using FVElementGeometry = typename GridGeometry::LocalView;
using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
static const int dim = GridView::dimension;
static const int dimWorld = GridView::dimensionworld;
......
......@@ -150,7 +150,7 @@ public:
//! The global finite volume geometry we are a restriction of
[[deprecated ("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const FVGridGeometry& fvGridGeometry() const
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
......@@ -271,7 +271,7 @@ public:
//! The global finite volume geometry we are a restriction of
[[deprecated ("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const FVGridGeometry& fvGridGeometry() const
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
......
......@@ -56,8 +56,8 @@ struct BoxDefaultGridGeometryTraits
using SubControlVolume = BoxSubControlVolume<GridView>;