Commit dfb6bd54 authored by Timo Koch's avatar Timo Koch
Browse files

Remove DiscretizationMethod property

parent f8b77a7c
......@@ -51,7 +51,7 @@ class GridAdaptInitializationIndicator
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethod::box;
static constexpr bool isBox = GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod == DiscretizationMethod::box;
public:
......
......@@ -58,7 +58,7 @@ class FVAssembler
using TimeLoop = TimeLoopBase<typename GET_PROP_TYPE(TypeTag, Scalar)>;
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
static constexpr DiscretizationMethod discMethod = GET_PROP_VALUE(TypeTag, DiscretizationMethod);
static constexpr DiscretizationMethod discMethod = GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod;
static constexpr bool isBox = discMethod == DiscretizationMethod::box;
using ThisType = FVAssembler<TypeTag, diffMethod, isImplicit>;
......
......@@ -495,7 +495,7 @@ public:
//! Compute the derivative of the flux residual
template<class PartialDerivativeMatrices, class T = TypeTag>
std::enable_if_t<GET_PROP_VALUE(T, DiscretizationMethod) != DiscretizationMethod::box, void>
std::enable_if_t<GET_PROP_TYPE(T, FVGridGeometry)::discMethod != DiscretizationMethod::box, void>
addFluxDerivatives(PartialDerivativeMatrices& derivativeMatrices,
const Problem& problem,
const Element& element,
......@@ -509,7 +509,7 @@ public:
//! Compute the derivative of the flux residual for the box method
template<class JacobianMatrix, class T = TypeTag>
std::enable_if_t<GET_PROP_VALUE(T, DiscretizationMethod) == DiscretizationMethod::box, void>
std::enable_if_t<GET_PROP_TYPE(T, FVGridGeometry)::discMethod == DiscretizationMethod::box, void>
addFluxDerivatives(JacobianMatrix& A,
const Problem& problem,
const Element& element,
......
......@@ -74,7 +74,7 @@ class FVProblem
using CoordScalar = typename GridView::ctype;
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethod::box;
static constexpr bool isBox = GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod == DiscretizationMethod::box;
using PointSourceMap = std::map<std::pair<std::size_t, std::size_t>,
std::vector<PointSource> >;
......
......@@ -285,7 +285,7 @@ class BoundingBoxTreePointSourceHelper
static constexpr int dim = GridView::dimension;
static constexpr int dimworld = GridView::dimensionworld;
static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethod::box;
static constexpr bool isBox = GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod == DiscretizationMethod::box;
static constexpr int dofCodim = isBox ? dim : 0;
public:
......
......@@ -55,7 +55,6 @@ NEW_PROP_TAG(BaseLocalResidual); //!< The type of the base class of the loc
NEW_PROP_TAG(JacobianMatrix); //!< Type of the global jacobian matrix
NEW_PROP_TAG(SolutionVector); //!< Vector containing all primary variable vector of the grid
NEW_PROP_TAG(BoundaryTypes); //!< Stores the boundary types of a single degree of freedom
NEW_PROP_TAG(DiscretizationMethod); //!< Property for the used discretization method
//! The type of the local residual function, i.e. the equation to be solved. Must inherit
//! from the BaseLocalResidual property and fulfill its interfaces.
......
......@@ -52,7 +52,7 @@ class BoxElementVolumeVariables<TypeTag,/*enableGlobalVolVarCache*/true>
static const int dim = GridView::dimension;
using Element = typename GridView::template Codim<0>::Entity;
static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethod::box;
static constexpr bool isBox = GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod == DiscretizationMethod::box;
public:
//! Export type of the solution vector
......
......@@ -53,12 +53,6 @@ namespace Properties
//! Type tag for the box scheme.
NEW_TYPE_TAG(BoxModel, INHERITS_FROM(FiniteVolumeModel));
//! Set the corresponding discretization method property
SET_PROP(BoxModel, DiscretizationMethod)
{
static const DiscretizationMethod value = DiscretizationMethod::box;
};
//! Set the default for the global finite volume geometry
SET_PROP(BoxModel, FVGridGeometry)
{
......
......@@ -60,12 +60,6 @@ namespace Properties
//! Type tag for the cell-centered mpfa scheme.
NEW_TYPE_TAG(CCMpfaModel, INHERITS_FROM(FiniteVolumeModel));
//! Set the corresponding discretization method property
SET_PROP(CCMpfaModel, DiscretizationMethod)
{
static const DiscretizationMethod value = DiscretizationMethod::ccmpfa;
};
//! Set the index set type used on the dual grid nodes
SET_PROP(CCMpfaModel, DualGridNodalIndexSet)
{
......
......@@ -53,12 +53,6 @@ namespace Properties
//! Type tag for the cell-centered tpfa scheme.
NEW_TYPE_TAG(CCTpfaModel, INHERITS_FROM(FiniteVolumeModel));
//! Set the corresponding discretization method property
SET_PROP(CCTpfaModel, DiscretizationMethod)
{
static const DiscretizationMethod value = DiscretizationMethod::cctpfa;
};
//! Set the default for the global finite volume geometry
SET_PROP(CCTpfaModel, FVGridGeometry)
{
......
......@@ -44,7 +44,7 @@ class DarcysLawImplementation
* These specializations are found in the headers included below.
*/
template <class TypeTag>
using DarcysLaw = DarcysLawImplementation<TypeTag, GET_PROP_VALUE(TypeTag, DiscretizationMethod)>;
using DarcysLaw = DarcysLawImplementation<TypeTag, GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod>;
} // end namespace Dumux
......
......@@ -40,7 +40,7 @@ class FicksLawImplementation;
* \brief Evaluates the diffusive mass flux according to Fick's law
*/
template <class TypeTag>
using FicksLaw = FicksLawImplementation<TypeTag, GET_PROP_VALUE(TypeTag, DiscretizationMethod)>;
using FicksLaw = FicksLawImplementation<TypeTag, GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod>;
} // end namespace Dumux
......
......@@ -41,7 +41,7 @@ class FouriersLawImplementation
* \brief Evaluates the heat conduction flux according to Fouriers's law
*/
template <class TypeTag>
using FouriersLaw = FouriersLawImplementation<TypeTag, GET_PROP_VALUE(TypeTag, DiscretizationMethod)>;
using FouriersLaw = FouriersLawImplementation<TypeTag, GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod>;
} // end namespace Dumux
......
......@@ -39,7 +39,7 @@ class FouriersLawNonEquilibriumImplementation
* \brief Evaluates the heat conduction flux according to Fouriers's law
*/
template <class TypeTag>
using FouriersLawNonEquilibrium = FouriersLawNonEquilibriumImplementation<TypeTag, GET_PROP_VALUE(TypeTag, DiscretizationMethod)>;
using FouriersLawNonEquilibrium = FouriersLawNonEquilibriumImplementation<TypeTag, GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod>;
} // end namespace Dumux
......
......@@ -39,7 +39,7 @@ class MaxwellStefansLawImplementation
* \brief Evaluates the diffusive mass flux according to Maxwell Stafan's law
*/
template <class TypeTag>
using MaxwellStefansLaw = MaxwellStefansLawImplementation<TypeTag, GET_PROP_VALUE(TypeTag, DiscretizationMethod)>;
using MaxwellStefansLaw = MaxwellStefansLawImplementation<TypeTag, GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod>;
} // end namespace
......
......@@ -62,12 +62,6 @@ namespace Properties
//! Type tag for the staggered scheme.
NEW_TYPE_TAG(StaggeredModel, INHERITS_FROM(FiniteVolumeModel));
//! Set the corresponding discretization method property
SET_PROP(StaggeredModel, DiscretizationMethod)
{
static const DiscretizationMethod value = DiscretizationMethod::staggered;
};
//! Set the default global face variables cache vector class
SET_TYPE_PROP(StaggeredModel, GridFaceVariables, StaggeredGridFaceVariables<TypeTag, GET_PROP_VALUE(TypeTag, EnableGridFaceVariablesCache)>);
......
......@@ -41,7 +41,7 @@ class UpwindSchemeImplementation;
* This depends on the chosen discretization method.
*/
template<class TypeTag>
using UpwindScheme = UpwindSchemeImplementation<TypeTag, GET_PROP_VALUE(TypeTag, DiscretizationMethod)>;
using UpwindScheme = UpwindSchemeImplementation<TypeTag, GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod>;
//! Upwind scheme for the box method
template<class TypeTag>
......
......@@ -43,7 +43,7 @@ class NavierStokesFluxVariablesImpl;
* \note Not all specializations are currently implemented
*/
template<class TypeTag>
using NavierStokesFluxVariables = NavierStokesFluxVariablesImpl<TypeTag, GET_PROP_VALUE(TypeTag, DiscretizationMethod)>;
using NavierStokesFluxVariables = NavierStokesFluxVariablesImpl<TypeTag, GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod>;
} // end namespace
......
......@@ -40,7 +40,7 @@ class FreeFlowFluxVariablesCacheImplementation
* Store flux stencils and data required for flux calculation
*/
template<class TypeTag>
using FreeFlowFluxVariablesCache = FreeFlowFluxVariablesCacheImplementation<TypeTag, GET_PROP_VALUE(TypeTag, DiscretizationMethod)>;
using FreeFlowFluxVariablesCache = FreeFlowFluxVariablesCacheImplementation<TypeTag, GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod>;
/*!
* \ingroup NavierStokesModel
......
......@@ -43,7 +43,7 @@ class NavierStokesResidualImpl;
* \note Not all specializations are currently implemented
*/
template<class TypeTag>
using NavierStokesResidual = NavierStokesResidualImpl<TypeTag, GET_PROP_VALUE(TypeTag, DiscretizationMethod)>;
using NavierStokesResidual = NavierStokesResidualImpl<TypeTag, GET_PROP_TYPE(TypeTag, FVGridGeometry)::discMethod>;
}
......
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