Commit 9630f879 authored by Timo Koch's avatar Timo Koch
Browse files

[discretization] Rename DiscretizationMethods to DiscretizationMethod with lower-case fields

parent 8d3a7fb9
......@@ -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) == DiscretizationMethods::Box;
static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethod::box;
public:
......
......@@ -58,8 +58,8 @@ class FVAssembler
using TimeLoop = TimeLoopBase<typename GET_PROP_TYPE(TypeTag, Scalar)>;
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
static constexpr DiscretizationMethods discMethod = GET_PROP_VALUE(TypeTag, DiscretizationMethod);
static constexpr bool isBox = discMethod == DiscretizationMethods::Box;
static constexpr DiscretizationMethod discMethod = GET_PROP_VALUE(TypeTag, DiscretizationMethod);
static constexpr bool isBox = discMethod == DiscretizationMethod::box;
using ThisType = FVAssembler<TypeTag, diffMethod, isImplicit>;
using LocalAssembler = std::conditional_t<isBox, BoxLocalAssembler<TypeTag, ThisType, 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) != DiscretizationMethods::Box, void>
std::enable_if_t<GET_PROP_VALUE(T, DiscretizationMethod) != 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) == DiscretizationMethods::Box, void>
std::enable_if_t<GET_PROP_VALUE(T, DiscretizationMethod) == DiscretizationMethod::box, void>
addFluxDerivatives(JacobianMatrix& A,
const Problem& problem,
const Element& element,
......
......@@ -35,7 +35,7 @@ namespace Dumux {
* \brief Helper function to generate Jacobian pattern for the box method
*/
template<bool isImplicit, class GridGeometry,
typename std::enable_if_t<(GridGeometry::discretizationMethod == DiscretizationMethods::Box), int> = 0>
typename std::enable_if_t<(GridGeometry::discretizationMethod == DiscretizationMethod::box), int> = 0>
Dune::MatrixIndexSet getJacobianPattern(const GridGeometry& gridGeometry)
{
const auto numDofs = gridGeometry.numDofs();
......@@ -76,8 +76,8 @@ Dune::MatrixIndexSet getJacobianPattern(const GridGeometry& gridGeometry)
* \brief Helper function to generate Jacobian pattern for cell-centered methods
*/
template<bool isImplicit, class GridGeometry,
typename std::enable_if_t<( (GridGeometry::discretizationMethod == DiscretizationMethods::CCTpfa)
|| (GridGeometry::discretizationMethod == DiscretizationMethods::CCMpfa) ), int> = 0>
typename std::enable_if_t<( (GridGeometry::discretizationMethod == DiscretizationMethod::cctpfa)
|| (GridGeometry::discretizationMethod == DiscretizationMethod::ccmpfa) ), int> = 0>
Dune::MatrixIndexSet getJacobianPattern(const GridGeometry& gridGeometry)
{
const auto numDofs = gridGeometry.numDofs();
......
......@@ -54,7 +54,7 @@ public:
};
//! the partial reassembler engine specialized for discretization methods
template<class Assembler, DiscretizationMethods discMethod>
template<class Assembler, DiscretizationMethod discMethod>
class PartialReassemblerEngine
{
public:
......@@ -79,7 +79,7 @@ public:
//! the partial reassembler engine specialized for the box method
template<class Assembler>
class PartialReassemblerEngine<Assembler, DiscretizationMethods::Box>
class PartialReassemblerEngine<Assembler, DiscretizationMethod::box>
{
using Scalar = typename Assembler::Scalar;
using FVGridGeometry = typename Assembler::FVGridGeometry;
......@@ -280,7 +280,7 @@ private:
//! the partial reassembler engine specialized for the box method
template<class Assembler>
class PartialReassemblerEngine<Assembler, DiscretizationMethods::CCTpfa>
class PartialReassemblerEngine<Assembler, DiscretizationMethod::cctpfa>
{
using Scalar = typename Assembler::Scalar;
using FVGridGeometry = typename Assembler::FVGridGeometry;
......@@ -372,10 +372,10 @@ private:
//! the partial reassembler engine specialized for the mpfa method
template<class Assembler>
class PartialReassemblerEngine<Assembler, DiscretizationMethods::CCMpfa>
: public PartialReassemblerEngine<Assembler, DiscretizationMethods::CCTpfa>
class PartialReassemblerEngine<Assembler, DiscretizationMethod::ccmpfa>
: public PartialReassemblerEngine<Assembler, DiscretizationMethod::cctpfa>
{
using ParentType = PartialReassemblerEngine<Assembler, DiscretizationMethods::CCTpfa>;
using ParentType = PartialReassemblerEngine<Assembler, DiscretizationMethod::cctpfa>;
public:
using ParentType::ParentType;
};
......@@ -393,7 +393,7 @@ class PartialReassembler
using JacobianMatrix = typename Assembler::JacobianMatrix;
using VertexMapper = typename FVGridGeometry::VertexMapper;
static constexpr DiscretizationMethods discMethod = FVGridGeometry::discretizationMethod;
static constexpr DiscretizationMethod discMethod = FVGridGeometry::discretizationMethod;
using Engine = PartialReassemblerEngine<Assembler, discMethod>;
static constexpr auto hasVertexColor = Dumux::isValid([](auto&& a) -> decltype(a.vertexColor(0)) {});
......
......@@ -75,7 +75,7 @@ class FVProblem
using CoordScalar = typename GridView::ctype;
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box;
static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == 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) == DiscretizationMethods::Box;
static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethod::box;
static constexpr int dofCodim = isBox ? dim : 0;
public:
......
......@@ -33,7 +33,7 @@
namespace Dumux
{
// forward declaration
template<class TypeTag, DiscretizationMethods discMethod>
template<class TypeTag, DiscretizationMethod discMethod>
class DarcysLawImplementation;
/*!
......@@ -41,7 +41,7 @@ class DarcysLawImplementation;
* \brief Specialization of Darcy's Law for the box method.
*/
template <class TypeTag>
class DarcysLawImplementation<TypeTag, DiscretizationMethods::Box>
class DarcysLawImplementation<TypeTag, DiscretizationMethod::box>
{
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView;
......
......@@ -53,7 +53,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) == DiscretizationMethods::Box;
static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethod::box;
public:
//! Constructor
......
......@@ -31,7 +31,7 @@
namespace Dumux
{
// forward declaration
template<class TypeTag, DiscretizationMethods discMethod>
template<class TypeTag, DiscretizationMethod discMethod>
class FicksLawImplementation;
/*!
......@@ -39,7 +39,7 @@ class FicksLawImplementation;
* \brief Specialization of Fick's Law for the box method.
*/
template <class TypeTag>
class FicksLawImplementation<TypeTag, DiscretizationMethods::Box>
class FicksLawImplementation<TypeTag, DiscretizationMethod::box>
{
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
......
......@@ -31,7 +31,7 @@
namespace Dumux
{
// forward declaration
template<class TypeTag, DiscretizationMethods discMethod>
template<class TypeTag, DiscretizationMethod discMethod>
class FouriersLawImplementation;
/*!
......@@ -39,7 +39,7 @@ class FouriersLawImplementation;
* \brief Specialization of Fourier's Law for the box method.
*/
template <class TypeTag>
class FouriersLawImplementation<TypeTag, DiscretizationMethods::Box>
class FouriersLawImplementation<TypeTag, DiscretizationMethod::box>
{
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
......
......@@ -34,7 +34,7 @@
namespace Dumux {
// forward declaration
template <class TypeTag, DiscretizationMethods DM>
template <class TypeTag, DiscretizationMethod DM>
class FouriersLawNonEquilibriumImplementation;
/*!
......@@ -42,7 +42,7 @@ class FouriersLawNonEquilibriumImplementation;
* \brief Specialization of Fourier's Law for the box method for thermal nonequilibrium models.
*/
template <class TypeTag>
class FouriersLawNonEquilibriumImplementation<TypeTag, DiscretizationMethods::Box>
class FouriersLawNonEquilibriumImplementation<TypeTag, DiscretizationMethod::box>
{
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
......
......@@ -95,7 +95,7 @@ class BoxFVGridGeometry<Scalar, GV, true, Traits>
public:
//! export discretization method
static constexpr DiscretizationMethods discretizationMethod = DiscretizationMethods::Box;
static constexpr DiscretizationMethod discretizationMethod = DiscretizationMethod::box;
//! export the type of the fv element geometry (the local view type)
using LocalView = typename Traits::template LocalView<ThisType, true>;
......@@ -303,7 +303,7 @@ class BoxFVGridGeometry<Scalar, GV, false, Traits>
public:
//! export discretization method
static constexpr DiscretizationMethods discretizationMethod = DiscretizationMethods::Box;
static constexpr DiscretizationMethod discretizationMethod = DiscretizationMethod::box;
//! export the type of the fv element geometry (the local view type)
using LocalView = typename Traits::template LocalView<ThisType, false>;
......
......@@ -35,7 +35,7 @@
namespace Dumux {
// forward declaration
template <class TypeTag, DiscretizationMethods DM>
template <class TypeTag, DiscretizationMethod DM>
class MaxwellStefansLawImplementation;
/*!
......@@ -43,7 +43,7 @@ class MaxwellStefansLawImplementation;
* \brief Specialization of Maxwell Stefan's Law for the Box method.
*/
template <class TypeTag>
class MaxwellStefansLawImplementation<TypeTag, DiscretizationMethods::Box >
class MaxwellStefansLawImplementation<TypeTag, DiscretizationMethod::box >
{
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
......
......@@ -56,7 +56,7 @@ NEW_TYPE_TAG(BoxModel, INHERITS_FROM(FiniteVolumeModel));
//! Set the corresponding discretization method property
SET_PROP(BoxModel, DiscretizationMethod)
{
static const DiscretizationMethods value = DiscretizationMethods::Box;
static const DiscretizationMethod value = DiscretizationMethod::box;
};
//! Set the default for the global finite volume geometry
......
......@@ -34,7 +34,7 @@ namespace Dumux
* \ingroup BoxModel
* \brief Convert intersection boundary types to vertex boundary types
*/
template<class BoundaryTypes, DiscretizationMethods discMethod>
template<class BoundaryTypes, DiscretizationMethod discMethod>
class ScvfToScvBoundaryTypes
{
public:
......@@ -44,7 +44,7 @@ public:
void computeBoundaryTypes(const Problem& problem)
{
// only do something for box
if (discMethod == DiscretizationMethods::Box)
if (discMethod == DiscretizationMethod::box)
{
const auto& fvGridGeometry = problem.fvGridGeometry();
scvBoundaryTypes.resize(fvGridGeometry.vertexMapper().size());
......@@ -81,7 +81,7 @@ public:
template<class SubControlVolume>
const BoundaryTypes& boundaryTypes(const SubControlVolume& scv) const
{
if (discMethod == DiscretizationMethods::Box)
if (discMethod == DiscretizationMethod::box)
return scvBoundaryTypes[scv.dofIndex()];
else
DUNE_THROW(Dune::InvalidStateException, "Only use this for the box discretization!");
......
......@@ -35,7 +35,7 @@
namespace Dumux
{
//! forward declaration of the method-specific implementation
template<class TypeTag, DiscretizationMethods discMethod>
template<class TypeTag, DiscretizationMethod discMethod>
class DarcysLawImplementation;
/*!
......@@ -43,7 +43,7 @@ class DarcysLawImplementation;
* \brief Darcy's law for cell-centered finite volume schemes with multi-point flux approximation.
*/
template<class TypeTag>
class DarcysLawImplementation<TypeTag, DiscretizationMethods::CCMpfa>
class DarcysLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
{
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
......@@ -264,7 +264,7 @@ class DarcysLawImplementation<TypeTag, DiscretizationMethods::CCMpfa>
public:
// state the discretization method this implementation belongs to
static const DiscretizationMethods myDiscretizationMethod = DiscretizationMethods::CCMpfa;
static const DiscretizationMethod myDiscretizationMethod = DiscretizationMethod::ccmpfa;
// export the type for the corresponding cache
using Cache = MpfaDarcysLawCache;
......
......@@ -31,7 +31,7 @@
namespace Dumux
{
//! forward declaration of the method-specific implemetation
template<class TypeTag, DiscretizationMethods discMethod>
template<class TypeTag, DiscretizationMethod discMethod>
class FicksLawImplementation;
/*!
......@@ -39,7 +39,7 @@ class FicksLawImplementation;
* \brief Fick's law for cell-centered finite volume schemes with multi-point flux approximation
*/
template <class TypeTag>
class FicksLawImplementation<TypeTag, DiscretizationMethods::CCMpfa>
class FicksLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
{
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
......@@ -220,7 +220,7 @@ class FicksLawImplementation<TypeTag, DiscretizationMethods::CCMpfa>
public:
// state the discretization method this implementation belongs to
static const DiscretizationMethods myDiscretizationMethod = DiscretizationMethods::CCMpfa;
static const DiscretizationMethod myDiscretizationMethod = DiscretizationMethod::ccmpfa;
// state the type for the corresponding cache and its filler
using Cache = MpfaFicksLawCache;
......
......@@ -427,10 +427,10 @@ private:
template< class InteractionVolume,
class DataHandle,
class AdvectionType = typename GET_PROP_TYPE(TypeTag, AdvectionType),
typename std::enable_if_t<AdvectionType::myDiscretizationMethod == DiscretizationMethods::CCMpfa, int> = 0 >
typename std::enable_if_t<AdvectionType::myDiscretizationMethod == DiscretizationMethod::ccmpfa, int> = 0 >
void fillAdvectionHandle(InteractionVolume& iv, DataHandle& handle, bool forceUpdateAll)
{
using LambdaFactory = TensorLambdaFactory<TypeTag, DiscretizationMethods::CCMpfa>;
using LambdaFactory = TensorLambdaFactory<TypeTag, DiscretizationMethod::ccmpfa>;
// get instance of the interaction volume-local assembler
static constexpr MpfaMethods M = InteractionVolume::MpfaMethod;
......@@ -509,13 +509,13 @@ private:
template< class InteractionVolume,
class DataHandle,
class DiffusionType = typename GET_PROP_TYPE(TypeTag, MolecularDiffusionType),
typename std::enable_if_t<DiffusionType::myDiscretizationMethod == DiscretizationMethods::CCMpfa, int> = 0 >
typename std::enable_if_t<DiffusionType::myDiscretizationMethod == DiscretizationMethod::ccmpfa, int> = 0 >
void fillDiffusionHandle(InteractionVolume& iv,
DataHandle& handle,
bool forceUpdateAll,
int phaseIdx, int compIdx)
{
using LambdaFactory = TensorLambdaFactory<TypeTag, DiscretizationMethods::CCMpfa>;
using LambdaFactory = TensorLambdaFactory<TypeTag, DiscretizationMethod::ccmpfa>;
// get instance of the interaction volume-local assembler
static constexpr MpfaMethods M = InteractionVolume::MpfaMethod;
......@@ -551,10 +551,10 @@ private:
template< class InteractionVolume,
class DataHandle,
class HeatConductionType = typename GET_PROP_TYPE(TypeTag, HeatConductionType),
typename std::enable_if_t<HeatConductionType::myDiscretizationMethod == DiscretizationMethods::CCMpfa, int> = 0 >
typename std::enable_if_t<HeatConductionType::myDiscretizationMethod == DiscretizationMethod::ccmpfa, int> = 0 >
void fillHeatConductionHandle(InteractionVolume& iv, DataHandle& handle, bool forceUpdateAll)
{
using LambdaFactory = TensorLambdaFactory<TypeTag, DiscretizationMethods::CCMpfa>;
using LambdaFactory = TensorLambdaFactory<TypeTag, DiscretizationMethod::ccmpfa>;
// get instance of the interaction volume-local assembler
static constexpr MpfaMethods M = InteractionVolume::MpfaMethod;
......@@ -584,21 +584,21 @@ private:
template< class InteractionVolume,
class DataHandle,
class AdvectionType = typename GET_PROP_TYPE(TypeTag, AdvectionType),
typename std::enable_if_t<AdvectionType::myDiscretizationMethod != DiscretizationMethods::CCMpfa, int> = 0 >
typename std::enable_if_t<AdvectionType::myDiscretizationMethod != DiscretizationMethod::ccmpfa, int> = 0 >
void fillAdvectionHandle(InteractionVolume& iv, DataHandle& handle, bool forceUpdateAll) {}
//! fill handle only when diffusion uses mpfa
template< class InteractionVolume,
class DataHandle,
class DiffusionType = typename GET_PROP_TYPE(TypeTag, MolecularDiffusionType),
typename std::enable_if_t<DiffusionType::myDiscretizationMethod != DiscretizationMethods::CCMpfa, int> = 0 >
typename std::enable_if_t<DiffusionType::myDiscretizationMethod != DiscretizationMethod::ccmpfa, int> = 0 >
void fillDiffusionHandle(InteractionVolume& iv, DataHandle& handle, bool forceUpdateAll, int phaseIdx, int compIdx) {}
//! fill handle only when heat conduction uses mpfa
template< class InteractionVolume,
class DataHandle,
class HeatConductionType = typename GET_PROP_TYPE(TypeTag, HeatConductionType),
typename std::enable_if_t<HeatConductionType::myDiscretizationMethod != DiscretizationMethods::CCMpfa, int> = 0 >
typename std::enable_if_t<HeatConductionType::myDiscretizationMethod != DiscretizationMethod::ccmpfa, int> = 0 >
void fillHeatConductionHandle(InteractionVolume& iv, DataHandle& handle, bool forceUpdateAll) {}
const Problem* problemPtr_;
......
......@@ -35,7 +35,7 @@
namespace Dumux
{
//! forward declaration of the method-specific implementation
template<class TypeTag, DiscretizationMethods discMethod>
template<class TypeTag, DiscretizationMethod discMethod>
class FouriersLawImplementation;
/*!
......@@ -43,7 +43,7 @@ class FouriersLawImplementation;
* \brief Fourier's law for cell-centered finite volume schemes with two-point flux approximation
*/
template <class TypeTag>
class FouriersLawImplementation<TypeTag, DiscretizationMethods::CCMpfa>
class FouriersLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
{
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
......@@ -210,7 +210,7 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethods::CCMpfa>
public:
// state the discretization method this implementation belongs to
static const DiscretizationMethods myDiscretizationMethod = DiscretizationMethods::CCMpfa;
static const DiscretizationMethod myDiscretizationMethod = DiscretizationMethod::ccmpfa;
// state the type for the corresponding cache and its filler
using Cache = MpfaFouriersLawCache;
......
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