Commit a7ac83bd authored by Martin Schneider's avatar Martin Schneider
Browse files

[course][exercises] Correct return type for Neumann and Source functions

parent 9b6857a8
......@@ -197,10 +197,10 @@ public:
*
* \param globalPos The position of the integration point of the boundary segment.
*/
PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
{
// initialize values to zero, i.e. no-flow Neumann boundary conditions
PrimaryVariables values(0.0);
NumEqVector values(0.0);
// if we are inside the injection zone set inflow Neumann boundary conditions
if (time_ < injectionDuration_
......
......@@ -195,10 +195,10 @@ public:
*
* \param globalPos The position of the integration point of the boundary segment.
*/
PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
{
// initialize values to zero, i.e. no-flow Neumann boundary conditions
PrimaryVariables values(0.0);
NumEqVector values(0.0);
// if we are inside the injection zone set inflow Neumann boundary conditions
if (time_ < injectionDuration_
......
......@@ -197,10 +197,10 @@ public:
*
* \param globalPos The position of the integration point of the boundary segment.
*/
PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
{
// initialize values to zero, i.e. no-flow Neumann boundary conditions
PrimaryVariables values(0.0);
NumEqVector values(0.0);
// if we are inside the injection zone set inflow Neumann boundary conditions
// using < boundary + eps_ or > boundary - eps_ is safer for floating point comparisons
......
......@@ -110,6 +110,7 @@ class ExerciseFluidsystemProblemTwoPTwoC : public PorousMediumFlowProblem<TypeTa
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
public:
ExerciseFluidsystemProblemTwoPTwoC(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
......@@ -176,10 +177,10 @@ public:
*
* \param globalPos The position of the integration point of the boundary segment.
*/
PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
{
// initialize values to zero, i.e. no-flow Neumann boundary conditions
PrimaryVariables values(0.0);
NumEqVector values(0.0);
Scalar up = this->fvGridGeometry().bBoxMax()[dimWorld-1];
// extraction of oil (30 g/m/s) on a segment of the upper boundary
......@@ -236,10 +237,10 @@ public:
* \brief Returns the source term
* \param globalPos The global position
*/
PrimaryVariables sourceAtPos(const GlobalPosition &globalPos) const
NumEqVector sourceAtPos(const GlobalPosition &globalPos) const
{
// we do not define any sources
PrimaryVariables values(0.0);
NumEqVector values(0.0);
return values;
}
......
......@@ -133,6 +133,7 @@ class ExerciseFluidsystemProblemTwoP : public PorousMediumFlowProblem<TypeTag>
using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using FluidState = GetPropType<TypeTag, Properties::FluidState>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
enum {
waterPressureIdx = Indices::pressureIdx,
......@@ -218,10 +219,10 @@ public:
* For this method, the \a values parameter stores the mass flux
* in normal direction of each phase. Negative values mean influx.
*/
PrimaryVariables neumannAtPos(const GlobalPosition& globalPos) const
NumEqVector neumannAtPos(const GlobalPosition& globalPos) const
{
// initialize values to zero, i.e. no-flow Neumann boundary conditions
PrimaryVariables values(0.0);
NumEqVector values(0.0);
Scalar up = this->fvGridGeometry().bBoxMax()[dimWorld-1];
......@@ -274,10 +275,10 @@ public:
*
* \param globalPos The global position
*/
PrimaryVariables sourceAtPos(const GlobalPosition& globalPos) const
NumEqVector sourceAtPos(const GlobalPosition& globalPos) const
{
// we define no source term here
PrimaryVariables values(0.0);
NumEqVector values(0.0);
return values;
}
......
......@@ -108,6 +108,7 @@ class InjectionProblem2P : public PorousMediumFlowProblem<TypeTag>
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
enum { dimWorld = GridView::dimensionworld };
using Element = typename GridView::template Codim<0>::Entity;
......@@ -199,10 +200,10 @@ public:
*
* \param globalPos The position of the integration point of the boundary segment.
*/
PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
{
// initialize values to zero, i.e. no-flow Neumann boundary conditions
PrimaryVariables values(0.0);
NumEqVector values(0.0);
// if we are inside the injection zone set inflow Neumann boundary conditions
// using < boundary + eps_ or > boundary - eps_ is safer for floating point comparisons
......
......@@ -105,6 +105,7 @@ class InjectionProblem2P : public PorousMediumFlowProblem<TypeTag>
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
enum { dimWorld = GridView::dimensionworld };
using Element = typename GridView::template Codim<0>::Entity;
......@@ -199,10 +200,10 @@ public:
*
* \param globalPos The position of the integration point of the boundary segment.
*/
PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
{
// initialize values to zero, i.e. no-flow Neumann boundary conditions
PrimaryVariables values(0.0);
NumEqVector values(0.0);
// if we are inside the injection zone set inflow Neumann boundary conditions
// using < boundary + eps_ or > boundary - eps_ is safer for floating point comparisons
......
......@@ -190,10 +190,10 @@ public:
*
* \param globalPos The position of the integration point of the boundary segment.
*/
PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
{
// initialize values to zero, i.e. no-flow Neumann boundary conditions
PrimaryVariables values(0.0);
NumEqVector values(0.0);
// if we are inside the injection zone set inflow Neumann boundary conditions
if (time_ < injectionDuration_
......
......@@ -110,6 +110,7 @@ class ExerciseFluidsystemProblemTwoPTwoC : public PorousMediumFlowProblem<TypeTa
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
public:
ExerciseFluidsystemProblemTwoPTwoC(std::shared_ptr<const FVGridGeometry> fvGridGeometry)
......@@ -181,10 +182,10 @@ public:
* For this method, the \a values parameter stores the mass flux
* in normal direction of each phase. Negative values mean influx.
*/
PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
{
// initialize values to zero, i.e. no-flow Neumann boundary conditions
PrimaryVariables values(0.0);
NumEqVector values(0.0);
Scalar up = this->fvGridGeometry().bBoxMax()[dimWorld-1];
// extraction of oil (30 g/m/s) on a segment of the upper boundary
......@@ -245,10 +246,10 @@ public:
* \f$ [ \textnormal{unit of primary variable} / (m^\textrm{dim} \cdot s )] \f$
* \param globalPos The global position
*/
PrimaryVariables sourceAtPos(const GlobalPosition &globalPos) const
NumEqVector sourceAtPos(const GlobalPosition &globalPos) const
{
// we do not define any sources
PrimaryVariables values(0.0);
NumEqVector values(0.0);
return values;
}
......
......@@ -133,6 +133,7 @@ class ExerciseFluidsystemProblemTwoP : public PorousMediumFlowProblem<TypeTag>
using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using FluidState = GetPropType<TypeTag, Properties::FluidState>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
enum {
waterPressureIdx = Indices::pressureIdx,
......@@ -221,10 +222,10 @@ public:
* For this method, the \a values parameter stores the mass flux
* in normal direction of each phase. Negative values mean influx.
*/
PrimaryVariables neumannAtPos(const GlobalPosition& globalPos) const
NumEqVector neumannAtPos(const GlobalPosition& globalPos) const
{
// initialize values to zero, i.e. no-flow Neumann boundary conditions
PrimaryVariables values(0.0);
NumEqVector values(0.0);
Scalar up = this->fvGridGeometry().bBoxMax()[dimWorld-1];
......@@ -279,10 +280,10 @@ public:
* \f$ [ \textnormal{unit of primary variable} / (m^\textrm{dim} \cdot s )] \f$
* \param globalPos The global position
*/
PrimaryVariables sourceAtPos(const GlobalPosition& globalPos) const
NumEqVector sourceAtPos(const GlobalPosition& globalPos) const
{
// we define no source term here
PrimaryVariables values(0.0);
NumEqVector values(0.0);
return values;
}
......
......@@ -116,6 +116,7 @@ class InjectionProblem2P : public PorousMediumFlowProblem<TypeTag>
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
enum { dimWorld = GridView::dimensionworld };
using Element = typename GridView::template Codim<0>::Entity;
......@@ -207,10 +208,10 @@ public:
*
* \param globalPos The position of the integration point of the boundary segment.
*/
PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
{
// initialize values to zero, i.e. no-flow Neumann boundary conditions
PrimaryVariables values(0.0);
NumEqVector values(0.0);
// if we are inside the injection zone set inflow Neumann boundary conditions
// using < boundary + eps_ or > boundary - eps_ is safer for floating point comparisons
......
......@@ -105,6 +105,7 @@ class InjectionProblem2P : public PorousMediumFlowProblem<TypeTag>
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
enum { dimWorld = GridView::dimensionworld };
using Element = typename GridView::template Codim<0>::Entity;
......@@ -205,10 +206,10 @@ public:
*
* \param globalPos The position of the integration point of the boundary segment.
*/
PrimaryVariables neumannAtPos(const GlobalPosition &globalPos) const
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
{
// initialize values to zero, i.e. no-flow Neumann boundary conditions
PrimaryVariables values(0.0);
NumEqVector values(0.0);
// if we are inside the injection zone set inflow Neumann boundary conditions
// using < boundary + eps_ or > boundary - eps_ is safer for floating point comparisons
......
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