Loading...
Searching...
No Matches
ftraits.hh
Go to the documentation of this file.
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
#ifndef DUNE_FTRAITS_HH
#define DUNE_FTRAITS_HH
#include <complex>
#include <vector>
namespace Dune {
template<class T>
struct FieldTraits
{
typedef T field_type;
typedef T real_type;
};
template<class T>
struct FieldTraits<const T>
{
typedef typename FieldTraits<T>::field_type field_type;
typedef typename FieldTraits<T>::real_type real_type;
};
template<class T>
struct FieldTraits< std::complex<T> >
{
typedef std::complex<T> field_type;
typedef T real_type;
};
template<class T, unsigned int N>
struct FieldTraits< T[N] >
{
typedef typename FieldTraits<T>::field_type field_type;
typedef typename FieldTraits<T>::real_type real_type;
};
template<class T>
struct FieldTraits< std::vector<T> >
{
typedef typename FieldTraits<T>::field_type field_type;
typedef typename FieldTraits<T>::real_type real_type;
};
} // end namespace Dune
#endif // DUNE_FTRAITS_HH
std
STL namespace.
Dune
Dune namespace
Definition alignedallocator.hh:13
Dune::FieldTraits
Definition ftraits.hh:26
Dune::field_type::field_type
typenameDenseMatVecTraits< V >::value_type field_type
Definition ftraits.hh:28
Dune::field_type::real_type
typenameDenseMatVecTraits< V >::value_type real_type
Definition ftraits.hh:30
Dune::FieldTraits< const T >::field_type
FieldTraits< T >::field_type field_type
Definition ftraits.hh:36
Dune::FieldTraits< const T >::real_type
FieldTraits< T >::real_type real_type
Definition ftraits.hh:37
Dune::FieldTraits< std::complex< T > >::real_type
T real_type
Definition ftraits.hh:44
Dune::FieldTraits< std::complex< T > >::field_type
std::complex< T > field_type
Definition ftraits.hh:43
Dune::FieldTraits< T[N] >::field_type
FieldTraits< T >::field_type field_type
Definition ftraits.hh:50
Dune::FieldTraits< T[N] >::real_type
FieldTraits< T >::real_type real_type
Definition ftraits.hh:51
Dune::FieldTraits< std::vector< T > >::real_type
FieldTraits< T >::real_type real_type
Definition ftraits.hh:58
Dune::FieldTraits< std::vector< T > >::field_type
FieldTraits< T >::field_type field_type
Definition ftraits.hh:57