Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
undeterminated.h
Go to the documentation of this file.
1# ifndef _RHEO_UNDETERMINATED_H
2# define _RHEO_UNDETERMINATED_H
23#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
29namespace rheolef {
31template<class T>
33 typedef T scalar_type;
34 typedef T float_type;
35};
36template<class T> struct scalar_traits<undeterminated_basic<T> > { typedef T type; };
37template<class T> struct float_traits<undeterminated_basic<T> > { typedef typename float_traits<T>::type type; };
38
39template<class T> struct is_undeterminated : std::false_type {};
40template<class T> struct is_undeterminated<undeterminated_basic<T> > : std::true_type {};
41
42// promote: used to eliminate undeterminated_basic from generic expressions
43template<class T1, class T2>
47
48// scalar:
49template<class T1, class T2>
50struct promote<T1, undeterminated_basic<T2> > {
51 typedef typename promote<T1,T2>::type type;
52};
53template<class T1, class T2>
54struct promote<undeterminated_basic<T1>, T2 > {
55 typedef typename promote<T1,T2>::type type;
56};
57
58#define _RHEOLEF_tensor_promote(tensor) \
59template<class T1, class T2> \
60struct promote<tensor##_basic<T1>, undeterminated_basic<T2> > { \
61 typedef tensor##_basic<typename promote<T1,T2>::type> type; \
62}; \
63template<class T1, class T2> \
64struct promote<undeterminated_basic<T1>, tensor##_basic<T2> > { \
65 typedef tensor##_basic<typename promote<T1,T2>::type> type; \
66}; \
67template<class T1, class T2> \
68struct 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
see the point page for the full documentation
see the tensor3 page for the full documentation
see the tensor4 page for the full documentation
see the tensor page for the full documentation
Expr1::float_type T
Definition field_expr.h:230
This file is part of Rheolef.
helper for std::complex<T>: get basic T type
Definition Float.h:93
undeterminated_basic< typename promote< T1, T2 >::type > type
promote_not_specialized_for_this_case< T1, T2 > type
Definition promote.h:30
helper for point_basic<T> & tensor_basic<T>: get basic T type
Definition point.h:323
helper for generic field value_type: T, point_basic<T> or tensor_basic<T>
#define _RHEOLEF_tensor_promote(tensor)