dune-common  2.6-git
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables

Dune namespace. More...

Namespaces

 AlignedNumberImpl
 
 Concept
 Namespace for concepts.
 
 DenseMatrixHelp
 
 DynamicMatrixHelp
 
 FloatCmp
 
 FMatrixHelp
 
 fvmeta
 
 Hybrid
 
 Indices
 Namespace with predefined compile time indices for the range [0,19].
 
 Std
 Namespace for features backported from new C++ standards.
 

Classes

struct  AddPtrTypeEvaluator
 TypeEvaluator to turn a type T into a pointer to T More...
 
struct  AddPtrTypeEvaluator< T & >
 
struct  AddRefTypeEvaluator
 TypeEvaluator to turn a type T into a reference to T More...
 
class  AlignedAllocator
 Allocators which guarantee alignment of the memory. More...
 
class  AlignedBase
 CRTP base mixin class to check alignment. More...
 
struct  AlignmentOf
 Calculates the alignment requirement of a type. More...
 
class  AllSet
 A set containing everything. More...
 
struct  AlwaysFalse
 template which always yields a false value More...
 
struct  AlwaysTrue
 template which always yields a true value More...
 
class  ArrayList
 A dynamically growing random access list. More...
 
class  ArrayListIterator
 A random access iterator for the Dune::ArrayList class. More...
 
class  AssociativePropertyMap
 An adapter to turn an unique associative container into a property map. More...
 
struct  At
 Reverse element access. More...
 
struct  AtType
 Type for reverse element access. More...
 
class  BidirectionalIteratorFacade
 Facade class for stl conformant bidirectional iterators. More...
 
class  bigunsignedint
 Portable very large unsigned integers. More...
 
class  BitSetVector
 A dynamic array of blocks of booleans. More...
 
class  BitSetVectorConstReference
 A proxy class that acts as a const reference to a single bitset in a BitSetVector. More...
 
class  BitSetVectorReference
 A proxy class that acts as a mutable reference to a single bitset in a BitSetVector. More...
 
struct  Cloneable
 An interface class for cloneable objects. More...
 
class  CollectiveCommunication
 Collective communication interface and sequential default implementation. More...
 
class  Combine
 A set combining two other sets. More...
 
struct  common_bits
 activate if current and mask have common bits switched on. More...
 
struct  const_reference
 Get the 'const' version of a reference to a mutable object. More...
 
struct  const_reference< BitSetVectorConstReference< block_size, Alloc > >
 
struct  const_reference< BitSetVectorReference< block_size, Alloc > >
 
struct  const_reference< const R & >
 
struct  const_reference< const R >
 
struct  const_reference< DiagonalRowVector< K, n > >
 
struct  const_reference< DiagonalRowVectorConst< K, n > >
 
struct  const_reference< R & >
 
class  ConstArrayListIterator
 A constant random access iterator for the Dune::ArrayList class. More...
 
class  ConstAssociativePropertyMap
 An adaptor to turn an unique associative container into a property map. More...
 
class  ContainerWrapperIterator
 Iterator class for sparse vector-like containers. More...
 
class  DebugAllocator
 Allocators implementation which performs different kind of memory checks. More...
 
class  DebugAllocator< void >
 
class  DebugStream
 Generic class to implement debug output streams. More...
 
class  DebugStreamError
 standard exception for the debugstream More...
 
class  DebugStreamState
 Intermediate class to implement tie-operation of DebugStream. More...
 
class  DenseIterator
 Generic iterator class for dense vector and matrix implementations. More...
 
class  DenseMatrix
 A dense n x m matrix. More...
 
struct  DenseMatrixAssigner
 you have to specialize this structure for any type that should be assignable to a DenseMatrix More...
 
struct  DenseMatrixAssigner< DenseMatrix, DiagonalMatrix< field, N > >
 
struct  DenseMatrixAssigner< DenseMatrix, IdentityMatrix< field, N > >
 
struct  DenseMatVecTraits
 
struct  DenseMatVecTraits< DynamicMatrix< K > >
 
struct  DenseMatVecTraits< DynamicVector< K, Allocator > >
 
struct  DenseMatVecTraits< FieldMatrix< K, ROWS, COLS > >
 
struct  DenseMatVecTraits< FieldVector< K, SIZE > >
 
class  DenseVector
 Interface for a class of dense vectors over a given field. More...
 
class  DiagonalMatrix
 A diagonal matrix of static size. More...
 
class  DiagonalMatrixWrapper
 
class  DiagonalRowVector
 
class  DiagonalRowVectorConst
 
class  DynamicMatrix
 Construct a matrix with a dynamic size. More...
 
class  DynamicVector
 Construct a vector with a dynamic size. More...
 
struct  Empty
 Just an empty class. More...
 
class  EmptySet
 An empty set. More...
 
struct  EnableIfInterOperable
 Enable typedef if two types are interoperable. More...
 
class  EnumItem
 A set consisting only of one item. More...
 
class  EnumRange
 A set representing a range including the borders. More...
 
class  Exception
 Base class for Dune-Exceptions. More...
 
struct  ExceptionHook
 Base class to add a hook to the Dune::Exception. More...
 
struct  Factorial
 Calculates the factorial of m at compile time. More...
 
struct  Factorial< 0 >
 end of recursion of factorial via specialization More...
 
class  FakeMPIHelper
 A fake mpi helper. More...
 
class  FieldMatrix
 A dense n x m matrix. More...
 
struct  FieldTraits
 
struct  FieldTraits< const T >
 
struct  FieldTraits< DenseMatrix< M > >
 
struct  FieldTraits< DenseVector< V > >
 
struct  FieldTraits< DiagonalMatrix< K, n > >
 
struct  FieldTraits< DynamicMatrix< K > >
 
struct  FieldTraits< DynamicVector< K, Allocator > >
 
struct  FieldTraits< FieldMatrix< K, ROWS, COLS > >
 
struct  FieldTraits< FieldVector< K, SIZE > >
 
struct  FieldTraits< std::complex< T > >
 
struct  FieldTraits< std::vector< T > >
 
struct  FieldTraits< T[N] >
 
class  FieldVector
 vector space out of a tensor product of fields. More...
 
class  FirstPredicateIndex
 Finding the index of a certain type in a std::tuple. More...
 
struct  FirstTypeIndex
 Find the first occurrence of a type in a std::tuple. More...
 
