Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
field_eigen.h
Go to the documentation of this file.
1#ifndef _RHEOLEF_FIELD_EIGEN_H
2#define _RHEOLEF_FIELD_EIGEN_H
23//
24// customize the eigen library for accepting
25// Array<field>
26// Array<field,3>
27//
28// author: Pierre.Saramito@imag.fr
29//
30// date: 23 feb 2018
31//
32#include "rheolef/field.h"
33#include "rheolef/compiler_eigen.h"
34
35namespace Eigen {
36 template<class T, class M>
37 struct NumTraits <rheolef::field_basic<T,M> >
38 : NumTraits <typename rheolef::float_traits<T>::type> {
39 using NonInteger = T;
40 using Nested = T;
42 enum {
43 RequireInitialization = 1,
44 IsSigned = 1,
45 IsInteger = 0,
46 IsComplex = 0, // TODO: check it with some is_complex<T> traits
47 ReadCost = 1,
48 AddCost = 3,
49 MulCost = 3
50 };
51 };
52 template<class BinOp, class T, class M>
53 struct ScalarBinaryOpTraits <T, rheolef::field_basic<T,M>, BinOp> {
55 };
56 template<class BinOp, class T, class M>
57 struct ScalarBinaryOpTraits <rheolef::field_basic<T,M>, T, BinOp> {
59 };
60} // namespace Eigen
61#endif // _RHEOLEF_FIELD_EIGEN_H
Expr1::float_type T
Definition field_expr.h:230
This file is part of Rheolef.
typename rheolef::float_traits< T >::type Real
Definition field_eigen.h:41