3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Dumux::PrimaryVariableSwitch< Implementation > Class Template Reference

The primary variable switch controlling the phase presence state variable. More...

#include <dumux/porousmediumflow/compositional/primaryvariableswitch.hh>

Inheritance diagram for Dumux::PrimaryVariableSwitch< Implementation >:

Description

template<class Implementation>
class Dumux::PrimaryVariableSwitch< Implementation >

The primary variable switch controlling the phase presence state variable.

Public Member Functions

 PrimaryVariableSwitch (int verbosity=1)
 
bool wasSwitched (std::size_t dofIdxGlobal) const
 If the primary variables were recently switched. More...
 
void reset (const std::size_t numDofs)
 Reset all flags. More...
 
template<class SolutionVector , class GridVariables , class Problem >
bool update (SolutionVector &curSol, GridVariables &gridVariables, const Problem &problem, const typename GridVariables::GridGeometry &gridGeometry)
 Updates the variable switch / phase presence. More...
 
template<class Problem , class GridVariables , class SolutionVector >
void updateSwitchedVolVars (const Problem &problem, const typename GridVariables::GridGeometry::GridView::template Codim< 0 >::Entity &element, const typename GridVariables::GridGeometry &gridGeometry, GridVariables &gridVariables, const SolutionVector &sol)
 Updates the volume variables whose primary variables were switched. More...
 
template<class Problem , class GridVariables , class SolutionVector >
void updateSwitchedFluxVarsCache (const Problem &problem, const typename GridVariables::GridGeometry::GridView::template Codim< 0 >::Entity &element, const typename GridVariables::GridGeometry &gridGeometry, GridVariables &gridVariables, const SolutionVector &sol)
 Updates the fluxVars cache for dof whose primary variables were switched. More...
 
template<class Problem , class GridVariables , class SolutionVector >
void updateDirichletConstraints (const Problem &problem, const typename GridVariables::GridGeometry &gridGeometry, GridVariables &gridVariables, SolutionVector &sol)
 Updates the the primary variables state at the boundary. More...
 
int verbosity () const
 The verbosity level. More...
 

Protected Member Functions

Implementation & asImp_ ()
 Return actual implementation (static polymorphism) More...
 
const Implementation & asImp_ () const
 Return actual implementation (static polymorphism) More...
 
template<class VolumeVariables , class GlobalPosition >
bool update_ (typename VolumeVariables::PrimaryVariables &priVars, const VolumeVariables &volVars, std::size_t dofIdxGlobal, const GlobalPosition &globalPos)
 
template<class Geometry , class Problem >
bool skipDof_ (const typename Geometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const Geometry &fvGeometry, const typename Geometry::SubControlVolume &scv, const Problem &problem)
 
template<class Geometry , class Problem >
bool isConstrainedDof_ (const typename Geometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const Geometry &fvGeometry, const typename Geometry::SubControlVolume &scv, const Problem &problem)
 
template<class Problem , class Element , class SubControlVolume , class SolutionVector >
bool handleDirichletBoundaryCondition_ (const Problem &problem, const Element &element, const SubControlVolume &scv, SolutionVector &sol)
 
template<class Problem , class Element , class SubControlVolume , class SolutionVector >
bool handleInternalDirichletConstraint_ (const Problem &problem, const Element &element, const SubControlVolume &scv, SolutionVector &sol)
 

Protected Attributes

std::vector< bool > wasSwitched_
 
std::vector< bool > visited_
 

Constructor & Destructor Documentation

◆ PrimaryVariableSwitch()

template<class Implementation >
Dumux::PrimaryVariableSwitch< Implementation >::PrimaryVariableSwitch ( int  verbosity = 1)
inline

Member Function Documentation

◆ asImp_() [1/2]

template<class Implementation >
Implementation & Dumux::PrimaryVariableSwitch< Implementation >::asImp_ ( )
inlineprotected

Return actual implementation (static polymorphism)

◆ asImp_() [2/2]

template<class Implementation >
const Implementation & Dumux::PrimaryVariableSwitch< Implementation >::asImp_ ( ) const
inlineprotected

Return actual implementation (static polymorphism)

◆ handleDirichletBoundaryCondition_()

template<class Implementation >
template<class Problem , class Element , class SubControlVolume , class SolutionVector >
bool Dumux::PrimaryVariableSwitch< Implementation >::handleDirichletBoundaryCondition_ ( const Problem &  problem,
const Element &  element,
const SubControlVolume &  scv,
SolutionVector &  sol 
)
inlineprotected

◆ handleInternalDirichletConstraint_()

