Skip to content
Snippets Groups Projects
Commit 68c0dbad authored by Timo Koch's avatar Timo Koch
Browse files

[disc] Add defaults for FluxVariablesCache/CacheFiller

parent baa85a7a
No related branches found
No related tags found
1 merge request!3077Provide defaults for FluxVariablesCache and FluxVariablesCacheFiller
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
#include <dumux/discretization/box/gridvolumevariables.hh> #include <dumux/discretization/box/gridvolumevariables.hh>
#include <dumux/discretization/box/fvgridgeometry.hh> #include <dumux/discretization/box/fvgridgeometry.hh>
#include <dumux/flux/fluxvariablescaching.hh>
namespace Dumux { namespace Dumux {
namespace Properties { namespace Properties {
...@@ -85,7 +87,11 @@ struct GridFluxVariablesCache<TypeTag, TTag::BoxModel> ...@@ -85,7 +87,11 @@ struct GridFluxVariablesCache<TypeTag, TTag::BoxModel>
private: private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>(); static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
using Problem = GetPropType<TypeTag, Properties::Problem>; using Problem = GetPropType<TypeTag, Properties::Problem>;
using FluxVariablesCache = GetPropType<TypeTag, Properties::FluxVariablesCache>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using FluxVariablesCache = GetPropTypeOr<TypeTag,
Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
>;
public: public:
using type = BoxGridFluxVariablesCache<Problem, FluxVariablesCache, enableCache>; using type = BoxGridFluxVariablesCache<Problem, FluxVariablesCache, enableCache>;
}; };
......
...@@ -48,6 +48,8 @@ ...@@ -48,6 +48,8 @@
#include <dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh> #include <dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh>
#include <dumux/flux/fluxvariablescaching.hh>
namespace Dumux { namespace Dumux {
namespace Properties { namespace Properties {
...@@ -130,8 +132,14 @@ struct GridFluxVariablesCache<TypeTag, TTag::CCMpfaModel> ...@@ -130,8 +132,14 @@ struct GridFluxVariablesCache<TypeTag, TTag::CCMpfaModel>
private: private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>(); static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
using Problem = GetPropType<TypeTag, Properties::Problem>; using Problem = GetPropType<TypeTag, Properties::Problem>;
using FluxVariablesCache = GetPropType<TypeTag, Properties::FluxVariablesCache>;
using FluxVariablesCacheFiller = GetPropType<TypeTag, Properties::FluxVariablesCacheFiller>; using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using FluxVariablesCache = GetPropTypeOr<TypeTag,
Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
>;
using FluxVariablesCacheFiller = GetPropTypeOr<TypeTag,
Properties::FluxVariablesCacheFiller, FluxVariablesCaching::EmptyCacheFiller
>;
using PrimaryInteractionVolume = GetPropType<TypeTag, Properties::PrimaryInteractionVolume>; using PrimaryInteractionVolume = GetPropType<TypeTag, Properties::PrimaryInteractionVolume>;
using SecondaryInteractionVolume = GetPropType<TypeTag, Properties::SecondaryInteractionVolume>; using SecondaryInteractionVolume = GetPropType<TypeTag, Properties::SecondaryInteractionVolume>;
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
#include <dumux/discretization/cellcentered/tpfa/gridfluxvariablescache.hh> #include <dumux/discretization/cellcentered/tpfa/gridfluxvariablescache.hh>
#include <dumux/discretization/cellcentered/tpfa/subcontrolvolumeface.hh> #include <dumux/discretization/cellcentered/tpfa/subcontrolvolumeface.hh>
#include <dumux/flux/fluxvariablescaching.hh>
namespace Dumux { namespace Dumux {
namespace Properties { namespace Properties {
...@@ -81,8 +83,14 @@ struct GridFluxVariablesCache<TypeTag, TTag::CCTpfaModel> ...@@ -81,8 +83,14 @@ struct GridFluxVariablesCache<TypeTag, TTag::CCTpfaModel>
private: private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>(); static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
using Problem = GetPropType<TypeTag, Properties::Problem>; using Problem = GetPropType<TypeTag, Properties::Problem>;
using FluxVariablesCache = GetPropType<TypeTag, Properties::FluxVariablesCache>;
using FluxVariablesCacheFiller = GetPropType<TypeTag, Properties::FluxVariablesCacheFiller>; using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using FluxVariablesCache = GetPropTypeOr<TypeTag,
Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
>;
using FluxVariablesCacheFiller = GetPropTypeOr<TypeTag,
Properties::FluxVariablesCacheFiller, FluxVariablesCaching::EmptyCacheFiller
>;
public: public:
using type = CCTpfaGridFluxVariablesCache<Problem, FluxVariablesCache, FluxVariablesCacheFiller, enableCache>; using type = CCTpfaGridFluxVariablesCache<Problem, FluxVariablesCache, FluxVariablesCacheFiller, enableCache>;
}; };
......
...@@ -80,8 +80,13 @@ struct GridFluxVariablesCache<TypeTag, TTag::FaceCenteredStaggeredModel> ...@@ -80,8 +80,13 @@ struct GridFluxVariablesCache<TypeTag, TTag::FaceCenteredStaggeredModel>
private: private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>(); static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
using Problem = GetPropType<TypeTag, Properties::Problem>; using Problem = GetPropType<TypeTag, Properties::Problem>;
using FluxVariablesCache = GetPropType<TypeTag, Properties::FluxVariablesCache>; using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using FluxVariablesCacheFiller = GetPropType<TypeTag, Properties::FluxVariablesCacheFiller>; using FluxVariablesCache = GetPropTypeOr<TypeTag,
Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
>;
using FluxVariablesCacheFiller = GetPropTypeOr<TypeTag,
Properties::FluxVariablesCacheFiller, FluxVariablesCaching::EmptyCacheFiller
>;
public: public:
using type = FaceCenteredStaggeredGridFluxVariablesCache<Problem, FluxVariablesCache, FluxVariablesCacheFiller, enableCache>; using type = FaceCenteredStaggeredGridFluxVariablesCache<Problem, FluxVariablesCache, FluxVariablesCacheFiller, enableCache>;
}; };
......
...@@ -83,8 +83,13 @@ struct GridFluxVariablesCache<TypeTag, TTag::StaggeredModel> ...@@ -83,8 +83,13 @@ struct GridFluxVariablesCache<TypeTag, TTag::StaggeredModel>
{ {
private: private:
using Problem = GetPropType<TypeTag, Properties::Problem>; using Problem = GetPropType<TypeTag, Properties::Problem>;
using FluxVariablesCache = GetPropType<TypeTag, Properties::FluxVariablesCache>; using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using FluxVariablesCacheFiller = GetPropType<TypeTag, Properties::FluxVariablesCacheFiller>; using FluxVariablesCache = GetPropTypeOr<TypeTag,
Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
>;
using FluxVariablesCacheFiller = GetPropTypeOr<TypeTag,
Properties::FluxVariablesCacheFiller, FluxVariablesCaching::EmptyCacheFiller
>;
static constexpr auto enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>(); static constexpr auto enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
static constexpr auto upwindSchemeOrder = getPropValue<TypeTag, Properties::UpwindSchemeOrder>(); static constexpr auto upwindSchemeOrder = getPropValue<TypeTag, Properties::UpwindSchemeOrder>();
public: public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment