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

A multidomain wrapper for multiple grid variables. More...

#include <dumux/multidomain/fvgridvariables.hh>

Description

template<class MDTraits>
class Dumux::MultiDomainFVGridVariables< MDTraits >

A multidomain wrapper for multiple grid variables.

Template Parameters
MDTraitsthe multidomain traits

Public Types

template<std::size_t i>
using Type = typename MDTraits::template SubDomain< i >::GridVariables
 export base types of the stored type More...
 
template<std::size_t i>
using PtrType = std::shared_ptr< Type< i > >
 export pointer types the stored type More...
 
using TupleType = typename MDTraits::template Tuple< PtrType >
 export type of tuple of pointers More...
 

Public Member Functions

 MultiDomainFVGridVariables ()=default
 The default constructor. More...
 
 MultiDomainFVGridVariables (MultiDomainFVGridGeometry< MDTraits > gridGeometries, MultiDomainFVProblem< MDTraits > problems)
 Contruct the grid variables. More...
 
 MultiDomainFVGridVariables (TupleType ggTuple)
 Construct wrapper from a tuple of grid variables. More...
 
void init (const SolutionVector &sol)
 initialize all variables More...
 
void update (const SolutionVector &sol, bool forceFluxCacheUpdate=false)
 update all variables More...
 
void updateAfterGridAdaption (const SolutionVector &sol)
 update all variables after grid adaption More...
 
void advanceTimeStep ()
 Sets the current state as the previous for next time step. More...
 
void resetTimeStep (const SolutionVector &sol)
 resets state to the one before time integration More...
 
template<std::size_t i>
const Type< i > & operator[] (Dune::index_constant< i > id) const
 return the grid variables for domain with index i More...
 
template<std::size_t i>
Type< i > & operator[] (Dune::index_constant< i > id)
 return the grid variables for domain with index i More...
 
template<std::size_t i>
const PtrType< i > & get (Dune::index_constant< i > id=Dune::index_constant< i >{}) const
 access the ith grid variables pointer we are wrapping More...
 
template<std::size_t i>
PtrType< i > & get (Dune::index_constant< i > id=Dune::index_constant< i >{})
 access the ith grid variables pointer we are wrapping More...
 
template<std::size_t i>
void set (PtrType< i > p, Dune::index_constant< i > id=Dune::index_constant< i >{})
 set the pointer for sub domain i More...
 
TupleType getTuple ()
 return the grid variables tuple we are wrapping More...
 
TupleTypeasTuple ()
 Access the underlying tuple representation. More...
 
const TupleTypeasTuple () const
 Access the underlying tuple representation. More...
 

Member Typedef Documentation

◆ PtrType

template<class MDTraits >
template<std::size_t i>
using Dumux::MultiDomainFVGridVariables< MDTraits >::PtrType = std::shared_ptr<Type<i> >

export pointer types the stored type

◆ TupleType

template<class MDTraits >
using Dumux::MultiDomainFVGridVariables< MDTraits >::TupleType = typename MDTraits::template Tuple<PtrType>

export type of tuple of pointers

◆ Type

template<class MDTraits >
template<std::size_t i>
using Dumux::MultiDomainFVGridVariables< MDTraits >::Type = typename MDTraits::template SubDomain<i>::GridVariables

export base types of the stored type

Constructor & Destructor Documentation

◆ MultiDomainFVGridVariables() [1/3]

template<class MDTraits >
Dumux::MultiDomainFVGridVariables< MDTraits >::MultiDomainFVGridVariables ( )
default

The default constructor.

◆ MultiDomainFVGridVariables() [2/3]

template<class MDTraits >
Dumux::MultiDomainFVGridVariables< MDTraits >::MultiDomainFVGridVariables ( MultiDomainFVGridGeometry< MDTraits >  gridGeometries,
MultiDomainFVProblem< MDTraits >  problems 
)
inline

Contruct the grid variables.

Parameters
gridGeometriesa multidomain wrapper of a grid geometry tuple
problemsa multidomain wrapper of a problem tuple

◆ MultiDomainFVGridVariables() [3/3]

template<class MDTraits >
Dumux::MultiDomainFVGridVariables< MDTraits >::MultiDomainFVGridVariables ( TupleType  ggTuple)
inline

Construct wrapper from a tuple of grid variables.

Parameters
ggTuplea tuple of shared_ptrs to the grid variables

Member Function Documentation

◆ advanceTimeStep()

template<class MDTraits >
void Dumux::MultiDomainFVGridVariables< MDTraits >::advanceTimeStep ( )
inline

Sets the current state as the previous for next time step.

Note
this has to be called at the end of each time step

◆ asTuple() [1/2]

template<class MDTraits >
TupleType & Dumux::MultiDomainFVGridVariables< MDTraits >::asTuple ( )
inline

Access the underlying tuple representation.

◆ asTuple() [2/2]

template<class MDTraits >
const TupleType & Dumux::MultiDomainFVGridVariables< MDTraits >::asTuple ( ) const
inline

Access the underlying tuple representation.

◆ get() [1/2]

template<class MDTraits >
template<std::size_t i>
PtrType< i > & Dumux::MultiDomainFVGridVariables< MDTraits >::get ( Dune::index_constant< i >  id = Dune::index_constant<i>{})
inline

access the ith grid variables pointer we are wrapping

◆ get() [2/2]

template<class MDTraits >
template<std::size_t i>
const PtrType< i > & Dumux::MultiDomainFVGridVariables< MDTraits >::get ( Dune::index_constant< i >  id = Dune::index_constant<i>{}) const
inline

access the ith grid variables pointer we are wrapping

◆ getTuple()

template<class MDTraits >
TupleType Dumux::MultiDomainFVGridVariables< MDTraits >::getTuple ( )
inline

return the grid variables tuple we are wrapping

Note
the copy is not expensive since it is a tuple of shared pointers

◆ init()

template<class MDTraits >
void Dumux::MultiDomainFVGridVariables< MDTraits >::init ( const SolutionVector &  sol)
inline

initialize all variables

◆ operator[]() [1/2]

template<class MDTraits >
template<std::size_t i>
Type< i > & Dumux::MultiDomainFVGridVariables< MDTraits >::operator[] ( Dune::index_constant< i >  id)
inline

return the grid variables for domain with index i

◆ operator[]() [2/2]

template<class MDTraits >
template<std::size_t i>
const Type< i > & Dumux::MultiDomainFVGridVariables< MDTraits >::operator[] ( Dune::index_constant< i >  id) const
inline

return the grid variables for domain with index i

◆ resetTimeStep()

template<class MDTraits >
void Dumux::MultiDomainFVGridVariables< MDTraits >::resetTimeStep ( const SolutionVector &  sol)
inline

resets state to the one before time integration

◆ set()

template<class MDTraits >
template<std::size_t i>
void Dumux::MultiDomainFVGridVariables< MDTraits >::set ( PtrType< i >  p,
Dune::index_constant< i >  id = Dune::index_constant<i>{} 
)
inline

set the pointer for sub domain i

◆ update()

template<class MDTraits >
void Dumux::MultiDomainFVGridVariables< MDTraits >::update ( const SolutionVector &  sol,
bool  forceFluxCacheUpdate = false 
)
inline

update all variables

◆ updateAfterGridAdaption()

template<class MDTraits >
void Dumux::MultiDomainFVGridVariables< MDTraits >::updateAfterGridAdaption ( const SolutionVector &  sol)
inline

update all variables after grid adaption


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