template<class Implementation >
template<class Problem , class Element , class SubControlVolume , class SolutionVector >
bool Dumux::PrimaryVariableSwitch< Implementation >::handleInternalDirichletConstraint_ ( const Problem &  problem,
const Element &  element,
const SubControlVolume &  scv,
SolutionVector &  sol 
)
inlineprotected

◆ isConstrainedDof_()

template<class Implementation >
template<class Geometry , class Problem >
bool Dumux::PrimaryVariableSwitch< Implementation >::isConstrainedDof_ ( const typename Geometry::GridGeometry::GridView::template Codim< 0 >::Entity &  element,
const Geometry &  fvGeometry,
const typename Geometry::SubControlVolume &  scv,
const Problem &  problem 
)
inlineprotected

◆ reset()

template<class Implementation >
void Dumux::PrimaryVariableSwitch< Implementation >::reset ( const std::size_t  numDofs)
inline

Reset all flags.

◆ skipDof_()

template<class Implementation >
template<class Geometry , class Problem >
bool Dumux::PrimaryVariableSwitch< Implementation >::skipDof_ ( const typename Geometry::GridGeometry::GridView::template Codim< 0 >::Entity &  element,
const Geometry &  fvGeometry,
const typename Geometry::SubControlVolume &  scv,
const Problem &  problem 
)
inlineprotected

◆ update()

template<class Implementation >
template<class SolutionVector , class GridVariables , class Problem >
bool Dumux::PrimaryVariableSwitch< Implementation >::update ( SolutionVector &  curSol,
GridVariables &  gridVariables,
const Problem &  problem,
const typename GridVariables::GridGeometry &  gridGeometry 
)
inline

Updates the variable switch / phase presence.

Parameters
curSolThe current solution to be updated / modified
gridVariablesThe secondary variables on the grid
problemThe problem
gridGeometryThe finite-volume grid geometry

◆ update_()

template<class Implementation >
template<class VolumeVariables , class GlobalPosition >
bool Dumux::PrimaryVariableSwitch< Implementation >::update_ ( typename VolumeVariables::PrimaryVariables &  priVars,
const VolumeVariables &  volVars,
std::size_t  dofIdxGlobal,
const GlobalPosition &  globalPos 
)
inlineprotected

◆ updateDirichletConstraints()

template<class Implementation >
template<class Problem , class GridVariables , class SolutionVector >
void Dumux::PrimaryVariableSwitch< Implementation >::updateDirichletConstraints ( const Problem &  problem,
const typename GridVariables::GridGeometry &  gridGeometry,
GridVariables &  gridVariables,
SolutionVector &  sol 
)
inline

Updates the the primary variables state at the boundary.

Required when a Dirichlet constraint (at a boundary or internal) differs from the initial condition.

◆ updateSwitchedFluxVarsCache()

template<class Implementation >
template<class Problem , class GridVariables , class SolutionVector >
void Dumux::PrimaryVariableSwitch< Implementation >::updateSwitchedFluxVarsCache ( const Problem &  problem,
const typename GridVariables::GridGeometry::GridView::template Codim< 0 >::Entity &  element,
const typename GridVariables::GridGeometry &  gridGeometry,
GridVariables &  gridVariables,
const SolutionVector &  sol 
)
inline

Updates the fluxVars cache for dof whose primary variables were switched.

Required when flux variables are cached globally (not for box method).

◆ updateSwitchedVolVars()

template<class Implementation >
template<class Problem , class GridVariables , class SolutionVector >
void Dumux::PrimaryVariableSwitch< Implementation >::updateSwitchedVolVars ( const Problem &  problem,
const typename GridVariables::GridGeometry::GridView::template Codim< 0 >::Entity &  element,
const typename GridVariables::GridGeometry &  gridGeometry,
GridVariables &  gridVariables,
const SolutionVector &  sol 
)
inline

Updates the volume variables whose primary variables were switched.

Required when volume variables are cached globally.

◆ verbosity()

template<class Implementation >
int Dumux::PrimaryVariableSwitch< Implementation >::verbosity ( ) const
inline

The verbosity level.

◆ wasSwitched()

template<class Implementation >
bool Dumux::PrimaryVariableSwitch< Implementation >::wasSwitched ( std::size_t  dofIdxGlobal) const
inline

If the primary variables were recently switched.

Member Data Documentation

◆ visited_

template<class Implementation >
std::vector<bool> Dumux::PrimaryVariableSwitch< Implementation >::visited_
protected

◆ wasSwitched_

template<class Implementation >
std::vector<bool> Dumux::PrimaryVariableSwitch< Implementation >::wasSwitched_
protected

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