Skip to content
Snippets Groups Projects
Commit 852970f1 authored by Timo Koch's avatar Timo Koch
Browse files

Rename GridVariables -> FVGridVariables. Move to discretization/fvgridvariables.hh

parent 6c386da0
No related branches found
No related tags found
1 merge request!617[WIP] Next
......@@ -20,18 +20,20 @@
* \file
* \brief Class storing scv and scvf variables
*/
#ifndef DUMUX_GRID_VARIABLES_HH
#define DUMUX_GRID_VARIABLES_HH
#ifndef DUMUX_FV_GRID_VARIABLES_HH
#define DUMUX_FV_GRID_VARIABLES_HH
#include <memory>
#include <dumux/common/properties.hh>
namespace Dumux
{
/*!
* \ingroup ImplicitModel
* \brief Class storing scv and scvf variables
*/
template<class TypeTag>
class GridVariables
class FVGridVariables
{
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
......@@ -41,7 +43,8 @@ class GridVariables
public:
//! Constructor
GridVariables(std::shared_ptr<Problem> problem, std::shared_ptr<FVGridGeometry> fvGridGeometry)
FVGridVariables(std::shared_ptr<const Problem> problem,
std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: problem_(problem)
, fvGridGeometry_(fvGridGeometry)
, curGridVolVars_(*problem)
......@@ -118,8 +121,8 @@ public:
{ return prevGridVolVars_; }
private:
std::shared_ptr<Problem> problem_;
std::shared_ptr<FVGridGeometry> fvGridGeometry_;
std::shared_ptr<const Problem> problem_;
std::shared_ptr<const FVGridGeometry> fvGridGeometry_;
// the current and previous variables (primary and secondary variables)
GridVolumeVariables curGridVolVars_;
......@@ -129,6 +132,6 @@ private:
GridFluxVariablesCache gridFluxVarsCache_;
};
} // end namespace
} // end namespace Dumux
#endif
......@@ -33,7 +33,7 @@
#include <dumux/common/properties/grid.hh>
#include <dumux/common/boundarytypes.hh>
#include <dumux/implicit/gridvariables.hh>
#include <dumux/discretization/fvgridvariables.hh>
namespace Dumux
{
......@@ -43,7 +43,7 @@ namespace Properties
NEW_TYPE_TAG(FiniteVolumeModel, INHERITS_FROM(GridProperties));
//! The grid variables
SET_TYPE_PROP(FiniteVolumeModel, GridVariables, GridVariables<TypeTag>);
SET_TYPE_PROP(FiniteVolumeModel, GridVariables, FVGridVariables<TypeTag>);
//! The type of a solution for a whole element
SET_TYPE_PROP(FiniteVolumeModel, ElementSolutionVector, Dune::BlockVector<typename GET_PROP_TYPE(TypeTag, PrimaryVariables)>);
......
......@@ -23,7 +23,8 @@
#ifndef DUMUX_STAGGERED_GRID_VARIABLES_HH
#define DUMUX_STAGGERED_GRID_VARIABLES_HH
#include <dumux/implicit/gridvariables.hh>
#include <dumux/common/properties.hh>
#include <dumux/discretization/fvgridvariables.hh>
namespace Dumux
{
......@@ -33,9 +34,9 @@ namespace Dumux
* \brief Class storing scv and scvf variables
*/
template<class TypeTag>
class StaggeredGridVariables : public GridVariables<TypeTag>
class StaggeredGridVariables : public FVGridVariables<TypeTag>
{
using ParentType = GridVariables<TypeTag>;
using ParentType = FVGridVariables<TypeTag>;
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using GridVolumeVariables = typename GET_PROP_TYPE(TypeTag, GlobalVolumeVariables);
......@@ -45,7 +46,8 @@ class StaggeredGridVariables : public GridVariables<TypeTag>
public:
//! Constructor
StaggeredGridVariables(std::shared_ptr<Problem> problem, std::shared_ptr<FVGridGeometry> fvGridGeometry)
StaggeredGridVariables(std::shared_ptr<const Problem> problem,
std::shared_ptr<const FVGridGeometry> fvGridGeometry)
: ParentType(problem, fvGridGeometry)
, fvGridGeometry_(fvGridGeometry)
, curGridFaceVariables_(*problem)
......@@ -103,13 +105,12 @@ public:
private:
std::shared_ptr<FVGridGeometry> fvGridGeometry_;
std::shared_ptr<const FVGridGeometry> fvGridGeometry_;
GridFaceVariables curGridFaceVariables_;
GridFaceVariables prevGridFaceVariables_;
};
} // end namespace
} // end namespace Dumux
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment