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::MultiDomainFVGridGeometry< MDTraits > Class Template Reference

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

#include <dumux/multidomain/fvgridgeometry.hh>

Description

template<class MDTraits>
class Dumux::MultiDomainFVGridGeometry< MDTraits >

A multidomain wrapper for multiple grid geometries.

Template Parameters
MDTraitsThe multidomain traits

Public Types

template<std::size_t i>
using Type = typename MDTraits::template SubDomain< i >::GridGeometry
 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

 MultiDomainFVGridGeometry ()=default
 The default constructor. More...
 
template<typename... Args>
 MultiDomainFVGridGeometry (Args &&... args)
 Construct grid geometries for all subdomains. More...
 
 MultiDomainFVGridGeometry (TupleType ggTuple)
 Construct wrapper from a tuple of grid geometries. More...
 
 MultiDomainFVGridGeometry (GVTuple gvTuple)
 Construct wrapper from a tuple of grid views. More...
 
template<typename... Args>
void update (Args &&... args)
 Update all grid geometries (do this e.g. after grid adaption) More...
 
void update ()
 Update all grid geometries (do this again after grid adaption) More...
 
template<std::size_t i>
const Type< i > & operator[] (Dune::index_constant< i >) const
 return the grid geometry for domain with index i More...
 
template<std::size_t i>
Type< i > & operator[] (Dune::index_constant< i >)
 return the grid geometry 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 grid geometry pointer for domain with index i More...
 
template<std::size_t i>
PtrType< i > & get (Dune::index_constant< i > id=Dune::index_constant< i >{})
 ! access the the grid geometry pointer for domain with index i 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::MultiDomainFVGridGeometry< MDTraits >::PtrType = std::shared_ptr<Type<i> >

export pointer types the stored type

◆ TupleType

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

export type of tuple of pointers

◆ Type

template<class MDTraits >
template<std::size_t i>
using Dumux::MultiDomainFVGridGeometry< MDTraits >::Type = typename MDTraits::template SubDomain<i>::GridGeometry

export base types of the stored type

Constructor & Destructor Documentation

◆ MultiDomainFVGridGeometry() [1/4]

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

The default constructor.

◆ MultiDomainFVGridGeometry() [2/4]

template<class MDTraits >
template<typename... Args>
Dumux::MultiDomainFVGridGeometry< MDTraits >::MultiDomainFVGridGeometry ( Args &&...  args)
inline

Construct grid geometries for all subdomains.

Parameters
argsa list of arguments to pass to the constructors

The number of arguments has to match the number of subdomains. In case a constructor needs multiple arguments, they have to be wrapped in a std::tuple. Use std::make_tuple and possible wrap arguments using std::ref / std::cref or use std::forward_as_tuple. If an argument is a tuple, it will be unpacked and its members will be passed to the constructor. In the corner case where you need to pass a tuple to the constructor, you therefore need to additionally wrap the tuple in a tuple before passing.

◆ MultiDomainFVGridGeometry() [3/4]

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

Construct wrapper from a tuple of grid geometries.

Parameters
ggTuplea tuple of shared_ptrs to the grid geometries

◆ MultiDomainFVGridGeometry() [4/4]

template<class MDTraits >
Dumux::MultiDomainFVGridGeometry< MDTraits >::MultiDomainFVGridGeometry ( GVTuple  gvTuple)
inline

Construct wrapper from a tuple of grid views.

Member Function Documentation

◆ asTuple() [1/2]

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

Access the underlying tuple representation.

◆ asTuple() [2/2]

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

Access the underlying tuple representation.

◆ get() [1/2]

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

! access the the grid geometry pointer for domain with index i

◆ get() [2/2]

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

! access the grid geometry pointer for domain with index i

◆ getTuple()

template<class MDTraits >
TupleType Dumux::MultiDomainFVGridGeometry< 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

◆ operator[]() [1/2]

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

return the grid geometry for domain with index i

◆ operator[]() [2/2]

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

return the grid geometry for domain with index i

◆ set()

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

set the pointer for sub domain i

◆ update() [1/2]

template<class MDTraits >
void Dumux::MultiDomainFVGridGeometry< MDTraits >::update ( )
inline

Update all grid geometries (do this again after grid adaption)

◆ update() [2/2]

template<class MDTraits >
template<typename... Args>
void Dumux::MultiDomainFVGridGeometry< MDTraits >::update ( Args &&...  args)
inline

Update all grid geometries (do this e.g. after grid adaption)

Parameters
argsa list of arguments to pass to the update functions

The number of arguments has to match the number of subdomains. In case the update function needs multiple arguments, they have to be wrapped in a std::tuple. Use std::make_tuple and possible wrap arguments using std::ref / std::cref or use std::forward_as_tuple. If an argument is a tuple, it will be unpacked and its members will be passed to the constructor. In the corner case where you need to pass a tuple to the constructor, you therefore need to additionally wrap the tuple in a tuple before passing.


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