Rheolef  7.2
an efficient C++ finite element environment
basis_fem_visu_gnuplot.cc
Go to the documentation of this file.
1 // file automatically generated by: ../../../rheolef/nfem/pbasis/make_basis_list_cxx.sh
22 #include "basis.h"
23 #include "equispaced.icc"
24 #include "basis_visu_gnuplot.icc"
26 #include "rheolef/iorheo.h"
27 namespace rheolef {
28 using namespace std;
29 
30 // --------------------------------------------------------------------------
31 // show polynomials
32 // --------------------------------------------------------------------------
33 template<class T>
34 void
35 basis_rep<T>::put (ostream& os, reference_element hat_K) const
36 {
37  switch (valued_tag()) {
38  case space_constant::scalar: put_scalar_valued (os, hat_K); break;
39  case space_constant::vector: put_vector_valued (os, hat_K); break;
40  default: error_macro ("unimplemented gnuplot visualization of "<<valued()<<"-valued polynomials");
41  }
42 }
43 template<class T>
44 void
45 basis_rep<T>::put_scalar_valued (ostream& os, reference_element hat_K) const
46 {
47  details::put(*this,os,hat_K); // shared with basis_raw
48 }
49 template<class T>
50 void
52 {
54  bool verbose = iorheo::getverbose(os);
55  bool clean = iorheo::getclean(os);
56  bool execute = iorheo::getexecute(os);
57  size_type nsub = iorheo::getsubdivide(os);
58  if (nsub <= 1) nsub = 20; // default value
59 
60  size_type loc_ndof = ndof(hat_K);
61  string basename = "basis-" + name() + "-" + hat_K.name();
62  string filelist;
63  // --------------------
64  // .plot
65  // --------------------
66  string plot_name = basename + ".plot";
67  string gdat_name = basename + ".gdat";
68  ofstream plot (plot_name.c_str());
69  cerr << "! file \"" << plot_name << "\" created" << endl;
70  filelist += " \"" + plot_name + "\"";
71  size_t d = hat_K.dimension();
72  check_macro (d==1 || d==2, "unsupported dimension " << d);
73  plot << "gdat = \"" << gdat_name << "\"" << endl
74  << "set colors classic" << endl
75  << "set size square" << endl
76  ;
77  // draw all edges
78  point_basic<T> xmin, xmax;
79  for (size_type mu = 0; mu < d; ++mu) {
80  xmin[mu] = 1;
81  xmax[mu] = -1;
82  }
83  for (size_type loc_isid = 0, loc_nsid = hat_K.n_subgeo(1); loc_isid < loc_nsid; ++loc_isid) {
84  size_type loc_ia = hat_K.subgeo_local_vertex (1, loc_isid, 0);
85  size_type loc_ib = hat_K.subgeo_local_vertex (1, loc_isid, 1);
86  const point& a = hat_K.vertex (loc_ia);
87  const point& b = hat_K.vertex (loc_ib);
88  plot << "set arrow from ";
89  size_type d2 = max(d,size_type(2));
90  for (size_type mu = 0; mu < d2; ++mu) {
91  plot << a[mu];
92  if (mu+1 != d2) plot << ", ";
93  xmin[mu] = min(xmin[mu],T(a[mu]));
94  xmax[mu] = max(xmax[mu],T(a[mu]));
95  }
96  plot << " to ";
97  for (size_type mu = 0; mu < d2; ++mu) {
98  plot << b[mu];
99  if (mu+1 != d2) plot << ", ";
100  xmin[mu] = min(xmin[mu],T(b[mu]));
101  xmax[mu] = max(xmax[mu],T(b[mu]));
102  }
103  plot << " nohead lc 0 lw 1" << endl;
104  }
105  T delta = 0.1;
106  plot << endl
107  << "set xrange ["<<xmin[0]-delta<<":"<<xmax[0]+delta<<"]"<<endl;
108  if (d >= 2) {
109  plot << "set yrange ["<<xmin[1]-delta<<":"<<xmax[1]+delta<<"]"<<endl;
110  } else {
111  plot << "set yrange [-1:1]"<<endl;
112  }
113  if (d >= 3) {
114  plot << "set zrange ["<<xmin[2]-delta<<":"<<xmax[2]+delta<<"]"<<endl
115  << "set xyplane at "<< xmin[2]-delta << endl;
116  }
117  if (d == 1) {
118  plot << "plot \\" << endl
119  ;
120  for (size_t loc_idof = 0; loc_idof < loc_ndof; ++loc_idof) {
121  plot << " gdat u 1:"<<loc_idof+2 << " t \"L" << loc_idof+1 << "\" w l";
122  if (loc_idof+1 != loc_ndof) { plot << ",\\"; }
123  plot << endl;
124  }
125  } else if (d == 2) {
126  plot << "pause_duration = 0.5" << endl
127  << "d = 2" << endl
128  << "scale= 1./" << nsub << endl
129  << "idx = 0" << endl
130  << "idxmax = " << loc_ndof << endl
131  << "plot gdat i idx u 1:2:(scale*$3):(scale*$4) t sprintf(\"P%d\",idx+1) w vec lc 0 lw 2" << endl
132  << "load \"" << basename << ".loop\"" << endl
133  ;
134  string loop_name = basename + ".loop";
135  ofstream loop (loop_name.c_str());
136  cerr << "! file \"" << loop_name << "\" created" << endl;
137  filelist += " \"" + loop_name + "\"";
138  loop << "idx = idx+1" << endl
139  << "if (idx < idxmax) \\" << endl
140  << " pause -1 \"<return>\"; \\" << endl
141  << " replot; \\" << endl
142  << " reread" << endl
143  ;
144  }
145  plot << "pause -1 \"<return>\"" << endl;
146  plot.close();
147 
148  // --------------------
149  // .gdat
150  // --------------------
151  ofstream gdat (gdat_name.c_str());
152  cerr << "! file \"" << gdat_name << "\" created" << endl;
153  filelist += " \"" + gdat_name + "\"";
154  gdat << setprecision(std::numeric_limits<T>::digits10)
155  << "# basis " << name() << endl
156  << "# element " << hat_K.name() << endl
157  << "# degree " << degree() << endl
158  ;
159  switch (hat_K.variant()) {
160 #ifdef TODO
161  case reference_element::p: {
162  break;
163  }
164  case reference_element::e: {
165  gdat << "# ndof " << loc_ndof << endl
166  << "# x";
167  for (size_t loc_idof = 0; loc_idof < loc_ndof; ++loc_idof) {
168  gdat << " L" << loc_idof+1;
169  }
170  gdat << endl;
171  for (size_type i = 0; i <= nsub; i++) {
172  point_basic<T> hat_x (T(i)/T(nsub));
173  eval (hat_K, hat_x, value);
174  gdat << hat_x[0];
175  for (size_t loc_idof = 0, loc_ndof = value.size(); loc_idof < loc_ndof; ++loc_idof) {
176  for (size_t mu = 0; mu < d; ++mu) {
177  gdat << " " << value[loc_idof][mu];
178  }
179  }
180  gdat << endl;
181  }
182  break;
183  }
184 #endif // TODO
186  case reference_element::q: {
187  Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1> hat_node;
188  Eigen::Matrix<point_basic<T>,Eigen::Dynamic,Eigen::Dynamic> value;
189  pointset_lagrange_equispaced (hat_K, nsub, hat_node);
190  details::basis_on_pointset_evaluate (*this, hat_K, hat_node, value);
191  size_t loc_nnod = value.rows();
192  size_t loc_ndof = value.cols();
193  for (size_t loc_idof = 0; loc_idof < loc_ndof; ++loc_idof) {
194  for (size_t loc_inod = 0; loc_inod < loc_nnod; ++loc_inod) {
195  for (size_t mu = 0; mu < d; ++mu) {
196  gdat << hat_node[loc_inod][mu] << " ";
197  }
198  for (size_t mu = 0; mu < d; ++mu) {
199  gdat << value(loc_inod,loc_idof)[mu] << " ";
200  }
201  gdat << endl;
202  }
203  gdat << endl << endl;
204  }
205  break;
206  }
207 #ifdef TODO
208  case reference_element::T: {
209  for (size_type k = 0; k <= nsub; k++) {
210  for (size_type j = 0; j+k <= nsub; j++) {
211  for (size_type i = 0; i+j+k <= nsub; i++) {
212  point_basic<T> hat_x (T(i)/T(nsub), T(j)/T(nsub), T(k)/T(nsub));
213  eval_lagrange (hat_x, hat_K, degree, sopt, inv_vdm, value);
214  Lambda = max(Lambda, norm(value,1));
215  }
216  }
217  }
218  return Lambda;
219  }
220  case reference_element::P: {
221  for (size_type k = 0; k <= degree; k++) {
222  for (size_type j = 0; j <= degree; j++) {
223  for (size_type i = 0; i+j <= degree; i++) {
224  point_basic<T> hat_x (T(i)/T(nsub), T(j)/T(nsub), 2*T(k)/T(nsub)-1);
225  eval_lagrange (hat_x, hat_K, degree, sopt, inv_vdm, value);
226  Lambda = max(Lambda, norm(value,1));
227  }
228  }
229  }
230  break;
231  }
232  case reference_element::H: {
233  for (size_type k = 0; k <= degree; k++) {
234  for (size_type j = 0; j <= degree; j++) {
235  for (size_type i = 0; i <= degree; i++) {
236  point_basic<T> hat_x (2*T(i)/T(nsub)-1, 2*T(j)/T(nsub), 2*T(k)/T(nsub)-1);
237  eval_lagrange (hat_x, hat_K, degree, sopt, inv_vdm, value);
238  Lambda = max(Lambda, norm(value,1));
239  }
240  }
241  }
242  break;
243  }
244 #endif // TODO
245  default:
246  error_macro ("unexpected element type `"<<hat_K.name()<<"'");
247  }
248  // -----------
249  if (execute) {
250  // -----------
251  string command = "gnuplot \"" + plot_name + "\"";
252  if (verbose) clog << "! " << command << endl;
253  int status = system (command.c_str());
254  }
255  // -----------
256  if (clean) {
257  // -----------
258  string command = "/bin/rm -f " + filelist;
259  if (verbose) clog << "! " << command << endl;
260  int status = system (command.c_str());
261  }
262 }
263 // --------------------------------------------------------------------------
264 // show nodes
265 // --------------------------------------------------------------------------
266 template<class T>
267 static
268 void
269 put_hat_node_header (std::ostream& plot, reference_element hat_K)
270 {
272  size_type d = hat_K.dimension();
273  plot << "set colors classic" << endl
274  << "set nokey" << endl
275  << "set noborder" << endl
276  << "set noxtics" << endl
277  << "set noytics" << endl
278  << "set noztics" << endl
279  ;
280  if (d == 2){
281  plot << "set size ratio -1 # 2d equal scales" << endl;
282  } else if (d == 3) {
283  plot << "set view 70, 140 # x to left, y to right, z to top" << endl;
284  plot << "set view equal xyz # 3d equal scales" << endl;
285  }
286  plot << endl;
287 
288  // draw all edges
289  point_basic<T> xmin, xmax;
290  for (size_type mu = 0; mu < d; ++mu) {
291  xmin[mu] = 1;
292  xmax[mu] = -1;
293  }
294  for (size_type loc_isid = 0, loc_nsid = hat_K.n_subgeo(1); loc_isid < loc_nsid; ++loc_isid) {
295  size_type loc_ia = hat_K.subgeo_local_vertex (1, loc_isid, 0);
296  size_type loc_ib = hat_K.subgeo_local_vertex (1, loc_isid, 1);
297  const point& a = hat_K.vertex (loc_ia);
298  const point& b = hat_K.vertex (loc_ib);
299  plot << "set arrow from ";
300  size_type d2 = max(d,size_type(2));
301  for (size_type mu = 0; mu < d2; ++mu) {
302  plot << a[mu];
303  if (mu+1 != d2) plot << ", ";
304  xmin[mu] = min(xmin[mu],T(a[mu]));
305  xmax[mu] = max(xmax[mu],T(a[mu]));
306  }
307  plot << " to ";
308  for (size_type mu = 0; mu < d2; ++mu) {
309  plot << b[mu];
310  if (mu+1 != d2) plot << ", ";
311  xmin[mu] = min(xmin[mu],T(b[mu]));
312  xmax[mu] = max(xmax[mu],T(b[mu]));
313  }
314  plot << " nohead lc 0 lw 1" << endl;
315  }
316  T delta = 0.1;
317  plot << endl
318  << "set xrange ["<<xmin[0]-delta<<":"<<xmax[0]+delta<<"]"<<endl;
319  if (d >= 2) {
320  plot << "set yrange ["<<xmin[1]-delta<<":"<<xmax[1]+delta<<"]"<<endl;
321  } else {
322  plot << "set yrange [-1:1]"<<endl;
323  }
324  if (d >= 3) {
325  plot << "set zrange ["<<xmin[2]-delta<<":"<<xmax[2]+delta<<"]"<<endl
326  << "set xyplane at "<< xmin[2]-delta << endl;
327  }
328 }
329 // class-function for shrinkage of discontinuous element internal nodes
330 template<class T>
331 struct shrink_fun {
332  point_basic<T> operator() (const point_basic<T>& x) const {
333  return is_continuous ? x : x - a*(x-xc);
334  }
335  shrink_fun (bool ic, const point_basic<T>& xc1)
336  : is_continuous(ic), xc(xc1), a(0.15) {}
337  bool is_continuous;
338  point_basic<T> xc;
339  T a;
340 };
341 template<class T>
342 void
343 basis_rep<T>::put_hat_node (std::ostream& os, reference_element hat_K) const
344 {
345  using namespace std;
346  bool verbose = iorheo::getverbose(os);
347  bool clean = iorheo::getclean(os);
348  bool execute = iorheo::getexecute(os);
349 
350  _initialize_data_guard (hat_K);
351  const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& hat_x = hat_node(hat_K);
352  size_type d = hat_K.dimension();
353 
354  string basename = "basis-" + name() + "-" + hat_K.name();
355  string filelist;
356  // --------------------
357  // .gdat
358  // --------------------
359  string gdat_name = basename + ".gdat";
360  ofstream gdat (gdat_name.c_str());
361  cerr << "! file \"" << gdat_name << "\" created" << endl;
362  filelist += " \"" + gdat_name + "\"";
363  gdat << setprecision(std::numeric_limits<T>::digits10)
364  << "# basis " << name() << endl
365  << "# element " << hat_K.name() << endl
366  << "# degree " << degree() << endl
367  << "# ndof " << ndof(hat_K) << endl
368  << "# raw_poly " << _sopt.get_raw_polynomial_name() << endl
369  << "# nodeset " << _sopt.get_node_name() << endl
370  << "# nnode " << hat_x.size() << endl
371  ;
372  point_basic<T> xc;
373  reference_element_barycenter (hat_K, xc);
374  shrink_fun<T> shrink (option().is_continuous(), xc);
375  if (! option().is_trace_n()) {
376  for (size_type dim = 0, d = hat_K.dimension(); dim <= d; ++dim) {
377  for (size_type loc_inod = first_inod_by_dimension(hat_K,dim), loc_nnod = first_inod_by_dimension(hat_K,dim+1); loc_inod < loc_nnod; ++loc_inod) {
378  point_basic<T> shrink_hat_x = shrink (hat_x [loc_inod]);
379  shrink_hat_x.put (gdat, max(d,size_type(2)));
380  gdat << " " << loc_inod << endl;
381  }
382  gdat << endl << endl;
383  }
384  } else {
385  // TODO: loop on sides and shrink also inside each side
386  size_type loc_inod = 0, loc_nnod = nnod(hat_K);
387  size_type d = hat_K.dimension();
388  for (size_type loc_isid = 0, loc_nsid = hat_K.n_side(); loc_isid < loc_nsid; ++loc_isid) {
389  reference_element S = hat_K.side (loc_isid);
390  // 1) compute the side barycenter
391  point xs;
392  size_type loc_nsidvert = hat_K.subgeo_size (d-1, loc_isid);
393  for (size_type loc_jsidvert = 0; loc_jsidvert < loc_nsidvert; ++loc_jsidvert) {
394  size_type iloc = hat_K.subgeo_local_vertex(d-1, loc_isid, loc_jsidvert);
395  xs += hat_K.vertex (iloc);
396  }
397  xs /= T(loc_nsidvert);
398  // 2) loop on side and shrink
399  shrink_fun<T> shrink_s (option().is_continuous(), xs);
400  size_type nns = nnod_on_subgeo_internal (d, S.variant());
401  for (size_type ins = 0; ins < nns; ++ins, ++loc_inod) {
402  check_macro (loc_inod < loc_nnod, "invalid loc_inod");
403  point_basic<T> shrink_hat_x = shrink_s (shrink (hat_x [loc_inod]));
404  shrink_hat_x.put (gdat, max(d,size_type(2)));
405  gdat << " " << loc_inod << endl;
406  }
407  }
408  }
409  // --------------------
410  // .plot
411  // --------------------
412  string plot_name = basename + ".plot";
413  ofstream plot (plot_name.c_str());
414  cerr << "! file \"" << plot_name << "\" created" << endl;
415  filelist += " \"" + plot_name + "\"";
416  plot << "gdat = \"" << gdat_name << "\"" << endl
417  << "set title \"" << name() << ": nodes\"" << endl
418  ;
419  put_hat_node_header<T> (plot, hat_K) ;
420  string color[4] = {"#ff0000", "#008800", "#0000ff", "#ff00ff"};
421  bool need_coma = false;
422  size_type index = 0;
423  plot << ((d==3) ? "s" : "") << "plot \\" << endl;
424  if (! option().is_trace_n()) {
425  for (size_type dim = 0, d = hat_K.dimension(); dim <= d; ++dim) {
426  size_type nnod_dim = first_inod_by_dimension (hat_K, dim+1) - first_inod_by_dimension (hat_K, dim);
427  if (nnod_dim == 0) continue;
428  plot << " " << (need_coma ? ", " : " ") << "gdat \\" << endl
429  << " index " << index << " \\" << endl
430  << " w p ps 2 pt 7 lc rgb \"" << color[dim] << "\",\\" << endl
431  << " gdat \\" << endl
432  << " index " << index << " \\" << endl
433  << " u 1:2:3" << ((d==3) ? ":4" : "") << " w labels offset char 2 lc 0 \\" << endl
434  ;
435  need_coma = true;
436  index++;
437  }
438  } else {
439  plot << " gdat \\" << endl
440  << " w p ps 2 pt 7 lc rgb \"" << color[0] << "\",\\" << endl
441  << " gdat \\" << endl
442  << " u 1:2:3" << ((d==3) ? ":4" : "") << " w labels offset char 2 lc 0" << endl
443  ;
444  }
445  plot << endl
446  << "pause -1 \"<return>\"" << endl
447  ;
448  // -----------
449  if (execute) {
450  // -----------
451  string command = "gnuplot \"" + plot_name + "\"";
452  if (verbose) clog << "! " << command << endl;
453  int status = system (command.c_str());
454  }
455  // -----------
456  if (clean) {
457  // -----------
458  string command = "/bin/rm -f " + filelist;
459  if (verbose) clog << "! " << command << endl;
460  int status = system (command.c_str());
461  }
462 }
463 // --------------------------------------------------------------------------
464 // show nodes
465 // --------------------------------------------------------------------------
466 template<class T>
467 void
469  std::ostream& os,
470  reference_element hat_K,
471  const side_information_type& sid) const
472 {
473  using namespace std;
474  check_macro (is_nodal(), "side-node visualization: only nodal basis supported");
475  Eigen::Matrix<size_type,Eigen::Dynamic,1> loc_inod;
476  local_idof_on_side (hat_K, sid, loc_inod);
477 
478  bool verbose = iorheo::getverbose(os);
479  bool clean = iorheo::getclean(os);
480  bool execute = iorheo::getexecute(os);
481 
482  _initialize_data_guard (hat_K);
483  const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& hat_x = hat_node (hat_K);
484  size_type d = hat_K.dimension();
485 
486  string basename = "basis-" + name() + "-" + hat_K.name();
487  string filelist;
488  // --------------------
489  // .gdat
490  // --------------------
491  string gdat_name = basename + ".gdat";
492  ofstream gdat (gdat_name.c_str());
493  cerr << "! file \"" << gdat_name << "\" created" << endl;
494  filelist += " \"" + gdat_name + "\"";
495  gdat << setprecision(std::numeric_limits<T>::digits10)
496  << "# basis " << name() << endl
497  << "# element " << hat_K.name() << endl
498  << "# degree " << degree() << endl
499  << "# ndof " << ndof(hat_K) << endl
500  << "# raw_poly " << _sopt.get_raw_polynomial_name() << endl
501  << "# nodeset " << _sopt.get_node_name() << endl
502  << "# nnode " << hat_x.size() << endl
503  ;
504  for (size_type loc_sid_inod = 0, loc_sid_nnod = loc_inod.size(); loc_sid_inod < loc_sid_nnod; ++loc_sid_inod) {
505  hat_x [loc_inod[loc_sid_inod]].put (gdat, max(d,size_type(2)));
506  gdat << " " << loc_inod[loc_sid_inod] << endl;
507  }
508  // --------------------
509  // .plot
510  // --------------------
511  string plot_name = basename + ".plot";
512  ofstream plot (plot_name.c_str());
513  cerr << "! file \"" << plot_name << "\" created" << endl;
514  filelist += " \"" + plot_name + "\"";
515  plot << "gdat = \"" << gdat_name << "\"" << endl
516  << "set title \"" << name() << ": nodes\"" << endl
517  ;
518  put_hat_node_header<T> (plot, hat_K) ;
519  string color[4] = {"#ff0000", "#008800", "#0000ff", "#ff00ff"};
520  bool need_coma = false;
521  size_type index = 0;
522  plot << ((d==3) ? "s" : "") << "plot \\" << endl
523  << " gdat \\" << endl
524  << " w p ps 2 pt 7 lc rgb \"" << color[d] << "\",\\" << endl
525  << " gdat \\" << endl
526  << " u 1:2:3" << ((d==3) ? ":4" : "") << " w labels offset char 2 lc 0" << endl
527  << "pause -1 \"<return>\"" << endl
528  ;
529  // -----------
530  if (execute) {
531  // -----------
532  string command = "gnuplot \"" + plot_name + "\"";
533  if (verbose) clog << "! " << command << endl;
534  int status = system (command.c_str());
535  }
536  // -----------
537  if (clean) {
538  // -----------
539  string command = "/bin/rm -f " + filelist;
540  if (verbose) clog << "! " << command << endl;
541  int status = system (command.c_str());
542  }
543 }
544 // ----------------------------------------------------------------------------
545 // instanciation in library
546 // ----------------------------------------------------------------------------
547 #define _RHEOLEF_instanciation(T) \
548 template void basis_rep<Float>::put (ostream& os, reference_element hat_K) const; \
549 template void basis_rep<Float>::put_scalar_valued (ostream& os, reference_element hat_K) const; \
550 template void basis_rep<Float>::put_vector_valued (ostream& os, reference_element hat_K) const; \
551 template void basis_rep<Float>::put_hat_node (ostream& os, reference_element hat_K) const; \
552 template void basis_rep<Float>::put_hat_node_on_side ( \
553  std::ostream&, reference_element, const side_information_type&) const;
554 
556 
557 } // namespace rheolef
basis - finite element method
field::size_type size_type
Definition: branch.cc:430
see the Float page for the full documentation
see the point page for the full documentation
reference_element::size_type size_type
Definition: basis.h:214
void put_hat_node_on_side(std::ostream &os, reference_element hat_K, const side_information_type &sid) const
void put_hat_node(std::ostream &os, reference_element hat_K) const
virtual void put_vector_valued(std::ostream &os, reference_element hat_K) const
std::ostream & put(std::ostream &s, int d=3) const
Definition: point.h:388
see the reference_element page for the full documentation
const point_basic< Float > & vertex(size_type iloc) const
static const variant_type H
static const variant_type q
static const variant_type e
reference_element side(size_type loc_isid) const
size_type subgeo_size(size_type subgeo_dim, size_type loc_isid) const
static const variant_type p
variant_type variant() const
size_type subgeo_local_vertex(size_type subgeo_dim, size_type loc_isid, size_type loc_jsidvert) const
std::vector< int >::size_type size_type
size_type n_subgeo(size_type subgeo_dim) const
static const variant_type T
static const variant_type P
static const variant_type t
size_t size_type
Definition: basis_get.cc:76
point_basic< T >
Definition: piola_fem.h:135
rheolef::std value
#define error_macro(message)
Definition: dis_macros.h:49
Expr1::float_type T
Definition: field_expr.h:230
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
Float delta(Float f, Float g)
string command
Definition: mkgeo_ball.sh:136
void put(const Basis &b, ostream &os, reference_element hat_K)
void basis_on_pointset_evaluate(const Basis &b, const reference_element &hat_K, const Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > &hat_x, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &vdm)
size_type nnod(const basis_basic< T > &b, const geo_size &gs, size_type map_dim)
size_type ndof(const basis_basic< T > &b, const geo_size &gs, size_type map_dim)
This file is part of Rheolef.
void put(std::ostream &out, std::string name, const tiny_matrix< T > &a)
Definition: tiny_lu.h:155
void pointset_lagrange_equispaced(reference_element hat_K, size_t order_in, Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > &hat_xnod, size_t internal=0)
Definition: equispaced.icc:44
t operator()(const t &a, const t &b)
Definition: space.cc:386
T norm(const vec< T, M > &x)
norm(x): see the expression page for the full documentation
Definition: vec.h:387
void reference_element_barycenter(reference_element hat_K, point_basic< T > &c)
_RHEOLEF_instanciation(Float, sequential, std::allocator< Float >) _RHEOLEF_instanciation(Float
space_constant::valued_type valued_tag() const