struct  FlattenTuple
 Flatten a std::tuple of std::tuple's. More...
 
class  FloatCmpOps
 Class encapsulating a default epsilon. More...
 
class  FMatrixError
 Error thrown if operations of a FieldMatrix fail. More...
 
class  FMatrixPrecision
 Precisions for calculations with FieldMatrix and FieldVector. More...
 
struct  ForEachType
 Helper template to clone the type definition of a std::tuple with the storage types replaced by a user-defined rule. More...
 
struct  ForEachType< TE, std::tuple< Args... > >
 
class  ForwardIteratorFacade
 Base class for stl conformant forward iterators. More...
 
class  Function
 Base class template for function classes. More...
 
struct  Gcd
 Calculator of the greatest common divisor. More...
 
class  GenericIterator
 Generic class for stl-conforming iterators for container classes with operator[]. More...
 
class  GlobalLookupIndexSet
 Decorates an index set with the possibility to find a global index that is mapped to a specific local. More...
 
class  GMPField
 Number class for high precision floating point number using the GMP library mpf_class implementation. More...
 
struct  greater_or_equal
 Greater or equal template test. More...
 
struct  has_nan
 Whether this type has a value of NaN. More...
 
struct  hash
 Functor for hashing objects of type T. More...
 
class  HelpRequest
 exception thrown if the user wants to see help string More...
 
struct  IdentityMap
 A property map that applies the identity function to integers. More...
 
class  IdentityMatrix
 Read-only identity matrix. More...
 
struct  ImplementationDefined
 Dummy struct used for documentation purposes. More...
 
class  Indent
 Utility class for handling nested indentation in output. More...
 
class  IndexPair
 A pair consisting of a global and local index. More...
 
struct  IndexSetSortFunctor
 
struct  IntegerSequenceEntry
 Get entry of std::integer_sequence. More...
 
class  IntegralRange
 dynamic integer range for use in range-based for loops More...
 
class  InvalidIndexSetState
 Exception indicating that the index set is not in the expected state. More...
 
class  InvalidStateException
 Default exception if a function was called while the object is not in a valid state for that function. More...
 
class  IOError
 Default exception class for I/O errors. More...
 
class  ios_base_all_saver
 Utility class for storing and resetting stream attributes. More...
 
struct  is_indexable
 Type trait to determine whether an instance of T has an operator[](I), i.e. whether it can be indexed with an index of type I. More...
 
struct  is_range
 typetrait to check that a class has begin() and end() members More...
 
struct  IsEmptyTypeList
 Check if given type is an empty TypeList. More...
 
struct  IsFieldVectorSizeCorrect
 TMP to check the size of a DenseVectors statically, if possible. More...
 
struct  IsFieldVectorSizeCorrect< FieldVector< T, SIZE >, SIZE >
 
struct  IsFieldVectorSizeCorrect< FieldVector< T, SIZE1 >, SIZE >
 
struct  IsIntegralConstant
 Check if T is an std::integral_constant<I, i> More...
 
struct  IsInteroperable
 Checks whether two types are interoperable. More...
 
struct  IsNumber
 Whether this type acts as a scalar in the context of (hierarchically blocked) containers. More...
 
struct  IsNumber< GMPField< precision > >
 
struct  IsTuple
 Check if T is a std::tuple<...> More...
 
struct  IsTupleOrDerived
 Check if T derived from a std::tuple<...> More...
 
struct  IsType
 Generator for predicates accepting one particular type. More...
 
struct  IsTypeList
 Check if given type is a TypeList. More...
 
struct  IsTypeList< TypeList< T... > >
 Check if given type is a TypeList. More...
 
struct  IsVector
 
struct  IsVector< T, void_t< typename T::field_type > >
 
class  IteratorPropertyMap
 Adapter to turn a random access iterator into a property map. More...
 
class  IteratorRange
 Simple range between a begin and an end iterator. More...
 
struct  JoinTuples
 Join two std::tuple's. More...
 
struct  Lcm
 Calculate the least common multiple of two numbers. More...
 
class  LocalIndex
 An index present on the local process. More...
 
struct  LocalIndexComparator
 
struct  LocalIndexComparator< ParallelLocalIndex< T > >
 
class  lru
 LRU Cache Container. More...
 
struct  LvaluePropertyMapTag
 Tag for the category of lvalue property maps. More...
 
class  MallocAllocator
 Allocators implementation which simply calls malloc/free. More...
 
struct  MathematicalConstants
 Provides commonly used mathematical constants. More...
 
class  MathError
 Default exception class for mathematical errors. More...
 
struct  Max
 
struct  MetaType
 A type that refers to another type. More...
 
struct  Min
 
class  MPIGuard
 detects a thrown exception and communicates to all other processes More...
 
class  MPIGuardError
 This exception is thrown if the MPIGuard detects an error on a remote process. More...
 
struct  MPITraits
 
struct  mutable_reference
 get the 'mutable' version of a reference to a const object More...
 
struct  mutable_reference< BitSetVectorConstReference< block_size, Alloc > >
 
struct  mutable_reference< BitSetVectorReference< block_size, Alloc > >
 
struct  mutable_reference< const R & >
 
struct  mutable_reference< const R >
 
struct  mutable_reference< DiagonalRowVector< K, n > >
 
struct  mutable_reference< DiagonalRowVectorConst< K, n > >
 
struct  mutable_reference< R & >
 
class  NegateSet
 The negation of a set. An item is contained in the set if and only if it is not contained in the negated set. More...
 
struct  No_Comm
 
class  NotImplemented
 Default exception for dummy implementations. More...
 
struct  null_deleter
 implements the Deleter concept of shared_ptr without deleting anything More...
 
struct  NullPointerInitialiser
 A helper template that initializes a std::tuple consisting of pointers to nullptr. More...
 
struct  NullPointerInitialiser< std::tuple< Args... > >
 
class  OutOfMemoryError
 Default exception if memory allocation fails. More...
 
class  ParallelError
 Default exception if an error in the parallel communication of the program occurred. More...
 
class  ParallelIndexSet
 Manager class for the mapping between local indices and globally unique indices. More...
 
class  ParallelLocalIndex
 An index present on the local process with an additional attribute flag. More...
 
class  ParameterizedObjectFactory
 A factory class for parameterized objects. More...
 
class  ParameterizedObjectFactory< TypeT(Args...), KeyT >
 
