Rheolef  7.2
an efficient C++ finite element environment
form_field_expr.h
Go to the documentation of this file.
1 # ifndef _RHEOLEF_FORM_FIELD_EXPR_H
2 # define _RHEOLEF_FORM_FIELD_EXPR_H
23 
24 #include "rheolef/form.h"
25 #include "rheolef/field_wdof_sliced.h"
26 #include "rheolef/field_wdof_indirect.h"
27 #include "rheolef/field_expr.h"
28 namespace rheolef {
29 
30 // -----------------------------------------------------------------------
31 // form*field_expr
32 // -----------------------------------------------------------------------
33 #ifdef TO_CLEAN
34 #define _RHEOLEF_form_mult_field_var_old(field_var) \
35 template <class T, class M> \
36 inline \
37 field_basic<T,M> \
38 operator* (const form_basic<T,M>& a, const field_var<T,M>& expr) \
39 { \
40  field_basic<T,M> eh = expr; \
41  return a.operator* (eh); \
42 }
43 #undef _RHEOLEF_form_mult_field_var_old
44 #endif // TO_CLEAN
45 
46 // TODO: via a template FieldRdof instead of field_var<FieldRdof>
47 // and move it in the form.h file
48 #define _RHEOLEF_form_mult_field_var(field_var) \
49 template <class T, class M, class FieldRdof> \
50 inline \
51 field_basic<T,M> \
52 operator* (const form_basic<T,M>& a, const field_var<FieldRdof>& expr) \
53 { \
54  field_basic<T,M> eh = expr; \
55  return a.operator* (eh); \
56 }
61 #undef _RHEOLEF_form_mult_field_var_new
62 
63 template <class T, class M, class Expr>
64 inline
65 typename
66 std::enable_if<
70 >::type
71 operator* (const form_basic<T,M>& a, const Expr& expr)
72 {
74  return a.operator* (eh);
75 }
76 
77 }// namespace rheolef
78 # endif /* _RHEOLEF_FORM_FIELD_EXPR_H */
rheolef::std type
This file is part of Rheolef.
csr< T, sequential > operator*(const T &lambda, const csr< T, sequential > &a)
Definition: csr.h:437
_RHEOLEF_form_mult_field_var(details::field_wdof_sliced) _RHEOLEF_form_mult_field_var(details