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