Commit 99a6edfc authored by Ivan Buntic's avatar Ivan Buntic Committed by Timo Koch
Browse files

[disc][porousmediumflow][co2] Use discretization tag instead of enum as template argument.

parent 575d6e4c
Pipeline #10224 passed with stages
......@@ -34,7 +34,7 @@ namespace Dumux {
* \ingroup BoxDiscretization
* \brief Convert intersection boundary types to vertex boundary types
*/
template<class BoundaryTypes, DiscretizationMethod discMethod>
template<class BoundaryTypes, class DiscretizationMethod>
class ScvfToScvBoundaryTypes
{
public:
......@@ -44,7 +44,7 @@ public:
void computeBoundaryTypes(const Problem& problem)
{
// only do something for box
if (discMethod == DiscretizationMethods::box)
if (DiscretizationMethod{} == DiscretizationMethods::box)
{
const auto& gridGeometry = problem.gridGeometry();
scvBoundaryTypes.resize(gridGeometry.vertexMapper().size());
......@@ -81,7 +81,7 @@ public:
template<class SubControlVolume>
const BoundaryTypes& boundaryTypes(const SubControlVolume& scv) const
{
if (discMethod == DiscretizationMethods::box)
if (DiscretizationMethod{} == DiscretizationMethods::box)
return scvBoundaryTypes[scv.dofIndex()];
else
DUNE_THROW(Dune::InvalidStateException, "Only use this for the box discretization!");
......
......@@ -128,7 +128,8 @@ class HeterogeneousProblem : public PorousMediumFlowProblem<TypeTag>
static constexpr bool useMoles = ModelTraits::useMoles();
// the discretization method we are using
static constexpr auto discMethod = GetPropType<TypeTag, Properties::GridGeometry>::discMethod;
using DiscretizationMethod = DiscretizationMethods::Box;
static constexpr DiscretizationMethod discMethod{};
static constexpr bool isBox = GridGeometry::discMethod == DiscretizationMethods::box;
// world dimension to access gravity vector
......@@ -445,7 +446,7 @@ private:
// vtk output
std::vector<Scalar> vtkKxx_, vtkPorosity_, vtkBoxVolume_, vtkTemperature_;
ScvfToScvBoundaryTypes<BoundaryTypes, discMethod> scvfToScvBoundaryTypes_;
ScvfToScvBoundaryTypes<BoundaryTypes, DiscretizationMethod> scvfToScvBoundaryTypes_;
};
} // end namespace Dumux
......
Markdown is supported
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