Namespaces | |
namespace | Concept |
Namespace for concepts. | |
namespace | DenseMatrixHelp |
namespace | detail |
namespace | DynamicMatrixHelp |
namespace | FloatCmp |
namespace | FMatrixHelp |
namespace | fvmeta |
namespace | Hybrid |
namespace | Imp |
namespace | Impl |
namespace | Indices |
Namespace with predefined compile time indices for the range [0,19]. | |
namespace | Std |
Classes | |
struct | AlignmentOf |
Calculates the alignment requirement of a type. More... | |
class | ArrayList |
A dynamically growing random access list. More... | |
class | ArrayListIterator |
A random access iterator for the Dune::ArrayList class. More... | |
class | ConstArrayListIterator |
A constant random access iterator for the Dune::ArrayList class. More... | |
class | bigunsignedint |
Portable very large unsigned integers. More... | |
struct | Min |
struct | Max |
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 | const_reference< BitSetVectorReference< block_size, Alloc > > |
struct | const_reference< BitSetVectorConstReference< block_size, Alloc > > |
struct | mutable_reference< BitSetVectorReference< block_size, Alloc > > |
struct | mutable_reference< BitSetVectorConstReference< block_size, Alloc > > |
class | BitSetVector |
A dynamic array of blocks of booleans. More... | |
class | DebugAllocator< void > |
class | DebugAllocator |
Allocators implementation which performs different kind of memory checks. More... | |
struct | greater_or_equal |
Greater or equal template test. More... | |
struct | common_bits |
activate if current and mask have common bits switched on. More... | |
class | DebugStreamError |
standard exception for the debugstream More... | |
class | StreamWrap |
class | DebugStreamState |
Intermediate class to implement tie-operation of DebugStream. More... | |
class | DebugStream |
Generic class to implement debug output streams. More... | |
struct | FieldTraits< DenseMatrix< M > > |
class | FMatrixError |
Error thrown if operations of a FieldMatrix fail. More... | |
class | DenseMatrix |
A dense n x m matrix. More... | |
struct | FieldTraits< DenseVector< V > > |
class | DenseIterator |
Generic iterator class for dense vector and matrix implementations. More... | |
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 | DiagonalRowVectorConst |
class | DiagonalRowVector |
struct | const_reference< DiagonalRowVector< K, n > > |
struct | const_reference< DiagonalRowVectorConst< K, n > > |
struct | mutable_reference< DiagonalRowVector< K, n > > |
struct | mutable_reference< DiagonalRowVectorConst< K, n > > |
class | ContainerWrapperIterator |
Iterator class for sparse vector-like containers. More... | |
struct | DenseMatrixAssigner< DenseMatrix, DiagonalMatrix< field, N > > |
struct | ImplementationDefined |
Dummy struct used for documentation purposes. More... | |
struct | AlwaysVoid |
struct | IsVector |
struct | IsVector< T, typename AlwaysVoid< typename T::field_type >::type > |
struct | DenseMatVecTraits< DynamicMatrix< K > > |
struct | FieldTraits< DynamicMatrix< K > > |
class | DynamicMatrix |
Construct a matrix with a dynamic size. More... | |
struct | DenseMatVecTraits< DynamicVector< K, Allocator > > |
struct | FieldTraits< DynamicVector< K, Allocator > > |
class | DynamicVector |
Construct a vector with a dynamic size. More... | |
class | EmptySet |
An empty set. More... | |
class | AllSet |
A set containing everything. More... | |
class | EnumItem |
A set consisting only of one item. More... | |
class | EnumRange |
A set representing a range including the borders. More... | |
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... | |
class | Combine |
A set combining two other sets. More... | |
class | Exception |
Base class for Dune-Exceptions. More... | |
struct | ExceptionHook |
Base class to add a hook to the Dune::Exception. More... | |
class | IOError |
Default exception class for I/O errors. More... | |
class | MathError |
Default exception class for mathematical errors. More... | |
class | RangeError |
Default exception class for range errors. More... | |
class | NotImplemented |
Default exception for dummy implementations. More... | |
class | SystemError |
Default exception class for OS errors. More... | |
class | OutOfMemoryError |
Default exception if memory allocation fails. More... | |
class | InvalidStateException |
Default exception if a function was called while the object is not in a valid state for that function. More... | |
class | ParallelError |
Default exception if an error in the parallel communication of the programm occurred. More... | |
class | FloatCmpOps |
Class encapsulating a default epsilon. More... | |
struct | DenseMatVecTraits< FieldMatrix< K, ROWS, COLS > > |
struct | FieldTraits< FieldMatrix< K, ROWS, COLS > > |
class | FieldMatrix |
A dense n x m matrix. More... | |
class | ForLoop |
A static loop using TMP. More... | |
struct | FieldTraits |
struct | FieldTraits< const T > |
struct | FieldTraits< std::complex< T > > |
struct | FieldTraits< T[N] > |
struct | FieldTraits< std::vector< T > > |
class | Function |
Base class template for function classes. More... | |
class | VirtualFunction |
Virtual base class template for function classes. More... | |
struct | DenseMatVecTraits< FieldVector< K, SIZE > > |
struct | FieldTraits< FieldVector< K, SIZE > > |
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 > |
class | FieldVector |
vector space out of a tensor product of fields. More... | |
struct | Gcd |
Calculator of the greatest common divisor. More... | |
struct | const_reference |
Get the 'const' version of a reference to a mutable object. More... | |
struct | const_reference< const R > |
struct | const_reference< R & > |
struct | const_reference< const R & > |
struct | mutable_reference |
get the 'mutable' version of a reference to a const object More... | |
struct | mutable_reference< const R > |
struct | mutable_reference< R & > |
struct | mutable_reference< const R & > |
class | GenericIterator |
Generic class for stl-conforming iterators for container classes with operator[]. More... | |
class | GMPField |
Number class for high precision floating point number using the GMP library mpf_class implementation. More... | |
struct | IsNumber< GMPField< precision > > |
struct | hash |
Functor for hashing objects of type T. More... | |
class | IdentityMatrix |
Read-only identity matrix. More... | |
struct | DenseMatrixAssigner< DenseMatrix, IdentityMatrix< field, N > > |
class | Indent |
Utility class for handling nested indentation in output. More... | |
struct | Cloneable |
An interface class for cloneable objects. More... | |
class | ios_base_all_saver |
Utility class for storing and resetting stream attributes. More... | |
class | ForwardIteratorFacade |
Base class for stl conformant forward iterators. More... | |
class | BidirectionalIteratorFacade |
Facade class for stl conformant bidirectional iterators. More... | |
class | RandomAccessIteratorFacade |
Base class for stl conformant forward iterators. More... | |
class | IteratorRange |
Simple range between a begin and an end iterator. More... | |
struct | Lcm |
Calculate the least common multiple of two numbers. More... | |
class | lru |
LRU Cache Container. More... | |
class | MallocAllocator |
Allocators implementation which simply calls malloc/free. More... | |
struct | StandardMathematicalConstants |
Standard implementation of MathematicalConstants. More... | |
struct | Factorial |
Calculates the factorial of m at compile time. More... | |
struct | Factorial< 0 > |
end of recursion of factorial via specialization More... | |
struct | DenseMatVecTraits |
struct | No_Comm |
class | CollectiveCommunication |
Collective communication interface and sequential default implementation. More... | |
struct | SizeOne |
Flag for marking indexed data structures where data at each index is of the same size. More... | |
struct | VariableSize |
Flag for marking indexed data structures where the data at each index may be a variable multiple of another type. More... | |
struct | CommPolicy |
Default policy used for communicating an indexed type. More... | |
class | BufferedCommunicator |
A communicator that uses buffers to gather and scatter the data to be send or received. More... | |
class | IndexPair |
A pair consisting of a global and local index. More... | |
class | InvalidIndexSetState |
Exception indicating that the index set is not in the expected state. More... | |
class | ParallelIndexSet |
Manager class for the mapping between local indices and globally unique indices. More... | |
class | GlobalLookupIndexSet |
Decorates an index set with the possibility to find a global index that is mapped to a specific local. More... | |
struct | LocalIndexComparator |
struct | IndexSetSortFunctor |
class | IndicesSyncer |
Class for recomputing missing indices of a distributed index set. More... | |
class | InterfaceBuilder |
Base class of all classes representing a communication interface. More... | |
class | InterfaceInformation |
Information describing an interface. More... | |
class | Interface |
Communication interface between remote and local indices. More... | |
class | LocalIndex |
An index present on the local process. More... | |
class | Generic_MPI_Op |
class | CollectiveCommunication< MPI_Comm > |
Specialization of CollectiveCommunication for MPI. More... | |
class | MPIGuardError |
This exception is thrown if the MPIGuard detects an error on a remote process. More... | |
class | MPIGuard |
detects a thrown exception and communicates to all other processes More... | |
class | FakeMPIHelper |
A fake mpi helper. More... | |
class | MPIHelper |
A real mpi helper.This helper should be used for parallel programs. More... | |
struct | MPITraits |
A traits class describing the mapping of types onto MPI_Datatypes. More... | |
class | ParallelLocalIndex |
An index present on the local process with an additional attribute flag. More... | |
struct | LocalIndexComparator< ParallelLocalIndex< T > > |
class | MPITraits< ParallelLocalIndex< T > > |
class | MPITraits< IndexPair< TG, ParallelLocalIndex< TA > > > |
class | RemoteIndex |
Information about an index residing on another processor. More... | |
class | RemoteIndices |
The indices present on remote processes. More... | |
class | RemoteIndexListModifier |
Modifier for adding and/or deleting remote indices from the remote index list. More... | |
class | CollectiveIterator |
A collective iterator for moving over the remote indices for all processes collectively. More... | |
class | SelectionIterator |
A const iterator over an uncached selection. More... | |
class | UncachedSelection |
An uncached selection of indices. More... | |
class | Selection |
A cached selection of indices. More... | |
class | VariableSizeCommunicator |
A buffered communicator where the amount of data sent does not have to be known a priori. More... | |
class | ParameterTree |
Hierarchical structure of string parameters. More... | |
class | ParameterTreeParserError |
report parser error while reading ParameterTree More... | |
class | HelpRequest |
exception thrown if the user wants to see help string More... | |
class | ParameterTreeParser |
Parsers to set up a ParameterTree from various input sources. 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 | StaticPower |
Calculates m^p at compile time. More... | |
struct | StaticPower< m, 0 > |
end of recursion via specialization More... | |
struct | Power |
Compute power for a run-time mantissa and a compile-time integer exponent. More... | |
class | FMatrixPrecision |
Precisions for calculations with FieldMatrix and FieldVector. 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 | ReadablePropertyMapTag |
Tag for the category of readable property maps. More... | |
struct | WritablePropertyMapTag |
Tag for the category of writable property maps. More... | |
struct | ReadWritePropertyMapTag |
Tag for the category of readable and writable property maps. More... | |
struct | LvaluePropertyMapTag |
Tag for the category of lvalue property maps. More... | |
struct | PropertyMapTraits< T * > |
struct | PropertyMapTraits< const T * > |
struct | RAPropertyMapHelper |
class | IteratorPropertyMap |
Adapter to turn a random access iterator into a property map. More... | |
class | AssociativePropertyMap |
An adapter to turn an unique associative container into a property map. More... | |
class | ConstAssociativePropertyMap |
An adaptor to turn an unique associative container into a property map. More... | |
struct | IdentityMap |
A property map that applies the identity function to integers. More... | |
struct | PropertyMapTypeSelector |
Selector for the property map type. More... | |
class | ReservedVector |
A Vector class with statically reserved memory. More... | |
struct | null_deleter |
implements the Deleter concept of shared_ptr without deleting anything More... | |
struct | SimdScalarTypeTraits |
class | Singleton |
An adapter to turn a class into a singleton. More... | |
class | SLList |
A single linked list. More... | |
class | SLListIterator |
A mutable iterator for the SLList. More... | |
class | SLListConstIterator |
A constant iterator for the SLList. More... | |
class | SLListModifyIterator |
A mutable iterator for the SLList. More... | |
class | TimerError |
Exception thrown by the Timer class More... | |
class | Timer |
A simple stop watch. More... | |
struct | TupleAccessTraits |
struct | TupleAccessTraits< T * > |
struct | TupleAccessTraits< T & > |
struct | NullPointerInitialiser< std::tuple< Args...> > |
struct | ForEachType< TE, std::tuple< Args...> > |
class | TransformTupleFunctor |
struct | AddRefTypeEvaluator |
TypeEvaluator to turn a type T into a reference to T More... | |
struct | AddPtrTypeEvaluator |
TypeEvaluator to turn a type T into a pointer to T More... | |
struct | AddPtrTypeEvaluator< T & > |
class | ForEachValue |
Helper template which implements iteration over all storage elements in a std::tuple. More... | |
class | ForEachValuePair |
Extension of ForEachValue to two std::tuple's. More... | |
struct | AtType |
Type for reverse element access. More... | |
struct | At |
Reverse element access. More... | |
struct | PointerPairDeletor |
Deletes all objects pointed to in a std::tuple of pointers. More... | |
class | FirstPredicateIndex |
Finding the index of a certain type in a std::tuple. More... | |
struct | IsType |
Generator for predicates accepting one particular type. More... | |
struct | FirstTypeIndex |
Find the first occurrence of a type in a std::tuple. More... | |
struct | PushBackTuple< typename std::tuple< Args...>, T > |
struct | PushFrontTuple< typename std::tuple< Args...>, T > |
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... | |
struct | JoinTuples |
Join two std::tuple's. More... | |
struct | FlattenTuple |
Flatten a std::tuple of std::tuple's. More... | |
class | TupleVector |
A class augmenting std::tuple by element access via operator[]. More... | |
struct | TypeList |
A simple type list. More... | |
struct | IsTypeList |
Check if given type is a TypeList. More... | |
struct | IsTypeList< TypeList< T...> > |
struct | IsEmptyTypeList |
Check if given type is an empty TypeList. More... | |
struct | TypeListSize |
struct | TypeListSize< TypeList< T...> > |
Get size of TypeList. More... | |
struct | TypeListElement |
struct | TypeListElement< i, TypeList< T...> > |
Get element of TypeList. More... | |
struct | Empty |
Just an empty class. More... | |
struct | ConstantVolatileTraits |
Determines whether a type is const or volatile and provides the unqualified types. More... | |
struct | IsVolatile |
Tests whether a type is volatile. More... | |
struct | IsConst |
Tests whether a type is constant. More... | |
struct | remove_const |
struct | remove_reference |
struct | Conversion |
Checks whether a type is convertible to another. More... | |
struct | IsBaseOf |
Checks whether a type is derived from another. More... | |
struct | IsInteroperable |
Checks whether two types are interoperable. More... | |
struct | enable_if |
struct | enable_if< true, T > |
struct | EnableIfInterOperable |
Enable typedef if two types are interoperable. More... | |
struct | is_same |
struct | conditional |
struct | integral_constant |
struct | true_type |
struct | false_type |
struct | is_pointer |
struct | is_lvalue_reference |
struct | remove_pointer |
struct | AlwaysFalse |
template which always yields a false value More... | |
struct | AlwaysTrue |
template which always yields a true value More... | |
struct | IsNumber |
struct | IsNumber< std::complex< T > > |
struct | has_nan |
struct | has_nan< std::complex< T > > |
struct | is_indexable |
struct | is_range |
struct | IsTuple |
Check if T is a std::tuple<...>. More... | |
struct | IsTupleOrDerived |
Check if T derived from a std::tuple<...>. More... | |
struct | IsIntegralConstant |
Check if T is an std::integral_constant<I, i>. More... | |
struct | SizeOf |
Compute size of variadic type list. More... | |
struct | PriorityTag |
Helper class for tagging priorities. More... | |
struct | PriorityTag< 0 > |
Helper class for tagging priorities. More... | |
Typedefs | |
typedef unsigned int | DebugLevel |
Type for debug levels. | |
typedef DebugStream < VERY_VERBOSE_DEBUG_LEVEL, MINIMAL_DEBUG_LEVEL > | DVVerbType |
Type of very verbose debug stream. | |
typedef DebugStream < VERBOSE_DEBUG_LEVEL, MINIMAL_DEBUG_LEVEL > | DVerbType |
Type of more verbose debug stream. | |
typedef DebugStream < INFO_DEBUG_LEVEL, MINIMAL_DEBUG_LEVEL > | DInfoType |
Type of debug stream with info level. | |
typedef DebugStream < WARN_DEBUG_LEVEL, MINIMAL_DEBUG_LEVEL > | DWarnType |
Type of debug stream with warn level. | |
typedef DebugStream < GRAVE_DEBUG_LEVEL, MINIMAL_DEBUG_LEVEL > | DGraveType |
Type of debug stream for fatal errors. | |
typedef DebugStream< 1 > | DErrType |
The type of the stream used for error messages. | |
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> | |
std::array< T, n > | fill_array (const T &t) |
Create an array and fill it with copies of the provided value. | |
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. | |
template<class T > | |
std::string | className (T &) |
Provide the demangled class name of a given object as a string. | |
template<class C , class... T> | |
constexpr auto | models () |
Check if concept is modeled by given types. | |
template<typename T1 , typename T2 > | |
const T1 | cond (bool b, const T1 &v1, const T2 &v2) |
conditional evaluate | |
template<typename MAT > | |
std::ostream & | operator<< (std::ostream &s, const DenseMatrix< MAT > &a) |
Sends the matrix to an output stream. | |
template<class A , class B > | |
auto | dot (const A &a, const B &b)-> typename std |
computes the dot product for fundamental data types according to Petsc's VectDot function: dot(a,b) := std::conj(a)*b | |
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. | |
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<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. | |
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. | |
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. | |
std::ostream & | operator<< (std::ostream &s, const Indent &indent) |
write indentation to a stream | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
template<class K > | |
K | conjugateComplex (const K &x) |
compute conjugate complex of x | |
template<class T > | |
int | sign (const T &val) |
Return the sign of the value. | |
template<class... F> | |
auto | overload (F &&...f) |
Create an overload set. | |
template<class... F> | |
auto | orderedOverload (F &&...f) |
Create an ordered overload set. | |
template<class TG , class TL > | |
std::ostream & | operator<< (std::ostream &os, const IndexPair< TG, TL > &pair) |
Print an index pair. | |
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. | |
template<typename TG , typename TA > | |
bool | operator< (const IndexPair< TG, ParallelLocalIndex< TA > > &i1, const std::pair< TG, TA > &i2) |
template<typename TG , typename TA > | |
bool | operator< (const std::pair< TG, TA > &i1, const IndexPair< TG, ParallelLocalIndex< TA > > &i2) |
template<typename TG , typename TA > | |
bool | operator== (const IndexPair< TG, ParallelLocalIndex< TA > > &i1, const std::pair< TG, TA > &i2) |
template<typename TG , typename TA > | |
bool | operator!= (const IndexPair< TG, ParallelLocalIndex< TA > > &i1, const std::pair< TG, TA > &i2) |
template<typename TG , typename TA > | |
bool | operator== (const std::pair< TG, TA > &i2, const IndexPair< TG, ParallelLocalIndex< TA > > &i1) |
template<typename TG , typename TA > | |
bool | operator!= (const std::pair< TG, TA > &i2, const IndexPair< TG, ParallelLocalIndex< TA > > &i1) |
template<typename T , typename A , typename A1 > | |
void | storeGlobalIndicesOfRemoteIndices (std::map< int, SLList< std::pair< typename T::GlobalIndex, typename T::LocalIndex::Attribute >, A > > &globalMap, const RemoteIndices< T, A1 > &remoteIndices) |
Stores the corresponding global indices of the remote index information. | |
template<typename T , typename A , typename A1 > | |
void | repairLocalIndexPointers (std::map< int, SLList< std::pair< typename T::GlobalIndex, typename T::LocalIndex::Attribute >, A > > &globalMap, RemoteIndices< T, A1 > &remoteIndices, const T &indexSet) |
Repair the pointers to the local indices in the remote indices. | |
ComposeMPIOp (char, std::plus, MPI_SUM) | |
ComposeMPIOp (unsigned char, std::plus, MPI_SUM) | |
ComposeMPIOp (short, std::plus, MPI_SUM) | |
ComposeMPIOp (int, std::plus, MPI_SUM) | |
ComposeMPIOp (long, std::plus, MPI_SUM) | |
ComposeMPIOp (float, std::plus, MPI_SUM) | |
ComposeMPIOp (double, std::plus, MPI_SUM) | |
ComposeMPIOp (char, std::multiplies, MPI_PROD) | |
ComposeMPIOp (unsigned char, std::multiplies, MPI_PROD) | |
ComposeMPIOp (short, std::multiplies, MPI_PROD) | |
ComposeMPIOp (int, std::multiplies, MPI_PROD) | |
ComposeMPIOp (long, std::multiplies, MPI_PROD) | |
ComposeMPIOp (float, std::multiplies, MPI_PROD) | |
ComposeMPIOp (double, std::multiplies, MPI_PROD) | |
ComposeMPIOp (char, Min, MPI_MIN) | |
ComposeMPIOp (unsigned char, Min, MPI_MIN) | |
ComposeMPIOp (short, Min, MPI_MIN) | |
ComposeMPIOp (int, Min, MPI_MIN) | |
ComposeMPIOp (long, Min, MPI_MIN) | |
ComposeMPIOp (float, Min, MPI_MIN) | |
ComposeMPIOp (double, Min, MPI_MIN) | |
ComposeMPIOp (char, Max, MPI_MAX) | |
ComposeMPIOp (unsigned char, Max, MPI_MAX) | |
ComposeMPIOp (short, Max, MPI_MAX) | |
ComposeMPIOp (int, Max, MPI_MAX) | |
ComposeMPIOp (long, Max, MPI_MAX) | |
ComposeMPIOp (float, Max, MPI_MAX) | |
ComposeMPIOp (double, Max, MPI_MAX) | |
template<class T > | |
std::ostream & | operator<< (std::ostream &os, const ParallelLocalIndex< T > &index) |
Print the local index to a stream. | |
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) |
template<typename T1 , typename T2 > | |
std::ostream & | operator<< (std::ostream &os, const RemoteIndex< T1, T2 > &index) |
template<class T , class A > | |
std::ostream & | operator<< (std::ostream &os, const RemoteIndices< T, A > &indices) |
template<typename TG , typename TA > | |
std::ostream & | operator<< (std::ostream &os, const RemoteIndex< TG, TA > &index) |
std::string | concatPaths (const std::string &base, const std::string &p) |
concatenate two paths | |
std::string | processPath (const std::string &p) |
sanitize a path for further processing | |
bool | pathIndicatesDirectory (const std::string &p) |
check whether the given path indicates that it is a directory | |
std::string | prettyPath (const std::string &p, bool isDirectory) |
pretty print path | |
std::string | prettyPath (const std::string &p) |
pretty print path | |
std::string | relativePath (const std::string &newbase, const std::string &p) |
compute a relative path between two paths | |
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). | |
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 | |
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 | |
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 | |
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 | |
template<std::size_t N> | |
bool | all_true (const std::bitset< N > &b) |
template<typename T > | |
shared_ptr< T > | stackobject_to_shared_ptr (T &t) |
Create a shared_ptr for a stack-allocated object. | |
template<typename T , typename T2 > | |
shared_ptr< T2 > | stackobject_to_shared_ptr (T &t) |
Create a shared_ptr to a base class for a stack-allocated object. | |
template<class T > | |
auto | wrap_or_move (T &&t) |
Capture R-value reference to shared_ptr. | |
template<class T > | |
auto | wrap_or_move (T &t) |
Capture L-value reference to shared_ptr. | |
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. | |
template<typename Stream , typename... Ts> | |
Stream & | operator<< (Stream &stream, const std::tuple< Ts...> &t) |
Print a std::tuple. | |
template<typename Stream , typename... Ts> | |
Stream & | operator>> (Stream &stream, std::tuple< Ts...> &t) |
Read a std::tuple. | |
template<typename Stream , typename T , std::size_t N> | |
Stream & | operator<< (Stream &stream, const std::array< T, N > &a) |
Print a std::array. | |
template<typename C > | |
bool | hasPrefix (const C &c, const char *prefix) |
Check whether a character container has a given prefix. | |
template<typename C > | |
bool | hasSuffix (const C &c, const char *suffix) |
Check whether a character container has a given suffix. | |
template<class... T> | |
static std::string | formatString (const std::string &s, const T &...args) |
Format values according to printf format string. | |
template<class Tuple , class Functor > | |
auto | genericTransformTuple (Tuple &&t, Functor &&f)-> decltype(genericTransformTupleBackend(t |
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 |
auto | makeTransformTupleFunctor< TypeEvaluator > (args...))) |
template<class... T> | |
constexpr auto | makeTupleVector (T &&...t) |
Variables | |
DVVerbType | dvverb (std::cout) |
stream for very verbose output. | |
DVerbType | dverb (std::cout) |
Singleton of verbose debug stream. | |
DInfoType | dinfo (std::cout) |
Stream for informative output. | |
DWarnType | dwarn (std::cerr) |
Stream for warnings indicating problems. | |
DGraveType | dgrave (std::cerr) |
Stream for warnings indicating fatal errors. | |
DErrType | derr (std::cerr) |
Stream for error messages. | |
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. | |
static const DebugLevel | VERBOSE_DEBUG_LEVEL = 2 |
The level of the verbose debug stream. | |
static const DebugLevel | INFO_DEBUG_LEVEL = 3 |
The level of the informative debug stream. | |
static const DebugLevel | WARN_DEBUG_LEVEL = 4 |
The level of the debug stream for warnings. | |
static const DebugLevel | GRAVE_DEBUG_LEVEL = 5 |
The level of the debug stream for fatal errors. |
Dune namespace.
anonymous enum |
implementationDefined |
Dummy integral value used for documentation purposes. #include <dune/common/documentation.hh>
|
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.
std::string Dune::className | ( | T & | ) | [inline] |
Provide the demangled class name of a given object as a string.
std::string Dune::className | ( | ) | [inline] |
Provide the demangled class name of a type T as a string.
Dune::ComposeMPIOp | ( | double | , | |
Max | , | |||
MPI_MAX | ||||
) |
Dune::ComposeMPIOp | ( | float | , | |
Max | , | |||
MPI_MAX | ||||
) |
Dune::ComposeMPIOp | ( | long | , | |
Max | , | |||
MPI_MAX | ||||
) |
Dune::ComposeMPIOp | ( | int | , | |
Max | , | |||
MPI_MAX | ||||
) |
Dune::ComposeMPIOp | ( | short | , | |
Max | , | |||
MPI_MAX | ||||
) |
Dune::ComposeMPIOp | ( | unsigned | char, | |
Max | , | |||
MPI_MAX | ||||
) |
Dune::ComposeMPIOp | ( | char | , | |
Max | , | |||
MPI_MAX | ||||
) |
Dune::ComposeMPIOp | ( | double | , | |
Min | , | |||
MPI_MIN | ||||
) |
Dune::ComposeMPIOp | ( | float | , | |
Min | , | |||
MPI_MIN | ||||
) |
Dune::ComposeMPIOp | ( | long | , | |
Min | , | |||
MPI_MIN | ||||
) |
Dune::ComposeMPIOp | ( | int | , | |
Min | , | |||
MPI_MIN | ||||
) |
Dune::ComposeMPIOp | ( | short | , | |
Min | , | |||
MPI_MIN | ||||
) |
Dune::ComposeMPIOp | ( | unsigned | char, | |
Min | , | |||
MPI_MIN | ||||
) |
Dune::ComposeMPIOp | ( | char | , | |
Min | , | |||
MPI_MIN | ||||
) |
Dune::ComposeMPIOp | ( | double | , | |
std::multiplies | , | |||
MPI_PROD | ||||
) |
Dune::ComposeMPIOp | ( | float | , | |
std::multiplies | , | |||
MPI_PROD | ||||
) |
Dune::ComposeMPIOp | ( | long | , | |
std::multiplies | , | |||
MPI_PROD | ||||
) |
Dune::ComposeMPIOp | ( | int | , | |
std::multiplies | , | |||
MPI_PROD | ||||
) |
Dune::ComposeMPIOp | ( | short | , | |
std::multiplies | , | |||
MPI_PROD | ||||
) |
Dune::ComposeMPIOp | ( | unsigned | char, | |
std::multiplies | , | |||
MPI_PROD | ||||
) |
Dune::ComposeMPIOp | ( | char | , | |
std::multiplies | , | |||
MPI_PROD | ||||
) |
Dune::ComposeMPIOp | ( | double | , | |
std::plus | , | |||
MPI_SUM | ||||
) |
Dune::ComposeMPIOp | ( | float | , | |
std::plus | , | |||
MPI_SUM | ||||
) |
Dune::ComposeMPIOp | ( | long | , | |
std::plus | , | |||
MPI_SUM | ||||
) |
Dune::ComposeMPIOp | ( | int | , | |
std::plus | , | |||
MPI_SUM | ||||
) |
Dune::ComposeMPIOp | ( | short | , | |
std::plus | , | |||
MPI_SUM | ||||
) |
Dune::ComposeMPIOp | ( | unsigned | char, | |
std::plus | , | |||
MPI_SUM | ||||
) |
Dune::ComposeMPIOp | ( | char | , | |
std::plus | , | |||
MPI_SUM | ||||
) |
const T1 Dune::cond | ( | bool | b, | |
const T1 & | v1, | |||
const T2 & | v2 | |||
) | [inline] |
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.
b | boolean value | |
v1 | value of b==true | |
v2 | value of b==false |
K Dune::conjugateComplex | ( | const K & | x | ) | [inline] |
compute conjugate complex of x
void Dune::doAssertCallOnce | ( | const char * | file, | |
int | line, | |||
const char * | function | |||
) |
auto Dune::dotT | ( | const A & | a, | |
const B & | b | |||
) | [inline] |
Computes an indefinite vector dot product for fundamental data types according to Petsc's VectTDot function: dotT(a,b) := a*b.
a | ||
b |
Reference Dune::get | ( | const RAPropertyMapHelper< Reference, PropertyMap > & | pmap, | |
const Key & | key | |||
) | [inline] |
pointer_or_proxy_holder Dune::handle_proxy_member_access | ( | T && | t | ) | [inline] |
Transparent support for providing member access to both lvalues and rvalues (temporary proxies).
If an iterator facade (like entity iterators) wants to allow the embedded implementation to return either an (internally stored) reference or a temporary object and expose these two behaviors to enable performance optimizations, operator->() needs special handling: If the implementation returns a reference, operator->() in the facade can simply return the address of the referenced object, but if the returned object is a temporary, we need to capture and store it in a helper object to make sure it outlives the member access. This function transparently supports both variants. It should be used like this:
class iterator { ... decltype(handle_proxy_member_access(implementation.dereference())) operator->() const { return handle_proxy_member_access(implementation.dereference()); } ... };
void Dune::hash_combine | ( | std::size_t & | seed, | |
const T & | arg | |||
) | [inline] |
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.
seed | Start value that will be combined with the hash values of all objects in the range using hash_combine() in sequential fashion. | |
first | Iterator pointing to the first ojbect to hash. | |
last | Iterator pointing one past the last object to hash. |
std::size_t Dune::hash_range | ( | It | first, | |
It | last | |||
) | [inline] |
Hashes all elements in the range [first,last) and returns the combined hash.
first | Iterator pointing to the first object to hash. | |
last | Iterator pointing one past the last object to hash. |
constexpr auto Dune::makeTupleVector | ( | T &&... | t | ) | [inline] |
constexpr auto Dune::models | ( | ) | [inline] |
Check if concept is modeled by given types.
This will check if the given concept is modeled by the given list of types. This is true if the list of types models all the base concepts that are refined by the given concept and if it satisfies all additional requirements of the latter.
Notice that a concept may be defined for a list of interacting types. The function will check if the given list of types matches the requirements on the whole list. It does not check if each individual type in the list satisfies the concept.
This concept check mechanism is inspired by the concept checking facility in Eric Nieblers range-v3. For more information please refer to the libraries project page https://github.com/ericniebler/range-v3 or this blog entry: http://ericniebler.com/2013/11/23/concept-checking-in-c11. In fact the interface provided here is almost exactly the same as in range-v3. However the implementation differs, because range-v3 uses its own meta-programming library whereas our implementation is more straight forward.
The result is returned as std::integral_constant<bool, ...> which allows to nicely use this method with Hybrid::ifElse.
C | The concept to check | |
T | The list of type to check against the concept |
std::ostream& Dune::operator<< | ( | std::ostream & | os, | |
const RemoteIndex< TG, TA > & | index | |||
) | [inline] |
auto Dune::orderedOverload | ( | F &&... | f | ) | [inline] |
Create an ordered overload set.
F | List of function object types |
f | List of function objects |
This returns an object that contains all operator() implementations of the passed functions. All those are available when calling operator() of the returned object.
In contrast to overload() these overloads are ordered in the sense that the first matching overload for the given arguments is selected and later ones are ignored. Hence such a call is never ambiguous.
Notice that the passed function objects are stored by value and must be copy-constructible.
auto Dune::overload | ( | F &&... | f | ) | [inline] |
Create an overload set.
F | List of function object types |
f | List of function objects |
This returns an object that contains all operator() implementations of the passed functions. All those are available when calling operator() of the returned object.
The returned object derives from those implementations such that it contains all operator() implementations in its overload set. When calling operator() this will select the best overload. If multiple overload are equally good this will lead to ambiguity.
Notice that the passed function objects are stored by value and must be copy-constructible.
void Dune::put | ( | const RAPropertyMapHelper< Reference, PropertyMap > & | pmap, | |
const Key & | key, | |||
const Value & | value | |||
) | [inline] |
int Dune::sign | ( | const T & | val | ) | [inline] |
Return the sign of the value.
shared_ptr< T2 > stackobject_to_shared_ptr | ( | T & | t | ) | [inline] |
Create a shared_ptr to a base class for a stack-allocated object.
#include <dune/common/shared_ptr.hh>
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.
shared_ptr< T > stackobject_to_shared_ptr | ( | T & | t | ) | [inline] |
Create a shared_ptr for a stack-allocated object.
#include <dune/common/shared_ptr.hh>
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.
auto Dune::wrap_or_move | ( | T & | t | ) | [inline] |
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.
auto Dune::wrap_or_move | ( | T && | t | ) | [inline] |
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.