diff --git a/dumux/discretization/box.hh b/dumux/discretization/box.hh index 9bf9a02a081dad7234b06e39d98e9334c6709514..2b4908a97157300ba50d98fca10d605746315178 100644 --- a/dumux/discretization/box.hh +++ b/dumux/discretization/box.hh @@ -27,6 +27,7 @@ #include <dumux/discretization/method.hh> #include <dumux/discretization/fvproperties.hh> #include <dumux/discretization/localdoftraits.hh> +#include <dumux/discretization/defaultlocaloperator.hh> #include <dumux/discretization/cvfe/elementboundarytypes.hh> #include <dumux/discretization/cvfe/gridfluxvariablescache.hh> @@ -138,6 +139,18 @@ struct LocalDofTraits<GridView, DiscretizationMethods::Box> static constexpr int numCubeElementDofs = (1<<dim); }; +template<class TypeTag> +concept BoxModel = std::is_same_v< + typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod, + DiscretizationMethods::Box +>; + +template<BoxModel TypeTag> +struct DiscretizationDefaultLocalOperator<TypeTag> +{ + using type = CVFELocalResidual<TypeTag>; +}; + } // end namespace Dumux:Detail #endif diff --git a/dumux/discretization/ccmpfa.hh b/dumux/discretization/ccmpfa.hh index 04eedc99af7c730dd7d531ed88bd3ac9e49e14c2..96ad23fe7693d9099a2cd62f0e90b7bf3346188a 100644 --- a/dumux/discretization/ccmpfa.hh +++ b/dumux/discretization/ccmpfa.hh @@ -13,6 +13,8 @@ #ifndef DUMUX_DISCRETIZATION_CC_MPFA_HH #define DUMUX_DISCRETIZATION_CC_MPFA_HH +#include <type_traits> + #include <dune/common/reservedvector.hh> #include <dumux/common/properties.hh> @@ -21,7 +23,9 @@ #include <dumux/assembly/cclocalresidual.hh> +#include <dumux/discretization/method.hh> #include <dumux/discretization/fvproperties.hh> +#include <dumux/discretization/defaultlocaloperator.hh> #include <dumux/discretization/cellcentered/elementsolution.hh> #include <dumux/discretization/cellcentered/elementboundarytypes.hh> @@ -171,6 +175,18 @@ public: using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolumeFace>()))>; }; +template<class TypeTag> +concept CCMpfaModel = std::is_same_v< + typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod, + DiscretizationMethods::CCMpfa +>; + +template<CCMpfaModel TypeTag> +struct DiscretizationDefaultLocalOperator<TypeTag> +{ + using type = CCLocalResidual<TypeTag>; +}; + } // end namespace Detail } // namespace Dumux diff --git a/dumux/discretization/cctpfa.hh b/dumux/discretization/cctpfa.hh index 4e2864fe01de78733efad7e783660e1e75c56470..89686af5ceadd6a2d84391d70904cd7be0b36d3f 100644 --- a/dumux/discretization/cctpfa.hh +++ b/dumux/discretization/cctpfa.hh @@ -14,6 +14,8 @@ #ifndef DUMUX_DISCRETIZATION_CC_TPFA_HH #define DUMUX_DISCRETIZATION_CC_TPFA_HH +#include <type_traits> + #include <dumux/common/properties.hh> #include <dumux/common/boundaryflag.hh> #include <dumux/common/typetraits/problem.hh> @@ -22,6 +24,7 @@ #include <dumux/discretization/method.hh> #include <dumux/discretization/fvproperties.hh> +#include <dumux/discretization/defaultlocaloperator.hh> #include <dumux/discretization/cellcentered/subcontrolvolume.hh> #include <dumux/discretization/cellcentered/elementboundarytypes.hh> @@ -107,6 +110,18 @@ public: using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolumeFace>()))>; }; +template<class TypeTag> +concept CCTpfaModel = std::is_same_v< + typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod, + DiscretizationMethods::CCTpfa +>; + +template<CCTpfaModel TypeTag> +struct DiscretizationDefaultLocalOperator<TypeTag> +{ + using type = CCLocalResidual<TypeTag>; +}; + } // end namespace Detail } // namespace Dumux diff --git a/dumux/discretization/fcdiamond.hh b/dumux/discretization/fcdiamond.hh index d8292f2e559fe5605342ec7381f72f83d83bf81b..ac57965594b839ead26d025c3f05fe5a66839678 100644 --- a/dumux/discretization/fcdiamond.hh +++ b/dumux/discretization/fcdiamond.hh @@ -14,6 +14,8 @@ #ifndef DUMUX_DISCRETIZATION_FACECENTERED_DIAMOND_HH #define DUMUX_DISCRETIZATION_FACECENTERED_DIAMOND_HH +#include <type_traits> + #include <dumux/common/properties.hh> #include <dumux/common/typetraits/problem.hh> @@ -21,6 +23,7 @@ #include <dumux/discretization/method.hh> #include <dumux/discretization/fvproperties.hh> #include <dumux/discretization/localdoftraits.hh> +#include <dumux/discretization/defaultlocaloperator.hh> #include <dumux/flux/fluxvariablescaching.hh> #include <dumux/discretization/facecentered/diamond/fvgridgeometry.hh> @@ -142,6 +145,18 @@ struct LocalDofTraits<GridView, DiscretizationMethods::FCDiamond> static constexpr int numCubeElementDofs = 2*dim; }; +template<class TypeTag> +concept FaceCenteredDiamondModel = std::is_same_v< + typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod, + DiscretizationMethods::FCDiamond +>; + +template<FaceCenteredDiamondModel TypeTag> +struct DiscretizationDefaultLocalOperator<TypeTag> +{ + using type = CVFELocalResidual<TypeTag>; +}; + } // end namespace Dumux::Detail #endif diff --git a/dumux/discretization/fcstaggered.hh b/dumux/discretization/fcstaggered.hh index 7c9c6fdff46acf75f1c35af6dfe150b64ee3deb7..f61757b4e7f344f66c05daddcdd86246532b87da 100644 --- a/dumux/discretization/fcstaggered.hh +++ b/dumux/discretization/fcstaggered.hh @@ -15,6 +15,8 @@ #ifndef DUMUX_DISCRETIZATION_FACECENTERED_STAGGERED_HH #define DUMUX_DISCRETIZATION_FACECENTERED_STAGGERED_HH +#include <type_traits> + #include <dumux/common/properties.hh> #include <dumux/common/typetraits/problem.hh> @@ -123,6 +125,12 @@ public: using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolumeFace>()))>; }; +template<class TypeTag> +concept FaceCenteredStaggeredModel = std::is_same_v< + typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod, + DiscretizationMethods::FCStaggered +>; + } // end namespace Detail #endif diff --git a/dumux/discretization/pq1bubble.hh b/dumux/discretization/pq1bubble.hh index 5cca5d8923f20cc13191bda4508c426609d7320c..fd2614284d2ae7772cb80739860e2ec0f45cccb4 100644 --- a/dumux/discretization/pq1bubble.hh +++ b/dumux/discretization/pq1bubble.hh @@ -27,6 +27,7 @@ #include <dumux/discretization/method.hh> #include <dumux/discretization/fvproperties.hh> #include <dumux/discretization/localdoftraits.hh> +#include <dumux/discretization/defaultlocaloperator.hh> #include <dumux/discretization/cvfe/elementboundarytypes.hh> #include <dumux/discretization/cvfe/gridfluxvariablescache.hh> @@ -138,6 +139,18 @@ struct LocalDofTraits<GridView, DiscretizationMethods::PQ1Bubble> static constexpr int numCubeElementDofs = (1<<dim) + 1; }; +template<class TypeTag> +concept PQ1BubbleModel = std::is_same_v< + typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod, + DiscretizationMethods::PQ1Bubble +>; + +template<PQ1BubbleModel TypeTag> +struct DiscretizationDefaultLocalOperator<TypeTag> +{ + using type = CVFELocalResidual<TypeTag>; +}; + } // end namespace Dumux::Detail #endif diff --git a/dumux/discretization/staggered.hh b/dumux/discretization/staggered.hh index 98bf9b7f9cad7f8c7bd2a550224c56664eb298c6..c1947674e2e645f54ca2af9f17e06a3015baeaed 100644 --- a/dumux/discretization/staggered.hh +++ b/dumux/discretization/staggered.hh @@ -15,11 +15,14 @@ #ifndef DUMUX_DISCRETIZATION_STAGGERD_HH #define DUMUX_DISCRETIZATION_STAGGERD_HH +#include <type_traits> + #include <dumux/common/properties.hh> #include <dumux/common/typetraits/problem.hh> #include <dumux/discretization/method.hh> #include <dumux/discretization/fvproperties.hh> +#include <dumux/discretization/defaultlocaloperator.hh> #include <dumux/flux/fluxvariablescaching.hh> #include <dumux/discretization/cellcentered/elementboundarytypes.hh> @@ -205,6 +208,18 @@ public: using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolumeFace>()))>; }; +template<class TypeTag> +concept StaggeredModel = std::is_same_v< + typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod, + DiscretizationMethods::Staggered +>; + +template<StaggeredModel TypeTag> +struct DiscretizationDefaultLocalOperator<TypeTag> +{ + using type = StaggeredLocalResidual<TypeTag>; +}; + } // end namespace Detail } // namespace Dumux diff --git a/dumux/multidomain/facet/box/properties.hh b/dumux/multidomain/facet/box/properties.hh index 33098218633f9fdecf38a3ddb1dc9bab63bcc984..11121a0a32ffcb6a41c7fa09da9781ac1ef4dbdb 100644 --- a/dumux/multidomain/facet/box/properties.hh +++ b/dumux/multidomain/facet/box/properties.hh @@ -19,6 +19,7 @@ #include <dumux/common/properties.hh> #include <dumux/discretization/box.hh> +#include <dumux/discretization/defaultlocaloperator.hh> #include <dumux/multidomain/facet/box/darcyslaw.hh> #include <dumux/multidomain/facet/box/fickslaw.hh> @@ -87,6 +88,20 @@ public: }; } // namespace Properties + +namespace Detail { + +template<class T> +concept BoxFacetCouplingModel = BoxModel<T> && Dumux::Properties::inheritsFrom<Properties::TTag::BoxFacetCouplingModel, T>(); + +template<BoxFacetCouplingModel TypeTag> +struct DiscretizationDefaultLocalOperator<TypeTag> +{ + using type = BoxFacetCouplingLocalResidual<TypeTag>; +}; + +} // namespace Detail + } // namespace Dumux #endif diff --git a/dumux/multidomain/facet/cellcentered/mpfa/properties.hh b/dumux/multidomain/facet/cellcentered/mpfa/properties.hh index ebc96b34fd69453789bc35825681d7243a7fb1c8..ac08864d42cdd902519d0de05a56764fb6234bec 100644 --- a/dumux/multidomain/facet/cellcentered/mpfa/properties.hh +++ b/dumux/multidomain/facet/cellcentered/mpfa/properties.hh @@ -19,7 +19,7 @@ #include <dumux/common/properties.hh> #include <dumux/discretization/ccmpfa.hh> - +#include <dumux/discretization/defaultlocaloperator.hh> #include <dumux/multidomain/facet/cellcentered/upwindscheme.hh> #include <dumux/multidomain/facet/cellcentered/localresidual.hh> #include <dumux/multidomain/facet/cellcentered/mpfa/interactionvolume.hh> @@ -78,6 +78,20 @@ struct FluxVariables<TypeTag, TTag::CCMpfaFacetCouplingModel> }; } // namespace Properties + +namespace Detail { + +template<class T> +concept CCMpfaFacetCouplingModel = CCMpfaModel<T> && Dumux::Properties::inheritsFrom<Properties::TTag::CCMpfaFacetCouplingModel, T>(); + +template<CCMpfaFacetCouplingModel TypeTag> +struct DiscretizationDefaultLocalOperator<TypeTag> +{ + using type = CCFacetCouplingLocalResidual<TypeTag>; +}; + +} // end namespace Detail + } // namespace Dumux #endif diff --git a/dumux/multidomain/facet/cellcentered/tpfa/properties.hh b/dumux/multidomain/facet/cellcentered/tpfa/properties.hh index 87167307db3cb931cc1034a97b221550e2970fea..402a317254d17f5166001eef5b09f9df072cc274 100644 --- a/dumux/multidomain/facet/cellcentered/tpfa/properties.hh +++ b/dumux/multidomain/facet/cellcentered/tpfa/properties.hh @@ -17,8 +17,11 @@ #ifndef DUMUX_FACETCOUPLING_CC_TPFA_PROPERTIES_HH #define DUMUX_FACETCOUPLING_CC_TPFA_PROPERTIES_HH +#include <type_traits> + #include <dumux/common/properties.hh> #include <dumux/discretization/cctpfa.hh> +#include <dumux/discretization/defaultlocaloperator.hh> #include <dumux/multidomain/facet/cellcentered/upwindscheme.hh> #include <dumux/multidomain/facet/cellcentered/localresidual.hh> #include <dumux/multidomain/facet/cellcentered/tpfa/darcyslaw.hh> @@ -73,6 +76,20 @@ struct FluxVariables<TypeTag, TTag::CCTpfaFacetCouplingModel> }; } // namespace Properties + +namespace Detail { + +template<class T> +concept CCTpfaFacetCouplingModel = CCTpfaModel<T> && Dumux::Properties::inheritsFrom<Properties::TTag::CCTpfaFacetCouplingModel, T>(); + +template<CCTpfaFacetCouplingModel TypeTag> +struct DiscretizationDefaultLocalOperator<TypeTag> +{ + using type = CCFacetCouplingLocalResidual<TypeTag>; +}; + +} // end namespace Detail + } // namespace Dumux #endif