Rheolef  7.1
an efficient C++ finite element environment
test.cc
Go to the documentation of this file.
1 #include "rheolef/geo_domain.h"
22 #include "rheolef/test.h"
23 
24 namespace rheolef {
25 
26 // --------------------------------------------------------------------------
27 // 1. cstors
28 // --------------------------------------------------------------------------
29 template <class T, class M>
31 : _V(V),
32  _fops(),
33  _is_inside_on_local_sides(false),
34  _is_on_band(false),
35  _gh()
36 {
37 }
38 template <class T, class M>
40 : _V (x._V),
41  _fops (x._fops),
42  _is_inside_on_local_sides (x._is_inside_on_local_sides),
43  _is_on_band (x._is_on_band),
44  _gh (x._gh)
45 {
46  trace_macro ("*** PHYSICAL COPY OF TEST_REP ***");
47 }
48 template <class T, class M>
51 {
52  trace_macro ("*** PHYSICAL ASSIGN OF TEST_REP ***");
53  _V = x._V;
54  _fops = x._fops;
55  _is_inside_on_local_sides = x._is_inside_on_local_sides;
56  _is_on_band = x._is_on_band;
57  _gh = x._gh;
58  return *this;
59 }
60 // --------------------------------------------------------------------------
61 // 2. initializers
62 // --------------------------------------------------------------------------
63 template <class T, class M>
64 void
67  const integrate_option& iopt) const
68 {
69  _is_on_band = false;
70  _is_inside_on_local_sides = iopt._is_inside_on_local_sides;
71  _fops.initialize (get_vf_space().get_basis(), pops);
72 }
73 template <class T, class M>
74 void
78  const integrate_option& iopt) const
79 {
80  _is_on_band = false;
81  _fops.initialize (get_vf_space().get_basis(), pops);
82 }
83 template <class T, class M>
84 void
88  const integrate_option& iopt) const
89 {
90  _is_on_band = true;
91  _gh = gh;
92  _fops.initialize (get_vf_space().get_basis(), pops);
93 }
94 // ----------------------------------------------------------------------------
95 // 3. band : specific cases
96 // ----------------------------------------------------------------------------
97 template <class T, class M, class Value, details::differentiate_option::type Diff>
98 struct evaluate_band_continued {
99  void operator() (
100  const test_rep<T,M>& obj,
101  const geo_basic<T,M>& omega_K,
102  const Eigen::Matrix<piola<T>,Eigen::Dynamic,1>& piola,
103  const reference_element& hat_K,
104  const reference_element& tilde_L,
105  const std::vector<size_t>& dis_inod_K,
106  const std::vector<size_t>& dis_inod_L,
107  const details::differentiate_option& gopt,
108  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
109  {
110  fatal_macro ("on band: unexpected call to differential operator (id="<<Diff<<")");
111  }
112 };
113 template <class T, class M, class Value>
114 struct evaluate_band_continued<T,M,Value,details::differentiate_option::none> {
115  void operator() (
116  const test_rep<T,M>& obj,
117  const geo_basic<T,M>& omega_K,
118  const Eigen::Matrix<piola<T>,Eigen::Dynamic,1>& piola,
119  const reference_element& hat_K,
120  const reference_element& tilde_L,
121  const std::vector<size_t>& dis_inod_K,
122  const std::vector<size_t>& dis_inod_L,
123  const details::differentiate_option& gopt,
124  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
125  {
126  Eigen::Matrix<Value,Eigen::Dynamic,1> value_i;
127  size_t loc_nnod = value.rows();
128  for (size_t loc_inod = 0; loc_inod < loc_nnod; ++loc_inod) {
129  point_basic<T> tilde_xi = inverse_piola_transformation (obj._gh.band(), tilde_L, dis_inod_L, piola[loc_inod].F);
130  obj._fops.get_basis_on_pointset().get_basis().evaluate (tilde_L, tilde_xi, value_i);
131  value.row(loc_inod) = value_i.transpose();
132  }
133  }
134 };
135 // TODO: DVT_CLEAN_TEST_FEM_DG_BAND regrouper dans fem_on_pointset
136 template <class T, class GradValue>
137 static
138 void
139 band_grad_post (
140  const tensor_basic<T>& invDF,
141  const tensor_basic<T>& P,
142  const details::differentiate_option& gopt,
143  const GradValue& hat_grad_u,
144  GradValue& grad_u)
145 {
146  fatal_macro("band_grad_post: unsupported gradient type: "<<typename_macro(GradValue));
147 }
148 template <class T>
149 static
150 void
151 band_grad_post (
152  const tensor_basic<T>& invDF,
153  const tensor_basic<T>& P,
154  const details::differentiate_option& gopt,
155  const point_basic<T>& tilde_grad_u,
157 {
158  grad_u = invDF.trans_mult (tilde_grad_u); // TODO: DVT_OPTIM_2D
159  if (gopt.surfacic) {
160  grad_u = P.trans_mult (grad_u); // TODO: DVT_OPTIM_2D
161  }
162 }
163 template <class T>
164 static
165 void
166 band_grad_post (
167  const tensor_basic<T>& invDF,
168  const tensor_basic<T>& P,
169  const details::differentiate_option& gopt,
170  const tensor_basic<T>& tilde_grad_u,
171  tensor_basic<T>& grad_u)
172 {
173  grad_u = tilde_grad_u*invDF; // TODO: DVT_OPTIM_2D
174  if (gopt.symmetrized) {
175  grad_u = (grad_u + trans(grad_u))/2;
176  }
177  if (gopt.surfacic) {
178  if (! gopt.symmetrized) {
179  grad_u = grad_u*P;
180  } else {
181  grad_u = P*grad_u*P;
182  }
183  }
184 }
185 // ----------------------------------------------
186 // grad evaluate on band
187 // ----------------------------------------------
188 /*
189  Let F be the Piola transformation from the reference element:
190  F : hat_K --> K
191  hat_x --> x = F(hat_x)
192  Then the gradient of a basis function u defined on K writes:
193  grad(u)(xq) = DF^{-T}*hat_grad(hat_u)(hat_xq)
194 
195  When we are working with K as a side of a banded level set surface {phi(x)=0},
196  then things are more complex.
197  Let
198  L in Lambda : a element of the bounding box Lambda
199  K in Omega : a side of the surface Omega, included in L, as K = L inter {phi(x)=0}.
200  Let the two Piola transformations from the reference elements:
201  F : tilde_L --> L
202  tilde_x --> x = F(tilde_x)
203  G : hat_K --> K
204  hat_x --> x = G(hat_x)
205 
206  Let u is a basis function on L: it is defined over tilde_L as u_tilde:
207  u(x) = tilde_u (F^{-1}(x)) for all x in K
208 
209  The quadrature formula is defined in hat_K with integration point hat_xq and weights hat_wq.
210  Thus, integration point hat_xq may be transformed via F^{-1} o G.
211  Then, for x=xq=G(hat_xq) :
212 
213  u(G(hat_xq)) = tilde_u(F^{-1}(G(hat_xq)))
214 
215  Its derivative expresses with a product of the jacobian DF^-T(tilde_x) :
216 
217  grad(u)(x) = DF^-T (F^{-1}(x)) grad(u)(F^{-1}(x)) for all x in K
218 
219  and then, for x=xq=G(hat_xq)
220 
221  grad(u)(G(hat_xq)) = DF^-T (F^{-1}(G(hat_xq))) grad(u)(F^{-1}(G(hat_xq)))
222 
223 */
224 
225 template <class T, class M, class Value>
226 struct evaluate_band_continued<T,M,Value,details::differentiate_option::gradient> {
227  void operator() (
228  const test_rep<T,M>& obj,
229  const geo_basic<T,M>& omega_K,
230  const Eigen::Matrix<piola<T>,Eigen::Dynamic,1>& piola,
231  const reference_element& hat_K,
232  const reference_element& tilde_L,
233  const std::vector<size_t>& dis_inod_K,
234  const std::vector<size_t>& dis_inod_L,
235  const details::differentiate_option& gopt,
236  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
237  {
238  Eigen::Matrix<Value,Eigen::Dynamic,1> value_i;
239  Eigen::Matrix<tensor_basic<T>,Eigen::Dynamic,1> DG;
240  if (gopt.surfacic) {
241  jacobian_piola_transformation (obj._gh.level_set(), obj._fops.get_piola_on_pointset().get_basis_on_pointset(), hat_K, dis_inod_K, DG);
242  }
243  size_t d = omega_K.dimension();
244  Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1> x;
245  Eigen::Matrix<Value,Eigen::Dynamic,1> tilde_value_i;
246  piola_transformation (obj._gh.level_set(), obj._fops.get_piola_on_pointset().get_basis_on_pointset(), hat_K, dis_inod_K, x);
247  size_t loc_nnod = value.rows();
248  size_t loc_ndof = value.cols();
249  for (size_t loc_inod = 0; loc_inod < loc_nnod; ++loc_inod) {
250  // tilde_x = F_L^{-1}(G_K(hat_x))
251  point_basic<T> tilde_xi = inverse_piola_transformation (obj._gh.band(), tilde_L, dis_inod_L, x[loc_inod]);
252  // tilde_value_i: tilde_grad_u (tilde_xi)
253  obj._fops.get_basis_on_pointset().get_basis().grad_evaluate (tilde_L, tilde_xi, tilde_value_i);
254  // grad_u(xi) = DF^{-T}(tilde_xi)*tilde_grad_u(tilde_xi)
255  tensor_basic<T> DF;
256  tensor_basic<T> P;
257  jacobian_piola_transformation (obj._gh.band(), obj._fops.get_piola_on_pointset().get_basis_on_pointset().get_basis(), tilde_L, dis_inod_L, tilde_xi, DF);
258  tensor_basic<T> invDF = pseudo_inverse_jacobian_piola_transformation (DF, d, tilde_L.dimension());
259  if (gopt.surfacic) {
260  // apply also the tangential projection P=(I-n*n)
261  // grad(u) = P*DF^{-T}*hat_grad(hat_u) = (DF^{-1}*P)^T*hat_grad(hat_u)
262  map_projector (DG[loc_inod], d, hat_K.dimension(), P);
263  }
264  for (size_t loc_jdof = 0; loc_jdof < loc_ndof; ++loc_jdof) {
265  const Value& hat_grad_u = tilde_value_i [loc_jdof];
266  Value& grad_u = value (loc_inod, loc_jdof);
267  band_grad_post (invDF, P, gopt, hat_grad_u, grad_u);
268  }
269  }
270  }
271 };
272 // --------------------------------------------------------------------------
273 // 4. evaluate
274 // --------------------------------------------------------------------------
275 // external:
276 // assembly loop on geo_elements K on a domain omega_K
277 // give its corresponding element K1 in space.geo
278 template <class T, class M>
279 const geo_element&
281  const geo_basic<T,M>& space_geo,
282  const geo_basic<T,M>& omega_K,
283  const geo_element& K_in);
284 
285 template <class T, class M>
286 template <class Value, details::differentiate_option::type Diff>
287 void
289  const geo_basic<T,M>& omega_K,
290  const geo_element& K,
291  const details::differentiate_option& gopt,
292  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
293 {
294  // omega_K is the domaine associated to element K:
295  // it gives the vertices table for K, required by piola
296  // ----------------------------------------------------------------
297  // identify the effective (omega_K,K) that belongs to V.get_geo
298  // and then evaluate
299  // ----------------------------------------------------------------
300  // TODO DVT_CLEAN_TEST_FEM_DG_BAND
301  if (!_is_on_band) {
302  bool use_dom2bgd = (omega_K.variant() == geo_abstract_base_rep<T>::geo_domain &&
304  bool use_bgd2dom = (omega_K.variant() != geo_abstract_base_rep<T>::geo_domain &&
306  if (!use_bgd2dom && !use_dom2bgd) {
307  bool use_dg_on_sides
308  = omega_K.variant() == geo_abstract_base_rep<T>::geo_domain_indirect &&
309  1 + K.dimension() == omega_K.get_background_geo().map_dimension() &&
310  _V.get_basis().is_discontinuous();
311  if (!use_dg_on_sides) {
312  // usual case
313  _fops.template evaluate<M,Value,Diff> (omega_K, K, gopt, value);
314  } else {
315  // DG on omega_K="sides" or "boundary" or other d-1 sides domain
316  // but for a side K, will access to its neighbours L0 & L1 for e.g. dot(grad(u),normal())
317  // omits "inner(u)" on a sides-domain => assume a boundary side
318  geo_basic<T,M> omega_L_eff = omega_K.get_background_geo();
319  size_type L_map_d = K.dimension() + 1;
320  check_macro (L_map_d == omega_L_eff.map_dimension(),
321  "unexpected dimension for side S="<<K.name()<<K.dis_ie()<<" in domain "<<omega_L_eff.name());
322  check_macro (K.master(1) == std::numeric_limits<size_type>::max(),
323  "unexpected non-boundary side S="<<K.name()<<K.dis_ie()<<" in domain "<<omega_L_eff.name());
324  size_type L_dis_ie = K.master(0);
325  check_macro (L_dis_ie != std::numeric_limits<size_type>::max(),
326  "unexpected isolated side S="<<K.name()<<K.dis_ie());
327  const geo_element& L_eff = omega_L_eff.dis_get_geo_element (L_map_d, L_dis_ie);
329  L_eff.get_side_informations (K, sid);
330  _fops.template evaluate_on_side<M,Value,Diff> (omega_L_eff, L_eff, sid, gopt, value);
331  }
332  } else if (use_dom2bgd) {
333  bool use_dg_on_sides
334  = omega_K.variant() != geo_abstract_base_rep<T>::geo &&
335  1 + K.dimension() == _V.get_geo().get_background_geo().map_dimension() &&
336  _V.get_basis().is_discontinuous();
337  if (!use_dg_on_sides) {
338  // usual case
339  _fops.template evaluate<M,Value,Diff> (omega_K, K, gopt, value);
340  } else {
341  // e.g. wh = interpolate(Wh,uh);
342  // with uh in Vh=space("square",P1d) and Wh=space("square[left]",P1d);
343  const geo_element& K_space = assembly2space_geo_element (_V.get_geo(), omega_K, K);
344  size_type L_space_map_d = K_space.dimension() + 1;
345  check_macro (L_space_map_d == _V.get_geo().map_dimension(),
346  "unexpected dimension for side S="<<K_space.name()<<K_space.dis_ie()<<" in domain "<<_V.get_geo().name());
347  check_macro (K_space.master(1) == std::numeric_limits<size_type>::max(),
348  "unexpected non-boundary side S="<<K_space.name()<<K_space.dis_ie()<<" in domain "<<_V.get_geo().name());
349  size_type L_space_dis_ie = K_space.master(0);
350  check_macro (L_space_dis_ie != std::numeric_limits<size_type>::max(),
351  "unexpected isolated side S="<<K_space.name()<<K_space.dis_ie());
352  const geo_element& L_space = _V.get_geo().dis_get_geo_element (L_space_map_d, L_space_dis_ie);
354  L_space.get_side_informations (K_space, sid);
355  _fops.template evaluate_on_side<M,Value,Diff> (_V.get_geo(), L_space, sid, gopt, value);
356  }
357  } else { // use_bdg2dom
358  // space X (omega);
359  // space Y (omega["boundary"]);
360  // trial u(X);
361  // test v(Y);
362  // form m = integrate ("boundary", u*v);
363  // => v is on compacted geo_domain Y.geo but elements K
364  // during integration process are on domain omega["boundary"]
365  // => element K need to be replaced by an element in Y.geo
366  // for computing correctly Y.dis_idof(K)
367  check_macro (
368  omega_K.get_background_geo().name() == _V.get_geo().name() ||
369  omega_K.get_background_geo().name() == _V.get_geo().get_background_geo().name(),
370  "unexpected integration domain \"" << omega_K.name()
371  << "\" based on geo \"" << omega_K.get_background_geo().name()
372  << "\" together with a space on geo \"" << _V.get_geo().name()
373  << "\" based on geo \"" << _V.get_geo().get_background_geo().name()<<"\"");
374  geo_basic<T,M> omega_K_eff = _V.get_geo();
375  const geo_element& K_eff = omega_K_eff.bgd2dom_geo_element (K);
376  _fops.template evaluate<M,Value,Diff> (omega_K_eff, K_eff, gopt, value);
377  }
378  } else { // is_on_band
379  // find L in the band such that K is the intersected side of L
380  // as the zero level set isosurface
381  std::vector<size_type> dis_inod_L;
382  std::vector<size_type> dis_inod_K;
383  size_type first_dis_ie = _gh.level_set().sizes().ownership_by_dimension [K.dimension()].first_index();
384  check_macro (K.dis_ie() >= first_dis_ie, "unexpected intersected side element K.dis_ie="<<K.dis_ie());
385  size_type K_ie = K.dis_ie() - first_dis_ie;
386  size_type L_ie = _gh.sid_ie2bnd_ie (K_ie);
387  const geo_element& L = _gh.band() [L_ie];
388  reference_element hat_K = K.variant();
389  reference_element tilde_L = L.variant();
390  // use the basis on L, the element from the band that contains the
391  // intersected side K on the zero level set surface
392  const piola_fem<T>& pf = _fops.get_basis_on_pointset().get_basis().get_piola_fem();
393  check_macro (! pf.transform_need_piola(), "band: unsupported piola-based basis");
394  const Eigen::Matrix<piola<T>,Eigen::Dynamic,1>& piola = _fops.get_piola_on_pointset().get_piola (_gh.level_set(), K);
395  size_type loc_nnod = piola.size();
396  size_type loc_ndof = get_vf_space().get_basis().ndof (tilde_L);
397  value.resize (loc_nnod, loc_ndof);
398  _gh.level_set().dis_inod (K, dis_inod_K);
399  _gh.band() .dis_inod (L, dis_inod_L);
400  evaluate_band_continued<T,M,Value,Diff> eval_band_cont;
401  eval_band_cont (*this, omega_K, piola, hat_K, tilde_L, dis_inod_K, dis_inod_L, gopt, value);
402  }
403 }
404 // --------------------------------------------------------------------------
405 // 5. evaluate on side
406 // --------------------------------------------------------------------------
407 template <class T, class M>
408 template <class Value, details::differentiate_option::type Diff>
409 void
411  const geo_basic<T,M>& omega_K,
412  const geo_element& K,
413  const side_information_type& sid,
414  const details::differentiate_option& gopt,
415  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
416 {
417  size_type space_map_d = get_vf_space().get_geo().map_dimension();
418  // TODO DVT_CLEAN_TEST_FEM_DG_BAND
419  bool is_broken = get_vf_space().get_geo().is_broken() && space_map_d + 1 == K.dimension();
420  if (!_is_on_band) {
421  if (!is_broken) {
422  _fops.template evaluate_on_side<M,Value,Diff> (omega_K, K, sid, gopt, value);
423  } else { // is_broken: _is_inside_on_local_sides
424  check_macro(_is_inside_on_local_sides, "unexpected broken case");
425  size_type isid = sid.loc_isid;
426  size_type dis_isid = (K.dimension() == 1) ? K[isid] : (K.dimension() == 2) ? K.edge(isid) : K.face(isid);
427  const geo_element& S = omega_K.dis_get_geo_element (space_map_d, dis_isid);
428  bool have_bgd_dom = get_vf_space().get_geo().variant() == geo_abstract_base_rep<T>::geo_domain && get_vf_space().get_geo().name() != omega_K.name();
429  const geo_element* dom_S_ptr = (!have_bgd_dom) ? &S : &(get_vf_space().get_geo().bgd2dom_geo_element(S));
430  const geo_element& dom_S = *dom_S_ptr;
431  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic> value_sid;
432  _fops.template evaluate<M,Value,Diff> (omega_K, dom_S, gopt, value_sid);
433  // next, locally assembly value_sid into value
434  reference_element hat_K = K;
435  size_type loc_nnod = value_sid.rows();
436  size_type loc_ndof = 0;
437  size_type loc_isid_ndof = 0;
438  size_type start_loc_isid_idof = 0;
439  for (size_type jsid = 0, nsid = hat_K.n_side(); jsid < nsid; ++jsid) {
440  reference_element hat_Sj = hat_K.side(jsid);
441  size_type loc_jsid_ndof = get_vf_space().get_basis().ndof (hat_Sj);
442  if (jsid == isid) {
443  start_loc_isid_idof = loc_ndof;
444  loc_isid_ndof = loc_jsid_ndof;
445  }
446  loc_ndof += loc_jsid_ndof;
447  }
448  value.resize (loc_nnod, loc_ndof);
449  value.fill (Value());
450  for (size_type loc_isid_jdof = 0; loc_isid_jdof < loc_isid_ndof; ++loc_isid_jdof) {
451  size_type loc_jdof = start_loc_isid_idof + loc_isid_jdof;
452  for (size_type loc_inod = 0; loc_inod < loc_nnod; ++loc_inod) {
453  value(loc_inod,loc_jdof) = value_sid (loc_inod, loc_isid_jdof);
454  }
455  }
456  }
457  } else {
458  check_macro (!_is_on_band, "evaluate_on_side: not yet on band");
459  }
460 }
461 // ----------------------------------------------
462 // 6. local dg merge dofs on an internal side
463 // ----------------------------------------------
464 template <class T, class M>
465 template <class Value>
466 void
468  const geo_basic<T,M>& omega_K,
469  const geo_element& S,
470  const geo_element& K0,
471  const geo_element& K1,
472  const Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value0,
473  const Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value1,
474  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
475 {
476  check_macro (value0.rows() == value1.rows(), "invalid node number");
477  size_type loc_nnod = value0.rows();
478  size_type loc_ndof0 = value0.cols();
479  size_type loc_ndof1 = value1.cols();
480  value.resize (loc_nnod, loc_ndof0 + loc_ndof1);
481  for (size_type loc_inod = 0; loc_inod < loc_nnod; ++loc_inod) {
482  for (size_type loc_idof = 0; loc_idof < loc_ndof0; ++loc_idof) {
483  value (loc_inod,loc_idof) = value0 (loc_inod,loc_idof);
484  }
485  for (size_type loc_idof = 0; loc_idof < loc_ndof1; ++loc_idof) {
486  value (loc_inod,loc_ndof0+loc_idof) = value1 (loc_inod,loc_idof); // TODO: DVT_EIGEN_BLAS2
487  }
488  }
489 }
490 // ----------------------------------------------------------------------------
491 // instanciation in library
492 // ----------------------------------------------------------------------------
493 
494 #define _RHEOLEF_instanciation_value_diff(T,M,Value,Diff) \
495 template void test_rep<T,M>::evaluate<Value,Diff> ( \
496  const geo_basic<T,M>& omega_K, \
497  const geo_element& K, \
498  const details::differentiate_option& gopt, \
499  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const; \
500 template void test_rep<T,M>::evaluate_on_side<Value,Diff> ( \
501  const geo_basic<T,M>& omega_K, \
502  const geo_element& K, \
503  const side_information_type& sid, \
504  const details::differentiate_option& gopt, \
505  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const; \
506 
507 #define _RHEOLEF_instanciation_value(T,M,Value) \
508 template void test_rep<T,M>::local_dg_merge_on_side ( \
509  const geo_basic<T,M>& omega_K, \
510  const geo_element& S, \
511  const geo_element& K0, \
512  const geo_element& K1, \
513  const Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value0, \
514  const Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value1, \
515  Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const; \
516 _RHEOLEF_instanciation_value_diff(T,M,Value,details::differentiate_option::none) \
517 _RHEOLEF_instanciation_value_diff(T,M,Value,details::differentiate_option::gradient) \
518 _RHEOLEF_instanciation_value_diff(T,M,Value,details::differentiate_option::divergence) \
519 _RHEOLEF_instanciation_value_diff(T,M,Value,details::differentiate_option::curl) \
520 
521 #define _RHEOLEF_instanciation(T,M) \
522 template class test_rep<T,M>; \
523 _RHEOLEF_instanciation_value(T,M,T) \
524 _RHEOLEF_instanciation_value(T,M,point_basic<T>) \
525 _RHEOLEF_instanciation_value(T,M,tensor_basic<T>) \
526 _RHEOLEF_instanciation_value(T,M,tensor3_basic<T>) \
527 _RHEOLEF_instanciation_value(T,M,tensor4_basic<T>) \
528 
529 _RHEOLEF_instanciation(Float,sequential)
530 #ifdef _RHEOLEF_HAVE_MPI
532 #endif // _RHEOLEF_HAVE_MPI
533 
534 } // namespace rheolef
rheolef::reference_element::n_side
size_type n_side() const
Definition: reference_element.h:104
rheolef::geo_basic
generic mesh with rerefence counting
Definition: domain_indirect.h:64
rheolef::test_rep::evaluate
void evaluate(const geo_basic< T, M > &omega_K, const geo_element &K, const details::differentiate_option &gopt, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
Definition: test.cc:288
gh
field gh(Float epsilon, Float t, const field &uh, const test &v)
Definition: burgers_diffusion_operators.icc:37
check_macro
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
rheolef::geo_element::master
size_type master(bool i) const
Definition: geo_element.h:165
rheolef::test_rep::evaluate_on_side
void evaluate_on_side(const geo_basic< T, M > &omega_K, const geo_element &K, const side_information_type &sid, const details::differentiate_option &gopt, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
Definition: test.cc:410
rheolef::_RHEOLEF_instanciation
_RHEOLEF_instanciation(Float, sequential, std::allocator< Float >) _RHEOLEF_instanciation(Float
rheolef::geo_abstract_base_rep::name
virtual std::string name() const =0
rheolef::test_rep::test_rep
test_rep(const space_type &V)
Definition: test.cc:30
rheolef::test_rep::_V
space_type _V
Definition: test.h:196
rheolef::value
rheolef::std value
rheolef::space_basic< float_type, M >
rheolef::assembly2space_geo_element
const geo_element & assembly2space_geo_element(const geo_basic< T, M > &space_geo, const geo_basic< T, M > &omega_K, const geo_element &K_in)
Definition: space_constitution_assembly.cc:115
rheolef::geo_element
see the geo_element page for the full documentation
Definition: geo_element.h:102
rheolef::geo_element::variant
variant_type variant() const
Definition: geo_element.h:161
rheolef::test_rep::_is_on_band
bool _is_on_band
Definition: test.h:199
rheolef::test_rep::size_type
std::size_t size_type
Definition: test.h:97
rheolef::geo_element::dis_ie
size_type dis_ie() const
Definition: geo_element.h:163
rheolef::test_rep
Definition: test.h:93
rheolef::side_information_type
Definition: reference_element_face_transformation.h:37
rheolef::geo_abstract_base_rep
abstract base interface class
Definition: geo.h:248
rheolef::reference_element
see the reference_element page for the full documentation
Definition: reference_element.h:66
rheolef::map_projector
void map_projector(const tensor_basic< T > &DF, size_t d, size_t map_d, tensor_basic< T > &P)
Definition: piola_util.cc:368
rheolef::integrate_option
see the integrate_option page for the full documentation
Definition: integrate_option.h:125
rheolef::geo_element::dimension
size_type dimension() const
Definition: geo_element.h:167
rheolef::test_rep::initialize
void initialize(const piola_on_pointset< float_type > &pops, const integrate_option &iopt) const
Definition: test.cc:65
rheolef::inverse_piola_transformation
point_basic< T > inverse_piola_transformation(const geo_basic< T, M > &omega, const reference_element &hat_K, const std::vector< size_t > &dis_inod, const point_basic< T > &x)
Definition: piola_util.cc:459
rheolef::test_rep::_is_inside_on_local_sides
bool _is_inside_on_local_sides
Definition: test.h:198
rheolef::details::differentiate_option
Definition: piola.h:41
fatal_macro
#define fatal_macro(message)
Definition: dis_macros.h:33
rheolef::side_information_type::loc_isid
size_t loc_isid
Definition: reference_element_face_transformation.h:38
rheolef::piola_on_pointset< float_type >
rheolef::band_basic< float_type, M >
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
Float
see the Float page for the full documentation
mkgeo_obstacle.L
L
Definition: mkgeo_obstacle.sh:133
rheolef::integrate_option::_is_inside_on_local_sides
bool _is_inside_on_local_sides
Definition: integrate_option.h:180
mkgeo_ball.d
d
Definition: mkgeo_ball.sh:154
rheolef::point_basic< T >
point_basic< T >
Definition: piola_fem.h:135
rheolef::test_rep::operator=
test_rep< T, M > & operator=(const test_rep< T, M > &)
Definition: test.cc:50
rheolef::test_rep::_fops
fem_on_pointset< float_type > _fops
Definition: test.h:197
rheolef::test_rep::_gh
band_basic< float_type, M > _gh
Definition: test.h:200
rheolef::pseudo_inverse_jacobian_piola_transformation
tensor_basic< T > pseudo_inverse_jacobian_piola_transformation(const tensor_basic< T > &DF, size_t d, size_t map_d)
Definition: piola_util.cc:265
rheolef::piola_transformation
void piola_transformation(const geo_basic< T, M > &omega, const basis_on_pointset< T > &piola_on_pointset, reference_element hat_K, const std::vector< size_t > &dis_inod, Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > &x)
Definition: piola_util.cc:43
rheolef::geo_element::name
char name() const
Definition: geo_element.h:169
rheolef::geo_element::face
size_type face(size_type i) const
Definition: geo_element.h:210
rheolef::reference_element::side
reference_element side(size_type loc_isid) const
Definition: reference_element.h:119
rheolef::trans
csr< T, sequential > trans(const csr< T, sequential > &a)
trans(a): see the form page for the full documentation
Definition: csr.h:455
rheolef::distributed
distributed
Definition: asr.cc:228
rheolef::test_rep::local_dg_merge_on_side
void local_dg_merge_on_side(const geo_basic< T, M > &omega_K, const geo_element &S, const geo_element &K0, const geo_element &K1, const Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value0, const Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value1, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
Definition: test.cc:467
rheolef::geo_element::edge
size_type edge(size_type i) const
Definition: geo_element.h:209
grad_u
Definition: combustion_exact.icc:34
M
Expr1::memory_type M
Definition: vec_expr_v2.h:385
rheolef::geo_abstract_base_rep::variant
virtual size_type variant() const =0
rheolef::jacobian_piola_transformation
void jacobian_piola_transformation(const geo_basic< T, M > &omega, const basis_on_pointset< T > &piola_on_pointset, reference_element hat_K, const std::vector< size_t > &dis_inod, Eigen::Matrix< tensor_basic< T >, Eigen::Dynamic, 1 > &DF)
Definition: piola_util.cc:80
T
Expr1::float_type T
Definition: field_expr.h:218
trace_macro
#define trace_macro(message)
Definition: dis_macros.h:111
rheolef::piola
Definition: piola.h:67