version 3.11-dev
Loading...
Searching...
No Matches
Typetraits

Basic Type traits in DuMux. More...

Description

Classes

struct  Dumux::ProblemTraits< Problem >
 Type traits for problem classes. More...

Typedefs

template<class T>
using Dumux::GridDiscretization_t = typename Detail::GridDiscretizationType<T>::type
 The grid discretization type of a class exporting it.

Functions

template<class T, class... Args>
decltype(auto) Dumux::gridDiscretization (const T &t, Args &&... args)
 The grid discretization.
template<typename Expression>
constexpr auto Dumux::isValid (const Expression &t)
 A function that creates a test functor to do class member introspection at compile time.

Files

file  propertysystem.hh
 The Dumux property system, traits with inheritance.
file  griddiscretization.hh
 Type traits for classes providing a grid discretization.
file  isvalid.hh
 A helper function for class member function introspection.
file  matrix.hh
 Type traits to be used with matrix types.
file  periodic.hh
 Type traits to detect periodicity support.
file  problem.hh
 Type traits for problem classes.
file  state.hh
 Type traits to be used with matrix types.
file  typetraits.hh
 Type traits.
file  utility.hh
 Utilities for template meta programming.
file  vector.hh
 Type traits to be used with vector types.

Typedef Documentation

◆ GridDiscretization_t

template<class T>
using Dumux::GridDiscretization_t = typename Detail::GridDiscretizationType<T>::type
Note
Generic code that has to serve both the GridGeometry and the GridDiscretization interfaces should use this instead of naming either alias directly.

Function Documentation

◆ gridDiscretization()

template<class T, class... Args>
decltype(auto) Dumux::gridDiscretization ( const T & t,
Args &&... args )
Note
Generic code that has to serve both the gridGeometry() and the gridDiscretization() interfaces should use this instead of calling either accessor directly.
the args make it work for multidomain problems

◆ isValid()

template<typename Expression>
auto Dumux::isValid ( const Expression & t)
constexpr
Returns
a functor that returns true if the expression is valid with a given type / object Usage: If you want to test if a class has the member function resize(std::size_t) create a test functor
auto hasResize = isValid([](auto&& c) -> decltype(c.resize(std::size_t(1))) {}; });
constexpr auto isValid(const Expression &t)
A function that creates a test functor to do class member introspection at compile time.
Definition isvalid.hh:81
Note
hasResize can be constexpr in C++17 which allows lambdas in constexpr functions The you can use the test in compile time expressions
template<class T>
auto otherFunc(const T& t)
-> typename std::enable_if_t<!decltype(hasResize(myvector))::value, double>
{ return 4.0; }