class  ParameterTree
 Hierarchical structure of string parameters. More...
 
class  ParameterTreeParser
 Parsers to set up a ParameterTree from various input sources. More...
 
class  ParameterTreeParserError
 report parser error while reading ParameterTree More...
 
struct  PointerPairDeletor
 Deletes all objects pointed to in a std::tuple of pointers. More...
 
class  Pool
 A memory pool of objects. More...
 
class  PoolAllocator
 An allocator managing a pool of objects for reuse. More...
 
class  PoolAllocator< void, s >
 
struct  Power
 Compute power for a run-time mantissa and a compile-time integer exponent. More...
 
struct  PriorityTag
 Helper class for tagging priorities. More...
 
struct  PriorityTag< 0 >
 Helper class for tagging priorities. More...
 
struct  PromotionTraits
 Compute type of the result of an arithmetic operation involving two different number types. More...
 
struct  PromotionTraits< T1, T1 >
 
struct  PropertyMapTraits
 
struct  PropertyMapTraits< const T * >
 
struct  PropertyMapTraits< T * >
 
struct  PropertyMapTypeSelector
 Selector for the property map type. More...
 
struct  PushBackTuple
 Helper template to append a type to a std::tuple. More...
 
struct  PushBackTuple< typename std::tuple< Args... >, T >
 
struct  PushFrontTuple
 Helper template to prepend a type to a std::tuple. More...
 
struct  PushFrontTuple< typename std::tuple< Args... >, T >
 
class  RandomAccessIteratorFacade
 Base class for stl conformant forward iterators. More...
 
class  RangeError
 Default exception class for range errors. More...
 
struct  RAPropertyMapHelper
 
struct  ReadablePropertyMapTag
 Tag for the category of readable property maps. More...
 
struct  ReadWritePropertyMapTag
 Tag for the category of readable and writable property maps. More...
 
struct  ReduceTuple
 Apply reduce with meta binary function to template. More...
 
struct  ReduceTuple< F, Tuple, Seed, 0 >
 Apply reduce with meta binary function to template. More...
 
class  ReservedVector
 A Vector class with statically reserved memory. More...
 
class  Selection
 A cached selection of indices. More...
 
class  SelectionIterator
 A const iterator over an uncached selection. More...
 
struct  SimdIndexTypeTraits
 
struct  SimdMaskTypeTraits
 
struct  SimdScalarTypeTraits
 
struct  SimdScalarTypeTraits< AlignedNumber< T, align > >
 deduce the underlying scalar data type of an AlignedNumber More...
 
class  Singleton
 An adapter to turn a class into a singleton. More...
 
struct  SizeOf
 Compute size of variadic type list. More...
 
class  SLList
 A single linked list. More...
 
class  SLListConstIterator
 A constant iterator for the SLList. More...
 
class  SLListIterator
 A mutable iterator for the SLList. More...
 
class  SLListModifyIterator
 A mutable iterator for the SLList. More...
 
struct  StandardMathematicalConstants
 Standard implementation of MathematicalConstants. More...
 
class  StaticIntegralRange
 static integer range for use in range-based for loops More...
 
struct  StaticPower
 Calculates m^p at compile time. More...
 
struct  StaticPower< m, 0 >
 end of recursion via specialization More...
 
class  StreamWrap
 
class  SystemError
 Default exception class for OS errors. More...
 
class  Timer
 A simple stop watch. More...
 
class  ToUniquePtr
 An owning pointer wrapper that can be assigned to (smart) pointers. Cannot be copied. Transfers ownership by cast to any (smart) pointer type. Releases the stored pointer on transfer. NOTE: This is an intermediate solution to switch to std::unique_ptr in later releases smoothly. More...
 
class  TransformTupleFunctor
 
struct  TupleAccessTraits
 
struct  TupleAccessTraits< T & >
 
struct  TupleAccessTraits< T * >
 
class  TupleVector
 A class augmenting std::tuple by element access via operator[]. More...
 
struct  TypeListElement
 
struct  TypeListElement< i, TypeList< T... > >
 Get element of TypeList. More...
 
struct  TypeListSize
 
struct  TypeListSize< TypeList< T... > >
 Get size of TypeList. More...
 
class  UncachedSelection
 An uncached selection of indices. More...
 
class  VirtualFunction
 Virtual base class template for function classes. More...
 
struct  WritablePropertyMapTag
 Tag for the category of writable property maps. More...
 

Typedefs

using ViolatedAlignmentHandler = std::function< void(const char *, std::size_t, const void *)>
 type of the handler called by violatedAlignment() More...
 
typedef unsigned int DebugLevel
 Type for debug levels. More...
 
template<std::size_t i>
using index_constant = std::integral_constant< std::size_t, i >
 An index constant with value i. More...
 
typedef FakeMPIHelper MPIHelper
 If no MPI is available FakeMPIHelper becomes the MPIHelper. More...
 
template<typename T >
using SimdScalar = typename SimdScalarTypeTraits< T >::type
 
template<typename V >
using SimdIndex = typename SimdIndexTypeTraits< V >::type
 An simd vector of indices corresponding to a simd vector V. More...
 
template<typename V >
using SimdMask = typename SimdMaskTypeTraits< V >::type
 A simd vector of truth values corresponding to a simd vector V. More...
 
typedef DebugStream< VERY_VERBOSE_DEBUG_LEVEL, MINIMAL_DEBUG_LEVELDVVerbType
 Type of very verbose debug stream. More...
 
typedef DebugStream< VERBOSE_DEBUG_LEVEL, MINIMAL_DEBUG_LEVELDVerbType
 Type of more verbose debug stream. More...
 
typedef DebugStream< INFO_DEBUG_LEVEL, MINIMAL_DEBUG_LEVELDInfoType
 Type of debug stream with info level. More...
 
typedef DebugStream< WARN_DEBUG_LEVEL, MINIMAL_DEBUG_LEVELDWarnType
 Type of debug stream with warn level. More...
 
typedef DebugStream< GRAVE_DEBUG_LEVEL, MINIMAL_DEBUG_LEVELDGraveType
 Type of debug stream for fatal errors. More...
 
typedef DebugStream< 1 > DErrType
 The type of the stream used for error messages. More...
 
template<class... T>
using TypeList = std::tuple< MetaType< T >... >
 A simple type list. More...
 
