Commit d1e16306 authored by Bernd Flemisch's avatar Bernd Flemisch Committed by Katharina Heck
Browse files

[cleanup] replace FV(fv)GridGeometry by G(g)ridGeometry

Treat files where old names are deprecated.
parent a6434f8a
......@@ -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,
......
......@@ -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 = "")
: gridGeometry_(fvGridGeometry)
FVProblem(std::shared_ptr<const GridGeometry> gridGeometry, const std::string& paramGroup = "")
: gridGeometry_(gridGeometry)
, paramGroup_(paramGroup)
{
// set a default name for the problem
......@@ -581,11 +581,11 @@ 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
const GridGeometry& gridGeometry() const
{ return *gridGeometry_; }
//! The parameter group in which to retrieve runtime parameters
......@@ -657,7 +657,7 @@ private:
}
//! The finite volume grid geometry
std::shared_ptr<const FVGridGeometry> gridGeometry_;
std::shared_ptr<const GridGeometry> gridGeometry_;
//! The parameter group in which to retrieve runtime parameters
std::string paramGroup_;
......
......@@ -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_; }
......
......@@ -154,7 +154,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_; }
......@@ -316,7 +316,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_; }
......
......@@ -159,7 +159,7 @@ public:
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const FVGridGeometry& fvGridGeometry() const
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
//! Returns whether one of the geometry's scvfs lies on a boundary
......@@ -363,7 +363,7 @@ public:
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const FVGridGeometry& fvGridGeometry() const
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
//! Returns whether one of the geometry's scvfs lies on a boundary
......
......@@ -61,8 +61,8 @@ public:
template<class Problem>
FVGridVariables(std::shared_ptr<Problem> problem,
std::shared_ptr<const GridGeometry> fvGridGeometry)
: gridGeometry_(fvGridGeometry)
std::shared_ptr<const GridGeometry> gridGeometry)
: gridGeometry_(gridGeometry)
, curGridVolVars_(*problem)
, prevGridVolVars_(*problem)
, gridFluxVarsCache_(*problem)
......
......@@ -94,10 +94,10 @@ public:
//! return the fv grid geometry
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const FVGridGeometry& fvGridGeometry() const
const GridGeometry& fvGridGeometry() const
{ return (*gridVariables_->gridGeometry_); }
//! return the fv grid geometry
const FVGridGeometry& gridGeometry() const
const GridGeometry& gridGeometry() const
{ return (*gridVariables_->gridGeometry_); }
// return the actual grid variables
......@@ -215,12 +215,11 @@ template<class GG, class GVV, class GFVC, class GFV>
class StaggeredGridVariables : public FVGridVariables<GG, GVV, GFVC>
{
using ParentType = FVGridVariables<GG, GVV, GFVC>;
using FVGridGeometry = GG;
using ThisType = StaggeredGridVariables<GG, GVV, GFVC, GFV>;
friend class StaggeredGridVariablesView<ThisType>;
static constexpr auto cellCenterIdx = FVGridGeometry::cellCenterIdx();
static constexpr auto faceIdx = FVGridGeometry::faceIdx();
static constexpr auto cellCenterIdx = GG::cellCenterIdx();
static constexpr auto faceIdx = GG::faceIdx();
public:
using CellCenterGridVariablesType = CellCenterGridVariablesView<ThisType>;
......@@ -238,8 +237,8 @@ public:
//! Constructor
template<class Problem>
StaggeredGridVariables(std::shared_ptr<Problem> problem,
std::shared_ptr<GridGeometry> fvGridGeometry)
: ParentType(problem, fvGridGeometry)
std::shared_ptr<GridGeometry> gridGeometry)
: ParentType(problem, gridGeometry)
, curGridFaceVariables_(*problem)
, prevGridFaceVariables_(*problem)
{}
......
......@@ -73,8 +73,8 @@ public:
static constexpr std::size_t maxNumElementScvs = (1<<dim);
//! Constructor
BoxFacetCouplingFVElementGeometry(const GridGeometry& fvGridGeometry)
: fvGridGeometryPtr_(&fvGridGeometry)
BoxFacetCouplingFVElementGeometry(const GridGeometry& gridGeometry)
: gridGeometryPtr_(&gridGeometry)
{}
//! Get a sub control volume with a local scv index
......@@ -141,17 +141,17 @@ public:
}
//! The global finite volume geometry we are a restriction of
[[deprecated("Use more general GridGeometry instead. FVGridGeometry will be removed after 3.1!")]]
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const GridGeometry& fvGridGeometry() const
{ return *fvGridGeometryPtr_; }
{ return *gridGeometryPtr_; }
//! The global finite volume geometry we are a restriction of
const GridGeometry& gridGeometry() const
{ return *fvGridGeometryPtr_; }
{ return *gridGeometryPtr_; }
private:
Dune::GeometryType elemGeometryType_;
const GridGeometry* fvGridGeometryPtr_;
const GridGeometry* gridGeometryPtr_;
GridIndexType eIdx_;
};
......@@ -188,8 +188,8 @@ public:
static constexpr std::size_t maxNumElementScvs = (1<<dim);
//! Constructor
BoxFacetCouplingFVElementGeometry(const FVGridGeometry& fvGridGeometry)
: fvGridGeometryPtr_(&fvGridGeometry)
BoxFacetCouplingFVElementGeometry(const GridGeometry& gridGeometry)
: gridGeometryPtr_(&gridGeometry)
{}
//! Get a sub control volume with a local scv index
......@@ -254,13 +254,13 @@ public:
}
//! The global finite volume geometry we are a restriction of
[[deprecated("Use more general GridGeometry instead. FVGridGeometry will be removed after 3.1!")]]
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const GridGeometry& fvGridGeometry() const
{ return *fvGridGeometryPtr_; }
{ return *gridGeometryPtr_; }
//! The global finite volume geometry we are a restriction of
const GridGeometry& gridGeometry() const
{ return *fvGridGeometryPtr_; }
{ return *gridGeometryPtr_; }
private:
......@@ -358,7 +358,7 @@ private:
GridIndexType eIdx_;
//! The global geometry this is a restriction of
const FVGridGeometry* fvGridGeometryPtr_;
const GridGeometry* gridGeometryPtr_;
//! vectors to store the geometries locally after binding an element
std::vector<SubControlVolume> scvs_;
......
......@@ -96,7 +96,7 @@ public:
private:
using ProblemTuple = typename MDTraits::template TupleOfSharedPtrConst<Problem>;
using FVGridGeometryTuple = typename MDTraits::template TupleOfSharedPtrConst<FVGridGeometry>;
using GridGeometryTuple = typename MDTraits::template TupleOfSharedPtrConst<GridGeometry>;
using GridVariablesTuple = typename MDTraits::template TupleOfSharedPtr<GridVariables>;
using TimeLoop = TimeLoopBase<Scalar>;
......@@ -130,7 +130,7 @@ private:
};
template<std::size_t id>
using SubDomainAssembler = typename SubDomainAssemblerType<FVGridGeometry<id>::discMethod, id>::type;
using SubDomainAssembler = typename SubDomainAssemblerType<GridGeometry<id>::discMethod, id>::type;
public:
......@@ -141,12 +141,12 @@ public:
* it is however guaranteed that the state after assembly will be the same as before
*/
MultiDomainFVAssembler(ProblemTuple&& problem,
FVGridGeometryTuple&& fvGridGeometry,
GridGeometryTuple&& gridGeometry,
GridVariablesTuple&& gridVariables,
std::shared_ptr<CouplingManager> couplingManager)
: couplingManager_(couplingManager)
, problemTuple_(problem)
, fvGridGeometryTuple_(fvGridGeometry)
, gridGeometryTuple_(gridGeometry)
, gridVariablesTuple_(gridVariables)
, timeLoop_()
, isStationaryProblem_(true)
......@@ -161,13 +161,13 @@ public:
*/
[[deprecated("Please use constructor taking the previous solution instead. Will be removed after release 3.2!")]]
MultiDomainFVAssembler(ProblemTuple&& problem,
FVGridGeometryTuple&& fvGridGeometry,
GridGeometryTuple&& gridGeometry,
GridVariablesTuple&& gridVariables,
std::shared_ptr<CouplingManager> couplingManager,
std::shared_ptr<const TimeLoop> timeLoop)
: couplingManager_(couplingManager)
, problemTuple_(problem)
, fvGridGeometryTuple_(fvGridGeometry)
, gridGeometryTuple_(gridGeometry)
, gridVariablesTuple_(gridVariables)
, timeLoop_(timeLoop)
, isStationaryProblem_(false)
......@@ -181,14 +181,14 @@ public:
* it is however guaranteed that the state after assembly will be the same as before
*/
MultiDomainFVAssembler(ProblemTuple&& problem,
FVGridGeometryTuple&& fvGridGeometry,
GridGeometryTuple&& gridGeometry,
GridVariablesTuple&& gridVariables,
std::shared_ptr<CouplingManager> couplingManager,
std::shared_ptr<const TimeLoop> timeLoop,
const SolutionVector& prevSol)
: couplingManager_(couplingManager)
, problemTuple_(problem)
, fvGridGeometryTuple_(fvGridGeometry)
, gridGeometryTuple_(gridGeometry)
, gridVariablesTuple_(gridVariables)
, timeLoop_(timeLoop)
, prevSol_(&prevSol)
......@@ -351,7 +351,7 @@ public:
//! the number of dof locations of domain i
template<std::size_t i>
std::size_t numDofs(Dune::index_constant<i> domainId) const
{ return std::get<domainId>(fvGridGeometryTuple_)->numDofs(); }
{ return std::get<domainId>(gridGeometryTuple_)->numDofs(); }
//! the problem of domain i
template<std::size_t i>
......@@ -367,7 +367,7 @@ public:
//! the finite volume grid geometry of domain i
template<std::size_t i>
const auto& gridGeometry(Dune::index_constant<i> domainId) const
{ return *std::get<domainId>(fvGridGeometryTuple_); }
{ return *std::get<domainId>(gridGeometryTuple_); }
//! the grid view of domain i
template<std::size_t i>
......@@ -529,7 +529,7 @@ private:
ProblemTuple problemTuple_;
//! the finite volume geometry of the grid
FVGridGeometryTuple fvGridGeometryTuple_;
GridGeometryTuple gridGeometryTuple_;
//! the variables container for the grid
GridVariablesTuple gridVariablesTuple_;
......
......@@ -78,8 +78,8 @@ public:
static constexpr std::size_t maxNumElementScvs = (1<<dim)*3;
//! Constructor
BoxDfmFVElementGeometry(const GridGeometry& fvGridGeometry)
: fvGridGeometryPtr_(&fvGridGeometry) {}
BoxDfmFVElementGeometry(const GridGeometry& gridGeometry)
: gridGeometryPtr_(&gridGeometry) {}
//! Get a sub control volume with a local scv index
const SubControlVolume& scv(std::size_t scvIdx) const
......@@ -155,15 +155,15 @@ public:
//! The global finite volume geometry we are a restriction of
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const GridGeometry& fvGridGeometry() const
{ return *fvGridGeometryPtr_; }
{ return *gridGeometryPtr_; }
//! The global finite volume geometry we are a restriction of
const GridGeometry& gridGeometry() const
{ return *fvGridGeometryPtr_; }
{ return *gridGeometryPtr_; }
private:
Dune::GeometryType elemGeometryType_;
const GridGeometry* fvGridGeometryPtr_;
const GridGeometry* gridGeometryPtr_;
GridIndexType eIdx_;
};
......@@ -200,8 +200,8 @@ public:
static constexpr std::size_t maxNumElementScvs = (1<<dim)*3;
//! Constructor
BoxDfmFVElementGeometry(const GridGeometry& fvGridGeometry)
: fvGridGeometryPtr_(&fvGridGeometry) {}
BoxDfmFVElementGeometry(const GridGeometry& gridGeometry)
: gridGeometryPtr_(&gridGeometry) {}
//! Get a sub control volume with a local scv index
const SubControlVolume& scv(std::size_t scvIdx) const
......@@ -275,11 +275,11 @@ public:
//! The global finite volume geometry we are a restriction of
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const GridGeometry& fvGridGeometry() const
{ return *fvGridGeometryPtr_; }
{ return *gridGeometryPtr_; }
//! The global finite volume geometry we are a restriction of
const GridGeometry& gridGeometry() const
{ return *fvGridGeometryPtr_; }
{ return *gridGeometryPtr_; }
private:
......@@ -445,7 +445,7 @@ private:
GridIndexType eIdx_;
//! The global geometry this is a restriction of
const GridGeometry* fvGridGeometryPtr_;
const GridGeometry* gridGeometryPtr_;
/*!
* \brief Binding of an element, has to be called before using the fvgeometries
......
......@@ -112,9 +112,9 @@ struct Problem<TypeTag, TTag::TubesTest> { using type = TubesTestProblem<TypeTag
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::TubesTest>
{
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = TubesTestSpatialParams<FVGridGeometry, Scalar>;
using type = TubesTestSpatialParams<GridGeometry, Scalar>;
};
// the fluid system
......@@ -154,7 +154,7 @@ class TubesTestProblem : public PorousMediumFlowProblem<TypeTag>
using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
using Element = typename GridView::template Codim<0>::Entity;
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
......@@ -163,14 +163,14 @@ class TubesTestProblem : public PorousMediumFlowProblem<TypeTag>
enum { isBox = GetPropType<TypeTag, Properties::GridGeometry>::discMethod == DiscretizationMethod::box };
public:
TubesTestProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(fvGridGeometry)
TubesTestProblem(std::shared_ptr<const GridGeometry> gridGeometry)
: ParentType(gridGeometry)
{
name_ = getParam<std::string>("Problem.Name");
//get hMax_ of the grid
hMax_ = 0.0;
for (const auto& element : elements(fvGridGeometry->gridView()))
for (const auto& element : elements(gridGeometry->gridView()))
hMax_ = std::max(element.geometry().volume(), hMax_);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment