Commit 2e42b5fe authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[propertysystem] replace macro SET_TYPE_PROP

parent 0b6a74b2
......@@ -86,10 +86,12 @@ public:
};
//! Set the default for the ElementBoundaryTypes
SET_TYPE_PROP(BoxModel, ElementBoundaryTypes, BoxElementBoundaryTypes<GetPropType<TypeTag, Properties::BoundaryTypes>>);
template<class TypeTag>
struct ElementBoundaryTypes<TypeTag, TTag::BoxModel> { using type = BoxElementBoundaryTypes<GetPropType<TypeTag, Properties::BoundaryTypes>>; };
//! Set the BaseLocalResidual to BoxLocalResidual
SET_TYPE_PROP(BoxModel, BaseLocalResidual, BoxLocalResidual<TypeTag>);
template<class TypeTag>
struct BaseLocalResidual<TypeTag, TTag::BoxModel> { using type = BoxLocalResidual<TypeTag>; };
} // namespace Properties
} // namespace Dumux
......
......@@ -140,10 +140,12 @@ public:
};
//! Set the default for the ElementBoundaryTypes
SET_TYPE_PROP(CCMpfaModel, ElementBoundaryTypes, CCElementBoundaryTypes);
template<class TypeTag>
struct ElementBoundaryTypes<TypeTag, TTag::CCMpfaModel> { using type = CCElementBoundaryTypes; };
//! Set the BaseLocalResidual to CCLocalResidual
SET_TYPE_PROP(CCMpfaModel, BaseLocalResidual, CCLocalResidual<TypeTag>);
template<class TypeTag>
struct BaseLocalResidual<TypeTag, TTag::CCMpfaModel> { using type = CCLocalResidual<TypeTag>; };
} // namespace Properties
} // namespace Dumux
......
......@@ -85,10 +85,12 @@ public:
};
//! Set the default for the ElementBoundaryTypes
SET_TYPE_PROP(CCTpfaModel, ElementBoundaryTypes, CCElementBoundaryTypes);
template<class TypeTag>
struct ElementBoundaryTypes<TypeTag, TTag::CCTpfaModel> { using type = CCElementBoundaryTypes; };
//! Set the BaseLocalResidual to CCLocalResidual
SET_TYPE_PROP(CCTpfaModel, BaseLocalResidual, CCLocalResidual<TypeTag>);
template<class TypeTag>
struct BaseLocalResidual<TypeTag, TTag::CCTpfaModel> { using type = CCLocalResidual<TypeTag>; };
} // namespace Properties
} // namespace Dumux
......
......@@ -67,13 +67,15 @@ template<class TypeTag>
struct EnableGridFluxVariablesCache<TypeTag, TTag::FiniteVolumeModel> { static constexpr bool value = false; };
//! Boundary types at a single degree of freedom
SET_TYPE_PROP(FiniteVolumeModel, BoundaryTypes, Dumux::BoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>);
template<class TypeTag>
struct BoundaryTypes<TypeTag, TTag::FiniteVolumeModel> { using type = Dumux::BoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; };
// TODO: bundle SolutionVector, JacobianMatrix
// in LinearAlgebra traits
//! The type of a solution for the whole grid at a fixed time TODO: move to LinearAlgebra traits
SET_TYPE_PROP(FiniteVolumeModel, SolutionVector, Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>);
template<class TypeTag>
struct SolutionVector<TypeTag, TTag::FiniteVolumeModel> { using type = Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>; };
//! Set the type of a global jacobian matrix from the solution types TODO: move to LinearAlgebra traits
SET_PROP(FiniteVolumeModel, JacobianMatrix)
......
......@@ -119,9 +119,12 @@ SET_PROP(StaggeredFreeFlowModel, BoundaryTypes)
};
//! The velocity output
SET_TYPE_PROP(StaggeredFreeFlowModel, VelocityOutput,
StaggeredFreeFlowVelocityOutput<GetPropType<TypeTag, Properties::GridVariables>,
GetPropType<TypeTag, Properties::SolutionVector>>);
template<class TypeTag>
struct VelocityOutput<TypeTag, TTag::StaggeredFreeFlowModel>
{
using type = StaggeredFreeFlowVelocityOutput<GetPropType<TypeTag, Properties::GridVariables>,
GetPropType<TypeTag, Properties::SolutionVector>>;
};
} // namespace Properties
} // namespace Dumux
......
......@@ -110,38 +110,45 @@ public:
};
//! Use the cell center element boundary types per default
SET_TYPE_PROP(StaggeredModel, ElementBoundaryTypes, CCElementBoundaryTypes);
template<class TypeTag>
struct ElementBoundaryTypes<TypeTag, TTag::StaggeredModel> { using type = CCElementBoundaryTypes; };
//! Set the BaseLocalResidual to StaggeredLocalResidual
SET_TYPE_PROP(StaggeredModel, BaseLocalResidual, StaggeredLocalResidual<TypeTag>);
template<class TypeTag>
struct BaseLocalResidual<TypeTag, TTag::StaggeredModel> { using type = StaggeredLocalResidual<TypeTag>; };
//! The cell center primary variables
SET_TYPE_PROP(StaggeredModel,
CellCenterPrimaryVariables,
Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
getPropValue<TypeTag, Properties::NumEqCellCenter>()>);
template<class TypeTag>
struct CellCenterPrimaryVariables<TypeTag, TTag::StaggeredModel>
{
using type = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
getPropValue<TypeTag, Properties::NumEqCellCenter>()>;
};
//! The face primary variables
SET_TYPE_PROP(StaggeredModel,
FacePrimaryVariables,
Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
getPropValue<TypeTag, Properties::NumEqFace>()>);
template<class TypeTag>
struct FacePrimaryVariables<TypeTag, TTag::StaggeredModel>
{
using type = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
getPropValue<TypeTag, Properties::NumEqFace>()>;
};
//! Boundary types at a single degree of freedom
SET_TYPE_PROP(StaggeredModel, BoundaryTypes, Dumux::BoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>);
template<class TypeTag>
struct BoundaryTypes<TypeTag, TTag::StaggeredModel> { using type = Dumux::BoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; };
// TODO: bundle SolutionVector, JacobianMatrix
// in LinearAlgebra traits
//! The type of a solution for the whole grid at a fixed time TODO: move to LinearAlgebra traits
SET_TYPE_PROP(StaggeredModel,
CellCenterSolutionVector,
Dune::BlockVector<GetPropType<TypeTag, Properties::CellCenterPrimaryVariables>>);
template<class TypeTag>
struct CellCenterSolutionVector<TypeTag, TTag::StaggeredModel>
{ using type = Dune::BlockVector<GetPropType<TypeTag, Properties::CellCenterPrimaryVariables>>; };
//! The type of a solution for the whole grid at a fixed time TODO: move to LinearAlgebra traits
SET_TYPE_PROP(StaggeredModel,
FaceSolutionVector,
Dune::BlockVector<GetPropType<TypeTag, Properties::FacePrimaryVariables>>);
template<class TypeTag>
struct FaceSolutionVector<TypeTag, TTag::StaggeredModel>
{ using type = Dune::BlockVector<GetPropType<TypeTag, Properties::FacePrimaryVariables>>; };
//! default property value for the solution vector only used for monolithic solver TODO: move to LinearAlgebra traits
SET_PROP(StaggeredModel, SolutionVector)
......
......@@ -127,7 +127,8 @@ public:
};
//! The specific I/O fields
SET_TYPE_PROP(KEpsilonNC, IOFields, FreeflowNCIOFields<KEpsilonIOFields, true/*turbulenceModel*/>);
template<class TypeTag>
struct IOFields<TypeTag, TTag::KEpsilonNC> { using type = FreeflowNCIOFields<KEpsilonIOFields, true/*turbulenceModel*/>; };
//////////////////////////////////////////////////////////////////////////
// Property values for non-isothermal multi-component k-epsilon model
......
......@@ -145,7 +145,8 @@ public:
};
//! The specific I/O fields
SET_TYPE_PROP(KOmegaNC, IOFields, FreeflowNCIOFields<KOmegaIOFields, true/*turbulenceModel*/>);
template<class TypeTag>
struct IOFields<TypeTag, TTag::KOmegaNC> { using type = FreeflowNCIOFields<KOmegaIOFields, true/*turbulenceModel*/>; };
//////////////////////////////////////////////////////////////////////////
// Property values for non-isothermal multi-component k-omega model
......
......@@ -132,7 +132,8 @@ public:
};
//! The specific I/O fields
SET_TYPE_PROP(LowReKEpsilonNC, IOFields, FreeflowNCIOFields<LowReKEpsilonIOFields, true/*turbulenceModel*/>);
template<class TypeTag>
struct IOFields<TypeTag, TTag::LowReKEpsilonNC> { using type = FreeflowNCIOFields<LowReKEpsilonIOFields, true/*turbulenceModel*/>; };
//////////////////////////////////////////////////////////////////////////
// Property values for non-isothermal multi-component low-Re k-epsilon model
......
......@@ -149,7 +149,8 @@ template<class TypeTag>
struct NormalizePressure<TypeTag, TTag::NavierStokesNC> { static constexpr bool value = true; }; //!< Normalize the pressure term in the momentum balance by default
//! The local residual
SET_TYPE_PROP(NavierStokesNC, LocalResidual, FreeflowNCResidual<TypeTag>);
template<class TypeTag>
struct LocalResidual<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCResidual<TypeTag>; };
//! Set the volume variables property
SET_PROP(NavierStokesNC, VolumeVariables)
......@@ -171,13 +172,16 @@ public:
};
//! The flux variables
SET_TYPE_PROP(NavierStokesNC, FluxVariables, FreeflowNCFluxVariables<TypeTag>);
template<class TypeTag>
struct FluxVariables<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCFluxVariables<TypeTag>; };
//! The flux variables cache class, by default the one for free flow
SET_TYPE_PROP(NavierStokesNC, FluxVariablesCache, FreeFlowFluxVariablesCache<TypeTag>);
template<class TypeTag>
struct FluxVariablesCache<TypeTag, TTag::NavierStokesNC> { using type = FreeFlowFluxVariablesCache<TypeTag>; };
//! The specific I/O fields
SET_TYPE_PROP(NavierStokesNC, IOFields, FreeflowNCIOFields<NavierStokesIOFields>);
template<class TypeTag>
struct IOFields<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCIOFields<NavierStokesIOFields>; };
/*!
* \brief The fluid state which is used by the volume variables to
......@@ -195,7 +199,8 @@ public:
};
//! Use Fick's law for molecular diffusion per default
SET_TYPE_PROP(NavierStokesNC, MolecularDiffusionType, FicksLaw<TypeTag>);
template<class TypeTag>
struct MolecularDiffusionType<TypeTag, TTag::NavierStokesNC> { using type = FicksLaw<TypeTag>; };
//////////////////////////////////////////////////////////////////////////
// Property values for non-isothermal multi-component free-flow model
......@@ -226,7 +231,8 @@ public:
};
//! Use Fourier's Law as default heat conduction type
SET_TYPE_PROP(NavierStokesNCNI, HeatConductionType, FouriersLaw<TypeTag>);
template<class TypeTag>
struct HeatConductionType<TypeTag, TTag::NavierStokesNCNI> { using type = FouriersLaw<TypeTag>; };
// \}
} // end namespace Properties
......
......@@ -143,7 +143,8 @@ public:
};
//! The specific I/O fields
SET_TYPE_PROP(OneEqNC, IOFields, FreeflowNCIOFields<OneEqIOFields, true/*turbulenceModel*/>);
template<class TypeTag>
struct IOFields<TypeTag, TTag::OneEqNC> { using type = FreeflowNCIOFields<OneEqIOFields, true/*turbulenceModel*/>; };
//////////////////////////////////////////////////////////////////////////
// Property values for non-isothermal multi-component one-equation model
......
......@@ -102,7 +102,8 @@ public:
};
//! The specific I/O fields
SET_TYPE_PROP(ZeroEqNC, IOFields, FreeflowNCIOFields<RANSIOFields, true/*turbulenceModel*/>);
template<class TypeTag>
struct IOFields<TypeTag, TTag::ZeroEqNC> { using type = FreeflowNCIOFields<RANSIOFields, true/*turbulenceModel*/>; };
//////////////////////////////////////////////////////////////////////////
// Property values for non-isothermal multi-component ZeroEq model
......
......@@ -176,7 +176,8 @@ public:
};
//! The local residual
SET_TYPE_PROP(NavierStokes, LocalResidual, NavierStokesResidual<TypeTag>);
template<class TypeTag>
struct LocalResidual<TypeTag, TTag::NavierStokes> { using type = NavierStokesResidual<TypeTag>; };
//! Set the volume variables property
SET_PROP(NavierStokes, VolumeVariables)
......@@ -197,13 +198,16 @@ public:
};
//! The flux variables
SET_TYPE_PROP(NavierStokes, FluxVariables, NavierStokesFluxVariables<TypeTag>);
template<class TypeTag>
struct FluxVariables<TypeTag, TTag::NavierStokes> { using type = NavierStokesFluxVariables<TypeTag>; };
//! The flux variables cache class, by default the one for free flow
SET_TYPE_PROP(NavierStokes, FluxVariablesCache, FreeFlowFluxVariablesCache<TypeTag>);
template<class TypeTag>
struct FluxVariablesCache<TypeTag, TTag::NavierStokes> { using type = FreeFlowFluxVariablesCache<TypeTag>; };
//! The specific I/O fields
SET_TYPE_PROP(NavierStokes, IOFields, NavierStokesIOFields);
template<class TypeTag>
struct IOFields<TypeTag, TTag::NavierStokes> { using type = NavierStokesIOFields; };
//////////////////////////////////////////////////////////////////
// Property values for non-isothermal Navier-Stokes model
......@@ -221,7 +225,8 @@ public:
};
//! The specific non-isothermal I/O fields
SET_TYPE_PROP(NavierStokesNI, IOFields, FreeflowNonIsothermalIOFields<NavierStokesIOFields>);
template<class TypeTag>
struct IOFields<TypeTag, TTag::NavierStokesNI> { using type = FreeflowNonIsothermalIOFields<NavierStokesIOFields>; };
// \}
}
......
......@@ -40,7 +40,8 @@ struct FreeFlow { using InheritsFrom = std::tuple<ModelProperties>; };
} // end namespace TTag
//! Use Fourier's Law as default heat conduction type
SET_TYPE_PROP(FreeFlow, HeatConductionType, FouriersLaw<TypeTag>);
template<class TypeTag>
struct HeatConductionType<TypeTag, TTag::FreeFlow> { using type = FouriersLaw<TypeTag>; };
} // namespace Properties
} // namespace Dumux
......
......@@ -87,7 +87,8 @@ public:
};
//! The specific I/O fields
SET_TYPE_PROP(RANS, IOFields, RANSIOFields);
template<class TypeTag>
struct IOFields<TypeTag, TTag::RANS> { using type = RANSIOFields; };
//////////////////////////////////////////////////////////////////
// Property values for non-isothermal Reynolds-averaged Navier-Stokes model
......@@ -112,10 +113,12 @@ public:
};
//! The specific non-isothermal I/O fields
SET_TYPE_PROP(RANSNI, IOFields, FreeflowNonIsothermalIOFields<RANSIOFields, true/*turbulenceModel*/>);
template<class TypeTag>
struct IOFields<TypeTag, TTag::RANSNI> { using type = FreeflowNonIsothermalIOFields<RANSIOFields, true/*turbulenceModel*/>; };
//! Use Fourier's Law as default heat conduction type
SET_TYPE_PROP(RANSNI, HeatConductionType, FouriersLaw<TypeTag>);
template<class TypeTag>
struct HeatConductionType<TypeTag, TTag::RANSNI> { using type = FouriersLaw<TypeTag>; };
// \}
} // end namespace Properties
......
......@@ -173,7 +173,8 @@ public:
};
//! The specific I/O fields
SET_TYPE_PROP(OneEq, IOFields, OneEqIOFields);
template<class TypeTag>
struct IOFields<TypeTag, TTag::OneEq> { using type = OneEqIOFields; };
//////////////////////////////////////////////////////////////////
// default property values for the non-isothermal Spalart-Allmaras model
......@@ -216,7 +217,8 @@ public:
};
//! The specific non-isothermal I/O fields
SET_TYPE_PROP(OneEqNI, IOFields, FreeflowNonIsothermalIOFields<OneEqIOFields, true/*turbulenceModel*/>);
template<class TypeTag>
struct IOFields<TypeTag, TTag::OneEqNI> { using type = FreeflowNonIsothermalIOFields<OneEqIOFields, true/*turbulenceModel*/>; };
// \}
}
......
......@@ -159,7 +159,8 @@ public:
};
//! The specific I/O fields
SET_TYPE_PROP(KEpsilon, IOFields, KEpsilonIOFields);
template<class TypeTag>
struct IOFields<TypeTag, TTag::KEpsilon> { using type = KEpsilonIOFields; };
//////////////////////////////////////////////////////////////////
// default property values for the non-isothermal k-epsilon model
......@@ -202,7 +203,8 @@ public:
};
//! The specific non-isothermal I/O fields
SET_TYPE_PROP(KEpsilonNI, IOFields, FreeflowNonIsothermalIOFields<KEpsilonIOFields, true/*turbulenceModel*/>);
template<class TypeTag>
struct IOFields<TypeTag, TTag::KEpsilonNI> { using type = FreeflowNonIsothermalIOFields<KEpsilonIOFields, true/*turbulenceModel*/>; };
// \}
}
......
......@@ -166,7 +166,8 @@ public:
};
//! The specific I/O fields
SET_TYPE_PROP(KOmega, IOFields, KOmegaIOFields);
template<class TypeTag>
struct IOFields<TypeTag, TTag::KOmega> { using type = KOmegaIOFields; };
///////////////////////////////////////////////////////////////////////////
// default property values for the non-isothermal k-omega single phase model
......@@ -210,7 +211,8 @@ public:
};
//! The specific non-isothermal I/O fields
SET_TYPE_PROP(KOmegaNI, IOFields, FreeflowNonIsothermalIOFields<KOmegaIOFields, true/*turbulenceModel*/>);
template<class TypeTag>
struct IOFields<TypeTag, TTag::KOmegaNI> { using type = FreeflowNonIsothermalIOFields<KOmegaIOFields, true/*turbulenceModel*/>; };
// \}
}
......
......@@ -175,7 +175,8 @@ public:
};
//! The specific I/O fields
SET_TYPE_PROP(LowReKEpsilon, IOFields, LowReKEpsilonIOFields);
template<class TypeTag>
struct IOFields<TypeTag, TTag::LowReKEpsilon> { using type = LowReKEpsilonIOFields; };
//////////////////////////////////////////////////////////////////
// default property values for the non-isothermal low-Reynolds k-epsilon model
......@@ -218,7 +219,8 @@ public:
};
//! The specific non-isothermal I/O fields
SET_TYPE_PROP(LowReKEpsilonNI, IOFields, FreeflowNonIsothermalIOFields<LowReKEpsilonIOFields, true/*turbulenceModel*/>);
template<class TypeTag>
struct IOFields<TypeTag, TTag::LowReKEpsilonNI> { using type = FreeflowNonIsothermalIOFields<LowReKEpsilonIOFields, true/*turbulenceModel*/>; };
// \}
}
......
......@@ -92,11 +92,16 @@ struct Elastic { using InheritsFrom = std::tuple<Geomechanics>; };
} // end namespace TTag
//! Use the local residual of the elastic model
SET_TYPE_PROP(Elastic, LocalResidual, ElasticLocalResidual<TypeTag>);
template<class TypeTag>
struct LocalResidual<TypeTag, TTag::Elastic> { using type = ElasticLocalResidual<TypeTag>; };
//! The model traits of the elastic model
SET_TYPE_PROP(Elastic, ModelTraits, ElasticModelTraits< GetPropType<TypeTag, Properties::GridView>::dimension,
GetPropType<TypeTag, Properties::SolidSystem>::numComponents >);
template<class TypeTag>
struct ModelTraits<TypeTag, TTag::Elastic>
{
using type = ElasticModelTraits< GetPropType<TypeTag, Properties::GridView>::dimension,
GetPropType<TypeTag, Properties::SolidSystem>::numComponents >;
};
//! Set the volume variables property
SET_PROP(Elastic, VolumeVariables)
......@@ -114,8 +119,12 @@ public:
};
//! By default, we use hooke's law for stress evaluations
SET_TYPE_PROP(Elastic, StressType, HookesLaw< GetPropType<TypeTag, Properties::Scalar>,
GetPropType<TypeTag, Properties::FVGridGeometry> >);
template<class TypeTag>
struct StressType<TypeTag, TTag::Elastic>
{
using type = HookesLaw< GetPropType<TypeTag, Properties::Scalar>,
GetPropType<TypeTag, Properties::FVGridGeometry> >;
};
} // namespace Properties
} // namespace Dumux
......
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