Flow123d
build_with_4.0.3-0c18259
|
#include <mixed.hh>
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* () |
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&& ...).
|
inline |
Beautiful index/like access insired by: https://arne-mertz.de/2017/03/tuple-compile-time-access/