Commit 206047ad authored by Ivan Buntic's avatar Ivan Buntic Committed by Timo Koch
Browse files

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

parent 8da46c5f
......@@ -37,12 +37,12 @@
namespace Dumux {
//! The implementation is specialized for the different discretizations
template<class GridGeometry, DiscretizationMethod discMethod>
template<class GridGeometry, class DiscretizationMethod>
struct LinearSolverTraitsImpl;
//! The type traits required for using the IstlFactoryBackend
template<class GridGeometry>
using LinearSolverTraits = LinearSolverTraitsImpl<GridGeometry, GridGeometry::discMethod>;
using LinearSolverTraits = LinearSolverTraitsImpl<GridGeometry, typename GridGeometry::DiscretizationMethod>;
//! sequential solver traits
template<class MType, class VType>
......@@ -109,7 +109,7 @@ struct LinearSolverTraitsBase
//! Box: use overlapping or non-overlapping model depending on the grid
template<class GridGeometry>
struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethod::box>
struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethods::Box>
: public LinearSolverTraitsBase<GridGeometry>
{
using DofMapper = typename GridGeometry::VertexMapper;
......@@ -124,7 +124,7 @@ struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethod::box>
//! Cell-centered tpfa: use overlapping model
template<class GridGeometry>
struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethod::cctpfa>
struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethods::CCTpfa>
: public LinearSolverTraitsBase<GridGeometry>
{
using DofMapper = typename GridGeometry::ElementMapper;
......@@ -139,7 +139,7 @@ struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethod::cctpfa>
//! Face-centered staggered: use overlapping model
template<class GridGeometry>
struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethod::fcstaggered>
struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethods::FCStaggered>
: public LinearSolverTraitsBase<GridGeometry>
{
class DofMapper
......@@ -180,13 +180,13 @@ struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethod::fcstaggered>
//! Cell-centered mpfa: use overlapping model
template<class GridGeometry>
struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethod::ccmpfa>
: public LinearSolverTraitsImpl<GridGeometry, DiscretizationMethod::cctpfa> {};
struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethods::CCMpfa>
: public LinearSolverTraitsImpl<GridGeometry, DiscretizationMethods::CCTpfa> {};
//! staggered: use overlapping model
template<class GridGeometry>
struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethod::staggered>
: public LinearSolverTraitsImpl<GridGeometry, DiscretizationMethod::cctpfa> {};
struct LinearSolverTraitsImpl<GridGeometry, DiscretizationMethods::Staggered>
: public LinearSolverTraitsImpl<GridGeometry, DiscretizationMethods::CCTpfa> {};
} // end namespace Dumux
......
......@@ -31,7 +31,8 @@ struct MockGridGeometry
using GridView = Dune::YaspGrid<2>::LeafGridView;
using DofMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
static constexpr auto discMethod = DiscretizationMethod::box;
using DiscretizationMethod = DiscretizationMethods::Box;
static constexpr DiscretizationMethod discMethod{};
};
template<class M, class X, class V>
......
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