24#ifndef DUMUX_BOUNDARY_TYPES_HH
25#define DUMUX_BOUNDARY_TYPES_HH
44 static constexpr int size()
56 for (
int eqIdx=0; eqIdx < numEq; ++eqIdx)
95 for (
int i=0; i < numEq; ++i)
104 for (
int eqIdx = 0; eqIdx < numEq; ++eqIdx)
113 for (
int eqIdx = 0; eqIdx < numEq; ++ eqIdx)
122 for (
int eqIdx = 0; eqIdx < numEq; ++eqIdx)
131 for (
int eqIdx = 0; eqIdx < numEq; ++eqIdx)
140 for (
int eqIdx = 0; eqIdx < numEq; ++eqIdx)
250 b.isCouplingDirichlet; }
263 b.isCouplingDirichlet; }
288 b.isCouplingNeumann; }
301 b.isCouplingNeumann; }
343 [](
const BoundaryInfo& b){ return b.isCouplingDirichlet; }
364 [](
const BoundaryInfo& b){ return b.isCouplingNeumann; }
386 for (
int i = 0; i < numEq; ++i)
Class to specify the type of a boundary.
Definition: common/boundarytypes.hh:38
void setAllCouplingDirichlet()
Set all boundary conditions to Dirichlet-like coupling.
Definition: common/boundarytypes.hh:129
void setAllNeumann()
Set all boundary conditions to Neumann.
Definition: common/boundarytypes.hh:102
bool isOutflow(unsigned eqIdx) const
Returns true if an equation is used to specify an outflow condition.
Definition: common/boundarytypes.hh:311
bool isNeumann(unsigned eqIdx) const
Returns true if an equation is used to specify a Neumann condition.
Definition: common/boundarytypes.hh:273
void setAllDirichlet()
Set all boundary conditions to Dirichlet.
Definition: common/boundarytypes.hh:111
void reset()
Reset the boundary types for all equations.
Definition: common/boundarytypes.hh:54
bool hasOnlyDirichlet() const
Returns true if all equations are used to specify a Dirichlet condition.
Definition: common/boundarytypes.hh:245
BoundaryTypes()
Definition: common/boundarytypes.hh:40
bool isSet(int eqIdx) const
Returns true if the boundary types for a given equation has been specified.
Definition: common/boundarytypes.hh:83
bool isDirichlet(unsigned eqIdx) const
Returns true if an equation is used to specify a Dirichlet condition.
Definition: common/boundarytypes.hh:236
void resetEq(int eqIdx)
Reset the boundary types for one equation.
Definition: common/boundarytypes.hh:63
bool hasNeumann() const
Returns true if some equation is used to specify a Neumann condition.
Definition: common/boundarytypes.hh:296
void setDirichlet(int pvIdx)
Set a Dirichlet boundary condition for a single primary variable.
Definition: common/boundarytypes.hh:225
unsigned eqToDirichletIndex(unsigned eqIdx) const
Returns the index of the primary variable which should be used for the Dirichlet condition given an e...
Definition: common/boundarytypes.hh:411
void checkWellPosed() const
Make sure the boundary conditions are well-posed.
Definition: common/boundarytypes.hh:92
bool isCouplingNeumann(unsigned eqIdx) const
Returns true if an equation is used to specify an Neumann coupling condition.
Definition: common/boundarytypes.hh:353
bool hasCoupling() const
Returns true if some equation is used to specify a coupling condition.
Definition: common/boundarytypes.hh:384
bool hasOnlyNeumann() const
Returns true if all equations are used to specify a Neumann condition.
Definition: common/boundarytypes.hh:283
void setDirichlet(int pvIdx, int eqIdx)
Set a Dirichlet boundary condition for a single primary variable.
Definition: common/boundarytypes.hh:166
std::array< BoundaryInfo, numEq > boundaryInfo_
Definition: common/boundarytypes.hh:425
std::array< unsigned int, numEq > eq2pvIdx_
Definition: common/boundarytypes.hh:426
void setCouplingNeumann(int eqIdx)
Set a boundary condition for a single equation to a Neumann-like coupling condition.
Definition: common/boundarytypes.hh:207
unsigned dirichletToEqIndex(unsigned pvIdx) const
Returns the index of the equation which should be used for the Dirichlet condition of the pvIdx's pri...
Definition: common/boundarytypes.hh:400
void setAllOutflow()
Set all boundary conditions to Neumann.
Definition: common/boundarytypes.hh:120
bool isCouplingDirichlet(unsigned eqIdx) const
Returns true if an equation is used to specify an Dirichlet coupling condition.
Definition: common/boundarytypes.hh:332
void setOutflow(int eqIdx)
Set a Neumann boundary condition for a single a single equation.
Definition: common/boundarytypes.hh:184
bool hasDirichlet() const
Returns true if some equation is used to specify a Dirichlet condition.
Definition: common/boundarytypes.hh:258
void setCouplingDirichlet(int eqIdx)
Set a boundary condition for a single equation to a Dirichlet-like coupling condition.
Definition: common/boundarytypes.hh:195
bool hasOutflow() const
Returns true if some equation is used to specify an outflow condition.
Definition: common/boundarytypes.hh:318
bool isCoupling(unsigned eqIdx) const
Returns true if an equation is used to specify a coupling condition.
Definition: common/boundarytypes.hh:374
void setAllCouplingNeumann()
Set all boundary conditions to Neumann-like coupling.
Definition: common/boundarytypes.hh:138
bool hasCouplingDirichlet() const
Returns true if some equation is used to specify an Dirichlet coupling condition.
Definition: common/boundarytypes.hh:339
bool hasCouplingNeumann() const
Returns true if some equation is used to specify an Neumann coupling condition.
Definition: common/boundarytypes.hh:360
std::array< unsigned int, numEq > pv2eqIdx_
Definition: common/boundarytypes.hh:426
static constexpr int size()
we have a boundary condition for each equation
Definition: common/boundarytypes.hh:44
void setNeumann(int eqIdx)
Set a Neumann boundary condition for a single a single equation.
Definition: common/boundarytypes.hh:150
use bitfields to minimize the size
Definition: common/boundarytypes.hh:416
bool isNeumann
Definition: common/boundarytypes.hh:419
bool isOutflow
Definition: common/boundarytypes.hh:420
bool isDirichlet
Definition: common/boundarytypes.hh:418
bool visited
Definition: common/boundarytypes.hh:417
bool isCouplingDirichlet
Definition: common/boundarytypes.hh:421
bool isCouplingNeumann
Definition: common/boundarytypes.hh:422