template<std::size_t i, class T >
using TypeListEntry_t = typename TypeListElement< i, T >::type
 Shortcut for TypeListElement<i, T>::type;. More...
 
template<class... Types>
using void_t = typename Impl::voider< Types... >::type
 Is void for all valid input types (see N3911). The workhorse for C++11 SFINAE-techniques. More...
 
template<class Type >
using field_t = typename FieldTraits< Type >::field_type
 Convenient access to FieldTraits<Type>::field_type. More...
 
template<class Type >
using real_t = typename FieldTraits< Type >::real_type
 Convenient access to FieldTraits<Type>::real_type. More...
 
template<class This , class... T>
using disableCopyMove = std::enable_if_t< not Impl::disableCopyMoveHelper< This, T... >::value, int >
 Helper to disable constructor as copy and move constructor. More...
 

Enumerations

enum  { implementationDefined }
 
enum  ParallelIndexSetState { GROUND, RESIZE }
 The states the index set can be in. More...
 
enum  LocalIndexState { VALID, DELETED }
 The states avaiable for the local indices. More...
 

Functions

template<typename T , std::size_t n>
 DUNE_DEPRECATED_MSG ("Use Dune::filledArray() from <dune/common/filledarray.hh>") std
 Create an array and fill it with copies of the provided value. More...
 
template<int k>
std::ostream & operator<< (std::ostream &s, const bigunsignedint< k > &x)
 
template<int k>
bigunsignedint< k > operator+ (const bigunsignedint< k > &x, std::uintmax_t y)
 
template<int k>
bigunsignedint< k > operator- (const bigunsignedint< k > &x, std::uintmax_t y)
 
template<int k>
bigunsignedint< k > operator* (const bigunsignedint< k > &x, std::uintmax_t y)
 
template<int k>
bigunsignedint< k > operator/ (const bigunsignedint< k > &x, std::uintmax_t y)
 
template<int k>
bigunsignedint< k > operator% (const bigunsignedint< k > &x, std::uintmax_t y)
 
template<int k>
bigunsignedint< k > operator+ (std::uintmax_t x, const bigunsignedint< k > &y)
 
template<int k>
bigunsignedint< k > operator- (std::uintmax_t x, const bigunsignedint< k > &y)
 
template<int k>
bigunsignedint< k > operator* (std::uintmax_t x, const bigunsignedint< k > &y)
 
template<int k>
bigunsignedint< k > operator/ (std::uintmax_t x, const bigunsignedint< k > &y)
 
template<int k>
bigunsignedint< k > operator% (std::uintmax_t x, const bigunsignedint< k > &y)
 
template<class T >
std::string className ()
 Provide the demangled class name of a type T as a string. More...
 
template<class T >
std::string className (T &)
 Provide the demangled class name of a given object as a string. More...
 
template<class C , class... T>
constexpr auto models ()
 Check if concept is modeled by given types. More...
 
template<typename T1 , typename T2 >
const T1 cond (bool b, const T1 &v1, const T2 &v2)
 conditional evaluate More...
 
static void defaultViolatedAlignment (const char *className, std::size_t expectedAlignment, const void *address)
 default alignment violation handler More...
 
ViolatedAlignmentHandlerviolatedAlignmentHandler ()
 access the handler called by violatedAlignment() More...
 
void violatedAlignment (const char *className, std::size_t expectedAlignment, const void *address)
 called when an alignment violation is detected More...
 
bool isAligned (const void *p, std::size_t align)
 check whether an address conforms to the given alignment More...
 
template<std::size_t align = debugAlignment, class T >
AlignedNumber< T, align > aligned (T value)
 align a value to a certain alignment More...
 
template<class T , std::size_t align>
AlignedNumber< T, align > cond (const AlignedNumber< bool, align > &b, const AlignedNumber< T, align > &v1, const AlignedNumber< T, align > &v2)
 
template<class T , std::size_t align>
max_value (const AlignedNumber< T, align > &val)
 
template<class T , std::size_t align>
min_value (const AlignedNumber< T, align > &val)
 
template<std::size_t align>
bool any_true (const AlignedNumber< bool, align > &val)
 
template<std::size_t align>
bool all_true (const AlignedNumber< bool, align > &val)
 
template<typename MAT >
std::ostream & operator<< (std::ostream &s, const DenseMatrix< MAT > &a)
 Sends the matrix to an output stream. More...
 
template<class A , class B >
auto dot (const A &a, const B &b) -> typename std::enable_if<!IsVector< A >::value &&!std::is_same< typename FieldTraits< A >::field_type, typename FieldTraits< A >::real_type > ::value, decltype(conj(a) *b)>::type
 computes the dot product for fundamental data types according to Petsc's VectDot function: dot(a,b) := std::conj(a)*b More...
 
template<class A , class B >
auto dotT (const A &a, const B &b) -> decltype(a *b)
 Computes an indefinite vector dot product for fundamental data types according to Petsc's VectTDot function: dotT(a,b) := a*b. More...
 
template<typename TA , int i>
std::ostream & operator<< (std::ostream &os, const EnumItem< TA, i > &)
 
template<typename TA , int from, int to>
std::ostream & operator<< (std::ostream &os, const EnumRange< TA, from, to > &)
 
template<class TI1 , class TI2 >
Combine< TI1, TI2, typename TI1::Type > combine (const TI1 &set1, const TI2 &set2)
 
template<class TI1 , class TI2 , class T >
std::ostream & operator<< (std::ostream &os, const Combine< TI1, TI2, T > &)
 
std::ostream & operator<< (std::ostream &stream, const Exception &e)
 
template<std::size_t n, class T >
std::array< T, n > filledArray (const T &t)
 Return an array filled with the provided value. More...
 
template<template< int > class Operation, int first, int last>
struct DUNE_DEPRECATED_MSG ("Use Hybrid::forEach instead!") ForLoop
 
template<typename Domain , typename Range , typename F >
Impl::LambdaVirtualFunction< Domain, Range, std::decay_t< F > > makeVirtualFunction (F &&f)
 make VirtualFunction out of a function object More...
 
template<typename T >
void hash_combine (std::size_t &seed, const T &arg)
 Calculates the hash value of arg and combines it in-place with seed. More...
 
template<typename It >
std::size_t hash_range (It first, It last)
 Hashes all elements in the range [first,last) and returns the combined hash. More...
 
template<typename It >
void hash_range (std::size_t &seed, It first, It last)
 Hashes all elements in the range [first,last) and combines the hashes in-place with seed. More...
 
