Commit 02cdfbce authored by Timo Koch's avatar Timo Koch
Browse files

[fvgridgeometry] Add dofmapper for box/cc/mpfa. Allows to use same main file in some cases.

parent b4ef0e70
......@@ -56,6 +56,7 @@ class BoxFVGridGeometry<TypeTag, true> : public BaseFVGridGeometry<TypeTag>
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using VertexMapper = typename GET_PROP_TYPE(TypeTag, VertexMapper);
using Element = typename GridView::template Codim<0>::Entity;
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
......@@ -75,6 +76,11 @@ public:
BoxFVGridGeometry(const GridView gridView)
: ParentType(gridView) {}
//! the vertex mapper is the dofMapper
//! this is convenience to have better chance to have the same main files for box/tpfa/mpfa...
const VertexMapper& dofMapper() const
{ return this->vertexMapper(); }
//! The total number of sub control volumes
std::size_t numScv() const
{ return numScv_; }
......@@ -240,6 +246,7 @@ class BoxFVGridGeometry<TypeTag, false> : public BaseFVGridGeometry<TypeTag>
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using VertexMapper = typename GET_PROP_TYPE(TypeTag, VertexMapper);
static const int dim = GridView::dimension;
static const int dimWorld = GridView::dimensionworld;
......@@ -259,6 +266,11 @@ public:
BoxFVGridGeometry(const GridView gridView)
: ParentType(gridView) {}
//! the vertex mapper is the dofMapper
//! this is convenience to have better chance to have the same main files for box/tpfa/mpfa...
const VertexMapper& dofMapper() const
{ return this->vertexMapper(); }
//! The total number of sub control volumes
std::size_t numScv() const
{ return numScv_; }
......
......@@ -55,6 +55,7 @@ class CCMpfaFVGridGeometry<TypeTag, true> : public BaseFVGridGeometry<TypeTag>
{
using ParentType = BaseFVGridGeometry<TypeTag>;
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using ElementMapper = typename GET_PROP_TYPE(TypeTag, ElementMapper);
using MpfaHelper = typename GET_PROP_TYPE(TypeTag, MpfaHelper);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
......@@ -84,6 +85,11 @@ public:
: ParentType(gridView), elementMap_(gridView)
{}
//! the element mapper is the dofMapper
//! this is convenience to have better chance to have the same main files for box/tpfa/mpfa...
const ElementMapper& dofMapper() const
{ return this->elementMapper(); }
/*!
* \brief Returns the total number of sub control volumes.
*/
......@@ -444,6 +450,7 @@ class CCMpfaFVGridGeometry<TypeTag, false> : public BaseFVGridGeometry<TypeTag>
using ConnectivityMap = CCMpfaConnectivityMap<TypeTag>;
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using ElementMapper = typename GET_PROP_TYPE(TypeTag, ElementMapper);
static constexpr int dim = GridView::dimension;
static constexpr int dimWorld = GridView::dimensionworld;
using Element = typename GridView::template Codim<0>::Entity;
......@@ -464,6 +471,11 @@ public:
: ParentType(gridView), elementMap_(gridView)
{}
//! the element mapper is the dofMapper
//! this is convenience to have better chance to have the same main files for box/tpfa/mpfa...
const ElementMapper& dofMapper() const
{ return this->elementMapper(); }
/*!
* \brief Returns the total number of sub control volumes.
*/
......
......@@ -58,6 +58,7 @@ class CCTpfaFVGridGeometry<TypeTag, true> : public BaseFVGridGeometry<TypeTag>
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using ElementMapper = typename GET_PROP_TYPE(TypeTag, ElementMapper);
using Element = typename GridView::template Codim<0>::Entity;
using ConnectivityMap = CCSimpleConnectivityMap<TypeTag>;
......@@ -77,6 +78,11 @@ public:
, elementMap_(gridView)
{}
//! the element mapper is the dofMapper
//! this is convenience to have better chance to have the same main files for box/tpfa/mpfa...
const ElementMapper& dofMapper() const
{ return this->elementMapper(); }
//! The total number of sub control volumes
std::size_t numScv() const
{
......@@ -313,6 +319,7 @@ class CCTpfaFVGridGeometry<TypeTag, false> : public BaseFVGridGeometry<TypeTag>
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using ElementMapper = typename GET_PROP_TYPE(TypeTag, ElementMapper);
using Element = typename GridView::template Codim<0>::Entity;
using ConnectivityMap = CCSimpleConnectivityMap<TypeTag>;
......@@ -329,6 +336,11 @@ public:
, elementMap_(gridView)
{}
//! the element mapper is the dofMapper
//! this is convenience to have better chance to have the same main files for box/tpfa/mpfa...
const ElementMapper& dofMapper() const
{ return this->elementMapper(); }
//! The total number of sub control volumes
std::size_t numScv() const
{
......
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