dune-common 2.9.0
Loading...
Searching...
No Matches
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// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_FTRAITS_HH
6#define DUNE_FTRAITS_HH
7
12#include <complex>
13#include <vector>
14
15namespace Dune {
16
24 template<class T>
26 {
28 typedef T field_type;
30 typedef T real_type;
31 };
32
33 template<class T>
34 struct FieldTraits<const T>
35 {
38 };
39
40 template<class T>
41 struct FieldTraits< std::complex<T> >
42 {
43 typedef std::complex<T> field_type;
44 typedef T real_type;
45 };
46
47 template<class T, unsigned int N>
48 struct FieldTraits< T[N] >
49 {
52 };
53
54 template<class T>
55 struct FieldTraits< std::vector<T> >
56 {
59 };
60
61} // end namespace Dune
62
63#endif // DUNE_FTRAITS_HH
STL namespace.
Dune namespace.
Definition alignedallocator.hh:13
Definition ftraits.hh:26
T field_type
export the type representing the field
Definition ftraits.hh:28
T real_type
export the type representing the real type of the field
Definition ftraits.hh:30
FieldTraits< T >::field_type field_type
Definition ftraits.hh:36
FieldTraits< T >::real_type real_type
Definition ftraits.hh:37
T real_type
Definition ftraits.hh:44
std::complex< T > field_type
Definition ftraits.hh:43
FieldTraits< T >::field_type field_type
Definition ftraits.hh:50
FieldTraits< T >::real_type real_type
Definition ftraits.hh:51
FieldTraits< T >::real_type real_type
Definition ftraits.hh:58
FieldTraits< T >::field_type field_type
Definition ftraits.hh:57