Rheolef  7.1
an efficient C++ finite element environment
undeterminated.h
Go to the documentation of this file.
1 # ifndef _RHEO_UNDETERMINATED_H
2 # define _RHEO_UNDETERMINATED_H
3 #include "rheolef/point.h"
24 #include "rheolef/tensor.h"
25 #include "rheolef/tensor3.h"
26 #include "rheolef/tensor4.h"
27 #include "rheolef/promote.h"
28 
29 namespace rheolef {
31 template<class T>
33  typedef T scalar_type;
34  typedef T float_type;
35 };
36 template<class T> struct scalar_traits<undeterminated_basic<T> > { typedef T type; };
37 template<class T> struct float_traits<undeterminated_basic<T> > { typedef typename float_traits<T>::type type; };
38 
39 template<class T> struct is_undeterminated : std::false_type {};
40 template<class T> struct is_undeterminated<undeterminated_basic<T> > : std::true_type {};
41 
42 // promote: used to eliminate undeterminated_basic from generic expressions
43 template<class T1, class T2>
46 };
47 
48 // scalar:
49 template<class T1, class T2>
50 struct promote<T1, undeterminated_basic<T2> > {
51  typedef typename promote<T1,T2>::type type;
52 };
53 template<class T1, class T2>
54 struct promote<undeterminated_basic<T1>, T2 > {
55  typedef typename promote<T1,T2>::type type;
56 };
57 
58 #define _RHEOLEF_tensor_promote(tensor) \
59 template<class T1, class T2> \
60 struct promote<tensor##_basic<T1>, undeterminated_basic<T2> > { \
61  typedef tensor##_basic<typename promote<T1,T2>::type> type; \
62 }; \
63 template<class T1, class T2> \
64 struct promote<undeterminated_basic<T1>, tensor##_basic<T2> > { \
65  typedef tensor##_basic<typename promote<T1,T2>::type> type; \
66 }; \
67 template<class T1, class T2> \
68 struct promote<tensor##_basic<T1>, tensor##_basic<T2> > { \
69  typedef tensor##_basic<typename promote<T1,T2>::type> type; \
70 };
75 #undef _RHEOLEF_tensor_promote
76 
77 } // namespace rheolef
78 #endif // _RHEO_UNDETERMINATED_H
tensor3
see the tensor3 page for the full documentation
tensor
see the tensor page for the full documentation
rheolef::float_traits
helper for std::complex<T>: get basic T type
Definition: Float.h:93
rheolef::promote< undeterminated_basic< T1 >, T2 >::type
promote< T1, T2 >::type type
Definition: undeterminated.h:55
tensor4
see the tensor4 page for the full documentation
rheolef::undeterminated_basic
helper for generic field value_type: T, point_basic<T> or tensor_basic<T>
Definition: undeterminated.h:32
rheolef::undeterminated_basic::scalar_type
T scalar_type
Definition: undeterminated.h:33
rheolef::float_traits< undeterminated_basic< T > >::type
float_traits< T >::type type
Definition: undeterminated.h:37
rheolef::scalar_traits< undeterminated_basic< T > >::type
T type
Definition: undeterminated.h:36
rheolef::undeterminated_basic::float_type
T float_type
Definition: undeterminated.h:34
rheolef::promote< undeterminated_basic< T1 >, undeterminated_basic< T2 > >::type
undeterminated_basic< typename promote< T1, T2 >::type > type
Definition: undeterminated.h:45
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::float_traits::type
T type
Definition: Float.h:94
_RHEOLEF_tensor_promote
#define _RHEOLEF_tensor_promote(tensor)
Definition: undeterminated.h:58
rheolef::promote_not_specialized_for_this_case
Definition: promote.h:26
rheolef::promote< T1, undeterminated_basic< T2 > >::type
promote< T1, T2 >::type type
Definition: undeterminated.h:51
point
see the point page for the full documentation
rheolef::scalar_traits
helper for point_basic<T> & tensor_basic<T>: get basic T type
Definition: point.h:324
rheolef::promote
Definition: promote.h:29
rheolef::is_undeterminated
Definition: undeterminated.h:39
T
Expr1::float_type T
Definition: field_expr.h:261