24 template <
class Scalar,
int n,
int m>
class FieldMatrix;
34 template <
class Scalar>
41 static bool const isBLAStype = std::is_same_v<Scalar,float> || std::is_same_v<Scalar,double>;
66 static Real real(std::complex<T>
const& z) {
return z.real(); }
74 template <
class Entry>
82 static int const lapackLayout = std::is_floating_point<Entry>::value;
87 template <
class Entry,
int n,
int m>
100 template <
class Entry,
int n>
113 template <
class Entry>
124 namespace ScalarDetail
129 static constexpr int value = 0;
132 template <
class K,
int n>
133 struct Rank<Dune::FieldVector<K,n>>
135 static constexpr int value = 1;
138 template <
class K,
int n,
int m>
139 struct Rank<Dune::FieldMatrix<K,n,m>>
141 static constexpr int value = 2;
153 constexpr int rank = ScalarDetail::Rank<T>::value;
162 template <
class T,
class Real>
165 using type = std::conditional_t<std::is_convertible<T,Real>::value,
Real,T>;
168 template <
class T,
int n,
int m,
class Real>
static bool const isBLAStype
static Real real(std::complex< T > const &z)
Helper class for working with (real or complex) scalar field types.
static Real real(Scalar const &s)
Conversion to the real type, ignoring the imaginary part if nonzero.
typenameGetScalar< X >::type Real
static bool const isBLAStype
constexpr int rank
Reports the rank of vector, matrix, and tensor types of static size.
EntryTraits< Entry >::real_type frobenius_norm2(Entry const &x)
Dune::FieldMatrix< typename ConvertTo< T, Real >::type, n, m > type
Reports the converted type.
std::conditional_t< std::is_convertible< T, Real >::value, Real, T > type
static int const lapackLayout
typename ScalarTraits< field_type >::Real real_type
typename EntryTraits< Entry >::field_type field_type
Dune::FieldMatrix< typename EntryTraits< Entry >::transpose_type, m, n > transpose_type
static real_type frobenius_norm2(Dune::FieldMatrix< Entry, n, m > const &x)
Dune::FieldMatrix< typename EntryTraits< Entry >::transpose_type, 1, n > transpose_type
typename ScalarTraits< field_type >::Real real_type
static int const lapackLayout
typename EntryTraits< Entry >::field_type field_type
static real_type frobenius_norm2(Dune::FieldVector< Entry, n > const &x)
A traits class for getting static information about block matrix entries.
static real_type frobenius_norm2(Entry const &x)
typename ScalarTraits< field_type >::Real real_type
static int const lapackLayout