std::ostream & operator<< (std::ostream &s, const Indent &indent)
 write indentation to a stream More...
 
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
EnableIfInterOperable< T1, T2, bool >::type operator== (const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs)
 Checks for equality. More...
 
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
EnableIfInterOperable< T1, T2, bool >::type operator!= (const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs)
 Checks for inequality. More...
 
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
std::enable_if< std::is_convertible< T2, T1 >::value, bool >::type operator== (const BidirectionalIteratorFacade< T1, V1, R1, D > &lhs, const BidirectionalIteratorFacade< T2, V2, R2, D > &rhs)
 Checks for equality. More...
 
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
std::enable_if< std::is_convertible< T1, T2 >::value &&!std::is_convertible< T2, T1 >::value, bool >::type operator== (const BidirectionalIteratorFacade< T1, V1, R1, D > &lhs, const BidirectionalIteratorFacade< T2, V2, R2, D > &rhs)
 Checks for equality. More...
 
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
EnableIfInterOperable< T1, T2, bool >::type operator!= (const BidirectionalIteratorFacade< T1, V1, R1, D > &lhs, const BidirectionalIteratorFacade< T2, V2, R2, D > &rhs)
 Checks for inequality. More...
 
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
EnableIfInterOperable< T1, T2, bool >::type operator== (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
 Checks for equality. More...
 
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
EnableIfInterOperable< T1, T2, bool >::type operator!= (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
 Checks for inequality. More...
 
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
EnableIfInterOperable< T1, T2, bool >::type operator< (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
 Comparison operator. More...
 
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
EnableIfInterOperable< T1, T2, bool >::type operator<= (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
 Comparison operator. More...
 
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
EnableIfInterOperable< T1, T2, bool >::type operator> (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
 Comparison operator. More...
 
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
EnableIfInterOperable< T1, T2, bool >::type operator>= (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
 Comparison operator. More...
 
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
EnableIfInterOperable< T1, T2, D >::type operator- (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
 Calculates the difference between two pointers. More...
 
template<class K >
conjugateComplex (const K &x)
 compute conjugate complex of x More...
 
template<class T >
int sign (const T &val)
 Return the sign of the value. More...
 
template<class... F>
auto overload (F &&... f)
 Create an overload set. More...
 
template<class... F>
auto orderedOverload (F &&... f)
 Create an ordered overload set. More...
 
template<class TG , class TL >
std::ostream & operator<< (std::ostream &os, const IndexPair< TG, TL > &pair)
 Print an index pair. More...
 
template<class TG , class TL >
bool operator== (const IndexPair< TG, TL > &, const IndexPair< TG, TL > &)
 
template<class TG , class TL >
bool operator!= (const IndexPair< TG, TL > &, const IndexPair< TG, TL > &)
 
template<class TG , class TL >
bool operator< (const IndexPair< TG, TL > &, const IndexPair< TG, TL > &)
 
template<class TG , class TL >
bool operator> (const IndexPair< TG, TL > &, const IndexPair< TG, TL > &)
 
template<class TG , class TL >
bool operator<= (const IndexPair< TG, TL > &, const IndexPair< TG, TL > &)
 
template<class TG , class TL >
bool operator>= (const IndexPair< TG, TL > &, const IndexPair< TG, TL > &)
 
template<class TG , class TL >
bool operator== (const IndexPair< TG, TL > &, const TG &)
 
template<class TG , class TL >
bool operator!= (const IndexPair< TG, TL > &, const TG &)
 
template<class TG , class TL >
bool operator< (const IndexPair< TG, TL > &, const TG &)
 
template<class TG , class TL >
bool operator> (const IndexPair< TG, TL > &, const TG &)
 
template<class TG , class TL >
bool operator<= (const IndexPair< TG, TL > &, const TG &)
 
template<class TG , class TL >
bool operator>= (const IndexPair< TG, TL > &, const TG &)
 
template<class TG , class TL , int N>
std::ostream & operator<< (std::ostream &os, const ParallelIndexSet< TG, TL, N > &indexSet)
 Print an index set. More...
 
template<class T >
std::ostream & operator<< (std::ostream &os, const ParallelLocalIndex< T > &index)
 Print the local index to a stream. More...
 
template<typename T >
bool operator== (const ParallelLocalIndex< T > &p1, const ParallelLocalIndex< T > &p2)
 
template<typename T >
bool operator!= (const ParallelLocalIndex< T > &p1, const ParallelLocalIndex< T > &p2)
 
std::string concatPaths (const std::string &base, const std::string &p)
 concatenate two paths More...
 
std::string processPath (const std::string &p)
 sanitize a path for further processing More...
 
bool pathIndicatesDirectory (const std::string &p)
 check whether the given path indicates that it is a directory More...
 
std::string prettyPath (const std::string &p, bool isDirectory)
 pretty print path More...
 
std::string prettyPath (const std::string &p)
 pretty print path More...
 
std::string relativePath (const std::string &newbase, const std::string &p)
 compute a relative path between two paths More...
 
template<typename T1 , std::size_t t1, typename T2 , std::size_t t2>
bool operator== (const PoolAllocator< T1, t1 > &, const PoolAllocator< T2, t2 > &)
 
template<typename T1 , std::size_t t1, typename T2 , std::size_t t2>
bool operator!= (const PoolAllocator< T1, t1 > &, const PoolAllocator< T2, t2 > &)
 
template<typename T , std::size_t t1, std::size_t t2>
bool operator== (const PoolAllocator< T, t1 > &p1, const PoolAllocator< T, t2 > &p2)
 
template<typename T , std::size_t t1, std::size_t t2>
bool operator!= (const PoolAllocator< T, t1 > &p1, const PoolAllocator< T, t2 > &p2)
 
template<typename T , std::size_t t1, std::size_t t2>
bool operator== (const PoolAllocator< void, t1 > &, const PoolAllocator< T, t2 > &)
 
template<typename T , std::size_t t1, std::size_t t2>
bool operator!= (const PoolAllocator< void, t1 > &, const PoolAllocator< T, t2 > &)
 
template<std::size_t t1, std::size_t t2>
bool operator== (const PoolAllocator< void, t1 > &p1, const PoolAllocator< void, t2 > &p2)
 
template<std::size_t t1, std::size_t t2>
bool operator!= (const PoolAllocator< void, t1 > &p1, const PoolAllocator< void, t2 > &p2)
 
template<class Reference , class PropertyMap , class Key >
Reference get (const RAPropertyMapHelper< Reference, PropertyMap > &pmap, const Key &key)
 
template<class Reference , class PropertyMap , class Key , class Value >
void put (const RAPropertyMapHelper< Reference, PropertyMap > &pmap, const Key &key, const Value &value)
 
template<typename T >
pointer_or_proxy_holder handle_proxy_member_access (T &&t)
 Transparent support for providing member access to both lvalues and rvalues (temporary proxies). More...
 
template<typename T , typename std::enable_if< is_range< T >::value, int >::type = 0>
T::value_type max_value (const T &v)
 compute the maximum value over a range More...
 
template<typename T , typename std::enable_if<!is_range< T >::value, int >::type = 0>
const T & max_value (const T &v)
 
template<typename T , typename std::enable_if< is_range< T >::value, int >::type = 0>
T::value_type min_value (const T &v)
 compute the minimum value over a range More...
 
template<typename T , typename std::enable_if<!is_range< T >::value, int >::type = 0>
const T & min_value (const T &v)
 
template<typename T , typename std::enable_if< is_range< T >::value, int >::type = 0>
bool any_true (const T &v)
 similar to std::bitset<N>::any() return true, if any entries is true More...
 
template<std::size_t N>
bool any_true (const std::bitset< N > &b)
 
template<typename T , typename std::enable_if< is_range< T >::value, int >::type = 0>
bool all_true (const T &v)
 similar to std::bitset<N>::all() return true, if any entries is true More...
 
template<std::size_t N>
bool all_true (const std::bitset< N > &b)
 
template<class T , class U , std::enable_if_t< std::is_same< std::decay_t< T >, std::decay_t< U >>::value, int > = 0, std::enable_if_t< std::is_integral< std::decay_t< T >>::value, int > = 0>
static IntegralRange< std::decay_t< T > > range (T &&from, U &&to) noexcept
 free standing function for setting up a range based for loop over an integer range for (auto i: range(0,10)) // 0,1,2,3,4,5,6,7,8,9 or for (auto i: range(-10,10)) // -10,-9,..,8,9 or for (auto i: range(10)) // 0,1,2,3,4,5,6,7,8,9 More...
 
template<class T , std::enable_if_t< std::is_integral< std::decay_t< T >>::value, int > = 0>
static IntegralRange< std::decay_t< T > > range (T &&to) noexcept
 
template<class T , T to>
static StaticIntegralRange< T, to > range (std::integral_constant< T, to >) noexcept
 
template<typename T >
shared_ptr< T > stackobject_to_shared_ptr (T &t)
 Create a shared_ptr for a stack-allocated object. More...
 
template<typename T , typename T2 >
 DUNE_DEPRECATED_MSG ("Do not use the explicit casting version of stackobject_to_shared_ptr, just assign the result to a shared_ptr to the base class") std
 Create a shared_ptr to a base class for a stack-allocated object. More...
 
template<class T >
auto wrap_or_move (T &&t)
 Capture R-value reference to shared_ptr. More...
 
template<class T >
auto wrap_or_move (T &t)
 Capture L-value reference to shared_ptr. More...
 
template<class T >
std::size_t lanes (const T &)
 get the number of lanes of a simd vector (scalar version) More...
 
template<class T >
lane (std::size_t l, const T &v)
 access a lane of a simd vector (scalar version) More...
 
template<class T >
T & lane (std::size_t l, T &v)
 access a lane of a simd vector (scalar version) More...
 
template<class T >
void assign (T &dst, const T &src, bool mask)
 masked Simd assignment (scalar version) More...
 
template<class T >
void swap (T &v1, T &v2, bool mask)
 
void doAssertCallOnce (const char *file, int line, const char *function)
 
void assertCallOnce (const char *file=nullptr, int line=-1, const char *function=nullptr)
 Make sure call_once() works and provide a helpful error message otherwise. More...
 
template<typename Stream , typename... Ts>
Stream & operator<< (Stream &stream, const std::tuple< Ts... > &t)
 Print a std::tuple. More...
 
template<typename Stream , typename... Ts>
Stream & operator>> (Stream &stream, std::tuple< Ts... > &t)
 Read a std::tuple. More...
 
template<typename Stream , typename T , std::size_t N>
Stream & operator<< (Stream &stream, const std::array< T, N > &a)
 Print a std::array. More...
 
template<typename C >
bool hasPrefix (const C &c, const char *prefix)
 Check whether a character container has a given prefix. More...
 
template<typename C >
bool hasSuffix (const C &c, const char *suffix)
 Check whether a character container has a given suffix. More...
 
template<class... T>
static std::string formatString (const std::string &s, const T &... args)
 Format values according to printf format string. More...
 
template<class Tuple , class Functor >
auto genericTransformTuple (Tuple &&t, Functor &&f) -> decltype(genericTransformTupleBackend(t, f))
 
template<template< class > class TE, class... Args>
TransformTupleFunctor< TE, Args... > makeTransformTupleFunctor (Args &&... args)
 
template<template< class > class TypeEvaluator, class Tuple , class... Args>
auto transformTuple (Tuple &&orig, Args &&... args) -> decltype(genericTransformTuple(orig, makeTransformTupleFunctor< TypeEvaluator >(args...)))
 
template<class Tuple >
struct DUNE_DEPRECATED_MSG ("Use Hybrid::forEach instead!") ForEachValue
 
template<class Tuple1 , class Tuple2 >
struct DUNE_DEPRECATED_MSG ("Use Hybrid::forEach instead!") ForEachValuePair
 
template<class... T>
constexpr auto makeTupleVector (T &&... t)
 
template<class T , T... t, std::size_t index>
constexpr auto integerSequenceEntry (std::integer_sequence< T, t... >, std::integral_constant< std::size_t, index > i)
 Get entry of std::integer_sequence. More...
 

Variables

static constexpr auto debugAlignment = 2*alignof(std::max_align_t)
 an alignment large enough to trigger alignment errors More...
 
template<class T , T from, T to>
static StaticIntegralRange< T, to, from > range (std::integral_constant< T, from >, std::integral_constant< T, to >) noexcept
 
DVVerbType dvverb (std::cout)
 stream for very verbose output. More...
 
DVerbType dverb (std::cout)
 Singleton of verbose debug stream. More...
 
DInfoType dinfo (std::cout)
 Stream for informative output. More...
 
DWarnType dwarn (std::cerr)
 Stream for warnings indicating problems. More...
 
DGraveType dgrave (std::cerr)
 Stream for warnings indicating fatal errors. More...
 
DErrType derr (std::cerr)
 Stream for error messages. More...
 
static const DebugLevel MINIMAL_DEBUG_LEVEL = DUNE_MINIMAL_DEBUG_LEVEL
 
static const DebugLevel VERY_VERBOSE_DEBUG_LEVEL = 1
 The level of the very verbose debug stream. More...
 
static const DebugLevel VERBOSE_DEBUG_LEVEL = 2
 The level of the verbose debug stream. More...
 
static const DebugLevel INFO_DEBUG_LEVEL = 3
 The level of the informative debug stream. More...
 
static const DebugLevel WARN_DEBUG_LEVEL = 4
 The level of the debug stream for warnings. More...
 
static const DebugLevel GRAVE_DEBUG_LEVEL = 5
 The level of the debug stream for fatal errors. More...
 

Detailed Description

Dune namespace.

Typedef Documentation

◆ SimdIndex

template<typename V >
using Dune::SimdIndex = typedef typename SimdIndexTypeTraits<V>::type

An simd vector of indices corresponding to a simd vector V.

lanes(T()) == lanes(SimdIndex<T>()) holds.

Note
The size of the elements of a SimdIndex isn't very well-defined. Be careful.

◆ SimdMask

template<typename V >
using Dune::SimdMask = typedef typename SimdMaskTypeTraits<V>::type

A simd vector of truth values corresponding to a simd vector V.

lanes(T()) == lanes(SimdMask<T>()) holds.

◆ SimdScalar

template<typename T >
using Dune::SimdScalar = typedef typename SimdScalarTypeTraits<T>::type

◆ TypeListEntry_t

template<std::size_t i, class T >
using Dune::TypeListEntry_t = typedef typename TypeListElement<i, T>::type

Shortcut for TypeListElement<i, T>::type;.

◆ ViolatedAlignmentHandler

using Dune::ViolatedAlignmentHandler = typedef std::function<void(const char*, std::size_t, const void*)>

type of the handler called by violatedAlignment()

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
implementationDefined 

Dummy integral value used for documentation purposes.

See also
ImplementationDefined

Function Documentation

◆ aligned()

template<std::size_t align = debugAlignment, class T >
AlignedNumber<T, align> Dune::aligned ( value)

align a value to a certain alignment

◆ all_true()

template<std::size_t align>
bool Dune::all_true ( const AlignedNumber< bool, align > &  val)

◆ any_true()

template<std::size_t align>
bool Dune::any_true ( const AlignedNumber< bool, align > &  val)

◆ assertCallOnce()

void Dune::assertCallOnce ( const char *  file = nullptr,
int  line = -1,
const char *  function = nullptr 
)
inline

Make sure call_once() works and provide a helpful error message otherwise.

For call_once() to work, certain versions of libstdc++ need to be linked with -pthread or similar flags. If that is not the case, call_once() will throw an exception. This function checks that call_once() can indeed be used, i.e. that it does not throw an exception when it should not, and that the code does indeed get executed. If call_once() cannot be used, assertCallOnce() aborts the program with a helpful error message.

The check is only actually executed the first time assertCallOnce() is called.

The arguments file and line specify the filename and line number that should appear in the error message. They are ignored if file is 0. The argument function specifies the name of the function to appear in the error message. It is ignored if function is 0.

◆ assign()

template<class T >
void Dune::assign ( T &  dst,
const T &  src,
bool  mask 
)

masked Simd assignment (scalar version)

Assign src to dest for those lanes where mask is true.

◆ className() [1/2]

template<class T >
std::string Dune::className ( )

Provide the demangled class name of a type T as a string.

◆ className() [2/2]

template<class T >
std::string Dune::className ( T &  )

Provide the demangled class name of a given object as a string.

◆ cond() [1/2]

template<typename T1 , typename T2 >
const T1 Dune::cond ( bool  b,
const T1 &  v1,
const T2 &  v2 
)

conditional evaluate

sometimes call immediate if, evaluates to

if (b)
return v1;
else
return v2;

In contrast to if-then-else the cond function can also be evaluated for vector valued SIMD data types, see simd.hh.

Parameters
bboolean value
v1value of b==true
v2value of b==false

◆ cond() [2/2]

template<class T , std::size_t align>
AlignedNumber<T, align> Dune::cond ( const AlignedNumber< bool, align > &  b,
const AlignedNumber< T, align > &  v1,
const AlignedNumber< T, align > &  v2 
)

◆ conjugateComplex()

template<class K >
K Dune::conjugateComplex ( const K &  x)
inline

compute conjugate complex of x

◆ defaultViolatedAlignment()

static void Dune::defaultViolatedAlignment ( const char *  className,
std::size_t  expectedAlignment,
const void *  address 
)
static

default alignment violation handler

Prints it's arguments on stderr and aborts.

◆ doAssertCallOnce()

void Dune::doAssertCallOnce ( const char *  file,
int  line,
const char *  function 
)

◆ dotT()

template<class A , class B >
auto Dune::dotT ( const A &  a,
const B &  b 
) -> decltype(a*b)

Computes an indefinite vector dot product for fundamental data types according to Petsc's VectTDot function: dotT(a,b) := a*b.

See also
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecTDot.html#VecTDot
Parameters
a
b
Returns
a*b

◆ DUNE_DEPRECATED_MSG() [1/2]

template<typename T , typename T2 >
Dune::DUNE_DEPRECATED_MSG ( "Do not use the explicit casting version of  stackobject_to_shared_ptr,
just assign the result to a shared_ptr to the base class"   
)
inline

Create a shared_ptr to a base class for a stack-allocated object.

Usage:

class A {};
class B : public A {};
...
B b;
shared_ptr<A> pa = stackobject_to_shared_ptr<A>(b);

The shared_ptr points to the object on the stack, but its deleter is set to an instance of null_deleter so that nothing happens when the shared_ptr is destroyed.

See also
shared_ptr, null_deleter

◆ DUNE_DEPRECATED_MSG() [2/2]

template<template< int > class Operation, int first, int last>
struct Dune::DUNE_DEPRECATED_MSG ( "Use Hybrid::forEach instead!"  )

◆ get()

template<class Reference , class PropertyMap , class Key >
Reference Dune::get ( const RAPropertyMapHelper< Reference, PropertyMap > &  pmap,
const Key &  key 
)
inline

◆ hash_combine()

template<typename T >
void Dune::hash_combine ( std::size_t &  seed,
const T &  arg 
)
inline

Calculates the hash value of arg and combines it in-place with seed.

Parameters
seedThe hash value that will be combined with the hash of arg.
argThe object for which to calculate a hash value and combine it with seed.

◆ hash_range() [1/2]

template<typename It >
std::size_t Dune::hash_range ( It  first,
It  last 
)
inline

Hashes all elements in the range [first,last) and returns the combined hash.

Parameters
firstIterator pointing to the first object to hash.
lastIterator pointing one past the last object to hash.
Returns
The result of hashing all objects in the range and combining them using hash_combine() in sequential fashion, starting with seed 0.

◆ hash_range() [2/2]

template<typename It >
void Dune::hash_range ( std::size_t &  seed,
It  first,
It  last 
)
inline

Hashes all elements in the range [first,last) and combines the hashes in-place with seed.

Parameters
seedStart value that will be combined with the hash values of all objects in the range using hash_combine() in sequential fashion.
firstIterator pointing to the first ojbect to hash.
lastIterator pointing one past the last object to hash.

◆ isAligned()

bool Dune::isAligned ( const void *  p,
std::size_t  align 
)
inline

check whether an address conforms to the given alignment

◆ lane() [1/2]

template<class T >
T Dune::lane ( std::size_t  l,
const T &  v 
)

access a lane of a simd vector (scalar version)

◆ lane() [2/2]

template<class T >
T& Dune::lane ( std::size_t  l,
T &  v 
)

access a lane of a simd vector (scalar version)

◆ lanes()

template<class T >
std::size_t Dune::lanes ( const T &  )

get the number of lanes of a simd vector (scalar version)

◆ makeTupleVector()

template<class... T>
constexpr auto Dune::makeTupleVector ( T &&...  t)
constexpr

◆ max_value() [1/2]

template<class T , std::size_t align>
T Dune::max_value ( const AlignedNumber< T, align > &  val)

◆ max_value() [2/2]

template<typename T , typename std::enable_if<!is_range< T >::value, int >::type = 0>
const T& Dune::max_value ( const T &  v)

◆ min_value() [1/2]

template<class T , std::size_t align>
T Dune::min_value ( const AlignedNumber< T, align > &  val)

◆ min_value() [2/2]

template<typename T , typename std::enable_if<!is_range< T >::value, int >::type = 0>
const T& Dune::min_value ( const T &  v)

◆ operator==()

template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 >
std::enable_if<std::is_convertible<T1,T2>::value && !std::is_convertible<T2,T1>::value, bool>::type Dune::operator== ( const BidirectionalIteratorFacade< T1, V1, R1, D > &  lhs,
const BidirectionalIteratorFacade< T2, V2, R2, D > &  rhs 
)
inline

Checks for equality.

This operation is only defined if either T1 is convertible to T2, and T2 is not convetible to T1. Otherwise the operator is removed from the overload set since the enable_if for the return type yield an invalid type expression.

◆ put()

template<class Reference , class PropertyMap , class Key , class Value >
void Dune::put ( const RAPropertyMapHelper< Reference, PropertyMap > &  pmap,
const Key &  key,
const Value &  value 
)
inline

◆ sign()

template<class T >
int Dune::sign ( const T &  val)

Return the sign of the value.

◆ stackobject_to_shared_ptr()

template<typename T >
shared_ptr< T > stackobject_to_shared_ptr ( T &  t)
inline

Create a shared_ptr for a stack-allocated object.

Usage:

int i = 10;
shared_ptr<int> pi = stackobject_to_shared_ptr(i);

The shared_ptr points to the object on the stack, but its deleter is set to an instance of null_deleter so that nothing happens when the shared_ptr is destroyed.

See also
shared_ptr, null_deleter

◆ swap()

template<class T >
void Dune::swap ( T &  v1,
T &  v2,
bool  mask 
)

◆ violatedAlignment()

void Dune::violatedAlignment ( const char *  className,
std::size_t  expectedAlignment,
const void *  address 
)

called when an alignment violation is detected

className Name of the class whose alignment was violated expectedAlignment The (over-)alignment that the class expected address The address the class actually found itself at.

The main purpose of the function is to serve as a convenient breakpoint for debugging – which is why we put it in an external compilation unit so it isn't inlined.

◆ violatedAlignmentHandler()

ViolatedAlignmentHandler & Dune::violatedAlignmentHandler ( )

access the handler called by violatedAlignment()

This may be used to obtain the handler for the purpose of calling, or for saving it somewhere to restore it later. It may also be used to set the handler simply by assigning a new handler. Setting the handler races with other accesses.

◆ wrap_or_move() [1/2]

template<class T >
auto Dune::wrap_or_move ( T &&  t)

Capture R-value reference to shared_ptr.

This will store a copy of the passed object in a shared_ptr.

The two overloads of wrap_or_move are intended to capture references and temporaries in a unique way without creating copies and only moving if necessary.

Be careful: Only use this function if you are aware of it's implications. You can e.g. easily end up storing a reference to a temporary if you use this inside of another function without perfect forwarding.

◆ wrap_or_move() [2/2]

template<class T >
auto Dune::wrap_or_move ( T &  t)

Capture L-value reference to shared_ptr.

This will store a pointer for the passed reference in a non-owning shared_ptr.

The two overloads of wrap_or_move are intended to capture references and temporaries in a unique way without creating copies and only moving if necessary.

Be careful: Only use this function if you are aware of it's implications. You can e.g. easily end up storing a reference to a temporary if you use this inside of another function without perfect forwarding.

Variable Documentation

◆ debugAlignment

constexpr auto Dune::debugAlignment = 2*alignof(std::max_align_t)
staticconstexpr

an alignment large enough to trigger alignment errors

Dune::stackobject_to_shared_ptr
shared_ptr< T > stackobject_to_shared_ptr(T &t)
Create a shared_ptr for a stack-allocated object.
Definition: shared_ptr.hh:75
documentation.hh
Documentation related stuff.
shared_ptr.hh
This file implements the class shared_ptr (a reference counting pointer), for those systems that don'...