From d669f69dcbdd632e11060e3de8c9087bcb5209b7 Mon Sep 17 00:00:00 2001 From: Sina Ackermann <sina.ackermann@iws.uni-stuttgart.de> Date: Wed, 31 Jan 2018 12:09:41 +0100 Subject: [PATCH] [test][1p] Use NumEqVector for sources and neumann --- .../1p/implicit/1pniconvectionproblem.hh | 6 +++--- test/porousmediumflow/1p/implicit/tubesproblem.hh | 5 +++-- .../1pnc/implicit/1p2cniconductionproblem.hh | 10 +++++----- .../1pnc/implicit/1p2cniconvectionproblem.hh | 10 +++++----- test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh | 10 +++++----- .../1pncmin/implicit/thermochemproblem.hh | 10 +++++----- 6 files changed, 26 insertions(+), 25 deletions(-) diff --git a/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh b/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh index 8356ddee48..898a40d796 100644 --- a/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh +++ b/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh @@ -125,7 +125,7 @@ class OnePNIConvectionProblem : public PorousMediumFlowProblem<TypeTag> energyEqIdx = Indices::energyEqIdx }; - using NeumannFluxes = typename GET_PROP_TYPE(TypeTag, NumEqVector); + using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); using Element = typename GridView::template Codim<0>::Entity; using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); @@ -269,12 +269,12 @@ public: * The \a values store the mass flux of each phase normal to the boundary. * Negative values indicate an inflow. */ - NeumannFluxes neumann(const Element& element, + NumEqVector neumann(const Element& element, const FVElementGeometry& fvGeometry, const ElementVolumeVariables& elemVolvars, const SubControlVolumeFace& scvf) const { - NeumannFluxes values(0.0); + NumEqVector values(0.0); const auto globalPos = scvf.ipGlobal(); const auto& volVars = elemVolvars[scvf.insideScvIdx()]; diff --git a/test/porousmediumflow/1p/implicit/tubesproblem.hh b/test/porousmediumflow/1p/implicit/tubesproblem.hh index 85c835e471..919ddc44f9 100644 --- a/test/porousmediumflow/1p/implicit/tubesproblem.hh +++ b/test/porousmediumflow/1p/implicit/tubesproblem.hh @@ -93,6 +93,7 @@ class TubesTestProblem : public PorousMediumFlowProblem<TypeTag> using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); using Element = typename GridView::template Codim<0>::Entity; using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); @@ -210,12 +211,12 @@ public: * that the conserved quantity is created, negative ones mean that it vanishes. * E.g. for the mass balance that would be a mass rate in \f$ [ kg / (m^3 \cdot s)] \f$. */ - PrimaryVariables source(const Element &element, + NumEqVector source(const Element &element, const FVElementGeometry& fvGeometry, const ElementVolumeVariables& elemVolVars, const SubControlVolume &scv) const { - PrimaryVariables source(0.0); + NumEqVector source(0.0); const auto& globalPos = scv.center(); const auto& volVars = elemVolVars[scv]; diff --git a/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh index 6a3cc069c5..550a5bcf9e 100644 --- a/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh +++ b/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh @@ -107,7 +107,7 @@ class OnePTwoCNIConductionProblem : public PorousMediumFlowProblem<TypeTag> using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); + using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); using Element = typename GridView::template Codim<0>::Entity; using ThermalConductivityModel = typename GET_PROP_TYPE(TypeTag, ThermalConductivityModel); @@ -259,8 +259,8 @@ public: * \brief Evaluate the boundary conditions for a neumann * boundary segment. */ - ResidualVector neumannAtPos(const GlobalPosition &globalPos) const - { return ResidualVector(0.0); } + NumEqVector neumannAtPos(const GlobalPosition &globalPos) const + { return NumEqVector(0.0); } // \} @@ -280,8 +280,8 @@ public: * * The units must be according to either using mole or mass fractions. (mole/(m^3*s) or kg/(m^3*s)) */ - PrimaryVariables sourceAtPos(const GlobalPosition &globalPos) const - { return PrimaryVariables(0.0); } + NumEqVector sourceAtPos(const GlobalPosition &globalPos) const + { return NumEqVector(0.0); } /*! * \brief Evaluate the initial value for a control volume. diff --git a/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh index 475fcec9f5..4b9e76c1f4 100644 --- a/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh +++ b/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh @@ -108,7 +108,7 @@ class OnePTwoCNIConvectionProblem : public PorousMediumFlowProblem<TypeTag> using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView; - using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); + using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); @@ -277,12 +277,12 @@ public: * in normal direction of each phase. Negative values mean influx. * E.g. for the mass balance that would the mass flux in \f$ [ kg / (m^2 \cdot s)] \f$. */ - ResidualVector neumann(const Element& element, + NumEqVector neumann(const Element& element, const FVElementGeometry& fvGeometry, const ElementVolumeVariables& elemVolVars, const SubControlVolumeFace& scvf) const { - ResidualVector flux(0.0); + NumEqVector flux(0.0); const auto& globalPos = scvf.ipGlobal(); const auto& scv = fvGeometry.scv(scvf.insideScvIdx()); @@ -315,8 +315,8 @@ public: * * The units must be according to either using mole or mass fractions. (mole/(m^3*s) or kg/(m^3*s)) */ - PrimaryVariables sourceAtPos(const GlobalPosition &globalPos) const - { return PrimaryVariables(0.0); } + NumEqVector sourceAtPos(const GlobalPosition &globalPos) const + { return NumEqVector(0.0); } /*! * \brief Evaluate the initial value for a control volume. diff --git a/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh index 555f3e2419..d7349db4d1 100644 --- a/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh +++ b/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh @@ -109,7 +109,7 @@ class OnePTwoCTestProblem : public PorousMediumFlowProblem<TypeTag> using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry)::LocalView; - using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); + using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); @@ -225,7 +225,7 @@ public: * in normal direction of each phase. Negative values mean influx. * E.g. for the mass balance that would the mass flux in \f$ [ kg / (m^2 \cdot s)] \f$. */ - ResidualVector neumann(const Element& element, + NumEqVector neumann(const Element& element, const FVElementGeometry& fvGeometry, const ElementVolumeVariables& elemVolVars, const SubControlVolumeFace& scvf) const @@ -233,7 +233,7 @@ public: // set a fixed pressure on the right side of the domain const Scalar dirichletPressure = 1e5; - ResidualVector flux(0.0); + NumEqVector flux(0.0); const auto& ipGlobal = scvf.ipGlobal(); const auto& volVars = elemVolVars[scvf.insideScvIdx()]; @@ -317,8 +317,8 @@ public: * * The units must be according to either using mole or mass fractions. (mole/(m^3*s) or kg/(m^3*s)) */ - PrimaryVariables sourceAtPos(const GlobalPosition &globalPos) const - { return PrimaryVariables(0.0); } + NumEqVector sourceAtPos(const GlobalPosition &globalPos) const + { return NumEqVector(0.0); } /*! * \brief Evaluate the initial value for a control volume. diff --git a/test/porousmediumflow/1pncmin/implicit/thermochemproblem.hh b/test/porousmediumflow/1pncmin/implicit/thermochemproblem.hh index c72e474f65..7bfbe78380 100644 --- a/test/porousmediumflow/1pncmin/implicit/thermochemproblem.hh +++ b/test/porousmediumflow/1pncmin/implicit/thermochemproblem.hh @@ -97,7 +97,7 @@ class ThermoChemProblem : public PorousMediumFlowProblem<TypeTag> using SubControlVolume = typename FVElementGeometry::SubControlVolume; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); + using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); using ReactionRate =ThermoChemReaction<TypeTag>; @@ -218,12 +218,12 @@ public: * Negative values indicate an inflow. */ - ResidualVector neumann(const Element& element, + NumEqVector neumann(const Element& element, const FVElementGeometry& fvGeometry, const ElementVolumeVariables& elemVolVars, const SubControlVolumeFace& scvf) const { - ResidualVector flux(0.0); + NumEqVector flux(0.0); return flux; } @@ -280,13 +280,13 @@ public: * that the conserved quantity is created, negative ones mean that it vanishes. * E.g. for the mass balance that would be a mass rate in \f$ [ kg / (m^3 \cdot s)] \f$. */ - PrimaryVariables source(const Element &element, + NumEqVector source(const Element &element, const FVElementGeometry& fvGeometry, const ElementVolumeVariables& elemVolVars, const SubControlVolume &scv) const { - PrimaryVariables source(0.0); + NumEqVector source(0.0); const auto& volVars = elemVolVars[scv]; Scalar qMass = rrate_.thermoChemReaction(volVars); -- GitLab