3.2-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::TwoPOneCPrimaryVariableSwitch Class Reference

The primary variable switch for the two-phase one-component model. More...

#include <dumux/porousmediumflow/2p1c/primaryvariableswitch.hh>

Inheritance diagram for Dumux::TwoPOneCPrimaryVariableSwitch:
Inheritance graph

Description

The primary variable switch for the two-phase one-component 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 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 updateBoundary (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

template<class VolumeVariables , class GlobalPosition >
bool update_ (typename VolumeVariables::PrimaryVariables &priVars, const VolumeVariables &volVars, std::size_t dofIdxGlobal, const GlobalPosition &globalPos)
 Performs variable switch at a degree of freedom location. More...
 
TwoPOneCPrimaryVariableSwitchasImp_ ()
 Return actual implementation (static polymorphism) More...
 
const TwoPOneCPrimaryVariableSwitchasImp_ () const
 Return actual implementation (static polymorphism) More...
 
bool skipDof_ (const typename Geometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const Geometry &fvGeometry, const typename Geometry::SubControlVolume &scv, const Problem &problem)
 
bool isConstrainedDof_ (const typename Geometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const Geometry &fvGeometry, const typename Geometry::SubControlVolume &scv, const Problem &problem)
 

Protected Attributes

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

Member Function Documentation

◆ asImp_() [1/2]

Return actual implementation (static polymorphism)

◆ asImp_() [2/2]

const TwoPOneCPrimaryVariableSwitch & Dumux::PrimaryVariableSwitch< TwoPOneCPrimaryVariableSwitch >::asImp_ ( ) const
inlineprotectedinherited

Return actual implementation (static polymorphism)

◆ isConstrainedDof_()

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

◆ reset()

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

Reset all flags.

◆ skipDof_()

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

◆ update()

bool Dumux::PrimaryVariableSwitch< TwoPOneCPrimaryVariableSwitch >::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_()

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

Performs variable switch at a degree of freedom location.

Parameters
priVarsThe primary variables at the given degree of freedom (dof) location.
volVarsThe volume variables.
dofIdxGlobalThe respective dof index.
globalPosThe global position of the dof.

◆ updateBoundary()

void Dumux::PrimaryVariableSwitch< TwoPOneCPrimaryVariableSwitch >::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).

◆ updateSwitchedFluxVarsCache()

void Dumux::PrimaryVariableSwitch< TwoPOneCPrimaryVariableSwitch >::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).

◆ updateSwitchedVolVars()

void Dumux::PrimaryVariableSwitch< TwoPOneCPrimaryVariableSwitch >::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.

◆ verbosity()

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

The verbosity level.

◆ wasSwitched()

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

If the primary variables were recently switched.

Member Data Documentation

◆ visited_

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

◆ wasSwitched_

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

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