Flow123d  master-f44eb46
Public Types | Public Member Functions | List of all members
MixedPtr< T, lower_dim > Class Template Reference

#include <mixed.hh>

Inheritance diagram for MixedPtr< T, lower_dim >:
Inheritance graph
[legend]
Collaboration diagram for MixedPtr< T, lower_dim >:
Collaboration graph
[legend]

Public Types

template<IntDim dim>
using TPtr = std::shared_ptr< T< dim > >
 

Public Member Functions

template<template< IntDim... > class TT>
 MixedPtr (const MixedPtr< TT > &other)
 
 MixedPtr (TPtr< 0 > p0, TPtr< 1 > p1, TPtr< 2 > p2, TPtr< 3 > p3)
 
template<typename... Args>
 MixedPtr (Args... args)
 
template<IntDim i_dim>
std::shared_ptr< T< i_dim > > operator[] (Dim< i_dim >)
 
template<IntDim i_dim>
const std::shared_ptr< T< i_dim > > operator[] (Dim< i_dim >) const
 
Mixed< T > operator* ()
 

Detailed Description

template<template< IntDim... > class T, int lower_dim = 0>
class MixedPtr< T, lower_dim >

Definition at line 247 of file mixed.hh.

Member Typedef Documentation

◆ TPtr

template<template< IntDim... > class T, int lower_dim = 0>
template<IntDim dim>
using MixedPtr< T, lower_dim >::TPtr = std::shared_ptr<T<dim> >

Similar to the mixed template but storing and providing shared pointers to the inner type. Usage:

fe_order = 10; auto gauss = MixedPtr<QGauss>(q_order); // template <int dim> class QGauss; auto mapping = MixedSpaceDimPtr<Mapping>(); // template <int dim, int spacedim> class Mapping; ... fe_values = FEValues<dim>(*mapping[Dim<dim>{}], *gauss[Dim<dim>{}], ...)

All parameters of the Mixed<T>(...) constructor are forwarder (by value) to the T(...) constructor for every dimension. Only forwarding by value is supported due to problems with MixedPtr. We are unable to give precedence to the copy constructor over the prefect forwarding constructor MixedPtr(Args&& ...).

Definition at line 264 of file mixed.hh.

Constructor & Destructor Documentation

◆ MixedPtr() [1/3]

template<template< IntDim... > class T, int lower_dim = 0>
template<template< IntDim... > class TT>
MixedPtr< T, lower_dim >::MixedPtr ( const MixedPtr< TT > &  other)
inline

Definition at line 267 of file mixed.hh.

◆ MixedPtr() [2/3]

template<template< IntDim... > class T, int lower_dim = 0>
MixedPtr< T, lower_dim >::MixedPtr ( TPtr< 0 >  p0,
TPtr< 1 >  p1,
TPtr< 2 >  p2,
TPtr< 3 >  p3 
)
inline

Definition at line 275 of file mixed.hh.

◆ MixedPtr() [3/3]

template<template< IntDim... > class T, int lower_dim = 0>
template<typename... Args>
MixedPtr< T, lower_dim >::MixedPtr ( Args...  args)
inline

Definition at line 280 of file mixed.hh.

Member Function Documentation

◆ operator*()

template<template< IntDim... > class T, int lower_dim = 0>
Mixed<T> MixedPtr< T, lower_dim >::operator* ( )
inline

Definition at line 306 of file mixed.hh.

◆ operator[]() [1/2]

template<template< IntDim... > class T, int lower_dim = 0>
template<IntDim i_dim>
std::shared_ptr<T<i_dim> > MixedPtr< T, lower_dim >::operator[] ( Dim< i_dim >  )
inline

Beautiful index/like access insired by: https://arne-mertz.de/2017/03/tuple-compile-time-access/

Definition at line 295 of file mixed.hh.

◆ operator[]() [2/2]

template<template< IntDim... > class T, int lower_dim = 0>
template<IntDim i_dim>
const std::shared_ptr<T<i_dim> > MixedPtr< T, lower_dim >::operator[] ( Dim< i_dim >  ) const
inline

Definition at line 301 of file mixed.hh.


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