25#ifndef DUMUX_ONEP_SUB_TEST_PROBLEM_HH
26#define DUMUX_ONEP_SUB_TEST_PROBLEM_HH
28#include <dune/common/indices.hh>
42template<
class TypeTag, std::
size_t tag>
49 using FVElementGeometry =
typename GridGeometry::LocalView;
50 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
51 using GridView =
typename GridGeometry::GridView;
52 using Element =
typename GridView::template Codim<0>::Entity;
58 static constexpr int dimWorld = GridView::dimensionworld;
59 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
60 static constexpr auto domainIdx = Dune::index_constant<tag>{};
64 std::shared_ptr<CouplingManager> couplingManager,
67 , couplingManager_(couplingManager)
70 problemName_ = getParam<std::string>(
"Vtk.OutputName")+
"_" + getParamFromGroup<std::string>(
paramGroup,
"Problem.Name");
76 const std::string&
name()
const
89 const SubControlVolumeFace &scvf)
const
92 const auto& globalPos = scvf.ipGlobal();
94 if (globalPos[dimWorld-1] < this->
gridGeometry().bBoxMin()[dimWorld-1] + eps_
95 || globalPos[dimWorld-1] > this->
gridGeometry().bBoxMax()[dimWorld-1] - eps_)
96 values.setAllDirichlet();
98 values.setAllNeumann();
100 if (couplingManager_->isCoupled(domainIdx, scvf))
101 values.setAllCouplingNeumann();
121 template<
class ElementVolumeVariables,
class ElementFluxVarsCache>
123 const FVElementGeometry& fvGeometry,
124 const ElementVolumeVariables& elemVolVars,
125 const ElementFluxVarsCache& elemFluxVarsCache,
126 const SubControlVolumeFace& scvf)
const
128 NumEqVector values(0.0);
130 if (bcTypes.hasCouplingNeumann())
131 values[Indices::conti0EqIdx] = couplingManager_->advectiveFluxCoupling(domainIdx, element, fvGeometry, elemVolVars, scvf);
145 PrimaryVariables values(0.0);
146 values[0] = 1.0e+5*(2.0 - globalPos[dimWorld-1]);
172 std::shared_ptr<CouplingManager> couplingManager_;
173 static constexpr Scalar eps_ = 1e-7;
174 std::string problemName_;
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Base class for all finite-volume problems.
Definition: common/fvproblem.hh:50
const std::string & paramGroup() const
The parameter group in which to retrieve runtime parameters.
Definition: common/fvproblem.hh:592
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvproblem.hh:588
Base class for all fully implicit porous media problems.
Definition: dumux/porousmediumflow/problem.hh:39
Multidomain test problem for the incompressible one-phase model.
Definition: test/multidomain/boundary/darcydarcy/1p_1p/problem.hh:45
BoundaryTypes boundaryTypes(const Element &element, const SubControlVolumeFace &scvf) const
Specifies which kind of boundary condition should be used for which equation on a given boundary segm...
Definition: test/multidomain/boundary/darcydarcy/1p_1p/problem.hh:88
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Dirichlet control volume.
Definition: test/multidomain/boundary/darcydarcy/1p_1p/problem.hh:143
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial value for a control volume.
Definition: test/multidomain/boundary/darcydarcy/1p_1p/problem.hh:167
Scalar temperature() const
Returns the temperature for an isothermal problem.
Definition: test/multidomain/boundary/darcydarcy/1p_1p/problem.hh:157
NumEqVector neumann(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVarsCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
Evaluates the boundary conditions for a Neumann boundary segment.
Definition: test/multidomain/boundary/darcydarcy/1p_1p/problem.hh:122
const std::string & name() const
The problem name.
Definition: test/multidomain/boundary/darcydarcy/1p_1p/problem.hh:76
OnePTestProblem(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< CouplingManager > couplingManager, const std::string ¶mGroup="")
Definition: test/multidomain/boundary/darcydarcy/1p_1p/problem.hh:63
Base class for all porous media problems.
Definition of the spatial parameters for the MaxwellStefan problem.