dune-common  2.4.1
ftraits.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_FTRAITS_HH
4 #define DUNE_FTRAITS_HH
5 
10 #include <complex>
11 
12 namespace Dune {
13 
21  template<class T>
22  struct FieldTraits
23  {
25  typedef T field_type;
27  typedef T real_type;
28  };
29 
30  template<class T>
31  struct FieldTraits<const T>
32  {
35  };
36 
37  template<class T>
38  struct FieldTraits< std::complex<T> >
39  {
40  typedef std::complex<T> field_type;
41  typedef T real_type;
42  };
43 
44 } // end namespace Dune
45 
46 #endif // DUNE_FTRAITS_HH
T real_type
export the type representing the real type of the field
Definition: ftraits.hh:27
FieldTraits< T >::real_type real_type
Definition: ftraits.hh:34
Definition: ftraits.hh:22
T real_type
Definition: ftraits.hh:41
std::complex< T > field_type
Definition: ftraits.hh:40
T field_type
export the type representing the field
Definition: ftraits.hh:25
Dune namespace.
Definition: alignment.hh:9
STL namespace.
FieldTraits< T >::field_type field_type
Definition: ftraits.hh:33