version 3.9-dev
Dumux::BoundaryTypes< numEq > Class Template Reference

Class to specify the type of a boundary.

#include <dumux/common/boundarytypes.hh>

Inheritance diagram for Dumux::BoundaryTypes< numEq >:

Classes

struct  BoundaryInfo
 use bitfields to minimize the size More...
 

Public Member Functions

 BoundaryTypes ()
 
void reset ()
 Reset the boundary types for all equations. More...
 
void resetEq (int eqIdx)
 Reset the boundary types for one equation. More...
 
bool isSet (int eqIdx) const
 Returns true if the boundary types for a given equation has been specified. More...
 
void checkWellPosed () const
 Make sure the boundary conditions are well-posed. More...
 
void setAllNeumann ()
 Set all boundary conditions to Neumann. More...
 
void setAllDirichlet ()
 Set all boundary conditions to Dirichlet. More...
 
void setAllCouplingDirichlet ()
 Set all boundary conditions to Dirichlet-like coupling. More...
 
void setAllCouplingNeumann ()
 Set all boundary conditions to Neumann-like coupling. More...
 
void setNeumann (int eqIdx)
 Set a Neumann boundary condition for a single equation. More...
 
void setDirichlet (int pvIdx, int eqIdx)
 Set a Dirichlet boundary condition for a single primary variable. More...
 
void setCouplingDirichlet (int eqIdx)
 Set a boundary condition for a single equation to a Dirichlet-like coupling condition. More...
 
void setCouplingNeumann (int eqIdx)
 Set a boundary condition for a single equation to a Neumann-like coupling condition. More...
 
void setDirichlet (int pvIdx)
 Set a Dirichlet boundary condition for a single primary variable. More...
 
bool isDirichlet (unsigned eqIdx) const
 Returns true if an equation is used to specify a Dirichlet condition. More...
 
bool hasOnlyDirichlet () const
 Returns true if all equations are used to specify a Dirichlet condition. More...
 
bool hasDirichlet () const
 Returns true if some equation is used to specify a Dirichlet condition. More...
 
bool isNeumann (unsigned eqIdx) const
 Returns true if an equation is used to specify a Neumann condition. More...
 
bool hasOnlyNeumann () const
 Returns true if all equations are used to specify a Neumann condition. More...
 
bool hasNeumann () const
 Returns true if some equation is used to specify a Neumann condition. More...
 
bool isCouplingDirichlet (unsigned eqIdx) const
 Returns true if an equation is used to specify an Dirichlet coupling condition. More...
 
bool hasCouplingDirichlet () const
 Returns true if some equation is used to specify an Dirichlet coupling condition. More...
 
bool isCouplingNeumann (unsigned eqIdx) const
 Returns true if an equation is used to specify an Neumann coupling condition. More...
 
bool hasCouplingNeumann () const
 Returns true if some equation is used to specify an Neumann coupling condition. More...
 
bool isCoupling (unsigned eqIdx) const
 Returns true if an equation is used to specify a coupling condition. More...
 
bool hasCoupling () const
 Returns true if some equation is used to specify a coupling condition. More...
 
unsigned dirichletToEqIndex (unsigned pvIdx) const
 Returns the index of the equation which should be used for the Dirichlet condition of the pvIdx's primary variable. More...
 
unsigned eqToDirichletIndex (unsigned eqIdx) const
 Returns the index of the primary variable which should be used for the Dirichlet condition given an equation index. More...
 

Static Public Member Functions

static constexpr int size ()
 we have a boundary condition for each equation More...
 

Protected Attributes

std::array< BoundaryInfo, numEq > boundaryInfo_
 
std::array< unsigned int, numEq > eq2pvIdx_
 
std::array< unsigned int, numEq > pv2eqIdx_
 

Constructor & Destructor Documentation

◆ BoundaryTypes()

template<int numEq>
Dumux::BoundaryTypes< numEq >::BoundaryTypes ( )
inline

Member Function Documentation

◆ checkWellPosed()

template<int numEq>
void Dumux::BoundaryTypes< numEq >::checkWellPosed ( ) const
inline

If they are not, an assertion fails and the program aborts! (if the NDEBUG macro is not defined)

◆ dirichletToEqIndex()

template<int numEq>
unsigned Dumux::BoundaryTypes< numEq >::dirichletToEqIndex ( unsigned  pvIdx) const
inline
Parameters
pvIdxThe index of the primary variable which is be set by the Dirichlet condition.

◆ eqToDirichletIndex()

