Commit e563e4e0 authored by Dennis Gläser's avatar Dennis Gläser Committed by Kilian Weishaupt
Browse files

[test] avoid deprecation warning from neumann interface

parent 7bc4744e
......@@ -115,7 +115,10 @@ class DamBreakProblem : public ShallowWaterProblem<TypeTag>
using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices;
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using NeumannFluxes = GetPropType<TypeTag, Properties::NumEqVector>;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using GridView = GetPropType<TypeTag, Properties::GridView>;
......@@ -220,19 +223,20 @@ public:
* \param element
* \param fvGeometry
* \param elemVolVars
* \param elemFluxVarsCache
* \param scvf
*/
NeumannFluxes neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVariablesCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NeumannFluxes values(0.0);
//we need the Riemann invariants to compute the values depending of the boundary type
//since we use a weak imposition we do not have a dirichlet value. We impose fluxes
//based on q,h, etc. computed with the Riemann invariants
// we need the Riemann invariants to compute the values depending of the boundary type
// since we use a weak imposition we do not have a dirichlet value. We impose fluxes
// based on q,h, etc. computed with the Riemann invariants
const auto& insideScv = fvGeometry.scv(scvf.insideScvIdx());
const auto& insideVolVars = elemVolVars[insideScv];
const auto& nxy = scvf.unitOuterNormal();
......
......@@ -72,7 +72,10 @@ class ElasticProblem : public GeomechanicsFVProblem<TypeTag>
using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView;
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using FVElementGeometry = typename FVGridGeometry::LocalView;
......@@ -127,6 +130,7 @@ public:
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolvars,
const ElementFluxVariablesCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
GradU gradU = exactGradient(scvf.ipGlobal());
......
......@@ -112,15 +112,17 @@ public:
* \param element The finite element
* \param fvGeometry The finite-volume geometry
* \param elemVolVars All volume variables for the element
* \param elemFluxVarsCache Flux variables caches for all faces in stencil
* \param scvf The sub control volume face
*
* Negative values mean influx.
* E.g. for the mass balance that would the mass flux in \f$ [ kg / (m^2 \cdot s)] \f$.
*/
template<class ElementVolumeVariables>
template<class ElementVolumeVariables, class ElementFluxVarsCache>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVarsCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NumEqVector values(0.0);
......
......@@ -108,15 +108,17 @@ public:
* \param element The finite element
* \param fvGeometry The finite-volume geometry
* \param elemVolVars All volume variables for the element
* \param elemFluxVarsCache Flux variables caches for all faces in stencil
* \param scvf The sub control volume face
*
* Negative values mean influx.
* E.g. for the mass balance that would the mass flux in \f$ [ kg / (m^2 \cdot s)] \f$.
*/
template<class ElementVolumeVariables>
template<class ElementVolumeVariables, class ElementFluxVarsCache>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVarsCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NumEqVector values(0.0);
......
......@@ -199,14 +199,16 @@ public:
* \param element The element for which the Neumann boundary condition is set
* \param fvGeometry The fvGeometry
* \param elemVolVars The element volume variables
* \param elemFluxVarsCache Flux variables caches for all faces in stencil
* \param scvf The boundary sub control volume face
*
* For this method, the \a values variable stores primary variables.
*/
template<class ElementVolumeVariables>
template<class ElementVolumeVariables, class ElementFluxVarsCache>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVarsCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NumEqVector values(0.0);
......
......@@ -205,14 +205,16 @@ public:
* \param element The element for which the Neumann boundary condition is set
* \param fvGeometry The fvGeometry
* \param elemVolVars The element volume variables
* \param elemFluxVarsCache Flux variables caches for all faces in stencil
* \param scvf The boundary sub control volume face
*
* For this method, the \a values variable stores primary variables.
*/
template<class ElementVolumeVariables>
template<class ElementVolumeVariables, class ElementFluxVarsCache>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVarsCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NumEqVector values(0.0);
......
......@@ -99,7 +99,9 @@ class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
......@@ -246,12 +248,13 @@ public:
* \param element The element for which the Neumann boundary condition is set
* \param fvGeometry The fvGeometry
* \param elemVolVars The element volume variables
* \param elemFluxVarsCache Flux variables caches for all faces in stencil
* \param scvf The boundary sub control volume face
*
*/
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVariablesCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NumEqVector values(0.0);
......
......@@ -192,14 +192,16 @@ public:
* \param element The element for which the Neumann boundary condition is set
* \param fvGeometry The fvGeometry
* \param elemVolVars The element volume variables
* \param elemFluxVarsCache Flux variables caches for all faces in stencil
* \param scvf The boundary sub control volume face
*
* For this method, the \a values variable stores primary variables.
*/
template<class ElementVolumeVariables>
template<class ElementVolumeVariables, class ElementFluxVarsCache>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVarsCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NumEqVector values(0.0);
......
......@@ -174,14 +174,16 @@ public:
* \param element The element for which the Neumann boundary condition is set
* \param fvGeometry The fvGeometry
* \param elemVolVars The element volume variables
* \param elemFluxVarsCache Flux variables caches for all faces in stencil
* \param scvf The boundary sub control volume face
*
* For this method, the \a values variable stores primary variables.
*/
template<class ElementVolumeVariables>
template<class ElementVolumeVariables, class ElementFluxVarsCache>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVarsCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NumEqVector values(0.0);
......
......@@ -83,12 +83,15 @@ class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView;
using VolumeVariables = typename GridVariables::GridVolumeVariables::VolumeVariables;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
......@@ -203,6 +206,7 @@ public:
* \param element The element for which the Neumann boundary condition is set
* \param fvGeometry The fvGeometry
* \param elemVolVars The element volume variables
* \param elemFluxVarsCache Flux variables caches for all faces in stencil
* \param scvf The boundary sub control volume face
*
* For this method, the \a values variable stores primary variables.
......@@ -210,6 +214,7 @@ public:
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVariablesCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NumEqVector values(0.0);
......
......@@ -151,14 +151,17 @@ double computeGlobalBoundaryMass(const Problem& problem, const SolutionVector& s
for (const auto& element : elements(gg.gridView()))
{
auto fvGeometry = localView(gg);
fvGeometry.bindElement(element);
fvGeometry.bind(element);
auto elemVolVars = localView(gridVars.curGridVolVars());
elemVolVars.bindElement(element, fvGeometry, sol);
elemVolVars.bind(element, fvGeometry, sol);
auto elemFluxVarsCache = localView(gridVars.gridFluxVarsCache());
elemFluxVarsCache.bind(element, fvGeometry, elemVolVars);
for (auto&& scvf : scvfs(fvGeometry))
if (scvf.boundary())
mass += problem.neumann(element, fvGeometry, elemVolVars, scvf)[transportEqIdx]
mass += problem.neumann(element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf)[transportEqIdx]
* scvf.area() * elemVolVars[scvf.insideScvIdx()].extrusionFactor()
* Problem::FluidSystem::molarMass(transportCompIdx)
* dt;
......
......@@ -221,10 +221,11 @@ public:
* in normal direction of each component. Negative values mean
* influx.
*/
template<class ElementVolumeVariables>
template<class ElementVolumeVariables, class ElementFluxVarsCache>
NeumannFluxes neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolvars,
const ElementFluxVarsCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NeumannFluxes values(0.0);
......
......@@ -205,10 +205,11 @@ public:
* in normal direction of each component. Negative values mean
* influx.
*/
template<class ElementVolumeVariables>
template<class ElementVolumeVariables, class ElementFluxVarsCache>
NeumannFluxes neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolvars,
const ElementFluxVarsCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NeumannFluxes values(0.0);
......
......@@ -182,10 +182,11 @@ public:
{ return PrimaryVariables(exact(globalPos)); }
//! Evaluates the Neumann boundary condition for a boundary segment.
template<class ElementVolumeVariables>
template<class ElementVolumeVariables, class ElementFluxVarsCache>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVarsCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
auto pos = scvf.ipGlobal();
......
......@@ -152,11 +152,7 @@ public:
{ return initialAtPos(globalPos); }
//! Evaluates the Neumann boundary condition for a boundary segment.
template<class ElementVolumeVariables>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const SubControlVolumeFace& scvf) const
NumEqVector neumannAtPos(const GlobalPosition& globalPos) const
{ return NumEqVector(0.0); }
//! Evaluates the initial conditions.
......
......@@ -151,11 +151,7 @@ public:
{ return initialAtPos(globalPos); }
//! Evaluates the Neumann boundary condition for a boundary segment.
template<class ElementVolumeVariables>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const SubControlVolumeFace& scvf) const
NumEqVector neumannAtPos(const GlobalPosition& globalPos) const
{ return NumEqVector(0.0); }
//! Evaluates the initial conditions.
......
......@@ -156,11 +156,7 @@ public:
}
//! Evaluates the Neumann boundary condition for a boundary segment.
template<class ElementVolumeVariables>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const SubControlVolumeFace& scvf) const
NumEqVector neumannAtPos(const GlobalPosition& globalPos) const
{ return NumEqVector(0.0); }
//! Evaluates the initial conditions.
......
......@@ -186,15 +186,17 @@ public:
* \param element The finite element
* \param fvGeometry The finite-volume geometry
* \param elemVolVars All volume variables for the element
* \param elemFluxVarsCache Flux variables caches for all faces in stencil
* \param scvf The sub control volume face
*
* Negative values mean influx.
* E.g. for the mass balance that would the mass flux in \f$ [ kg / (m^2 \cdot s)] \f$.
*/
template<class ElementVolumeVariables, class SubControlVolumeFace>
template<class ElementVolumeVariables, class ElementFluxVarsCache>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVarsCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
// get the volume flux on this segment
......
......@@ -106,6 +106,7 @@ class TracerLowDimProblem : public PorousMediumFlowProblem<TypeTag>
using GridView = GetPropType<TypeTag, Properties::GridView>;
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using FVElementGeometry = typename FVGridGeometry::LocalView;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
......@@ -187,15 +188,17 @@ public:
* \param element The finite element
* \param fvGeometry The finite-volume geometry
* \param elemVolVars All volume variables for the element
* \param elemFluxVarsCache Flux variables caches for all faces in stencil
* \param scvf The sub control volume face
*
* Negative values mean influx.
* E.g. for the mass balance that would the mass flux in \f$ [ kg / (m^2 \cdot s)] \f$.
*/
template<class ElementVolumeVariables, class SubControlVolumeFace>
template<class ElementVolumeVariables, class ElementFluxVarsCache>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVarsCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
// get the volume flux on this segment
......
......@@ -117,8 +117,11 @@ class OnePNIConvectionProblem : public PorousMediumFlowProblem<TypeTag>
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView;
using VolumeVariables = typename GridVariables::GridVolumeVariables::VolumeVariables;
using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>;
using IapwsH2O = Components::H2O<Scalar>;
......@@ -267,6 +270,7 @@ public:
* \param element The finite element
* \param fvGeometry The finite volume geometry of the element
* \param elemVolVars All volume variables for the element
* \param elemFluxVarsCache Flux variables caches for all faces in stencil
* \param scvf The sub-control volume face
*
* This method is used for cases, when the Neumann condition depends on the
......@@ -277,6 +281,7 @@ public:
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVariablesCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NumEqVector values(0.0);
......
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