3.1-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::TwoPTwoCCO2PrimaryVariableSwitch Class Reference

The primary variable switch for the 2p2c-CO2 model controlling the phase presence state variable. More...

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

Inheritance diagram for Dumux::TwoPTwoCCO2PrimaryVariableSwitch:
Inheritance graph

Description

The primary variable switch for the 2p2c-CO2 model controlling the phase presence state variable.

The phase switch occurs when the equilibrium concentration of a component in a phase is exceeded, instead of the sum of the components in the virtual phase (the phase which is not present) being greater that unity as done in the 2p2c model.

Public Member Functions

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...
 
bool update (SolutionVector &curSol, GridVariables &gridVariables, const Problem &problem, const typename GridVariables::GridGeometry &gridGeometry)
 Updates the variable switch / phase presence. More...
 
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...
 
void updateSwitchedVolVars (const Problem &problem, const typename GridVariables::GridGeometry::GridView::template Codim< 0 >::Entity &element, const typename GridVariables::GridGeometry &gridGeometry, GridVariables &gridVariables, const SolutionVector &uCurrentIter) const
 Do nothing when volume variables are not cached globally. More...
 
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...
 
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) const
 Do nothing when flux variables are not cached globally or the box method is used. More...
 
void updateBoundary (const Problem &problem, const typename GridVariables::GridGeometry &gridGeometry, GridVariables &gridVariables, SolutionVector &sol)
 Updates the the primary variables state at the boundary. More...
 
void updateBoundary (const Problem &problem, const typename GridVariables::GridGeometry &gridGeometry, GridVariables &gridVariables, SolutionVector &sol) const
 Do nothing when the box method is not used. More...
 
int verbosity () const
 The verbosity level. More...
 

Protected Member Functions

template<class VolumeVariables , class IndexType , class GlobalPosition >
bool update_ (typename VolumeVariables::PrimaryVariables &priVars, const VolumeVariables &volVars, IndexType dofIdxGlobal, const GlobalPosition &globalPos)
 
TwoPTwoCCO2PrimaryVariableSwitchasImp_ ()
 Return actual implementation (static polymorphism) More...
 
const TwoPTwoCCO2PrimaryVariableSwitchasImp_ () const
 Return actual implementation (static polymorphism) More...
 
bool update_ (typename VolumeVariables::PrimaryVariables &priVars, const VolumeVariables &volVars, std::size_t dofIdxGlobal, const GlobalPosition &globalPos)
 

Protected Attributes

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

Member Function Documentation

◆ asImp_() [1/2]

Return actual implementation (static polymorphism)

◆ asImp_() [2/2]

Return actual implementation (static polymorphism)

◆ reset()

void Dumux::PrimaryVariableSwitch< TwoPTwoCCO2PrimaryVariableSwitch >::reset ( const std::size_t  numDofs)
inlineinherited

Reset all flags.

◆ update()

bool Dumux::PrimaryVariableSwitch< TwoPTwoCCO2PrimaryVariableSwitch >::update ( SolutionVector &  curSol,
GridVariables &  gridVariables,
const Problem &  problem,
const typename GridVariables::GridGeometry &  gridGeometry 
)
inlineinherited

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_() [1/2]

template<class VolumeVariables , class IndexType , class GlobalPosition >
bool Dumux::TwoPTwoCCO2PrimaryVariableSwitch::update_ ( typename VolumeVariables::PrimaryVariables &  priVars,
const VolumeVariables &  volVars,
IndexType  dofIdxGlobal,
const GlobalPosition &  globalPos 
)
inlineprotected

◆ update_() [2/2]

bool Dumux::PrimaryVariableSwitch< TwoPTwoCCO2PrimaryVariableSwitch >::update_ ( typename VolumeVariables::PrimaryVariables &  priVars,
const VolumeVariables &  volVars,
std::size_t  dofIdxGlobal,
const GlobalPosition &  globalPos 
)
inlineprotectedinherited

◆ updateBoundary() [1/2]

void Dumux::PrimaryVariableSwitch< TwoPTwoCCO2PrimaryVariableSwitch >::updateBoundary ( const Problem &  problem,
const typename GridVariables::GridGeometry &  gridGeometry,
GridVariables &  gridVariables,
SolutionVector &  sol 
)
inlineinherited

Updates the the primary variables state at the boundary.

Required when a Dirichlet BC differes from the initial conditon (only for box method).

◆ updateBoundary() [2/2]

void Dumux::PrimaryVariableSwitch< TwoPTwoCCO2PrimaryVariableSwitch >::updateBoundary ( const Problem &  problem,
const typename GridVariables::GridGeometry &  gridGeometry,
GridVariables &  gridVariables,
SolutionVector &  sol 
) const
inlineinherited

Do nothing when the box method is not used.

◆ updateSwitchedFluxVarsCache() [1/2]

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

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

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

◆ updateSwitchedFluxVarsCache() [2/2]

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

Do nothing when flux variables are not cached globally or the box method is used.

◆ updateSwitchedVolVars() [1/2]

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

Updates the volume variables whose primary variables were switched.

Required when volume variables are cached globally.

◆ updateSwitchedVolVars() [2/2]

void Dumux::PrimaryVariableSwitch< TwoPTwoCCO2PrimaryVariableSwitch >::updateSwitchedVolVars ( const Problem &  problem,
const typename GridVariables::GridGeometry::GridView::template Codim< 0 >::Entity &  element,
const typename GridVariables::GridGeometry &  gridGeometry,
GridVariables &  gridVariables,
const SolutionVector &  uCurrentIter 
) const
inlineinherited

Do nothing when volume variables are not cached globally.

◆ verbosity()

int Dumux::PrimaryVariableSwitch< TwoPTwoCCO2PrimaryVariableSwitch >::verbosity ( ) const
inlineinherited

The verbosity level.

◆ wasSwitched()

bool Dumux::PrimaryVariableSwitch< TwoPTwoCCO2PrimaryVariableSwitch >::wasSwitched ( std::size_t  dofIdxGlobal) const
inlineinherited

If the primary variables were recently switched.

Member Data Documentation

◆ visited_

std::vector<bool> Dumux::PrimaryVariableSwitch< TwoPTwoCCO2PrimaryVariableSwitch >::visited_
protectedinherited

◆ wasSwitched_

std::vector<bool> Dumux::PrimaryVariableSwitch< TwoPTwoCCO2PrimaryVariableSwitch >::wasSwitched_
protectedinherited

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