template<int numEq>
unsigned Dumux::BoundaryTypes< numEq >::eqToDirichletIndex ( unsigned  eqIdx) const
inline
Parameters
eqIdxThe index of the equation which is used to set the Dirichlet condition.

◆ hasCoupling()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::hasCoupling ( ) const
inline

◆ hasCouplingDirichlet()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::hasCouplingDirichlet ( ) const
inline

◆ hasCouplingNeumann()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::hasCouplingNeumann ( ) const
inline

◆ hasDirichlet()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::hasDirichlet ( ) const
inline

◆ hasNeumann()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::hasNeumann ( ) const
inline

◆ hasOnlyDirichlet()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::hasOnlyDirichlet ( ) const
inline

◆ hasOnlyNeumann()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::hasOnlyNeumann ( ) const
inline

◆ isCoupling()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::isCoupling ( unsigned  eqIdx) const
inline
Parameters
eqIdxThe index of the equation

◆ isCouplingDirichlet()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::isCouplingDirichlet ( unsigned  eqIdx) const
inline
Parameters
eqIdxThe index of the equation

◆ isCouplingNeumann()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::isCouplingNeumann ( unsigned  eqIdx) const
inline
Parameters
eqIdxThe index of the equation

◆ isDirichlet()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::isDirichlet ( unsigned  eqIdx) const
inline
Parameters
eqIdxThe index of the equation

◆ isNeumann()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::isNeumann ( unsigned  eqIdx) const
inline
Parameters
eqIdxThe index of the equation

◆ isSet()

template<int numEq>
bool Dumux::BoundaryTypes< numEq >::isSet ( int  eqIdx) const
inline
Parameters
eqIdxThe index of the equation

◆ reset()

template<int numEq>
void Dumux::BoundaryTypes< numEq >::reset ( )
inline

After this method no equations will be disabled and neither Neumann nor Dirichlet conditions will be evaluated. This corresponds to a Neumann zero boundary.

◆ resetEq()

template<int numEq>
void Dumux::BoundaryTypes< numEq >::resetEq ( int  eqIdx)
inline

◆ setAllCouplingDirichlet()

template<int numEq>
void Dumux::BoundaryTypes< numEq >::setAllCouplingDirichlet ( )
inline

◆ setAllCouplingNeumann()

template<int numEq>
void Dumux::BoundaryTypes< numEq >::setAllCouplingNeumann ( )
inline

◆ setAllDirichlet()

template<int numEq>
void Dumux::BoundaryTypes< numEq >::setAllDirichlet ( )
inline

◆ setAllNeumann()

template<int numEq>
void Dumux::BoundaryTypes< numEq >::setAllNeumann ( )
inline

◆ setCouplingDirichlet()

template<int numEq>
void Dumux::BoundaryTypes< numEq >::setCouplingDirichlet ( int  eqIdx)
inline

◆ setCouplingNeumann()

template<int numEq>
void Dumux::BoundaryTypes< numEq >::setCouplingNeumann ( int  eqIdx)
inline

◆ setDirichlet() [1/2]

template<int numEq>
void Dumux::BoundaryTypes< numEq >::setDirichlet ( int  pvIdx)
inline

Depending on the discretization, setting the Dirichlet condition will replace the balance equation with index equal to pvIdx.

Parameters
pvIdxThe index of the primary variable inside a PrimaryVariables object.

◆ setDirichlet() [2/2]

template<int numEq>
void Dumux::BoundaryTypes< numEq >::setDirichlet ( int  pvIdx,
int  eqIdx 
)
inline
Parameters
pvIdxThe index of the primary variable for which the Dirichlet condition should apply.
eqIdxThe index of the equation which should used to set the Dirichlet condition

◆ setNeumann()

template<int numEq>
void Dumux::BoundaryTypes< numEq >::setNeumann ( int  eqIdx)
inline
Parameters
eqIdxThe index of the equation

◆ size()

template<int numEq>
static constexpr int Dumux::BoundaryTypes< numEq >::size ( )
inlinestaticconstexpr

Member Data Documentation

◆ boundaryInfo_

template<int numEq>
std::array<BoundaryInfo, numEq> Dumux::BoundaryTypes< numEq >::boundaryInfo_
protected

◆ eq2pvIdx_

template<int numEq>
std::array<unsigned int, numEq> Dumux::BoundaryTypes< numEq >::eq2pvIdx_
protected

◆ pv2eqIdx_

template<int numEq>
std::array<unsigned int, numEq> Dumux::BoundaryTypes< numEq >::pv2eqIdx_
protected

The documentation for this class was generated from the following file: