3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Files | Classes | Functions
Staggered FV scheme

A staggered finite volume scheme with degrees of freedom at cell-centers and facets. In this implementation, momentum control volumes do not explicitly exist, but the implementation uses workarounds. More...

Description

A staggered finite volume scheme with degrees of freedom at cell-centers and facets. In this implementation, momentum control volumes do not explicitly exist, but the implementation uses workarounds.

Files

file  staggeredfvassembler.hh
 A linear system assembler (residual and Jacobian) for staggered finite volume schemes.
 
file  staggeredlocalresidual.hh
 Calculates the element-wise residual for the staggered FV scheme.
 
file  staggeredfvproblem.hh
 Base class for all staggered fv problems.
 
file  elementfacevariables.hh
 
file  discretization/staggered/elementfluxvariablescache.hh
 
file  staggered/elementsolution.hh
 The local element solution class for staggered methods.
 
file  facesolution.hh
 
file  staggered/freeflow/connectivitymap.hh
 
file  staggered/freeflow/elementvolumevariables.hh
 
file  facevariables.hh
 
file  staggered/freeflow/fvgridgeometrytraits.hh
 
file  staggered/freeflow/gridvolumevariables.hh
 
file  discretization/staggered/freeflow/properties.hh
 Defines a type tag and some properties for ree-flow models using the staggered scheme. This scheme features degrees of freedom at the elements' centers and intersections (faces). TODO: detailed documentation and figures.
 
file  staggeredgeometryhelper.hh
 
file  discretization/staggered/freeflow/subcontrolvolumeface.hh
 
file  discretization/staggered/freeflow/velocityoutput.hh
 
file  discretization/staggered/fvelementgeometry.hh
 
file  discretization/staggered/fvgridgeometry.hh
 
file  gridfacevariables.hh
 
file  discretization/staggered/gridfluxvariablescache.hh
 
file  discretization/staggered/gridvariables.hh
 
file  discretization/staggered/subcontrolvolumeface.hh
 
file  staggeredcouplingmanager.hh
 The interface of the coupling manager for multi domain problems.
 
file  multidomain/staggeredfreeflow/couplingmanager.hh
 The interface of the coupling manager for multi domain problems.
 
file  staggeredtraits.hh
 Linear algebra traits for mixeddimension problems.
 
file  subdomainfclocalassembler.hh
 An assembler for Jacobian and residual contribution per element (face-centered staggered methods) for multidomain problems.
 
file  subdomainstaggeredlocalassembler.hh
 A multidomain assembler for Jacobian and residual contribution per element (staggered method)
 

Classes

class  Dumux::StaggeredFVAssembler< TypeTag, diffMethod, isImplicit >
 A linear system assembler (residual and Jacobian) for staggered finite volume schemes. This is basically just a wrapper for the MultiDomainFVAssembler which simplifies the set-up of uncoupled problems using the staggered scheme. More...
 
class  Dumux::StaggeredLocalResidual< TypeTag >
 Calculates the element-wise residual for the staggered FV scheme. More...
 
class  Dumux::StaggeredFVProblem< TypeTag >
 Base class for all staggered finite-volume problems. More...
 
class  Dumux::StaggeredElementFaceVariables< GridFaceVariables, cachingEnabled >
 Base class for the face variables vector. More...
 
class  Dumux::StaggeredElementFaceVariables< GFV, true >
 Class for the face variables vector. Specialization for the case of storing the face variables globally. More...
 
class  Dumux::StaggeredElementFaceVariables< GFV, false >
 Class for the face variables vector. Specialization for the case of not storing the face variables globally. More...
 
class  Dumux::StaggeredElementFluxVariablesCache< GridFluxVariablesCache, cachingEnabled >
 Base class for the stencil local flux variables cache for the staggered model. More...
 
class  Dumux::StaggeredElementFluxVariablesCache< GFVC, true >
 Class for the stencil local flux variables cache for the staggered model. Specialization for the case of storing the fluxvars cache globally. More...
 
class  Dumux::StaggeredElementFluxVariablesCache< GFVC, false >
 Class for the stencil local flux variables cache for the staggered model. Specialization for the case of not storing the fluxvars cache globally. More...
 
class  Dumux::StaggeredFaceSolution< FaceSolutionVector >
 The global face variables class for staggered models. More...
 
class  Dumux::StaggeredFreeFlowConnectivityMap< GridGeometry >
 Stores the dof indices corresponding to the neighboring cell centers and faces that contribute to the derivative calculation. Specialization for the staggered free flow model. More...
 
class  Dumux::StaggeredElementVolumeVariables< GVV, cachingEnabled >
 Base class for the element volume variables vector for the staggered model. More...
 
class  Dumux::StaggeredElementVolumeVariables< GVV, true >
 Class for the element volume variables vector for the staggered model. Specialization in case the volume variables are stored globally. More...
 
class  Dumux::StaggeredElementVolumeVariables< GVV, false >
 Class for the element volume variables vector for the staggered model. Specialization in case the volume variables are not stored globally. More...
 
class  Dumux::StaggeredFaceVariables< FacePrimaryVariables, dim, upwindSchemeOrder >
 The face variables class for free flow staggered grid models. Contains all relevant velocities for the assembly of the momentum balance. When the upwindSchemeOrder is set to 2, additional velocities located at Dofs further from the central stencil will be added and used when calculating the advective term. When the order remains at 1, these velocities will not be provided. More...
 
struct  Dumux::StaggeredFreeFlowDefaultFVGridGeometryTraits< GridView, upwOrder, MapperTraits >
 Default traits for the finite volume grid geometry. More...
 
class  Dumux::StaggeredGridVolumeVariables< Traits, cachingEnabled >
 Grid volume variables class for staggered models. More...
 
class  Dumux::StaggeredGridVolumeVariables< Traits, true >
 Grid volume variables class for staggered models. Specialization in case of storing the volume variables. More...
 
class  Dumux::StaggeredGridVolumeVariables< Traits, false >
 Grid volume variables class for staggered models. Specialization in case of not storing the volume variables. More...
 
struct  Dumux::Detail::PairData< GridView, upwindSchemeOrder >
 Parallel Data stored per sub face. More...
 
struct  Dumux::Detail::AxisData< GridView, upwindSchemeOrder >
 In Axis Data stored per sub face. More...
 
struct  Dumux::Detail::AxisData< GridView, 1 >
 In Axis Data stored per sub face for first-order scheme. More...
 
class  Dumux::FreeFlowStaggeredGeometryHelper< GridView, upwindSchemeOrder >
 Helper class constructing the dual grid finite volume geometries for the free flow staggered discretization method. More...
 
struct  Dumux::FreeFlowStaggeredDefaultScvfGeometryTraits< GridView, upwindSchemeOrder >
 Default traits class to be used for the sub-control volume faces for the free-flow staggered finite volume scheme. More...
 
class  Dumux::FreeFlowStaggeredSubControlVolumeFace< GV, upwindSchemeOrder, T >
 Class for a sub control volume face in the staggered method, i.e a part of the boundary of a sub control volume we compute fluxes on. This is a specialization for free flow models. More...
 
class  Dumux::StaggeredFreeFlowVelocityOutput< GridVariables, SolutionVector >
 Velocity output for staggered free-flow models. More...
 
class  Dumux::StaggeredFVElementGeometry< GG, enableGridGeometryCache >
 Stencil-local finite volume geometry (scvs and scvfs) for staggered models This builds up the sub control volumes and sub control volume faces for each element in the local scope we are restricting to, e.g. stencil or element. More...
 
class  Dumux::StaggeredFVElementGeometry< GG, true >
 Base class for the finite volume geometry vector for staggered models This locally builds up the sub control volumes and sub control volume faces for each element. Specialization for grid caching enabled. More...
 
class  Dumux::StaggeredFVElementGeometry< GG, false >
 Base class for the finite volume geometry vector for staggered models This locally builds up the sub control volumes and sub control volume faces for each element. Specialization for grid caching enabled. More...
 
class  Dumux::GridGeometryView< ActualGridGeometry >
 Base class for cell center of face specific auxiliary FvGridGeometry classes. Provides a common interface and a pointer to the actual gridGeometry. More...
 
class  Dumux::CellCenterFVGridGeometry< ActualGridGeometry >
 Cell center specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework. More...
 
class  Dumux::FaceFVGridGeometry< ActualGridGeometry >
 Face specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework. More...
 
class  Dumux::StaggeredFVGridGeometry< GridView, cachingEnabled, Traits >
 Base class for the finite volume geometry vector for staggered models This builds up the sub control volumes and sub control volume faces for each element. More...
 
class  Dumux::StaggeredFVGridGeometry< GV, true, T >
 Base class for the finite volume geometry vector for staggered models This builds up the sub control volumes and sub control volume faces for each element. Specialization in case the FVElementGeometries are stored. More...
 
class  Dumux::StaggeredFVGridGeometry< GV, false, T >
 Base class for the finite volume geometry vector for staggered models This builds up the sub control volumes and sub control volume faces for each element. Specialization in case the FVElementGeometries are stored. More...
 
struct  Dumux::StaggeredDefaultGridFaceVariablesTraits< P, FV >
 Traits class to be used for the StaggeredGridFaceVariables. More...
 
class  Dumux::StaggeredGridFaceVariables< Problem, FaceVariables, cachingEnabled, Traits >
 Face variables cache class for staggered models. More...
 
class  Dumux::StaggeredGridFaceVariables< P, FV, true, Traits >
 Face variables cache class for staggered models. Specialization in case of storing the face variables. More...
 
class  Dumux::StaggeredGridFaceVariables< P, FV, false, Traits >
 Face variables cache class for staggered models. Specialization in case of not storing the face variables. More...
 
struct  Dumux::StaggeredDefaultGridFluxVariablesCacheTraits< P, FVC, FVCF, upwOrder >
 Traits class to be used for the StaggeredGridVFluxVariablesCache. More...
 
class  Dumux::StaggeredGridFluxVariablesCache< Problem, FluxVariablesCache, FluxVariablesCacheFiller, EnableGridFluxVariablesCache, upwindSchemeOrder, Traits >
 Flux variables cache class for staggered models. More...
 
class  Dumux::StaggeredGridFluxVariablesCache< P, FVC, FVCF, true, upwindSchemeOrder, TheTraits >
 Flux variables cache class for staggered models. Specialization in case of storing the flux cache. More...
 
class  Dumux::StaggeredGridFluxVariablesCache< P, FVC, FVCF, false, upwindSchemeOrder, TheTraits >
 Flux variables cache class for staggered models. Specialization in case of not storing the flux cache. More...
 
class  Dumux::StaggeredGridVariablesView< ActualGridVariables >
 Base class for cell center of face specific auxiliary GridVariables classes. Provides a common interface and a pointer to the actual grid variables. More...
 
class  Dumux::CellCenterGridVariablesView< ActualGridVariables >
 Cell center specific auxiliary GridVariables classes. Required for the Dumux multi-domain framework. More...
 
class  Dumux::FaceGridVariablesView< ActualGridVariables >
 Face specific auxiliary GridVariables classes. Required for the Dumux multi-domain framework. More...
 
class  Dumux::StaggeredGridVariables< GG, GVV, GFVC, GFV >
 Class storing data associated to scvs and scvfs. More...
 
class  Dumux::BaseStaggeredGeometryHelper< GridView >
 Base class for a staggered grid geometry helper. More...
 
struct  Dumux::StaggeredDefaultScvfGeometryTraits< GridView >
 Default traits class to be used for the sub-control volume faces for the staggered finite volume scheme. More...
 
class  Dumux::StaggeredSubControlVolumeFace< GV, T >
 Class for a sub control volume face in the staggered method, i.e a part of the boundary of a sub control volume we compute fluxes on. More...
 
class  Dumux::StaggeredCouplingManager< MDTraits >
 Base coupling manager for the staggered discretization. More...
 
class  Dumux::StaggeredFreeFlowCouplingManager< Traits >
 The interface of the coupling manager for free flow systems. More...
 
class  Dumux::SubDomainFaceCenteredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, dm, implicit >
 A base class for all face-centered staggered local assemblers. More...
 
class  Dumux::SubDomainFaceCenteredLocalAssembler< id, TypeTag, Assembler, DM, implicit >
 The face-centered staggered scheme multidomain local assembler. More...
 
class  Dumux::SubDomainFaceCenteredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >
 Face-centered staggered scheme multi domain local assembler using numeric differentiation and implicit time discretization. More...
 
class  Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >
 A base class for all multidomain local assemblers (staggered) More...
 
class  Dumux::SubDomainStaggeredLocalAssemblerImplicitBase< id, TypeTag, Assembler, Implementation >
 A base class for all implicit multidomain local assemblers (staggered) More...
 
class  Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DM, implicit >
 The staggered multidomain local assembler. More...
 
class  Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >
 Staggered scheme local assembler using numeric differentiation and implicit time discretization. More...
 

Functions

template<class PrimaryVariables , class CellCenterPrimaryVariables >
PrimaryVariables Dumux::makePriVarsFromCellCenterPriVars (const CellCenterPrimaryVariables &cellCenterPriVars)
 Helper function to create a PrimaryVariables object from CellCenterPrimaryVariables. More...
 
template<class PrimaryVariables , class CellCenterPrimaryVariables >
StaggeredElementSolution< PrimaryVariables > Dumux::makeElementSolutionFromCellCenterPrivars (const CellCenterPrimaryVariables &cellCenterPriVars)
 Helper function to create an elementSolution from cell center primary variables. More...
 
template<class Vector >
static unsigned int Dumux::directionIndex (Vector &&vector)
 Returns the dirction index of the facet (0 = x, 1 = y, 2 = z) More...
 
template<class SubControlVolumeFace >
SubControlVolumeFace Dumux::makeStaggeredBoundaryFace (const SubControlVolumeFace &scvf, const typename SubControlVolumeFace::GlobalPosition &newCenter)
 Helper function to turn a given cell scvface into a fake boundary face. More...
 
template<class LocalAssemblerI , std::size_t j>
decltype(auto) Dumux::StaggeredCouplingManager< MDTraits >::evalCouplingResidual (Dune::index_constant< faceIdx > domainI, const SubControlVolumeFace &scvfI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ) const
 evaluates the face residual of a coupled face of domain i which depends on the variables at the degree of freedom with index dofIdxGlobalJ of domain j More...
 
template<std::size_t j, class LocalAssemblerI >
decltype(auto) Dumux::StaggeredFreeFlowCouplingManager< Traits >::evalCouplingResidual (Dune::index_constant< freeFlowMomentumIndex > domainI, const LocalAssemblerI &localAssemblerI, const SubControlVolume< freeFlowMomentumIndex > &scvI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ) const
 evaluates the element residual of a coupled element of domain i which depends on the variables at the degree of freedom with index dofIdxGlobalJ of domain j More...
 

member functions concerning variable caching for element residual evaluations

template<std::size_t i, std::size_t j, class LocalAssemblerI >
void Dumux::StaggeredFreeFlowCouplingManager< Traits >::updateCouplingContext (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ, const PrimaryVariables< j > &priVarsJ, int pvIdxJ)
 updates all data and variables that are necessary to evaluate the residual of the element of domain i this is called whenever one of the primary variables that the element residual depends on changes in domain j More...
 

Function Documentation

◆ directionIndex()

template<class Vector >
static unsigned int Dumux::directionIndex ( Vector &&  vector)
inlinestatic

Returns the dirction index of the facet (0 = x, 1 = y, 2 = z)

◆ evalCouplingResidual() [1/2]

template<class MDTraits >
template<class LocalAssemblerI , std::size_t j>
decltype(auto) Dumux::StaggeredCouplingManager< MDTraits >::evalCouplingResidual ( Dune::index_constant< faceIdx domainI,
const SubControlVolumeFace &  scvfI,
const LocalAssemblerI &  localAssemblerI,
Dune::index_constant< j >  domainJ,
std::size_t  dofIdxGlobalJ 
) const
inline

evaluates the face residual of a coupled face of domain i which depends on the variables at the degree of freedom with index dofIdxGlobalJ of domain j

Parameters
domainIthe domain index of domain i
scvfIthe subcontrol volume face whose residual shall be evaluated of domain i
localAssemblerIthe local assembler assembling the element residual of an element of domain i
domainJthe domain index of domain j
dofIdxGlobalJthe index of the degree of freedom of domain j which has an influence on the element residual of domain i
Note
the default implementation evaluates the complete face residual if only certain terms of the residual of the residual are coupled to dof with index dofIdxGlobalJ the function can be overloaded in the coupling manager
Returns
the face residual

◆ evalCouplingResidual() [2/2]

template<class Traits >
template<std::size_t j, class LocalAssemblerI >
decltype(auto) Dumux::StaggeredFreeFlowCouplingManager< Traits >::evalCouplingResidual ( Dune::index_constant< freeFlowMomentumIndex domainI,
const LocalAssemblerI &  localAssemblerI,
const SubControlVolume< freeFlowMomentumIndex > &  scvI,
Dune::index_constant< j >  domainJ,
std::size_t  dofIdxGlobalJ 
) const
inline

evaluates the element residual of a coupled element of domain i which depends on the variables at the degree of freedom with index dofIdxGlobalJ of domain j

Parameters
domainIthe domain index of domain i
localAssemblerIthe local assembler assembling the element residual of an element of domain i
scvIthe sub-control-volume of domain i
domainJthe domain index of domain j
dofIdxGlobalJthe index of the degree of freedom of domain j which has an influence on the element residual of domain i
Note
the element whose residual is to be evaluated can be retrieved from the local assembler as localAssemblerI.element() as well as all up-to-date variables and caches.
the default implementation evaluates the complete element residual if only parts (i.e. only certain scvs, or only certain terms of the residual) of the residual are coupled to dof with index dofIdxGlobalJ the function can be overloaded in the coupling manager
Returns
the element residual

◆ makeElementSolutionFromCellCenterPrivars()

template<class PrimaryVariables , class CellCenterPrimaryVariables >
StaggeredElementSolution< PrimaryVariables > Dumux::makeElementSolutionFromCellCenterPrivars ( const CellCenterPrimaryVariables &  cellCenterPriVars)

Helper function to create an elementSolution from cell center primary variables.

Template Parameters
PrimaryVariablesThe type of the desired primary variables object
CellCenterPrimaryVariablesThe type of the cell center (input) primary variables object
Parameters
cellCenterPriVarsThe cell center (input) primary variables object

◆ makePriVarsFromCellCenterPriVars()

template<class PrimaryVariables , class CellCenterPrimaryVariables >
PrimaryVariables Dumux::makePriVarsFromCellCenterPriVars ( const CellCenterPrimaryVariables &  cellCenterPriVars)

Helper function to create a PrimaryVariables object from CellCenterPrimaryVariables.

Template Parameters
PrimaryVariablesThe type of the desired primary variables object
CellCenterPrimaryVariablesThe type of the cell center (input) primary variables object
Parameters
cellCenterPriVarsThe cell center (input) primary variables object

◆ makeStaggeredBoundaryFace()

template<class SubControlVolumeFace >
SubControlVolumeFace Dumux::makeStaggeredBoundaryFace ( const SubControlVolumeFace &  scvf,
const typename SubControlVolumeFace::GlobalPosition &  newCenter 
)

Helper function to turn a given cell scvface into a fake boundary face.

Note
This function is considered internal to staggered freeflow and may change or be deleted at any time without deprecation warning

◆ updateCouplingContext()

template<class Traits >
template<std::size_t i, std::size_t j, class LocalAssemblerI >
void Dumux::StaggeredFreeFlowCouplingManager< Traits >::updateCouplingContext ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
Dune::index_constant< j >  domainJ,
std::size_t  dofIdxGlobalJ,
const PrimaryVariables< j > &  priVarsJ,
int  pvIdxJ 
)
inline

updates all data and variables that are necessary to evaluate the residual of the element of domain i this is called whenever one of the primary variables that the element residual depends on changes in domain j

Parameters
domainIthe domain index of domain i
localAssemblerIthe local assembler assembling the element residual of an element of domain i
domainJthe domain index of domain j
dofIdxGlobalJthe index of the degree of freedom of domain j whose solution changed
priVarsJthe new solution at the degree of freedom of domain j with index dofIdxGlobalJ
pvIdxJthe index of the primary variable of domain j which has been updated
Note
this concerns all data that is used in the evaluation of the element residual and depends on the primary variables at the degree of freedom location with index dofIdxGlobalJ
the element whose residual is to be evaluated can be retrieved from the local assembler as localAssemblerI.element()
per default, we udpate the solution vector, if the element residual of domain i depends on more than the primary variables of domain j update the other dependent data here by overloading this function