dune-common 3.0-git
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#include <vector>
12
13namespace Dune {
14
22 template<class T>
24 {
26 typedef T field_type;
28 typedef T real_type;
29 };
30
31 template<class T>
32 struct FieldTraits<const T>
33 {
36 };
37
38 template<class T>
39 struct FieldTraits< std::complex<T> >
40 {
41 typedef std::complex<T> field_type;
42 typedef T real_type;
43 };
44
45 template<class T, unsigned int N>
46 struct FieldTraits< T[N] >
47 {
50 };
51
52 template<class T>
53 struct FieldTraits< std::vector<T> >
54 {
57 };
58
59} // end namespace Dune
60
61#endif // DUNE_FTRAITS_HH
STL namespace.
Dune namespace.
Definition alignment.hh:11
Definition ftraits.hh:24
T field_type
export the type representing the field
Definition ftraits.hh:26
T real_type
export the type representing the real type of the field
Definition ftraits.hh:28
FieldTraits< T >::field_type field_type
Definition ftraits.hh:34
FieldTraits< T >::real_type real_type
Definition ftraits.hh:35
T real_type
Definition ftraits.hh:42
std::complex< T > field_type
Definition ftraits.hh:41
FieldTraits< T >::field_type field_type
Definition ftraits.hh:48
FieldTraits< T >::real_type real_type
Definition ftraits.hh:49
FieldTraits< T >::real_type real_type
Definition ftraits.hh:56
FieldTraits< T >::field_type field_type
Definition ftraits.hh:55