1# ifndef _RHEOLEF_FIELD_WDOF_ICC
2# define _RHEOLEF_FIELD_WDOF_ICC
28#include "rheolef/field_wdof.h"
29#include "rheolef/field_wdof_indirect.h"
30#include "rheolef/field_wdof_sliced.h"
31#include "rheolef/field_wdof_convert.h"
33namespace rheolef {
namespace details {
38template<
class Derived>
41typename std::enable_if<
42 details::is_rheolef_arithmetic<Value>::value
43 ,field_wdof_base<Derived>&
47 std::fill (derived().
begin_dof(), derived().end_dof(), value);
50template<
class Derived>
51template<
class FieldRdof>
53typename std::enable_if<
61 using space_type =
typename FieldRdof::space_type;
64 "field_wdof = field_rdof; rdof should have homogeneous space. HINT: field_wdof = interpolate(Xh, field_rdof)");
67 check_macro (derived().get_space().name() == Xh.name(),
"field_wdof = field_rdof : incompatible spaces "
68 << derived().get_space().name() <<
" and " << Xh.name());
72template<
class Derived>
73template<
class FieldLazy>
75typename std::enable_if<
84 check_macro (derived().get_space().name() == Xh.name(),
"field_wdof = field_rdof : incompatible spaces "
85 << derived().get_space().name() <<
" and " << Xh.name());
86 derived().operator= (0);
93template<
class FieldWdof,
class FieldRdof>
94typename std::enable_if<
102 auto Xh = rdof.get_space();
103 check_macro (wdof.get_space().name() == Xh.name(),
"field_wdof = field_rdof : incompatible spaces "
104 << wdof.get_space().name() <<
" and " << Xh.name());
105 assign_with_operator (wdof.begin_dof(), wdof.end_dof(), rdof.begin_dof(), generic_set_plus_op());
108template<
class FieldWdof,
class FieldRdof>
109typename std::enable_if<
117 auto Xh = rdof.get_space();
118 check_macro (wdof.get_space().name() == Xh.name(),
"field_wdof = field_rdof : incompatible spaces "
119 << wdof.get_space().name() <<
" and " << Xh.name());
120 assign_with_operator (wdof.begin_dof(), wdof.end_dof(), rdof.begin_dof(), generic_set_minus_op());
123template<
class FieldWdof,
class FieldLazy>
124typename std::enable_if<
133 auto Xh = lazy.get_space();
134 check_macro (wdof.get_space().name() == Xh.name(),
"field_wdof = field_lazy : incompatible spaces "
135 << wdof.get_space().name() <<
" and " << Xh.name());
138template<
class FieldWdof,
class FieldLazy>
139typename std::enable_if<
148 auto Xh = lazy.get_space();
149 check_macro (wdof.get_space().name() == Xh.name(),
"field_wdof = field_lazy : incompatible spaces "
150 << wdof.get_space().name() <<
" and " << Xh.name());
156template<
class Derived>
157field_wdof_indirect<Derived>
162template<
class Derived>
168template<
class Derived>
174template<
class Derived>
std::enable_if< details::is_rheolef_arithmetic< Value >::value, field_wdof_base< Derived > & >::type operator=(const Value &)
typename field_traits< Derived >::size_type size_type
field_wdof_sliced< Derived > operator()(size_type i_comp, size_type j_comp)
field_wdof_indirect< Derived > operator[](const std::string &dom_name)
void get_geo(istream &in, my_geo &omega)
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
std::enable_if< details::has_field_wdof_interface< FieldWdof >::value &&details::has_field_rdof_interface< FieldRdof >::value, FieldWdof & >::type operator+=(FieldWdof &wdof, const FieldRdof &rdof)
std::enable_if< details::has_field_wdof_interface< FieldWdof >::value &&details::has_field_rdof_interface< FieldRdof >::value, FieldWdof & >::type operator-=(FieldWdof &wdof, const FieldRdof &rdof)
void assign_with_operator(ForwardIterator first, ForwardIterator last, InputIterator iter_rhs, OpAssign op_assign)
std::enable_if< has_field_lazy_interface< FieldLazy >::value &&has_field_wdof_interface< FieldWdof >::value, FieldWdof & >::type convert_lazy2wdof(const FieldLazy &expr0, const SetPlusOp &my_set_plus_op, FieldWdof &uh)
size_type tensor_index(valued_type valued_tag, coordinate_type sys_coord, size_type i, size_type j)
This file is part of Rheolef.
const_iterator begin_dof() const
space_constant::valued_type valued_tag() const