undeterminated.h
Go to the documentation of this file.
# ifndef _RHEO_UNDETERMINATED_H
# define _RHEO_UNDETERMINATED_H
#include "rheolef/point.h"
#include "rheolef/tensor.h"
#include "rheolef/tensor3.h"
#include "rheolef/tensor4.h"
#include "rheolef/promote.h"
namespace rheolef {
template<class T>
struct undeterminated_basic {
typedef T scalar_type;
typedef T float_type;
};
template<class T> struct scalar_traits<undeterminated_basic<T> > { typedef T type; };
template<class T> struct float_traits<undeterminated_basic<T> > { typedef typename float_traits<T>::type type; };
template<class T> struct is_undeterminated : std::false_type {};
template<class T> struct is_undeterminated<undeterminated_basic<T> > : std::true_type {};
// promote: used to eliminate undeterminated_basic from generic expressions
template<class T1, class T2>
struct promote<undeterminated_basic<T1>, undeterminated_basic<T2> > {
typedef undeterminated_basic<typename promote<T1,T2>::type> type;
};
// scalar:
template<class T1, class T2>
struct promote<T1, undeterminated_basic<T2> > {
typedef typename promote<T1,T2>::type type;
};
template<class T1, class T2>
struct promote<undeterminated_basic<T1>, T2 > {
typedef typename promote<T1,T2>::type type;
};
#define _RHEOLEF_tensor_promote(tensor) \
template<class T1, class T2> \
struct promote<tensor##_basic<T1>, undeterminated_basic<T2> > { \
typedef tensor##_basic<typename promote<T1,T2>::type> type; \
}; \
template<class T1, class T2> \
struct promote<undeterminated_basic<T1>, tensor##_basic<T2> > { \
typedef tensor##_basic<typename promote<T1,T2>::type> type; \
}; \
template<class T1, class T2> \
struct promote<tensor##_basic<T1>, tensor##_basic<T2> > { \
typedef tensor##_basic<typename promote<T1,T2>::type> type; \
};
_RHEOLEF_tensor_promote(point)
_RHEOLEF_tensor_promote(tensor)
_RHEOLEF_tensor_promote(tensor3)
_RHEOLEF_tensor_promote(tensor4)
#undef _RHEOLEF_tensor_promote
} // namespace rheolef
#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:218