1#ifndef _RHEOLEF_SPACE_CONSTANT_H
2#define _RHEOLEF_SPACE_CONSTANT_H
25#include "rheolef/undeterminated.h"
26#include "rheolef/field_expr_utilities.h"
33namespace rheolef {
namespace details {
36template <
class T1,
class T2>
struct is_equal : std::false_type {};
37template <
class T>
struct is_equal<
T,
T> : std::true_type {};
40template<
class T>
struct is_scalar : std::false_type {};
41template<>
struct is_scalar<int> : std::true_type {};
42template<>
struct is_scalar<const int> : std::true_type {};
43template<>
struct is_scalar<size_t> : std::true_type {};
44template<>
struct is_scalar<double> : std::true_type {};
45#ifdef _RHEOLEF_HAVE_FLOAT128
46template<>
struct is_scalar<float128> : std::true_type {};
49template<
class T>
struct is_point : std::false_type {};
52template<
class T>
struct is_tensor : std::false_type {};
66template <
class T1,
class T2,
class Sfinae =
void>
68template <
class T1,
class T2,
class Sfinae =
void>
71#define _RHEOLEF_field_promote_argument(tensor) \
72template<class T1, class T2> \
73struct field_promote_first_argument<tensor##_basic<T1>, T2, \
74 typename std::enable_if< \
75 is_rheolef_arithmetic<T1>::value \
76 && is_rheolef_arithmetic<T2>::value \
79 using type = tensor##_basic<typename promote<T1,T2>::type>; }; \
80template <class T1, class T2> \
81struct field_promote_first_argument<T1,tensor##_basic<T2>, \
82 typename std::enable_if< \
83 is_rheolef_arithmetic<T1>::value \
84 && is_rheolef_arithmetic<T2>::value \
87 using type = typename promote<T1,T2>::type; }; \
88template <class T1, class T2> \
89struct field_promote_second_argument<tensor##_basic<T1>, T2, \
90 typename std::enable_if< \
91 is_rheolef_arithmetic<T1>::value \
92 && is_rheolef_arithmetic<T2>::value \
95 using type = typename promote<T1,T2>::type; }; \
96template <class T1, class T2> \
97struct field_promote_second_argument<T1,tensor##_basic<T2>, \
98 typename std::enable_if< \
99 is_rheolef_arithmetic<T1>::value \
100 && is_rheolef_arithmetic<T2>::value \
103 using type = tensor##_basic<typename promote<T1,T2>::type>; };
109#undef _RHEOLEF_field_promote_argument
115namespace space_constant {
153 const std::string& valued,
212std::pair<size_type,size_type>
224std::pair<size_type,size_type>
257std::pair<std::pair<size_type,size_type>, std::pair<size_type,size_type> >
269std::pair<std::pair<size_type,size_type>, std::pair<size_type,size_type> >
294 template<
class T1,
class T2>
303 ,is_point<typename F::result_type>
309 template<
class E>
struct is_expr : std::false_type {};
340 template<
class T,
class R>
344 template<
class T,
class R>
348 template<
class Constant>
352#ifdef _RHEOLEF_HAVE_FLOAT128
357template <
class Value>
360 is_rheolef_arithmetic<Value>
field::size_type size_type
see the Float page for the full documentation
see the point page for the full documentation
tensor3_basic< Float > tensor3
tensor_basic< Float > tensor
tensor4_basic< Float > tensor4
see the tensor3 page for the full documentation
see the tensor4 page for the full documentation
see the tensor page for the full documentation
void check_coord_sys_and_dimension(coordinate_type i, size_type d)
coordinate_type coordinate_system(std::string sys_coord)
std::string coordinate_system_name(coordinate_type i)
valued_type multiplies_result_tag(space_constant::valued_type tag1, space_constant::valued_type tag2)
size_type tensor4_index(valued_type valued, coordinate_type sys_coord, size_type i, size_type j, size_type k, size_type l)
T contract_product(const T &a, const T &b)
std::string tensor_subscript_name(valued_type valued_tag, coordinate_type sys_coord, size_type i_comp)
size_type tensor_index(valued_type valued_tag, coordinate_type sys_coord, size_type i, size_type j)
valued_type divides_result_tag(space_constant::valued_type tag1, space_constant::valued_type tag2)
std::pair< std::pair< size_type, size_type >, std::pair< size_type, size_type > > tensor4_subscript(valued_type valued, coordinate_type sys_coord, size_type i_comp)
std::string tensor4_subscript_name(valued_type valued, coordinate_type sys_coord, size_type i_comp)
const std::string & valued_name(valued_type valued_tag)
valued_type valued_tag(const std::string &name)
size_type n_component(valued_type valued_tag, size_type d, coordinate_type sys_coord)
std::pair< size_type, size_type > tensor_subscript(valued_type valued_tag, coordinate_type sys_coord, size_type i_comp)
This file is part of Rheolef.
T ddot(const tensor_basic< T > &a, const tensor_basic< T > &b)
ddot(x,y): see the expression page for the full documentation
rheolef::std enable_if ::type dot const Expr1 expr1, const Expr2 expr2 dot(const Expr1 &expr1, const Expr2 &expr2)
#define _RHEOLEF_field_promote_argument(tensor)
T2 operator()(const T1 &x) const
function_traits< F >::result_type type
undeterminated_basic< typename scalar_traits< T >::type > type
undeterminated_basic< typename scalar_traits< T >::type > type
point_basic< typename scalar_traits< T >::type > type
static const valued_type value
undeterminated_basic< T > type
undeterminated_basic< T > type
helper for generic field value_type: T, point_basic<T> or tensor_basic<T>