Rheolef  7.1
an efficient C++ finite element environment
form_expr_quadrature.h
Go to the documentation of this file.
1 #ifndef _RHEOLEF_FORM_EXPR_QUADRATURE_H
2 #define _RHEOLEF_FORM_EXPR_QUADRATURE_H
3 //
24 // variational expressions are integrated by using a quadrature formulae
25 //
26 // author: Pierre.Saramito@imag.fr
27 //
28 // date: 18 march 2018
29 //
30 // SUMMARY:
31 // 1. concept
32 // 2. terminals
33 // 2.1. integration on one element K
34 // 2.2. integration on element boundary partial K
35 // 3. unary function
36 // 3.1. unary node
37 // 3.2. unary calls
38 // 4. binary operators +- between two integrated forms
39 // 4.1. binary node
40 // 4.2. binary calls
41 // 5. binary operators */ between a integrated form and a constant
42 //
43 #include "rheolef/form_expr_variational.h"
44 #include "rheolef/init_expr_quadrature.h"
45 
46 namespace rheolef {
47 
48 // -------------------------------------------------------------------
49 // 1. concept
50 // -------------------------------------------------------------------
51 namespace details {
52 
53 // Define a trait type for detecting form expression valid arguments
54 template<class T> struct is_form_expr_quadrature_arg: std::false_type {};
55 
56 } // namespace details
57 // ---------------------------------------------------------------------------
58 // 2. terminals
59 // ---------------------------------------------------------------------------
60 // 2.1. integration on one element K
61 // ---------------------------------------------------------------------------
62 namespace details {
63 
64 template<class Expr>
66 public:
67 // typedefs:
68 
70  typedef typename Expr::memory_type memory_type;
71  typedef typename Expr::value_type result_hint;
72  typedef typename Expr::value_type value_type;
76  typedef typename Expr::vf_tag_type vf_tag_type;
82  typedef typename Expr::maybe_symmetric::type maybe_symmetric;
83 
85 
86 // alocators:
87 
88  template<class Sfinae = typename std::enable_if<is_form_expr_v2_variational_arg<Expr>::value, Expr>::type>
89  form_expr_quadrature_on_element (const Expr& expr);
90 
91 // modifiers:
92 
93  void initialize (const geo_basic<float_type,memory_type>& omega_K, const integrate_option& iopt) const;
94  void initialize (const band_basic<float_type,memory_type>& gh, const integrate_option& iopt) const;
95 
96 // accessors:
97 
98  const space_type& get_trial_space() const { return _expr.get_trial_space(); }
99  const space_type& get_test_space() const { return _expr.get_test_space(); }
100  size_type n_derivative() const { return _expr.n_derivative(); }
101 
102  template<class Value>
103  void evaluate (
104  const geo_basic<float_type,memory_type>& omega_K,
105  const geo_element& K,
106  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& ak) const;
107 
108  template<class Value>
109  bool valued_check() const {
110  typedef Value A1;
111  if (! is_undeterminated<A1>::value) return _expr.template valued_check<A1>();
112  return true;
113  }
114 protected:
115 // data:
116  Expr _expr;
118 
119 // working variables:
120  mutable Eigen::Tensor<float_type,3> _value_i;
121 };
122 template<class Expr> struct is_form_expr_quadrature_arg <form_expr_quadrature_on_element<Expr> > : std::true_type {};
123 
124 // ---------------------------------------------------------------------------
125 // inlined
126 // ---------------------------------------------------------------------------
127 template<class Expr>
128 template<class Sfinae>
129 inline
131  : _expr(expr),
132  _pops(),
133  _value_i()
134 {
135 }
136 template<class Expr>
137 void
139  const geo_basic<float_type,memory_type>& omega_K,
140  const integrate_option& iopt) const
141 {
142  integrate_option new_iopt = expr_quadrature_init_iopt (omega_K, get_trial_space(), get_test_space(), n_derivative(), iopt);
143  quadrature<float_type> quad = expr_quadrature_init_quad<float_type> (new_iopt);
144  _pops.initialize (omega_K.get_piola_basis(), quad, new_iopt);
145  _expr.initialize (_pops, new_iopt);
146 }
147 template<class Expr>
148 void
151  const integrate_option& iopt) const
152 {
153  integrate_option new_iopt = expr_quadrature_init_iopt (gh.band(), get_trial_space(), get_test_space(), n_derivative(), iopt);
154  quadrature<float_type> quad = expr_quadrature_init_quad<float_type> (new_iopt);
155  _pops.initialize (gh.band().get_piola_basis(), quad, new_iopt);
156  _expr.initialize (gh, _pops, new_iopt);
157 }
158 template<class Expr>
159 template<class Value>
160 void
162  const geo_basic<float_type,memory_type>& omega_K,
163  const geo_element& K,
164  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& ak) const
165 {
166  const Eigen::Matrix<float_type,Eigen::Dynamic,1>& w = _pops.get_weight (omega_K, K);
167  _expr.evaluate (omega_K, K, _value_i);
168 
169  // blas3: a_jk = sum_i phi_jk(xi)*w(xi) TODO: DVT_EIGEN_BLAS2
170  size_t ni = _value_i.dimension(0);
171  size_t nj = _value_i.dimension(1);
172  size_t nk = _value_i.dimension(2);
173  ak.resize (nj, nk);
174  for (size_t j = 0; j < nj; ++j) {
175  for (size_t k = 0; k < nk; ++k) {
176  Value sum = 0;
177  for (size_t i = 0; i < ni; ++i) {
178  sum += w[i] * _value_i(i,j,k);
179  }
180  ak(j,k) = sum;
181  }}
182 }
183 
184 } // namespace details
185 
186 // ---------------------------------------------------------------------------
187 // 2.2. integration on element boundary partial K
188 // ---------------------------------------------------------------------------
189 namespace details {
190 
191 template<class Expr>
193 public:
194 // typedefs:
195 
197  typedef typename Expr::memory_type memory_type;
198  typedef typename Expr::value_type result_hint;
199  typedef typename Expr::value_type value_type;
203  typedef typename Expr::vf_tag_type vf_tag_type;
209  typedef typename Expr::maybe_symmetric::type maybe_symmetric;
210 
212 
213 // alocators:
214 
215  template<class Sfinae = typename std::enable_if<is_form_expr_v2_variational_arg<Expr>::value, Expr>::type>
216  form_expr_quadrature_on_sides (const Expr& expr);
217 
218 // accessors:
219 
220  const space_type& get_trial_space() const { return _expr.get_trial_space(); }
221  const space_type& get_test_space() const { return _expr.get_test_space(); }
222  size_type n_derivative() const { return _expr.n_derivative(); }
223 
224 // mutable modifiers:
225 
226  void initialize (const geo_basic<float_type,memory_type>& omega_K, const integrate_option& iopt) const;
227  void initialize (const band_basic<float_type,memory_type>& gh, const integrate_option& iopt) const;
228 
229  template<class Value>
230  void evaluate (
231  const geo_basic<float_type,memory_type>& omega_K,
232  const geo_element& K,
233  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& ak) const;
234 
235  template<class Value>
236  bool valued_check() const {
237  typedef Value A1;
238  if (! is_undeterminated<A1>::value) return _expr.template valued_check<A1>();
239  return true;
240  }
241 protected:
242 // data:
243  mutable Expr _expr;
245  mutable bool _ignore_sys_coord;
246 // working variables:
247  mutable Eigen::Tensor<float_type,3> _value_i;
248  mutable std::vector<size_type> _dis_inod_S;
250 };
251 template<class Expr> struct is_form_expr_quadrature_arg <form_expr_quadrature_on_sides<Expr> > : std::true_type {};
252 
253 // ---------------------------------------------------------------------------
254 // inlined
255 // ---------------------------------------------------------------------------
256 template<class Expr>
257 template<class Sfinae>
258 inline
260  : _expr(expr),
261  _pops(),
262  _ignore_sys_coord(false),
263  _value_i(),
264  _dis_inod_S(),
265  _DF()
266 {
267 }
268 template<class Expr>
269 void
271 {
272  _ignore_sys_coord = iopt.ignore_sys_coord;
273  integrate_option new_iopt = expr_quadrature_init_iopt (omega_K, get_trial_space(), get_test_space(), _expr.n_derivative(), iopt);
274  quadrature<float_type> quad = expr_quadrature_init_quad<float_type> (new_iopt);
275  new_iopt._is_inside_on_local_sides = true; // propagate it recursively in the whole expression
276  _pops.initialize (omega_K.get_piola_basis(), quad, new_iopt);
277  _expr.initialize (_pops, new_iopt);
278 }
279 template<class Expr>
280 void
282 {
283  _ignore_sys_coord = iopt.ignore_sys_coord;
284  integrate_option new_iopt = expr_quadrature_init_iopt (gh.band(), get_trial_space(), get_test_space(), n_derivative(), iopt);
285  quadrature<float_type> quad = expr_quadrature_init_quad<float_type> (new_iopt);
286  new_iopt._is_inside_on_local_sides = true; // propagate it recursively in the whole expression
287  _pops.initialize (gh.band().get_piola_basis(), quad, new_iopt);
288  _expr.initialize (gh, _pops, new_iopt);
289  fatal_macro("on_local_sides: banded-level set not yet supported, sorry");
290 }
291 template<class Expr>
292 template<class Value>
293 void
295  const geo_basic<float_type,memory_type>& omega_K,
296  const geo_element& K,
297  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
298 {
299  size_type sid_dim = K.dimension()-1;
300  size_type nyi = get_test_space().get_constitution().assembly_loc_ndof (omega_K, K);
301  size_type nxj = get_trial_space().get_constitution().assembly_loc_ndof (omega_K, K);
302  for (size_type isid = 0, nsid = K.n_subgeo(sid_dim); isid < nsid; ++isid) {
303  size_type dis_isid = (K.dimension() == 1) ? K[isid] : (K.dimension() == 2) ? K.edge(isid) : K.face(isid);
304  const geo_element& S = omega_K.dis_get_geo_element (sid_dim, dis_isid);
306  K.get_side_informations (S, sid);
307  _expr.evaluate_on_side (omega_K, K, sid, _value_i);
308  const Eigen::Matrix<float_type,Eigen::Dynamic,1>& w = _pops.get_weight (omega_K, S);
309  // blas3: a_jk += sum_i phi_jk(xi)*w(xi) TODO: DVT_EIGEN_BLAS2
310  size_t ni = _value_i.dimension(0);
311  size_t nj = _value_i.dimension(1);
312  size_t nk = _value_i.dimension(2);
313  if (isid == 0) {
314  value = Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>::Zero(nj, nk);
315  }
316  for (size_t j = 0; j < nj; ++j) {
317  for (size_t k = 0; k < nk; ++k) {
318  Value sum = 0;
319  for (size_t i = 0; i < ni; ++i) {
320  sum += w[i] * _value_i(i,j,k);
321  }
322  value(j,k) += sum;
323  }}
324  }
325 }
326 
327 } // namespace details
328 
329 template<class Expr>
330 inline
331 typename
332 std::enable_if<
335 >::type
336 on_local_sides (const Expr& expr)
337 {
339 }
340 
341 // ---------------------------------------------------------------------------
342 // 3. unary function
343 // example: -(u*v), 2*(u*v), (u*v)/2
344 // ---------------------------------------------------------------------------
345 // 3.1. unary node
346 // ---------------------------------------------------------------------------
347 namespace details {
348 
349 template<class UnaryFunction, class Expr>
351 public:
352 // typedefs:
353 
355  typedef typename Expr::memory_type memory_type;
357  typename Expr::value_type>::type result_hint;
359  typename Expr::value_type
364  typedef typename Expr::vf_tag_type vf_tag_type;
370  typedef typename Expr::maybe_symmetric::type maybe_symmetric;
371 
373 
374 // alocators:
375 
376  template<class Sfinae = typename std::enable_if<is_form_expr_quadrature_arg<Expr>::value, Expr>::type>
377  form_expr_quadrature_unary (const UnaryFunction& f, const Expr& expr)
378  : _f(f), _expr(expr) {}
379 
380 // accessors:
381 
382  const space_type& get_trial_space() const { return _expr.get_trial_space(); }
383  const space_type& get_test_space() const { return _expr.get_test_space(); }
384  size_type n_derivative() const { return _expr.n_derivative(); }
385 
386 // mutable modifiers:
387 
388  void initialize (const geo_basic<float_type,memory_type>& omega_K, const integrate_option& iopt) const {
389  return _expr.initialize (omega_K, iopt); }
391  return _expr.initialize (gh, iopt); }
392 
393  template<class Value>
394  void evaluate (
395  const geo_basic<float_type,memory_type>& omega_K,
396  const geo_element& K,
397  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
398  {
399  typedef Value A1; // Value is float_type in general: elementary matrix
400  _expr.evaluate (omega_K, K, value);
401  for (size_type i = 0, ni = value.rows(); i < ni; ++i) {
402  for (size_type j = 0, nj = value.cols(); j < nj; ++j) {
403  value(i,j) = _f (value(i,j));
404  }}
405  }
406  template<class Value>
407  bool valued_check() const {
408  typedef Value A1;
409  if (! is_undeterminated<A1>::value) return _expr.template valued_check<A1>();
410  return true;
411  }
412 protected:
413 // data:
414  UnaryFunction _f;
415  Expr _expr;
416 };
417 template<class F, class Expr> struct is_form_expr_quadrature_arg <form_expr_quadrature_unary<F,Expr> > : std::true_type {};
418 
419 } // namespace details
420 // ---------------------------------------------------------------------------
421 // 3.2. unary calls
422 // ---------------------------------------------------------------------------
423 
424 #define _RHEOLEF_make_form_expr_quadrature_unary(FUNCTION,FUNCTOR) \
425 template<class Expr> \
426 inline \
427 typename \
428 std::enable_if< \
429  details::is_form_expr_quadrature_arg<Expr>::value \
430  ,details::form_expr_quadrature_unary< \
431  FUNCTOR \
432  ,Expr \
433  > \
434 >::type \
435 FUNCTION (const Expr& expr) \
436 { \
437  return details::form_expr_quadrature_unary <FUNCTOR,Expr> (FUNCTOR(), expr); \
438 }
439 
440 _RHEOLEF_make_form_expr_quadrature_unary (operator+, details::unary_plus)
441 _RHEOLEF_make_form_expr_quadrature_unary (operator-, details::negate)
442 #undef _RHEOLEF_make_form_expr_quadrature_unary
443 
444 // ---------------------------------------------------------------------------
445 // 4. binary operators +- between two integrated forms
446 // ---------------------------------------------------------------------------
447 // 4.1. binary node
448 // ---------------------------------------------------------------------------
449 // example: operator+ between two forms as in
450 // (u*v) + on_local_sides(u*v)
451 
452 namespace details {
453 
454 template<class BinaryFunction, class Expr1, class Expr2>
456 public:
457 // typedefs:
458 
463  typename Expr1::value_type
464  ,typename Expr2::value_type>::type result_hint;
466  typename Expr1::value_type
467  ,typename Expr2::value_type
471  typedef space_basic<scalar_type,memory_type> space_type; // TODO: deduce from Exprs
472  typedef typename details::bf_vf_tag<BinaryFunction,
473  typename Expr1::vf_tag_type,
474  typename Expr2::vf_tag_type>::type vf_tag_type;
478  typedef form_expr_quadrature_binary<BinaryFunction,typename Expr1::dual_self_type,
479  typename Expr2::dual_self_type>
481  typedef typename and_type<typename Expr1::maybe_symmetric::type,
482  typename Expr2::maybe_symmetric::type>::type
484 
486 
487 // alocators:
488 #ifdef TODO
489  template<class Sfinae
490  = typename std::enable_if<
492  ,Expr1
493  >::type
494  >
495 #endif // TODO
497  const Expr1& expr1,
498  const Expr2& expr2)
499  : _f(f), _expr1(expr1), _expr2(expr2) {}
500 
501 // accessors:
502 
503  const space_type& get_trial_space() const { return _expr1.get_trial_space(); }
504  const space_type& get_test_space() const { return _expr1.get_test_space(); }
505  size_type n_derivative() const { return std::min(_expr1.n_derivative(), _expr2.n_derivative()); }
506 
507 // mutable modifiers:
508  void initialize (const geo_basic<float_type,memory_type>& omega_K, const integrate_option& iopt) const {
510  _expr1.initialize (omega_K, new_iopt);
511  _expr2.initialize (omega_K, new_iopt);
512  }
515  _expr1.initialize (gh, new_iopt);
516  _expr2.initialize (gh, new_iopt);
517  }
518  template<class Value>
519  void evaluate (
520  const geo_basic<float_type,memory_type>& omega_K,
521  const geo_element& K,
522  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
523  {
524  // Value is float_type in general: elementary matrix
525  // for f=operator+ => sum of two elementary matrix of the same type
526  // TODO: otherwise Value and 2 could be obtained from the hint<> helper
527  typedef Value A1;
528  typedef Value A2;
529  Eigen::Matrix<A2,Eigen::Dynamic,Eigen::Dynamic> value2 (value.cols(), value.cols());
530  _expr1.evaluate (omega_K, K, value);
531  _expr2.evaluate (omega_K, K, value2);
532  for (size_type i = 0, ni = value.rows(); i < ni; ++i) {
533  for (size_type j = 0, nj = value.cols(); j < nj; ++j) {
534  value(i,j) = _f (value(i,j), value2(i,j));
535  }}
536  }
537  template<class Value>
538  bool valued_check() const {
539  typedef Value A1;
540  typedef Value A2;
541  bool status = true;
542  if (! is_undeterminated<A1>::value) status &= _expr1.template valued_check<A1>();
543  if (! is_undeterminated<A2>::value) status &= _expr2.template valued_check<A2>();
544  return status;
545  }
546 protected:
547 // data:
550  Expr2 _expr2;
551 };
552 template<class F, class Expr1, class Expr2> struct is_form_expr_quadrature_arg <form_expr_quadrature_binary<F,Expr1,Expr2> > : std::true_type {};
553 
554 } // namespace details
555 
556 // ---------------------------------------------------------------------------
557 // 4.2. binary calls
558 // ---------------------------------------------------------------------------
559 // expr_quad := expr_quad +- expr_quad
560 // expr_quad := expr_var +- expr_quad
561 // expr_quad := expr_quad +- expr_var
562 
563 #define _RHEOLEF_form_expr_quadrature_binary(FUNCTION,FUNCTOR) \
564 template <class Expr1, class Expr2> \
565 inline \
566 typename \
567 std::enable_if< \
568  details::is_form_expr_quadrature_arg <Expr1>::value \
569  && details::is_form_expr_quadrature_arg <Expr2>::value \
570  ,details::form_expr_quadrature_binary< \
571  FUNCTOR \
572  ,Expr1 \
573  ,Expr2 \
574  > \
575 >::type \
576 FUNCTION (const Expr1& expr1, const Expr2& expr2) \
577 { \
578  return details::form_expr_quadrature_binary \
579  <FUNCTOR, Expr1, Expr2> \
580  (FUNCTOR(), expr1, expr2); \
581 } \
582 template <class Expr1, class ExprVar2> \
583 inline \
584 typename \
585 std::enable_if< \
586  details::is_form_expr_quadrature_arg <Expr1>::value \
587  && details::is_form_expr_v2_variational_arg <ExprVar2>::value \
588  ,details::form_expr_quadrature_binary< \
589  FUNCTOR \
590  ,Expr1 \
591  ,details::form_expr_quadrature_on_element<ExprVar2> \
592  > \
593 >::type \
594 FUNCTION (const Expr1& expr1, const ExprVar2& expr_var2) \
595 { \
596  using Expr2 = details::form_expr_quadrature_on_element<ExprVar2>; \
597  return details::form_expr_quadrature_binary \
598  <FUNCTOR, Expr1, Expr2> \
599  (FUNCTOR(), expr1, Expr2(expr_var2)); \
600 } \
601 template <class ExprVar1, class Expr2> \
602 inline \
603 typename \
604 std::enable_if< \
605  details::is_form_expr_v2_variational_arg <ExprVar1>::value \
606  && details::is_form_expr_quadrature_arg <Expr2>::value \
607  ,details::form_expr_quadrature_binary< \
608  FUNCTOR \
609  ,details::form_expr_quadrature_on_element<ExprVar1> \
610  ,Expr2 \
611  > \
612 >::type \
613 FUNCTION (const ExprVar1& expr_var1, const Expr2& expr2) \
614 { \
615  using Expr1 = details::form_expr_quadrature_on_element<ExprVar1>; \
616  return details::form_expr_quadrature_binary \
617  <FUNCTOR, Expr1, Expr2> \
618  (FUNCTOR(), Expr1(expr_var1), expr2); \
619 } \
620 
621 _RHEOLEF_form_expr_quadrature_binary (operator+, details::plus)
622 _RHEOLEF_form_expr_quadrature_binary (operator-, details::minus)
623 
624 #undef _RHEOLEF_form_expr_quadrature_binary
625 
626 // ---------------------------------------------------------------------------
627 // 5. binary operators */ between a integrated form and a constant
628 // ---------------------------------------------------------------------------
629 // expr_quad := k*expr_quad
630 // expr_quad := expr_quad*k
631 // expr_quad := expr_quad/k
632 
633 namespace details {
634 
635 template<class Expr1, class Expr2, class Sfinae = void>
637 
638 template<class Expr1, class Expr2>
640  Expr1
641  ,Expr2
642  ,typename
643  std::enable_if<
644  is_rheolef_arithmetic <Expr1>::value
645  && is_form_expr_quadrature_arg<Expr2>::value
646  >::type
647 >
648 : std::true_type
649 {};
650 
651 template<class Expr1, class Expr2>
654 
655 } // namespace details
656 
657 #define _RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant_left(FUNCTION,FUNCTOR) \
658 template<class Expr1, class Expr2> \
659 inline \
660 typename \
661 std::enable_if< \
662  details::is_form_expr_quadrature_binary_multiplies_divides_constant_left <Expr1,Expr2>::value \
663  ,details::form_expr_quadrature_unary< \
664  details::binder_first <FUNCTOR, Expr1> \
665  ,Expr2 /* vf */ \
666  > \
667 >::type \
668 FUNCTION (const Expr1& expr1, const Expr2& expr2) \
669 { \
670  return details::form_expr_quadrature_unary \
671  <details::binder_first <FUNCTOR,Expr1>, Expr2> \
672  (details::binder_first <FUNCTOR,Expr1> (FUNCTOR(), expr1), expr2); \
673 }
674 
675 #define _RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant_right(FUNCTION,FUNCTOR) \
676 template<class Expr1, class Expr2> \
677 inline \
678 typename \
679 std::enable_if< \
680  details::is_form_expr_quadrature_binary_multiplies_divides_constant_right <Expr1,Expr2>::value \
681  ,details::form_expr_quadrature_unary< \
682  details::binder_second <FUNCTOR, Expr2> \
683  ,Expr1 /* vf */ \
684  > \
685 >::type \
686 FUNCTION (const Expr1& expr1, const Expr2& expr2) \
687 { \
688  return details::form_expr_quadrature_unary \
689  <details::binder_second <FUNCTOR,Expr2>, Expr1> \
690  (details::binder_second <FUNCTOR,Expr2> (FUNCTOR(), expr2), expr1); \
691 }
692 
693 #define _RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant(FUNCTION,FUNCTOR) \
694  _RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant_left (FUNCTION,FUNCTOR) \
695  _RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant_right (FUNCTION,FUNCTOR)
696 
697 
700 
701 #undef _RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant_right
702 #undef _RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant_left
703 #undef _RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant
704 
705 #ifdef TODO
706 #endif // TODO
707 
708 } // namespace rheolef
709 #endif // _RHEOLEF_FORM_EXPR_QUADRATURE_H
rheolef::details::form_expr_quadrature_on_sides::_ignore_sys_coord
bool _ignore_sys_coord
Definition: form_expr_quadrature.h:245
rheolef::details::form_expr_quadrature_on_element::self_type
form_expr_quadrature_on_element< Expr > self_type
Definition: form_expr_quadrature.h:79
rheolef::details::form_expr_quadrature_on_element::valued_hint
static const space_constant::valued_type valued_hint
Definition: form_expr_quadrature.h:84
rheolef::geo_basic< float_type, memory_type >
rheolef::BinaryFunction
rheolef::std BinaryFunction
rheolef::details::form_expr_quadrature_on_element::result_hint
Expr::value_type result_hint
Definition: form_expr_quadrature.h:71
rheolef::details::form_expr_quadrature_binary::vf_tag_type
details::bf_vf_tag< BinaryFunction, typename Expr1::vf_tag_type, typename Expr2::vf_tag_type >::type vf_tag_type
Definition: form_expr_quadrature.h:474
rheolef::details::form_expr_quadrature_binary::memory_type
promote_memory< typename Expr1::memory_type, typename Expr2::memory_type >::type memory_type
Definition: form_expr_quadrature.h:461
rheolef::details::form_expr_quadrature_binary::dual_self_type
form_expr_quadrature_binary< BinaryFunction, typename Expr1::dual_self_type, typename Expr2::dual_self_type > dual_self_type
Definition: form_expr_quadrature.h:480
rheolef::details::form_expr_quadrature_on_sides::valued_hint
static const space_constant::valued_type valued_hint
Definition: form_expr_quadrature.h:211
rheolef::details::form_expr_quadrature_binary::get_trial_space
const space_type & get_trial_space() const
Definition: form_expr_quadrature.h:503
gh
field gh(Float epsilon, Float t, const field &uh, const test &v)
Definition: burgers_diffusion_operators.icc:37
rheolef::details::form_expr_quadrature_on_sides::dual_self_type
form_expr_quadrature_on_element< typename Expr::dual_self_type > dual_self_type
Definition: form_expr_quadrature.h:208
rheolef::details::form_expr_quadrature_binary::form_expr_quadrature_binary
form_expr_quadrature_binary(const BinaryFunction &f, const Expr1 &expr1, const Expr2 &expr2)
Definition: form_expr_quadrature.h:496
mkgeo_ball.expr
expr
Definition: mkgeo_ball.sh:361
rheolef::details::expr_quadrature_init_iopt
integrate_option expr_quadrature_init_iopt(const geo_basic< T, M > &omega_K, const space_basic< T, M > &X, size_t n_derivative, const integrate_option &iopt)
Definition: init_expr_quadrature.h:36
rheolef::details::form_expr_quadrature_on_sides::_expr
Expr _expr
Definition: form_expr_quadrature.h:243
rheolef::details::form_expr_quadrature_unary::_expr
Expr _expr
Definition: form_expr_quadrature.h:415
rheolef::details::form_expr_quadrature_unary::get_test_space
const space_type & get_test_space() const
Definition: form_expr_quadrature.h:383
rheolef::details::form_expr_quadrature_binary::space_type
space_basic< scalar_type, memory_type > space_type
Definition: form_expr_quadrature.h:471
rheolef::details::form_expr_quadrature_on_element::space_type
space_basic< scalar_type, memory_type > space_type
Definition: form_expr_quadrature.h:75
rheolef::details::form_expr_quadrature_binary::size_type
geo_element::size_type size_type
Definition: form_expr_quadrature.h:459
rheolef::details::form_expr_quadrature_unary::maybe_symmetric
Expr::maybe_symmetric::type maybe_symmetric
Definition: form_expr_quadrature.h:370
rheolef::details::bf_vf_tag
Definition: field_expr_variational_tag.h:74
rheolef::details::form_expr_quadrature_on_element::maybe_symmetric
Expr::maybe_symmetric::type maybe_symmetric
Definition: form_expr_quadrature.h:82
rheolef::details::form_expr_quadrature_unary::initialize
void initialize(const band_basic< float_type, memory_type > &gh, const integrate_option &iopt) const
Definition: form_expr_quadrature.h:390
rheolef::details::form_expr_quadrature_unary::vf_tag_type
Expr::vf_tag_type vf_tag_type
Definition: form_expr_quadrature.h:364
rheolef::details::form_expr_quadrature_unary::initialize
void initialize(const geo_basic< float_type, memory_type > &omega_K, const integrate_option &iopt) const
Definition: form_expr_quadrature.h:388
rheolef::value
rheolef::std value
rheolef::details::form_expr_quadrature_unary::dual_self_type
form_expr_quadrature_unary< UnaryFunction, typename Expr::dual_self_type > dual_self_type
Definition: form_expr_quadrature.h:369
rheolef::details::form_expr_quadrature_on_element::initialize
void initialize(const geo_basic< float_type, memory_type > &omega_K, const integrate_option &iopt) const
Definition: form_expr_quadrature.h:138
rheolef::details::form_expr_quadrature_on_element::float_type
float_traits< value_type >::type float_type
Definition: form_expr_quadrature.h:74
rheolef::geo_element::get_side_informations
orientation_type get_side_informations(const geo_element &S, size_type &loc_isid, size_type &shift) const
Definition: geo_element.cc:185
rheolef::details::form_expr_quadrature_binary::vf_dual_tag_type
details::dual_vf_tag< vf_tag_type >::type vf_dual_tag_type
Definition: form_expr_quadrature.h:476
rheolef::details::generic_binary_traits
Definition: expression.h:406
rheolef::space_basic
the finite element space
Definition: space.h:352
rheolef::tensor_basic< float_type >
rheolef::geo_element::n_subgeo
size_type n_subgeo(size_type subgeo_dim) const
Definition: geo_element.h:212
rheolef::_RHEOLEF_make_form_expr_quadrature_unary
_RHEOLEF_make_form_expr_quadrature_unary(operator+, details::unary_plus) _RHEOLEF_make_form_expr_quadrature_unary(operator-
rheolef::details::form_expr_quadrature_unary::result_hint
details::generic_unary_traits< UnaryFunction >::template result_hint< typename Expr::value_type >::type result_hint
Definition: form_expr_quadrature.h:357
rheolef::details::form_expr_quadrature_on_sides::memory_type
Expr::memory_type memory_type
Definition: form_expr_quadrature.h:197
rheolef::geo_element
see the geo_element page for the full documentation
Definition: geo_element.h:102
rheolef::details::is_form_expr_quadrature_arg
Definition: form_expr_quadrature.h:54
rheolef::details::form_expr_quadrature_on_element::_expr
Expr _expr
Definition: form_expr_quadrature.h:116
rheolef::details::form_expr_quadrature_unary::size_type
geo_element::size_type size_type
Definition: form_expr_quadrature.h:354
rheolef::details::form_expr_quadrature_unary::value_type
details::generic_unary_traits< UnaryFunction >::template hint< typename Expr::value_type,result_hint >::result_type value_type
Definition: form_expr_quadrature.h:360
rheolef::details::form_expr_quadrature_binary::initialize
void initialize(const geo_basic< float_type, memory_type > &omega_K, const integrate_option &iopt) const
Definition: form_expr_quadrature.h:508
rheolef::details::result_type
Definition: space_constant.h:339
rheolef::type
rheolef::std type
rheolef::space_constant::valued_type
valued_type
Definition: space_constant.h:135
rheolef::details::form_expr_quadrature_on_sides::n_derivative
size_type n_derivative() const
Definition: form_expr_quadrature.h:222
rheolef::details::form_expr_quadrature_binary::_expr1
Expr1 _expr1
Definition: form_expr_quadrature.h:549
rheolef::details::form_expr_quadrature_on_sides::value_type
Expr::value_type value_type
Definition: form_expr_quadrature.h:199
rheolef::details::form_expr_quadrature_on_element::get_trial_space
const space_type & get_trial_space() const
Definition: form_expr_quadrature.h:98
rheolef::details::form_expr_quadrature_binary::_f
BinaryFunction _f
Definition: form_expr_quadrature.h:548
rheolef::details::form_expr_quadrature_unary::memory_type
Expr::memory_type memory_type
Definition: form_expr_quadrature.h:355
rheolef::details::form_expr_quadrature_on_sides::form_expr_quadrature_on_sides
form_expr_quadrature_on_sides(const Expr &expr)
Definition: form_expr_quadrature.h:259
rheolef::details::form_expr_quadrature_on_element::valued_check
bool valued_check() const
Definition: form_expr_quadrature.h:109
rheolef::details::form_expr_quadrature_unary::evaluate
void evaluate(const geo_basic< float_type, memory_type > &omega_K, const geo_element &K, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
Definition: form_expr_quadrature.h:394
rheolef::details::form_expr_quadrature_unary::get_trial_space
const space_type & get_trial_space() const
Definition: form_expr_quadrature.h:382
rheolef::details::is_form_expr_quadrature_binary_multiplies_divides_constant_left
Definition: form_expr_quadrature.h:636
rheolef::details::form_expr_quadrature_on_element::n_derivative
size_type n_derivative() const
Definition: form_expr_quadrature.h:100
rheolef::side_information_type
Definition: reference_element_face_transformation.h:37
rheolef::_RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant
_RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant(operator*, details::multiplies) _RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant_right(operator/
rheolef::details::form_expr_quadrature_binary::get_test_space
const space_type & get_test_space() const
Definition: form_expr_quadrature.h:504
rheolef::details::form_expr_quadrature_binary::valued_check
bool valued_check() const
Definition: form_expr_quadrature.h:538
rheolef::integrate_option
see the integrate_option page for the full documentation
Definition: integrate_option.h:125
rheolef::details::and_type
Definition: field_expr_utilities.h:81
rheolef::details::is_form_expr_v2_variational_arg
Definition: form_expr_variational.h:58
rheolef::details::form_expr_quadrature_on_sides::evaluate
void evaluate(const geo_basic< float_type, memory_type > &omega_K, const geo_element &K, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &ak) const
Definition: form_expr_quadrature.h:294
rheolef::details::form_expr_quadrature_binary
Definition: form_expr_quadrature.h:455
rheolef::details::form_expr_quadrature_on_sides::vf_dual_tag_type
details::dual_vf_tag< vf_tag_type >::type vf_dual_tag_type
Definition: form_expr_quadrature.h:205
rheolef::details::vf_tag_nonlinear
Definition: field_expr_variational_tag.h:49
rheolef::geo_element::dimension
size_type dimension() const
Definition: geo_element.h:167
rheolef::details::form_expr_quadrature_on_sides::_dis_inod_S
std::vector< size_type > _dis_inod_S
Definition: form_expr_quadrature.h:248
rheolef::on_local_sides
std::enable_if< details::is_field_expr_v2_variational_arg< Expr >::value,details::field_expr_quadrature_on_sides< Expr > >::type on_local_sides(const Expr &expr)
on_local_sides(expr): see the expression page for the full documentation
Definition: field_expr_quadrature.h:321
rheolef::details::form_expr_quadrature_unary::space_type
space_basic< scalar_type, memory_type > space_type
Definition: form_expr_quadrature.h:363
rheolef::details::form_expr_quadrature_binary::value_type
details::generic_binary_traits< BinaryFunction >::template hint< typename Expr1::value_type,typename Expr2::value_type,result_hint >::result_type value_type
Definition: form_expr_quadrature.h:468
rheolef::geo_element::size_type
reference_element::size_type size_type
Definition: geo_element.h:125
_RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant_right
#define _RHEOLEF_make_form_expr_quadrature_binary_operator_multiplies_divides_constant_right(FUNCTION, FUNCTOR)
Definition: form_expr_quadrature.h:675
rheolef::details::form_expr_quadrature_unary::valued_hint
static const space_constant::valued_type valued_hint
Definition: form_expr_quadrature.h:372
rheolef::details::form_expr_quadrature_on_sides::initialize
void initialize(const geo_basic< float_type, memory_type > &omega_K, const integrate_option &iopt) const
Definition: form_expr_quadrature.h:270
rheolef::details::form_expr_quadrature_on_element::evaluate
void evaluate(const geo_basic< float_type, memory_type > &omega_K, const geo_element &K, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &ak) const
Definition: form_expr_quadrature.h:161
rheolef::details::form_expr_quadrature_on_element::scalar_type
scalar_traits< value_type >::type scalar_type
Definition: form_expr_quadrature.h:73
fatal_macro
#define fatal_macro(message)
Definition: dis_macros.h:33
rheolef::details::form_expr_quadrature_unary::self_type
form_expr_quadrature_unary< UnaryFunction, Expr > self_type
Definition: form_expr_quadrature.h:367
rheolef::undefined_memory_model
Definition: distributed.h:27
rheolef::piola_on_pointset< float_type >
rheolef::band_basic
Definition: band.h:95
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::float_traits::type
T type
Definition: Float.h:94
rheolef::details::form_expr_quadrature_on_element::get_test_space
const space_type & get_test_space() const
Definition: form_expr_quadrature.h:99
rheolef::integrate_option::ignore_sys_coord
bool ignore_sys_coord
Definition: integrate_option.h:168
rheolef::_RHEOLEF_form_expr_quadrature_binary
_RHEOLEF_form_expr_quadrature_binary(operator+, details::plus) _RHEOLEF_form_expr_quadrature_binary(operator-
rheolef::details::form_expr_quadrature_on_element::vf_tag_type
Expr::vf_tag_type vf_tag_type
Definition: form_expr_quadrature.h:76
rheolef::details::form_expr_quadrature_on_sides::size_type
geo_element::size_type size_type
Definition: form_expr_quadrature.h:196
rheolef::details::form_expr_quadrature_on_sides::get_trial_space
const space_type & get_trial_space() const
Definition: form_expr_quadrature.h:220
rheolef::details::form_expr_quadrature_unary::scalar_type
scalar_traits< value_type >::type scalar_type
Definition: form_expr_quadrature.h:361
rheolef::details::generic_unary_traits
Definition: expression.h:187
rheolef::details::form_expr_quadrature_unary
Definition: form_expr_quadrature.h:350
rheolef::details::form_expr_quadrature_on_sides::space_type
space_basic< scalar_type, memory_type > space_type
Definition: form_expr_quadrature.h:202
rheolef::details::form_expr_quadrature_unary::_f
UnaryFunction _f
Definition: form_expr_quadrature.h:414
rheolef::integrate_option::_is_inside_on_local_sides
bool _is_inside_on_local_sides
Definition: integrate_option.h:180
rheolef::details::form_expr_quadrature_on_sides::maybe_symmetric
Expr::maybe_symmetric::type maybe_symmetric
Definition: form_expr_quadrature.h:209
rheolef::details::form_expr_quadrature_on_element::value_type
Expr::value_type value_type
Definition: form_expr_quadrature.h:72
rheolef::details::form_expr_quadrature_unary::n_derivative
size_type n_derivative() const
Definition: form_expr_quadrature.h:384
rheolef::details::form_expr_quadrature_on_sides::scalar_type
scalar_traits< value_type >::type scalar_type
Definition: form_expr_quadrature.h:200
rheolef::details::form_expr_quadrature_on_sides
Definition: form_expr_quadrature.h:192
rheolef::details::form_expr_quadrature_binary::_expr2
Expr2 _expr2
Definition: form_expr_quadrature.h:550
rheolef::scalar_traits::type
T type
Definition: point.h:324
rheolef::details::form_expr_quadrature_on_element::dual_self_type
form_expr_quadrature_on_element< typename Expr::dual_self_type > dual_self_type
Definition: form_expr_quadrature.h:81
rheolef::details::form_expr_quadrature_unary::form_expr_quadrature_unary
form_expr_quadrature_unary(const UnaryFunction &f, const Expr &expr)
Definition: form_expr_quadrature.h:377
rheolef::details::form_expr_quadrature_on_sides::_pops
piola_on_pointset< float_type > _pops
Definition: form_expr_quadrature.h:244
rheolef::details::form_expr_quadrature_binary::result_hint
details::generic_binary_traits< BinaryFunction >::template result_hint< typename Expr1::value_type,typename Expr2::value_type >::type result_hint
Definition: form_expr_quadrature.h:464
rheolef::details::form_expr_quadrature_binary::initialize
void initialize(const band_basic< float_type, memory_type > &gh, const integrate_option &iopt) const
Definition: form_expr_quadrature.h:513
rheolef::details::form_expr_quadrature_on_sides::get_test_space
const space_type & get_test_space() const
Definition: form_expr_quadrature.h:221
rheolef::details::form_expr_quadrature_binary::maybe_symmetric
and_type< typename Expr1::maybe_symmetric::type, typename Expr2::maybe_symmetric::type >::type maybe_symmetric
Definition: form_expr_quadrature.h:483
rheolef::details::form_expr_quadrature_on_sides::valued_check
bool valued_check() const
Definition: form_expr_quadrature.h:236
rheolef::details::form_expr_quadrature_binary::n_derivative
size_type n_derivative() const
Definition: form_expr_quadrature.h:505
rheolef::details::form_expr_quadrature_binary::scalar_type
scalar_traits< value_type >::type scalar_type
Definition: form_expr_quadrature.h:469
rheolef::details::form_expr_quadrature_on_element::_pops
piola_on_pointset< float_type > _pops
Definition: form_expr_quadrature.h:117
rheolef::details::form_expr_quadrature_on_sides::_DF
tensor_basic< float_type > _DF
Definition: form_expr_quadrature.h:249
rheolef::details::form_expr_quadrature_binary::evaluate
void evaluate(const geo_basic< float_type, memory_type > &omega_K, const geo_element &K, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
Definition: form_expr_quadrature.h:519
rheolef::details::form_expr_quadrature_unary::vf_dual_tag_type
details::dual_vf_tag< vf_tag_type >::type vf_dual_tag_type
Definition: form_expr_quadrature.h:366
rheolef::details::form_expr_quadrature_on_element::form_expr_quadrature_on_element
form_expr_quadrature_on_element(const Expr &expr)
Definition: form_expr_quadrature.h:130
rheolef::details::form_expr_quadrature_on_element::vf_dual_tag_type
details::dual_vf_tag< vf_tag_type >::type vf_dual_tag_type
Definition: form_expr_quadrature.h:78
rheolef::details::is_form_expr_quadrature_binary_multiplies_divides_constant_right
Definition: form_expr_quadrature.h:652
rheolef::details::form_expr_quadrature_binary::valued_hint
static const space_constant::valued_type valued_hint
Definition: form_expr_quadrature.h:485
rheolef::details::form_expr_quadrature_unary::float_type
float_traits< value_type >::type float_type
Definition: form_expr_quadrature.h:362
rheolef::details::form_expr_quadrature_on_sides::result_hint
Expr::value_type result_hint
Definition: form_expr_quadrature.h:198
rheolef::details::form_expr_quadrature_on_element::size_type
geo_element::size_type size_type
Definition: form_expr_quadrature.h:69
rheolef::geo_element::face
size_type face(size_type i) const
Definition: geo_element.h:210
rheolef::Expr1
rheolef::std Expr1
dot(x,y): see the expression page for the full documentation
rheolef::details::form_expr_quadrature_on_element::_value_i
Eigen::Tensor< float_type, 3 > _value_i
Definition: form_expr_quadrature.h:120
f
Definition: cavity_dg.h:29
rheolef::details::form_expr_quadrature_on_element
Definition: form_expr_quadrature.h:65
rheolef::details::form_expr_quadrature_on_sides::vf_tag_type
Expr::vf_tag_type vf_tag_type
Definition: form_expr_quadrature.h:203
rheolef::space_constant::valued_tag_traits
Definition: space_constant.h:161
rheolef::details::form_expr_quadrature_binary::float_type
float_traits< value_type >::type float_type
Definition: form_expr_quadrature.h:470
rheolef::geo_element::edge
size_type edge(size_type i) const
Definition: geo_element.h:209
rheolef::std
Definition: vec_expr_v2.h:391
mkgeo_contraction.status
status
Definition: mkgeo_contraction.sh:290
rheolef::quadrature
Definition: quadrature.h:185
rheolef::details::form_expr_quadrature_binary::self_type
form_expr_quadrature_binary< BinaryFunction, Expr1, Expr2 > self_type
Definition: form_expr_quadrature.h:477
rheolef::details::form_expr_quadrature_unary::valued_check
bool valued_check() const
Definition: form_expr_quadrature.h:407
rheolef::is_undeterminated
Definition: undeterminated.h:39
rheolef::details::form_expr_quadrature_on_sides::_value_i
Eigen::Tensor< float_type, 3 > _value_i
Definition: form_expr_quadrature.h:247
rheolef::details::form_expr_quadrature_on_element::memory_type
Expr::memory_type memory_type
Definition: form_expr_quadrature.h:70
rheolef::details::form_expr_quadrature_on_sides::float_type
float_traits< value_type >::type float_type
Definition: form_expr_quadrature.h:201
rheolef::details::form_expr_quadrature_on_sides::self_type
form_expr_quadrature_on_element< Expr > self_type
Definition: form_expr_quadrature.h:206