From ed97e627a1327498d5fd09828bb994bad8f913b3 Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Sun, 3 May 2020 18:01:03 +0200 Subject: [PATCH 1/6] [fvassembler] Export LocalResidual type --- dumux/assembly/fvassembler.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dumux/assembly/fvassembler.hh b/dumux/assembly/fvassembler.hh index c60d14fff8..7a8ba2f9a9 100644 --- a/dumux/assembly/fvassembler.hh +++ b/dumux/assembly/fvassembler.hh @@ -51,7 +51,6 @@ template class FVAssembler { using GridView = typename GetPropType::GridView; - using LocalResidual = GetPropType; using Element = typename GridView::template Codim<0>::Entity; using TimeLoop = TimeLoopBase>; using SolutionVector = GetPropType; @@ -69,6 +68,7 @@ public: using GridGeometry = GetPropType; using Problem = GetPropType; using GridVariables = GetPropType; + using LocalResidual = GetPropType; using ResidualType = SolutionVector; -- GitLab From f63f2579c3ba65735835d278242f1295c86c96ef Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Sun, 3 May 2020 18:01:34 +0200 Subject: [PATCH 2/6] [box] Do not use property system in boxlocalassembler --- dumux/assembly/boxlocalassembler.hh | 64 ++++++++++++----------------- 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/dumux/assembly/boxlocalassembler.hh b/dumux/assembly/boxlocalassembler.hh index 292ddf3be6..d37b5d99d5 100644 --- a/dumux/assembly/boxlocalassembler.hh +++ b/dumux/assembly/boxlocalassembler.hh @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -53,13 +52,10 @@ template class BoxLocalAssemblerBase : public FVLocalAssemblerBase { using ParentType = FVLocalAssemblerBase; - using JacobianMatrix = GetPropType; - using GridVariables = GetPropType; - using SolutionVector = GetPropType; - using ElementVolumeVariables = typename GetPropType::LocalView; - - enum { numEq = GetPropType::numEq() }; - + using JacobianMatrix = typename Assembler::JacobianMatrix; + using GridVariables = typename Assembler::GridVariables; + using SolutionVector = typename Assembler::ResidualType; + using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView; public: using ParentType::ParentType; @@ -226,12 +222,12 @@ public: const auto dirichletValues = this->problem().dirichlet(this->element(), scvI); // set the Dirichlet conditions in residual and jacobian - for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) + for (auto eqIdx = 0U; eqIdx < dirichletValues.size(); ++eqIdx) { if (bcTypes.isDirichlet(eqIdx)) { const auto pvIdx = bcTypes.eqToDirichletIndex(eqIdx); - assert(0 <= pvIdx && pvIdx < numEq); + assert(0 <= pvIdx && pvIdx < dirichletValues.size()); applyDirichlet(scvI, dirichletValues, eqIdx, pvIdx); } } @@ -265,18 +261,14 @@ class BoxLocalAssembler; using ParentType = BoxLocalAssemblerBase; - using Scalar = GetPropType; - using GridVariables = GetPropType; - using VolumeVariables = GetPropType; - using JacobianMatrix = GetPropType; - using LocalResidual = GetPropType; - using ElementResidualVector = typename LocalResidual::ElementResidualVector; - - enum { numEq = GetPropType::numEq() }; - enum { dim = GetPropType::GridView::dimension }; - static constexpr bool enableGridFluxVarsCache = getPropValue(); + using Scalar = typename Assembler::Scalar; + using GridVariables = typename Assembler::GridVariables; + using JacobianMatrix = typename Assembler::JacobianMatrix; + using ElementResidualVector = typename Assembler::LocalResidual::ElementResidualVector; + static constexpr auto numEq = GridVariables::VolumeVariables::PrimaryVariables::dimension; + static constexpr auto dim = Assembler::GridGeometry::GridView::dimension; public: using ParentType::ParentType; @@ -320,7 +312,7 @@ public: // dof index and corresponding actual pri vars const auto dofIdx = scv.dofIndex(); auto& curVolVars = this->getVolVarAccess(gridVariables.curGridVolVars(), curElemVolVars, scv); - const VolumeVariables origVolVars(curVolVars); + const auto origVolVars = curVolVars; // calculate derivatives w.r.t to the privars at the dof at hand for (int pvIdx = 0; pvIdx < numEq; pvIdx++) @@ -384,16 +376,14 @@ class BoxLocalAssembler; using ParentType = BoxLocalAssemblerBase; - using Scalar = GetPropType; - using GridVariables = GetPropType; - using VolumeVariables = GetPropType; - using JacobianMatrix = GetPropType; - using LocalResidual = GetPropType; - using ElementResidualVector = typename LocalResidual::ElementResidualVector; - enum { numEq = GetPropType::numEq() }; - enum { dim = GetPropType::GridView::dimension }; + using Scalar = typename Assembler::Scalar; + using GridVariables = typename Assembler::GridVariables; + using JacobianMatrix = typename Assembler::JacobianMatrix; + using ElementResidualVector = typename Assembler::LocalResidual::ElementResidualVector; + static constexpr auto numEq = GridVariables::VolumeVariables::PrimaryVariables::dimension; + static constexpr auto dim = Assembler::GridGeometry::GridView::dimension; public: using ParentType::ParentType; @@ -441,7 +431,7 @@ public: // dof index and corresponding actual pri vars const auto dofIdx = scv.dofIndex(); auto& curVolVars = this->getVolVarAccess(gridVariables.curGridVolVars(), curElemVolVars, scv); - const VolumeVariables origVolVars(curVolVars); + const auto origVolVars = curVolVars; // calculate derivatives w.r.t to the privars at the dof at hand for (int pvIdx = 0; pvIdx < numEq; pvIdx++) @@ -496,11 +486,10 @@ class BoxLocalAssembler; using ParentType = BoxLocalAssemblerBase; - using GridVariables = GetPropType; - using JacobianMatrix = GetPropType; - using LocalResidual = GetPropType; - using ElementResidualVector = typename LocalResidual::ElementResidualVector; + using GridVariables = typename Assembler::GridVariables; + using JacobianMatrix = typename Assembler::JacobianMatrix; + using ElementResidualVector = typename Assembler::LocalResidual::ElementResidualVector; public: using ParentType::ParentType; @@ -615,11 +604,10 @@ class BoxLocalAssembler; using ParentType = BoxLocalAssemblerBase; - using GridVariables = GetPropType; - using JacobianMatrix = GetPropType; - using LocalResidual = GetPropType; - using ElementResidualVector = typename LocalResidual::ElementResidualVector; + using GridVariables = typename Assembler::GridVariables; + using JacobianMatrix = typename Assembler::JacobianMatrix; + using ElementResidualVector = typename Assembler::LocalResidual::ElementResidualVector; public: using ParentType::ParentType; -- GitLab From 146ba256b474041c077d0b18bc278977aee6f372 Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Sun, 3 May 2020 18:16:52 +0200 Subject: [PATCH 3/6] [cc] Do not use property system in cclocalassembler --- dumux/assembly/cclocalassembler.hh | 79 +++++++++++++++++------------- 1 file changed, 45 insertions(+), 34 deletions(-) diff --git a/dumux/assembly/cclocalassembler.hh b/dumux/assembly/cclocalassembler.hh index 004bb7e8f0..4c7b715fa1 100644 --- a/dumux/assembly/cclocalassembler.hh +++ b/dumux/assembly/cclocalassembler.hh @@ -25,12 +25,12 @@ #ifndef DUMUX_CC_LOCAL_ASSEMBLER_HH #define DUMUX_CC_LOCAL_ASSEMBLER_HH +#include #include #include // for GhostEntity #include #include -#include #include #include #include @@ -56,12 +56,10 @@ template class CCLocalAssemblerBase : public FVLocalAssemblerBase { using ParentType = FVLocalAssemblerBase; - using GridView = typename GetPropType::GridView; - using JacobianMatrix = GetPropType; - using GridVariables = GetPropType; - using SolutionVector = GetPropType; - using ElementVolumeVariables = typename GetPropType::LocalView; - using NumEqVector = GetPropType; + using JacobianMatrix = typename Assembler::JacobianMatrix; + using GridVariables = typename Assembler::GridVariables; + using SolutionVector = typename Assembler::ResidualType; + using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView; static_assert(!Assembler::Problem::enableInternalDirichletConstraints(), "Internal Dirichlet constraints are currently not implemented for cc-methods!"); @@ -134,20 +132,24 @@ class CCLocalAssembler; using ParentType = CCLocalAssemblerBase; - using Scalar = GetPropType; - using NumEqVector = GetPropType; - using Element = typename GetPropType::GridView::template Codim<0>::Entity; - using GridGeometry = GetPropType; - using FVElementGeometry = typename GridGeometry::LocalView; - using GridVariables = GetPropType; - using JacobianMatrix = GetPropType; - - enum { numEq = GetPropType::numEq() }; - enum { dim = GetPropType::GridView::dimension }; - - using FluxStencil = Dumux::FluxStencil; + + using Scalar = typename Assembler::Scalar; + using JacobianMatrix = typename Assembler::JacobianMatrix; + using GridVariables = typename Assembler::GridVariables; + using SolutionVector = typename Assembler::ResidualType; + using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView; + using GridGeometry = typename Assembler::GridGeometry; + using Element = typename GridGeometry::GridView::template Codim<0>::Entity; + + static constexpr auto numEq = GridVariables::VolumeVariables::PrimaryVariables::dimension; + static constexpr auto dim = GridGeometry::GridView::dimension; + + // TODO Deduce from Assembler::Problem + using NumEqVector = Dune::FieldVector; + + using FluxStencil = Dumux::FluxStencil; static constexpr int maxElementStencilSize = GridGeometry::maxElementStencilSize; - static constexpr bool enableGridFluxVarsCache = getPropValue(); + static constexpr bool enableGridFluxVarsCache = GridVariables::GridFluxVariablesCache::cachingEnabled; public: @@ -320,13 +322,17 @@ class CCLocalAssembler; using ParentType = CCLocalAssemblerBase; - using Scalar = GetPropType; - using NumEqVector = GetPropType; - using Element = typename GetPropType::GridView::template Codim<0>::Entity; - using GridVariables = GetPropType; - using JacobianMatrix = GetPropType; - enum { numEq = GetPropType::numEq() }; + using Scalar = typename Assembler::Scalar; + using JacobianMatrix = typename Assembler::JacobianMatrix; + using GridVariables = typename Assembler::GridVariables; + using GridGeometry = typename Assembler::GridGeometry; + using Element = typename GridGeometry::GridView::template Codim<0>::Entity; + + static constexpr auto numEq = GridVariables::VolumeVariables::PrimaryVariables::dimension; + + // TODO Deduce from Assembler::Problem + using NumEqVector = Dune::FieldVector; public: using ParentType::ParentType; @@ -432,11 +438,14 @@ class CCLocalAssembler; using ParentType = CCLocalAssemblerBase; - using NumEqVector = GetPropType; - using JacobianMatrix = GetPropType; - using GridVariables = GetPropType; - enum { numEq = GetPropType::numEq() }; + using JacobianMatrix = typename Assembler::JacobianMatrix; + using GridVariables = typename Assembler::GridVariables; + + static constexpr auto numEq = GridVariables::VolumeVariables::PrimaryVariables::dimension; + + // TODO Deduce from Assembler::Problem + using NumEqVector = Dune::FieldVector; public: using ParentType::ParentType; @@ -524,12 +533,14 @@ class CCLocalAssembler; using ParentType = CCLocalAssemblerBase; - using NumEqVector = GetPropType; - using JacobianMatrix = GetPropType; - using GridVariables = GetPropType; - enum { numEq = GetPropType::numEq() }; + using JacobianMatrix = typename Assembler::JacobianMatrix; + using GridVariables = typename Assembler::GridVariables; + + static constexpr auto numEq = GridVariables::VolumeVariables::PrimaryVariables::dimension; + // TODO Deduce from Assembler::Problem + using NumEqVector = Dune::FieldVector; public: using ParentType::ParentType; -- GitLab From ee39ce4ca39c2f8dd080c38375aebed9dd58017b Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Sun, 3 May 2020 18:43:51 +0200 Subject: [PATCH 4/6] [localresidual] Export element boundary types --- dumux/assembly/boxlocalresidual.hh | 2 +- dumux/assembly/cclocalresidual.hh | 2 +- dumux/assembly/fvlocalresidual.hh | 3 ++- dumux/assembly/staggeredlocalresidual.hh | 2 +- dumux/freeflow/navierstokes/staggered/localresidual.hh | 2 +- dumux/multidomain/facet/box/localresidual.hh | 2 +- dumux/porousmediumflow/mpnc/localresidual.hh | 3 +-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dumux/assembly/boxlocalresidual.hh b/dumux/assembly/boxlocalresidual.hh index ca6410ddb2..9dcacf6460 100644 --- a/dumux/assembly/boxlocalresidual.hh +++ b/dumux/assembly/boxlocalresidual.hh @@ -47,7 +47,6 @@ class BoxLocalResidual : public FVLocalResidual using Problem = GetPropType; using GridView = typename GetPropType::GridView; using Element = typename GridView::template Codim<0>::Entity; - using ElementBoundaryTypes = GetPropType; using FVElementGeometry = typename GetPropType::LocalView; using ElementVolumeVariables = typename GetPropType::LocalView; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; @@ -56,6 +55,7 @@ class BoxLocalResidual : public FVLocalResidual public: using ElementResidualVector = typename ParentType::ElementResidualVector; + using ElementBoundaryTypes = GetPropType; using ParentType::ParentType; //! evaluate flux residuals for one sub control volume face and add to residual diff --git a/dumux/assembly/cclocalresidual.hh b/dumux/assembly/cclocalresidual.hh index 9f1c48fc76..790d65bd56 100644 --- a/dumux/assembly/cclocalresidual.hh +++ b/dumux/assembly/cclocalresidual.hh @@ -43,7 +43,6 @@ class CCLocalResidual : public FVLocalResidual using Problem = GetPropType; using Element = typename GetPropType::GridView::template Codim<0>::Entity; using NumEqVector = GetPropType; - using ElementBoundaryTypes = GetPropType; using ElementVolumeVariables = typename GetPropType::LocalView; using ElementFluxVariablesCache = typename GetPropType::LocalView; using FVElementGeometry = typename GetPropType::LocalView; @@ -51,6 +50,7 @@ class CCLocalResidual : public FVLocalResidual public: using ElementResidualVector = typename ParentType::ElementResidualVector; + using ElementBoundaryTypes = GetPropType; using ParentType::ParentType; //! evaluate the flux residual for a sub control volume face and add to residual diff --git a/dumux/assembly/fvlocalresidual.hh b/dumux/assembly/fvlocalresidual.hh index 3c105ea8b6..21530e32a4 100644 --- a/dumux/assembly/fvlocalresidual.hh +++ b/dumux/assembly/fvlocalresidual.hh @@ -54,7 +54,6 @@ class FVLocalResidual using SubControlVolume = typename FVElementGeometry::SubControlVolume; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using NumEqVector = GetPropType; - using ElementBoundaryTypes = GetPropType; using ElementFluxVariablesCache = typename GetPropType::LocalView; using VolumeVariables = GetPropType; using ElementVolumeVariables = typename GetPropType::LocalView; @@ -158,6 +157,7 @@ public: return residual; } + template ElementResidualVector evalFluxAndSource(const Element& element, const FVElementGeometry& fvGeometry, const ElementVolumeVariables& elemVolVars, @@ -358,6 +358,7 @@ public: * \param elemFluxVarsCache The flux variable caches for the element stencil * \param scvf The sub control volume face the flux term is integrated over */ + template void evalFlux(ElementResidualVector& residual, const Problem& problem, const Element& element, diff --git a/dumux/assembly/staggeredlocalresidual.hh b/dumux/assembly/staggeredlocalresidual.hh index 15ef2a4a9a..ea67a2dae9 100644 --- a/dumux/assembly/staggeredlocalresidual.hh +++ b/dumux/assembly/staggeredlocalresidual.hh @@ -44,7 +44,6 @@ class StaggeredLocalResidual using Implementation = GetPropType; using Problem = GetPropType; using Element = typename GridView::template Codim<0>::Entity; - using ElementBoundaryTypes = GetPropType; using ElementVolumeVariables = typename GetPropType::LocalView; using ElementFluxVariablesCache = typename GetPropType::LocalView; using FVElementGeometry = typename GetPropType::LocalView; @@ -62,6 +61,7 @@ public: using CellCenterResidualValue = GetPropType; using FaceResidualValue = GetPropType; using ElementResidualVector = CellCenterResidualValue; + using ElementBoundaryTypes = GetPropType; //! the constructor StaggeredLocalResidual(const Problem* problem, diff --git a/dumux/freeflow/navierstokes/staggered/localresidual.hh b/dumux/freeflow/navierstokes/staggered/localresidual.hh index 7a57d81386..18f2dc8119 100644 --- a/dumux/freeflow/navierstokes/staggered/localresidual.hh +++ b/dumux/freeflow/navierstokes/staggered/localresidual.hh @@ -68,7 +68,6 @@ class NavierStokesResidualImpl using Element = typename GridView::template Codim<0>::Entity; using SubControlVolume = typename FVElementGeometry::SubControlVolume; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; - using ElementBoundaryTypes = GetPropType; using CellCenterPrimaryVariables = GetPropType; using FacePrimaryVariables = GetPropType; using FluxVariables = GetPropType; @@ -80,6 +79,7 @@ class NavierStokesResidualImpl using ModelTraits = GetPropType; public: + using ElementBoundaryTypes = typename ParentType::ElementBoundaryTypes; using EnergyLocalResidual = FreeFlowEnergyLocalResidual 1)>; // account for the offset of the cell center privars within the PrimaryVariables container diff --git a/dumux/multidomain/facet/box/localresidual.hh b/dumux/multidomain/facet/box/localresidual.hh index f4d548c369..55ef0b47fe 100644 --- a/dumux/multidomain/facet/box/localresidual.hh +++ b/dumux/multidomain/facet/box/localresidual.hh @@ -45,7 +45,6 @@ class BoxFacetCouplingLocalResidual : public FVLocalResidual using Problem = GetPropType; using GridView = typename GetPropType::GridView; using Element = typename GridView::template Codim<0>::Entity; - using ElementBoundaryTypes = GetPropType; using FVElementGeometry = typename GetPropType::LocalView; using ElementVolumeVariables = typename GetPropType::LocalView; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; @@ -54,6 +53,7 @@ class BoxFacetCouplingLocalResidual : public FVLocalResidual public: using ElementResidualVector = typename ParentType::ElementResidualVector; + using ElementBoundaryTypes = GetPropType; using ParentType::ParentType; //! evaluate flux residuals for one sub control volume face and add to residual diff --git a/dumux/porousmediumflow/mpnc/localresidual.hh b/dumux/porousmediumflow/mpnc/localresidual.hh index 3ae3b7f5e9..fa400b6081 100644 --- a/dumux/porousmediumflow/mpnc/localresidual.hh +++ b/dumux/porousmediumflow/mpnc/localresidual.hh @@ -47,7 +47,6 @@ class MPNCLocalResidual : public CompositionalLocalResidual using ParentType = CompositionalLocalResidual; using Element = typename GetPropType::GridView::template Codim<0>::Entity; using FVElementGeometry = typename GetPropType::LocalView; - using ElementBoundaryTypes = GetPropType; using ElementFluxVariablesCache = typename GetPropType::LocalView; using ElementVolumeVariables = typename GetPropType::LocalView; using ModelTraits = GetPropType; @@ -58,7 +57,7 @@ class MPNCLocalResidual : public CompositionalLocalResidual public: using ParentType::ParentType; - + using typename ParentType::ElementBoundaryTypes; using typename ParentType::ElementResidualVector; ElementResidualVector evalFluxAndSource(const Element& element, -- GitLab From 794993c83e1da04a6fb6d27e7f9ceac9d8d18a45 Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Sun, 3 May 2020 18:50:59 +0200 Subject: [PATCH 5/6] [fvlovalassembler] Do not use properties --- dumux/assembly/fvlocalassemblerbase.hh | 37 +++++++++++++------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/dumux/assembly/fvlocalassemblerbase.hh b/dumux/assembly/fvlocalassemblerbase.hh index 7d894ca276..be057fafac 100644 --- a/dumux/assembly/fvlocalassemblerbase.hh +++ b/dumux/assembly/fvlocalassemblerbase.hh @@ -29,7 +29,6 @@ #include #include -#include #include #include @@ -46,25 +45,25 @@ namespace Dumux { template class FVLocalAssemblerBase { - using Problem = GetPropType; - using GridView = typename GetPropType::GridView; - using Scalar = GetPropType; - using JacobianMatrix = GetPropType; - using GridVariables = GetPropType; + using Problem = typename Assembler::Problem; + using Scalar = typename Assembler::Scalar; + using GridVariables = typename Assembler::GridVariables; using SolutionVector = typename Assembler::ResidualType; - using ElementBoundaryTypes = GetPropType; - using FVElementGeometry = typename GetPropType::LocalView; - using SubControlVolume = typename FVElementGeometry::SubControlVolume; - using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; - using GridVolumeVariables = GetPropType; - using ElementVolumeVariables = typename GetPropType::LocalView; - using VolumeVariables = GetPropType; - using ElementFluxVariablesCache = typename GetPropType::LocalView; - using Element = typename GridView::template Codim<0>::Entity; - static constexpr auto numEq = GetPropType::numEq(); + using GridGeometry = typename Assembler::GridGeometry; + using FVElementGeometry = typename GridGeometry::LocalView; + using SubControlVolume = typename GridGeometry::SubControlVolume; + using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace; + using GridVolumeVariables = typename GridVariables::GridVolumeVariables; + using ElementVolumeVariables = typename GridVolumeVariables::LocalView; + using VolumeVariables = typename GridVariables::VolumeVariables; + using GridFluxVariablesCache = typename GridVariables::GridFluxVariablesCache; + using ElementFluxVariablesCache = typename GridFluxVariablesCache::LocalView; + using Element = typename GridGeometry::GridView::template Codim<0>::Entity; + using ElementBoundaryTypes = typename Assembler::LocalResidual::ElementBoundaryTypes; + static constexpr auto numEq = VolumeVariables::PrimaryVariables::dimension; public: - using LocalResidual = GetPropType; + using LocalResidual = typename Assembler::LocalResidual; using ElementResidualVector = typename LocalResidual::ElementResidualVector; /*! @@ -310,11 +309,11 @@ protected: const Implementation &asImp_() const { return *static_cast(this); } - template(), int> = 0> + template = 0> VolumeVariables& getVolVarAccess(GridVolumeVariables& gridVolVars, ElementVolumeVariables& elemVolVars, const SubControlVolume& scv) { return elemVolVars[scv]; } - template(), int> = 0> + template = 0> VolumeVariables& getVolVarAccess(GridVolumeVariables& gridVolVars, ElementVolumeVariables& elemVolVars, const SubControlVolume& scv) { return gridVolVars.volVars(scv); } -- GitLab From 1c6e413df2752ebfddaa3a5747d3cebacb8c428c Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Sun, 3 May 2020 19:11:53 +0200 Subject: [PATCH 6/6] [fvlocalassembler] Remove TypeTag template parameter --- dumux/assembly/boxlocalassembler.hh | 58 +++++++++++++------------- dumux/assembly/cclocalassembler.hh | 58 +++++++++++++------------- dumux/assembly/fvassembler.hh | 4 +- dumux/assembly/fvlocalassemblerbase.hh | 3 +- 4 files changed, 59 insertions(+), 64 deletions(-) diff --git a/dumux/assembly/boxlocalassembler.hh b/dumux/assembly/boxlocalassembler.hh index d37b5d99d5..7b183bc63a 100644 --- a/dumux/assembly/boxlocalassembler.hh +++ b/dumux/assembly/boxlocalassembler.hh @@ -43,15 +43,14 @@ namespace Dumux { * \ingroup Assembly * \ingroup BoxDiscretization * \brief A base class for all local box assemblers - * \tparam TypeTag The TypeTag * \tparam Assembler The assembler type * \tparam Implementation The actual implementation * \tparam implicit Specifies whether the time discretization is implicit or not not (i.e. explicit) */ -template -class BoxLocalAssemblerBase : public FVLocalAssemblerBase +template +class BoxLocalAssemblerBase : public FVLocalAssemblerBase { - using ParentType = FVLocalAssemblerBase; + using ParentType = FVLocalAssemblerBase; using JacobianMatrix = typename Assembler::JacobianMatrix; using GridVariables = typename Assembler::GridVariables; using SolutionVector = typename Assembler::ResidualType; @@ -242,11 +241,10 @@ public: * \ingroup Assembly * \ingroup BoxDiscretization * \brief An assembler for Jacobian and residual contribution per element (box methods) - * \tparam TypeTag The TypeTag * \tparam diffMethod The differentiation method to residual compute derivatives * \tparam implicit Specifies whether the time discretization is implicit or not not (i.e. explicit) */ -template +template class BoxLocalAssembler; /*! @@ -254,13 +252,13 @@ class BoxLocalAssembler; * \ingroup BoxDiscretization * \brief Box local assembler using numeric differentiation and implicit time discretization */ -template -class BoxLocalAssembler -: public BoxLocalAssemblerBase, true> +template +class BoxLocalAssembler +: public BoxLocalAssemblerBase, true> { - using ThisType = BoxLocalAssembler; - using ParentType = BoxLocalAssemblerBase; + using ThisType = BoxLocalAssembler; + using ParentType = BoxLocalAssemblerBase; using Scalar = typename Assembler::Scalar; using GridVariables = typename Assembler::GridVariables; @@ -369,13 +367,13 @@ public: * \ingroup BoxDiscretization * \brief Box local assembler using numeric differentiation and explicit time discretization */ -template -class BoxLocalAssembler -: public BoxLocalAssemblerBase, false> +template +class BoxLocalAssembler +: public BoxLocalAssemblerBase, false> { - using ThisType = BoxLocalAssembler; - using ParentType = BoxLocalAssemblerBase; + using ThisType = BoxLocalAssembler; + using ParentType = BoxLocalAssemblerBase; using Scalar = typename Assembler::Scalar; using GridVariables = typename Assembler::GridVariables; @@ -479,13 +477,13 @@ public: * \ingroup BoxDiscretization * \brief Box local assembler using analytic differentiation and implicit time discretization */ -template -class BoxLocalAssembler -: public BoxLocalAssemblerBase, true> +template +class BoxLocalAssembler +: public BoxLocalAssemblerBase, true> { - using ThisType = BoxLocalAssembler; - using ParentType = BoxLocalAssemblerBase; + using ThisType = BoxLocalAssembler; + using ParentType = BoxLocalAssemblerBase; using GridVariables = typename Assembler::GridVariables; using JacobianMatrix = typename Assembler::JacobianMatrix; @@ -597,13 +595,13 @@ public: * \ingroup BoxDiscretization * \brief Box local assembler using analytic differentiation and explicit time discretization */ -template -class BoxLocalAssembler -: public BoxLocalAssemblerBase, false> +template +class BoxLocalAssembler +: public BoxLocalAssemblerBase, false> { - using ThisType = BoxLocalAssembler; - using ParentType = BoxLocalAssemblerBase; + using ThisType = BoxLocalAssembler; + using ParentType = BoxLocalAssemblerBase; using GridVariables = typename Assembler::GridVariables; using JacobianMatrix = typename Assembler::JacobianMatrix; diff --git a/dumux/assembly/cclocalassembler.hh b/dumux/assembly/cclocalassembler.hh index 4c7b715fa1..d8cf8deca8 100644 --- a/dumux/assembly/cclocalassembler.hh +++ b/dumux/assembly/cclocalassembler.hh @@ -47,15 +47,14 @@ namespace Dumux { * \ingroup Assembly * \ingroup CCDiscretization * \brief A base class for all local cell-centered assemblers - * \tparam TypeTag The TypeTag * \tparam Assembler The assembler type * \tparam Implementation The actual implementation * \tparam implicit Specifies whether the time discretization is implicit or not (i.e. explicit) */ -template -class CCLocalAssemblerBase : public FVLocalAssemblerBase +template +class CCLocalAssemblerBase : public FVLocalAssemblerBase { - using ParentType = FVLocalAssemblerBase; + using ParentType = FVLocalAssemblerBase; using JacobianMatrix = typename Assembler::JacobianMatrix; using GridVariables = typename Assembler::GridVariables; using SolutionVector = typename Assembler::ResidualType; @@ -113,11 +112,10 @@ public: * \ingroup Assembly * \ingroup CCDiscretization * \brief An assembler for Jacobian and residual contribution per element (cell-centered methods) - * \tparam TypeTag The TypeTag * \tparam diffMethod The differentiation method to residual compute derivatives * \tparam implicit Specifies whether the time discretization is implicit or not not (i.e. explicit) */ -template +template class CCLocalAssembler; /*! @@ -125,13 +123,13 @@ class CCLocalAssembler; * \ingroup CCDiscretization * \brief Cell-centered scheme local assembler using numeric differentiation and implicit time discretization */ -template -class CCLocalAssembler -: public CCLocalAssemblerBase, true > +template +class CCLocalAssembler +: public CCLocalAssemblerBase, true > { - using ThisType = CCLocalAssembler; - using ParentType = CCLocalAssemblerBase; + using ThisType = CCLocalAssembler; + using ParentType = CCLocalAssemblerBase; using Scalar = typename Assembler::Scalar; using JacobianMatrix = typename Assembler::JacobianMatrix; @@ -315,13 +313,13 @@ public: * \ingroup CCDiscretization * \brief Cell-centered scheme local assembler using numeric differentiation and explicit time discretization */ -template -class CCLocalAssembler -: public CCLocalAssemblerBase, false> +template +class CCLocalAssembler +: public CCLocalAssemblerBase, false> { - using ThisType = CCLocalAssembler; - using ParentType = CCLocalAssemblerBase; + using ThisType = CCLocalAssembler; + using ParentType = CCLocalAssemblerBase; using Scalar = typename Assembler::Scalar; using JacobianMatrix = typename Assembler::JacobianMatrix; @@ -431,13 +429,13 @@ public: * \ingroup CCDiscretization * \brief Cell-centered scheme local assembler using analytic (hand-coded) differentiation and implicit time discretization */ -template -class CCLocalAssembler -: public CCLocalAssemblerBase, true> +template +class CCLocalAssembler +: public CCLocalAssemblerBase, true> { - using ThisType = CCLocalAssembler; - using ParentType = CCLocalAssemblerBase; + using ThisType = CCLocalAssembler; + using ParentType = CCLocalAssemblerBase; using JacobianMatrix = typename Assembler::JacobianMatrix; using GridVariables = typename Assembler::GridVariables; @@ -526,13 +524,13 @@ public: * \ingroup CCDiscretization * \brief Cell-centered scheme local assembler using analytic (hand-coded) differentiation and explicit time discretization */ -template -class CCLocalAssembler -: public CCLocalAssemblerBase, false> +template +class CCLocalAssembler +: public CCLocalAssemblerBase, false> { - using ThisType = CCLocalAssembler; - using ParentType = CCLocalAssemblerBase; + using ThisType = CCLocalAssembler; + using ParentType = CCLocalAssemblerBase; using JacobianMatrix = typename Assembler::JacobianMatrix; using GridVariables = typename Assembler::GridVariables; diff --git a/dumux/assembly/fvassembler.hh b/dumux/assembly/fvassembler.hh index 7a8ba2f9a9..411ce12cd2 100644 --- a/dumux/assembly/fvassembler.hh +++ b/dumux/assembly/fvassembler.hh @@ -59,8 +59,8 @@ class FVAssembler static constexpr bool isBox = discMethod == DiscretizationMethod::box; using ThisType = FVAssembler; - using LocalAssembler = std::conditional_t, - CCLocalAssembler>; + using LocalAssembler = std::conditional_t, + CCLocalAssembler>; public: using Scalar = GetPropType; diff --git a/dumux/assembly/fvlocalassemblerbase.hh b/dumux/assembly/fvlocalassemblerbase.hh index be057fafac..dd680f5b36 100644 --- a/dumux/assembly/fvlocalassemblerbase.hh +++ b/dumux/assembly/fvlocalassemblerbase.hh @@ -37,12 +37,11 @@ namespace Dumux { /*! * \ingroup Assembly * \brief A base class for all local assemblers - * \tparam TypeTag The TypeTag * \tparam Assembler The assembler type * \tparam Implementation The assembler implementation * \tparam useImplicitAssembly Specifies whether the time discretization is implicit or not not (i.e. explicit) */ -template +template class FVLocalAssemblerBase { using Problem = typename Assembler::Problem; -- GitLab