Rheolef  7.1
an efficient C++ finite element environment
field.cc
Go to the documentation of this file.
1 #include "rheolef/field.h"
22 #include "rheolef/rheostream.h"
23 #include "rheolef/iorheo.h"
24 #include "rheolef/piola_util.h"
25 #include "rheolef/field_expr.h"
26 
27 namespace rheolef {
28 
29 // ---------------------------------------------------------------------------
30 // allocators
31 // ---------------------------------------------------------------------------
32 // TODO: DVT_EXPR_CTE_VEC : init_value as point or tensor
33 template <class T, class M>
35  const space_type& V,
36  const T& init_value)
37  : _V (V),
38  _u (),
39  _b (),
40  _dis_dof_indexes_requires_update(true),
41  _dis_dof_assembly_requires_update(true)
42 {
43  _u.resize (_V.iu_ownership(), init_value);
44  _b.resize (_V.ib_ownership(), init_value);
45 }
46 template <class T, class M>
47 void
49  const space_type& V,
50  const T& init_value)
51 {
52  if (_V == V) return;
53  _V = V;
54  _u.resize (_V.iu_ownership(), init_value);
55  _b.resize (_V.ib_ownership(), init_value);
56  dis_dof_indexes_requires_update();
57  dis_dof_assembly_requires_update();
58 }
59 // ---------------------------------------------------------------------------
60 // input
61 // ---------------------------------------------------------------------------
62 template <class T, class M>
63 static
64 void
65 get_field_recursive (
66  idiststream& ids,
67  vec<T,M>& u_io,
68  const space_constitution<T,M>& constit,
69  distributor::size_type& comp_start_dis_idof,
70  distributor::size_type& comp_start_ios_idof,
71  bool read_header = false)
72 {
73  using namespace std;
75  if (! constit.is_hierarchical()) {
76  // non-hierarchical case:
77  const space_scalar_constitution<T,M>& scalar_constit = constit.get_scalar();
78  size_type comp_dis_ndof = constit.dis_ndof();
79 #ifdef TODO
80  // conserve a copy of V[i_comp].ios_ownership()
81  const distributor& comp_ios_ownership = scalar_constit.ios_ownership();
82  size_type comp_ios_ndof = comp_ios_ownership.size();
83 #else // TODO
84  // recompute V[i_comp].ios_ownership() with comms and risks of errors
85  size_type comp_ios_ndof = constit.ios_ndof();
86  distributor comp_ios_ownership (comp_dis_ndof, ids.comm(), comp_ios_ndof);
87 #endif // TODO
88  if (read_header) {
89  check_macro (dis_scatch(ids, comp_ios_ownership.comm(), "\nfield"), "read field failed");
90  size_type version, dis_size1;
91  std::string geo_name, approx;
92  ids >> version >> dis_size1 >> geo_name >> approx;
93  // TODO: some checks here: geo.name, size, approx
94  }
95  vec<T,M> u_comp_io (comp_ios_ownership, std::numeric_limits<T>::max());
96  u_comp_io.get_values (ids);
97  size_type ios_ndof = u_io.size();
98  for (size_type comp_ios_idof = 0; comp_ios_idof < comp_ios_ndof; comp_ios_idof++) {
99  size_type ios_idof = comp_start_ios_idof + comp_ios_idof;
100  assert_macro (ios_idof < ios_ndof, "ios_idof="<<ios_idof<<" out of range [0:"<<ios_ndof<<"[");
101  u_io [ios_idof] = u_comp_io [comp_ios_idof];
102  }
103  comp_start_dis_idof += comp_dis_ndof;
104  comp_start_ios_idof += comp_ios_ndof;
105  return;
106  }
107  // hierarchical case:
108  typedef typename space_constitution<T,M>::hierarchy_type hier_t;
109  const hier_t& hier_constit = constit.get_hierarchy();
110  for (typename hier_t::const_iterator iter = hier_constit.begin(), last = hier_constit.end(); iter != last; ++iter) {
111  const space_constitution<T,M>& curr_constit = *iter;
112  get_field_recursive (ids, u_io, curr_constit, comp_start_dis_idof, comp_start_ios_idof, true);
113  }
114 }
115 // extern: defined in space_constitution_old_get.cc
116 template<class T, class M>
117 void space_constitution_old_get (idiststream& ids, space_constitution<T,M>& constit);
118 
119 template <class T, class M>
120 idiststream&
121 field_basic<T,M>::get (idiststream& ids)
122 {
123  using namespace std;
124  dis_dof_indexes_requires_update();
125  communicator comm = ids.comm();
126  if ( ! dis_scatch (ids, comm, "\nfield")) {
127  error_macro ("read field failed");
128  return ids;
129  }
131  ids >> version;
132  check_macro (version <= 3, "unexpected field version " << version);
133  space_constitution<T,M> constit;
134  std::string constit_name_input;
135  if (version == 1) {
136  // scalar case
137  size_type dis_size1;
138  std::string geo_name, approx;
139  ids >> dis_size1
140  >> geo_name
141  >> approx;
142  geo_type omega;
143  if (_V.get_geo().name() == geo_name) {
144  omega = _V.get_geo(); // reuse the previous mesh
145  } else {
146  omega = geo_type (geo_name); // load a new mesh
147  }
148  // TODO: get directly "P1" as a space_constitution by: "ids >> constit"; as for the version 2 format
149  constit = space_constitution<T,M>(omega, approx);
150  } else {
151  // version=2,3: multi-field header
152  // version == 2 : old format, hierarchical for vector & tensor valued fields
153  // version == 3 : new format, hierarchical for only heterogeneous fields based on spaces product
154  bool have_constit = false;
155  std::string label;
156  ids >> label;
157  check_macro (label == "header", "field file format version "<< version << ": \"header\" keyword not found");
158  while (ids.good()) {
159  ids >> label;
160  if (label == "end") {
161  break;
162  } else if (label == "size") {
163  size_type dummy_sz;
164  ids >> dummy_sz;
165  } else if (label == "constitution") {
166  ids >> constit_name_input;
167  std::istringstream istrstr (constit_name_input);
168  idiststream idiststrstr (istrstr);
169  if (version == 3) {
170  idiststrstr >> constit;
171  } else {
172  space_constitution_old_get (idiststrstr, constit);
173  }
174  have_constit = true;
175  } else {
176  error_macro ("unexpected field header member: \""<<label<<"\"");
177  }
178  }
179  ids >> label;
180  check_macro (label == "header", "field file format version "<< version << ": \"end header\" keyword not found");
181  check_macro (have_constit, "field file format version "<< version << ": \"constitution\" keyword not found");
182  }
183  // TODO: do not load mesh when we re-use _V: read only string constit and compare to _V.name()
184  if (!(_V.get_constitution() == constit)) {
185  // here cannot re-use _V: build a new space and resize the field
186  resize (space_type(constit));
187  }
188  size_type dis_ndof = _V.ownership().dis_size();
189  size_type my_proc = comm.rank();
190  size_type io_proc = ids.io_proc();
191  vec<T,M> u_io (_V.ios_ownership(), std::numeric_limits<T>::max());
192  vec<T,M> u_dof (_V.ownership(), std::numeric_limits<T>::max());
193  size_type comp_start_ios_idof = 0;
194  size_type comp_start_dis_idof = 0;
195  u_io.get_values (ids);
196  for (size_type ios_idof = 0, ios_ndof = _V.ios_ownership().size(); ios_idof < ios_ndof; ios_idof++) {
197  const T& value = u_io [ios_idof];
198  size_type dis_idof = _V.ios_idof2dis_idof (ios_idof);
199  u_dof.dis_entry (dis_idof) = value;
200  }
201  // here dispatch: communications:
202  u_dof.dis_entry_assembly();
203  // then copy vector into field (unknown, blocked) without comms
204  bool need_old2new_convert
205  = (version == 2
206  && constit.valued_tag() != space_constant::scalar
207  && constit.valued_tag() != space_constant::mixed);
208  if (!need_old2new_convert) {
209  for (size_type idof = 0, ndof = _V.ownership().size(); idof < ndof; idof++) {
210  dof(idof) = u_dof [idof];
211  }
212  return ids;
213  }
214  // automatically convert vector/tensor to version 3 by grouping components
215  std::string valued = constit.valued();
216  std::string approx = constit[0].get_basis().name();
217  std::string geo_name = constit.get_geo().name();
218  size_type n_comp = constit.size();
219  std::string new_constit_name_input = valued + "(" + approx + "){" + geo_name + "}";
220  std::istringstream new_istrstr (new_constit_name_input);
221  idiststream new_idiststrstr (new_istrstr);
222  space_constitution<T,M> new_constit;
223  new_idiststrstr >> new_constit;
224  resize (space_type(new_constit));
225  size_type ndof = u_dof.size();
226  size_type comp_ndof = ndof/n_comp;
227  // convert: new vector/tensor dof numbering have grouped components
228  for (size_type i_comp = 0; i_comp < n_comp; i_comp++) {
229  for (size_type comp_idof = 0; comp_idof < comp_ndof; comp_idof++) {
230  size_type new_idof = comp_idof*n_comp + i_comp;
231  size_type old_idof = i_comp*comp_ndof + comp_idof;
232  dof(new_idof) = u_dof [old_idof];
233  }
234  }
235  return ids;
236 }
237 // ---------------------------------------------------------------------------
238 // output
239 // ---------------------------------------------------------------------------
240 template <class T, class M>
241 static
242 void
243 put_field_recursive (
244  odiststream& ods,
245  const field_basic<T,M>& uh,
246  const space_constitution<T,M>& constit,
247  distributor::size_type& comp_start_idof,
248  distributor::size_type& comp_start_dis_idof,
249  bool write_header = false)
250 {
251  using namespace std;
253  if (! constit.is_hierarchical()) {
254  // non-hierarchical case:
255  // 1) merge distributed blocked and non-blocked and apply iso_dof permutation:
256  size_type comp_ndof = constit.ndof();
257  size_type comp_dis_ndof = constit.dis_ndof();
258  communicator comm = constit.comm();
259  const space_scalar_constitution<T,M>& scalar_constit = constit.get_scalar();
260  size_type io_proc = odiststream::io_proc();
261  size_type my_proc = comm.rank();
262  distributor comp_ios_ownership (comp_dis_ndof, comm, (my_proc == io_proc ? comp_dis_ndof : 0));
263  vec<T,M> comp_u_io (comp_ios_ownership, std::numeric_limits<T>::max());
264  for (size_type comp_idof = 0; comp_idof < comp_ndof; comp_idof++) {
265  size_type idof = comp_start_idof + comp_idof;
266  T value = uh.dof (idof);
267  size_type ios_dis_idof = uh.get_space().idof2ios_dis_idof (idof);
268  assert_macro (ios_dis_idof >= comp_start_dis_idof, "invalid comp ios index");
269  size_type comp_ios_dis_idof = ios_dis_idof - comp_start_dis_idof;
270  comp_u_io.dis_entry (comp_ios_dis_idof) = value;
271  }
272  comp_u_io.dis_entry_assembly();
273  // 2) then output the current field component
274  size_type old_prec = ods.os().precision();
275  ods << setprecision(std::numeric_limits<Float>::digits10);
276  if (write_header) {
277  ods << "field" << endl
278  << "1 " << comp_dis_ndof << endl
279  << scalar_constit.get_geo().name() << endl
280  << scalar_constit.get_basis().name() << endl
281  << endl;
282  }
283  ods << comp_u_io
284  << setprecision(old_prec);
285  comp_start_idof += comp_ndof;
286  comp_start_dis_idof += comp_dis_ndof;
287  if (comp_start_dis_idof != uh.dis_ndof()) {
288  ods << endl;
289  }
290  return;
291  }
292  // hierarchical case:
293  typedef typename space_constitution<T,M>::hierarchy_type hier_t;
294  const hier_t& hier_constit = constit.get_hierarchy();
295  for (typename hier_t::const_iterator iter = hier_constit.begin(), last = hier_constit.end(); iter != last; ++iter) {
296  const space_constitution<T,M>& curr_constit = *iter;
297  put_field_recursive (ods, uh, curr_constit, comp_start_idof, comp_start_dis_idof, false);
298  }
299 }
300 template <class T, class M>
301 odiststream&
303 {
304  using namespace std;
305  bool need_header = (get_space().get_constitution().is_hierarchical());
306  if (need_header) {
307  // multi-field header or non-equispaced node set
308  ods << "field" << endl
309  << "3" << endl
310  << "header" << endl
311  << " constitution " << get_space().get_constitution().name() << endl
312  << " size " << get_space().get_constitution().dis_ndof() << endl
313  << "end header" << endl
314  << endl;
315  } else {
316  // scalar-field header and equispaced node set
317  const space_scalar_constitution<T,M>& scalar_constit = get_space().get_constitution().get_scalar();
318  ods << "field" << endl
319  << "1 " << dis_ndof() << endl
320  << scalar_constit.get_geo().name() << endl
321  << scalar_constit.get_basis().name() << endl
322  << endl;
323  }
324  size_type comp_start_idof = 0;
325  size_type comp_start_dis_idof = 0;
326  put_field_recursive (ods, *this, get_space().get_constitution(), comp_start_idof, comp_start_dis_idof);
327  return ods;
328 }
329 // ----------------------------------------------------------------------------
330 // graphic output switch
331 // ----------------------------------------------------------------------------
332 // class-member template partial specialization 'field<T, M>::put(ods)' is not allowed
333 // here, we want to specialize for M=seq & M=dist since only seq graphic is vailable yet:
337 template <class T> odiststream& field_put_gmsh (odiststream&, const field_basic<T,sequential>&, std::string);
340 
341 // => use an intermediate class-function with full class specialization
342 template <class T, class M>
343 struct field_put {
344  odiststream& operator() (odiststream& ods, const field_basic<T, M>& uh) const {
345  return uh.put_field (ods);
346  }
347 };
348 // now, we can specialize the full class when M=seq:
349 template <class T>
350 struct field_put<T,sequential> {
351  odiststream& operator() (odiststream& ods, const field_basic<T,sequential>& uh) const
352  {
353  iorheo::flag_type format = iorheo::flags(ods.os()) & iorheo::format_field;
354  if (format [iorheo::gnuplot]) { return visu_gnuplot (ods,uh); }
355  if (format [iorheo::paraview]){ return visu_vtk_paraview (ods,uh); }
356  if (format [iorheo::gmsh]) { return visu_gmsh (ods,uh); }
357  // if (format [iorheo::gmsh]) { return field_put_gmsh (ods,uh,""); }
358  if (format [iorheo::gmsh_pos]){ return field_put_gmsh_pos(ods,uh); }
359  if (format [iorheo::bamg]) { return field_put_bamg_bb (ods,uh); }
360  return uh.put_field (ods);
361  }
362 };
363 // finally, the field::put member function uses the class-function
364 template <class T, class M>
367 {
368  field_put<T,M> put_fct;
369  return put_fct (ods, *this);
370 }
371 // ----------------------------------------------------------------------------
372 // access to non-local dofs
373 // ----------------------------------------------------------------------------
374 template <class T, class M>
375 const T&
377 {
379  if (_dis_dof_indexes_requires_update || _dis_dof_assembly_requires_update) {
380  size_type nproc = comm().size();
381  check_macro (nproc == 1, "field::dis_dof_update() need to be called before field::dis_dof(dis_idof)");
382  }
383  }
384  if (ownership().is_owned (dis_idof)) {
385  size_type first_idof = ownership().first_index ();
386  size_type idof = dis_idof - first_idof;
387  return dof (idof);
388  }
389  // here dis_idof is owned by another proc
390  space_pair_type blk_dis_iub = _V.data()._idof2blk_dis_iub.dis_at (dis_idof); // TODO: write a better access !
391  size_type dis_iub = blk_dis_iub.dis_iub();
392  const T& value = (! blk_dis_iub.is_blocked()) ? _u.dis_at (dis_iub) : _b.dis_at (dis_iub);
393  return value;
394 }
395 template <class T, class M>
398 {
399  dis_dof_assembly_requires_update();
400  const space_pair_type& blk_dis_iub = _V.data()._idof2blk_dis_iub.dis_at (dis_idof); // TODO: write a better access !
401  size_type dis_iub = blk_dis_iub.dis_iub();
402  if (! blk_dis_iub.is_blocked()) {
403  return _u.dis_entry (dis_iub);
404  } else {
405  return _b.dis_entry (dis_iub);
406  }
407 }
408 template <class T, class M>
409 void
411 {
412 #ifdef _RHEOLEF_HAVE_MPI
413  std::size_t nproc = ownership().comm().size();
414  if (is_distributed<M>::value && nproc > 1) {
415  std::size_t do_assembly = mpi::all_reduce (ownership().comm(), size_t(_dis_dof_assembly_requires_update), std::plus<std::size_t>());
416  std::size_t do_indexes = mpi::all_reduce (ownership().comm(), size_t(_dis_dof_indexes_requires_update), std::plus<std::size_t>());
417  if (do_assembly) {
418  _u.dis_entry_assembly();
419  _b.dis_entry_assembly();
420  }
421  if (do_indexes) {
422  _u.set_dis_indexes (_V.ext_iu_set());
423  _b.set_dis_indexes (_V.ext_ib_set());
424  }
425  }
426 #endif // _RHEOLEF_HAVE_MPI
427  _dis_dof_indexes_requires_update = false;
428  _dis_dof_assembly_requires_update = false;
429 }
430 // ----------------------------------------------------------------------------
431 // evaluation
432 // ----------------------------------------------------------------------------
433 template <class T, class M>
434 T
435 field_basic<T,M>::evaluate (const geo_element& K, const point_basic<T>& hat_x, size_type i_comp) const
436 {
437  const basis_basic<T>& b = _V.get_basis();
438  size_type loc_ndof = b.ndof (K.variant()) ;
439  std::vector<size_type> dis_idof1 (loc_ndof);
440  _V.dis_idof (K, dis_idof1);
441 
442  std::vector<T> dof (loc_ndof);
443  for (size_type loc_idof = 0; loc_idof < loc_ndof; loc_idof++) {
444  dof [loc_idof] = dis_dof (dis_idof1 [loc_idof]);
445  }
446  // WARNING: not efficient since it evaluate the hat_basis at each hat_x
447  // when hat_x is on a repetitive pattern, such as quadrature nodes or Lagrange basis nodes
448  // TODO: evaluate basis one time for all on hat_K
449  Eigen::Matrix<T,Eigen::Dynamic,1> b_value (loc_ndof);
450  b.evaluate (K, hat_x, b_value);
451 
452  T value = 0;
453  for (size_type loc_idof = 0; loc_idof < loc_ndof; loc_idof++) {
454  value += dof [loc_idof] * b_value[loc_idof]; // sum_i w_coef(i)*hat_phi(hat_x)
455  }
456  return value;
457 }
458 template <class T, class M>
459 T
461 {
462  dis_dof_update();
463  const geo_basic<T,M>& omega = _V.get_geo();
464  size_type dis_ie = omega.dis_locate (x);
465  check_macro (dis_ie != std::numeric_limits<size_type>::max(), "x="<<x<<" is outside the domain");
466  // only the proc owner of dis_ie compute the value; other procs are waiting for the value
467  T value = std::numeric_limits<T>::max();
468  size_type map_dim = omega.map_dimension();
469  const distributor& ownership = omega.geo_element_ownership(map_dim);
470  size_type ie_proc = ownership.find_owner(dis_ie);
471  size_type my_proc = ownership.comm().rank();
472  std::vector<size_type> dis_inod;
473  if (my_proc == ie_proc) {
474  size_type first_dis_ie = ownership.first_index();
475  size_type ie = dis_ie - first_dis_ie;
476  const geo_element& K = omega[ie];
477  omega.dis_inod (K, dis_inod);
478  point_basic<T> hat_x = inverse_piola_transformation (_V.get_geo(), K, dis_inod, x);
479  value = evaluate (K, hat_x, i_comp);
480  }
481 #ifdef _RHEOLEF_HAVE_MPI
483  mpi::broadcast (mpi::communicator(), value, ie_proc);
484  }
485 #endif // _RHEOLEF_HAVE_MPI
486  return value;
487 }
488 template <class T, class M>
491 {
492  fatal_macro ("dis_vector_evaluate: not yet");
493  return point_basic<T>();
494 }
495 // ----------------------------------------------------------------------------
496 // tensor component access: sigma_h(i,j)
497 // ----------------------------------------------------------------------------
498 template <class T, class M>
501 {
502  space_constant::coordinate_type sys_coord = get_geo().coordinate_system();
503  size_type ij_comp = space_constant::tensor_index (valued_tag(), sys_coord, i_comp, j_comp);
504  return field_component_const<T,M> (*this, ij_comp);
505 }
506 template <class T, class M>
509 {
510  space_constant::coordinate_type sys_coord = get_geo().coordinate_system();
511  size_type ij_comp = space_constant::tensor_index (valued_tag(), sys_coord, i_comp, j_comp);
512  return field_component<T,M> (*this, ij_comp);
513 }
514 // ----------------------------------------------------------------------------
515 // instanciation in library
516 // ----------------------------------------------------------------------------
517 #define _RHEOLEF_instanciation_base(T,M) \
518 template class field_basic<T,M>; \
519 template odiststream& operator<< (odiststream&, const field_basic<T,M>&);
520 
521 #ifdef TODO
522 #define _RHEOLEF_instanciation(T,M) \
523 _RHEOLEF_instanciation_base(T,M) \
524 _RHEOLEF_instanciation_base(std::complex<T>,M)
525 #else // TODO
526 #define _RHEOLEF_instanciation(T,M) \
527 _RHEOLEF_instanciation_base(T,M)
528 #endif // TODO
529 
530 _RHEOLEF_instanciation(Float,sequential)
531 #ifdef _RHEOLEF_HAVE_MPI
533 #endif // _RHEOLEF_HAVE_MPI
534 
535 } // namespace rheolef
rheolef::space_numbering::ndof
size_type ndof(const basis_basic< T > &b, const geo_size &gs, size_type map_dim)
Definition: space_numbering.cc:28
rheolef::space_scalar_constitution
Definition: space_constitution.h:148
rheolef::geo_basic< float_type, M >
rheolef::field_basic::get_space
const space_type & get_space() const
Definition: field.h:300
rheolef::space_constitution::ndof
size_type ndof() const
Definition: space_constitution.h:412
paraview
verbose clean transpose logscale grid shrink ball stereo iso volume skipvtk deformation fastfieldload lattice reader_on_stdin color format format format format format format format format format format format format format format format format format format format format format paraview
Definition: iorheo-members.h:125
rheolef::space_numbering::dis_ndof
size_type dis_ndof(const basis_basic< T > &b, const geo_size &gs, size_type map_dim)
Definition: space_numbering.cc:41
rheolef::point_basic
Definition: point.h:87
rheolef::field_basic::dis_vector_evaluate
point_basic< T > dis_vector_evaluate(const point_basic< T > &x) const
Definition: field.cc:490
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::space_constitution::is_hierarchical
bool is_hierarchical() const
Definition: space_constitution.h:432
rheolef::distributor::comm
const communicator_type & comm() const
Definition: distributor.h:145
rheolef::space_pair_type::is_blocked
bool is_blocked() const
Definition: space.h:125
mkgeo_ball.b
int b
Definition: mkgeo_ball.sh:152
rheolef::distributor::find_owner
size_type find_owner(size_type dis_i) const
find iproc associated to a global index dis_i: CPU=log(nproc)
Definition: distributor.cc:106
rheolef::_RHEOLEF_instanciation
_RHEOLEF_instanciation(Float, sequential, std::allocator< Float >) _RHEOLEF_instanciation(Float
rheolef::sequential
Definition: distributed.h:28
rheolef::valued_tag
space_constant::valued_type valued_tag() const
Definition: field_expr_recursive.h:579
rheolef::value
rheolef::std value
rheolef::field_component_const
Definition: field_component.h:143
rheolef::field_basic::evaluate
T evaluate(const geo_element &K, const point_basic< T > &hat_xq, size_type i_comp=0) const
Definition: field.cc:435
rheolef::space_basic< float_type, M >
rheolef::distributor
see the distributor page for the full documentation
Definition: distributor.h:62
rheolef-config.version
version
Definition: rheolef-config.in:126
rheolef::geo_element
see the geo_element page for the full documentation
Definition: geo_element.h:102
rheolef::visu_vtk_paraview
odiststream & visu_vtk_paraview(odiststream &, const field_basic< T, sequential > &)
Definition: field_seq_visu_vtk_paraview.cc:47
rheolef::space_constant::mixed
@ mixed
Definition: space_constant.h:142
rheolef::odiststream::os
std::ostream & os()
Definition: diststream.h:236
rheolef::size_type
size_t size_type
Definition: basis_get.cc:76
rheolef::space_numbering::dis_idof
void dis_idof(const basis_basic< T > &b, const geo_size &gs, const geo_element &K, typename std::vector< size_type >::iterator dis_idof_tab)
Definition: space_numbering.cc:187
rheolef::space_constitution::get_basis
const basis_basic< T > & get_basis() const
Definition: space_constitution.h:418
rheolef::geo_element::variant
variant_type variant() const
Definition: geo_element.h:161
rheolef::vec
see the vec page for the full documentation
Definition: vec.h:79
rheolef::field_basic::dis_dof
const T & dis_dof(size_type dis_idof) const
Definition: field.cc:376
rheolef::is_distributed
Definition: distributed.h:36
bamg
verbose clean transpose logscale grid shrink ball stereo iso volume skipvtk deformation fastfieldload lattice reader_on_stdin color format format bamg
Definition: iorheo-members.h:71
rheolef::field_basic::field_basic
field_basic()
Definition: field.h:608
rheolef::visu_gmsh
odiststream & visu_gmsh(odiststream &, const field_basic< T, sequential > &)
Definition: field_seq_visu_gmsh.cc:48
rheolef::field_basic::dis_dof_entry
dis_reference dis_dof_entry(size_type dis_idof)
Definition: field.cc:397
rheolef::basis_basic
Definition: basis.h:532
rheolef::field_basic::resize
void resize(const space_type &V, const T &init_value=std::numeric_limits< T >::max())
Definition: field.cc:48
rheolef::space_constant::scalar
@ scalar
Definition: space_constant.h:136
rheolef::field_basic::_V
space_type _V
Definition: field.h:403
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::odiststream::io_proc
static size_type io_proc()
Definition: diststream.cc:78
rheolef::field_basic::dis_dof_update
void dis_dof_update() const
Definition: field.cc:410
rheolef::space_scalar_constitution::get_basis
const basis_basic< T > & get_basis() const
Definition: space_constitution.h:170
gmsh
verbose clean transpose logscale grid shrink ball stereo iso volume skipvtk deformation fastfieldload lattice reader_on_stdin color format format format format format format gmsh
Definition: iorheo-members.h:83
assert_macro
#define assert_macro(ok_condition, message)
Definition: dis_macros.h:113
rheolef::space_scalar_constitution::get_geo
const geo_basic< T, M > & get_geo() const
Definition: space_constitution.h:168
rheolef::space_constitution::size
size_type size() const
Definition: space_constitution.h:455
rheolef::field_basic
Definition: field.h:235
rheolef::field_basic::dof
T & dof(size_type idof)
Definition: field.h:658
rheolef::field_basic::_b
vec< T, M > _b
Definition: field.h:405
rheolef::field_component
Definition: field_component.h:61
fatal_macro
#define fatal_macro(message)
Definition: dis_macros.h:33
rheolef::space_constitution::get_hierarchy
const hierarchy_type & get_hierarchy() const
Definition: space_constitution.h:453
rheolef::space_constitution_old_get
void space_constitution_old_get(idiststream &ids, space_constitution< T, M > &constit)
Definition: space_constitution_old_get.cc:86
rheolef::space_constant::tensor_index
size_type tensor_index(valued_type valued_tag, coordinate_type sys_coord, size_type i, size_type j)
Definition: space_constant.cc:181
gnuplot
verbose clean transpose logscale grid shrink ball stereo iso volume skipvtk deformation fastfieldload lattice reader_on_stdin color format format format format format format format format format format format format format format format format format format format gnuplot
Definition: iorheo-members.h:121
rheolef::space_pair_type
Definition: space.h:121
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
error_macro
#define error_macro(message)
Definition: dis_macros.h:49
rheolef::field_basic::put_field
odiststream & put_field(odiststream &ops) const
Definition: field.cc:302
rheolef::space_constitution::get_geo
const geo_basic< T, M > & get_geo() const
Definition: space_constitution.h:416
rheolef::odiststream
odiststream: see the diststream page for the full documentation
Definition: diststream.h:126
rheolef::space_numbering::dis_inod
void dis_inod(const basis_basic< T > &b, const geo_size &gs, const geo_element &K, typename std::vector< size_type >::iterator dis_inod_tab)
Definition: space_numbering.cc:177
Float
see the Float page for the full documentation
rheolef::space_constitution::valued_tag
const valued_type & valued_tag() const
Definition: space_constitution.h:451
rheolef::visu_gnuplot
odiststream & visu_gnuplot(odiststream &, const field_basic< T, sequential > &)
Definition: field_seq_visu_gnuplot.cc:461
mkgeo_grid.sys_coord
string sys_coord
Definition: mkgeo_grid.sh:171
rheolef::field_basic::dis_ndof
size_type dis_ndof() const
Definition: field.h:342
rheolef::point_basic< T >
point_basic< T >
Definition: piola_fem.h:135
rheolef::space_constitution::comm
communicator comm() const
Definition: space_constitution.h:415
rheolef::field_put_bamg_bb
odiststream & field_put_bamg_bb(odiststream &, const field_basic< T, sequential > &)
Definition: field_seq_put_bamg_bb.cc:41
rheolef::field_basic::_u
vec< T, M > _u
Definition: field.h:404
rheolef::field_put_gmsh
odiststream & field_put_gmsh(odiststream &, const field_basic< T, sequential > &, std::string)
Definition: field_seq_put_gmsh.cc:46
rheolef::space_constitution::hierarchy_type
rep::hierarchy_type hierarchy_type
Definition: space_constitution.h:389
size_type
field::size_type size_type
Definition: branch.cc:425
rheolef::space_pair_type::dis_iub
size_type dis_iub() const
Definition: space.h:126
rheolef::field_basic::operator()
field_component< T, M > operator()(size_type i_comp, size_type j_comp)
Definition: field.cc:508
rheolef::field_put_gmsh_pos
odiststream & field_put_gmsh_pos(odiststream &, const field_basic< T, sequential > &)
Definition: field_seq_put_gmsh_pos.cc:171
rheolef::distributor::first_index
size_type first_index(size_type iproc) const
global index range and local size owned by ip-th process
Definition: distributor.h:151
get_geo
void get_geo(istream &in, my_geo &omega)
Definition: field2gmsh_pos.cc:126
mkgeo_ball.map_dim
map_dim
Definition: mkgeo_ball.sh:337
rheolef::field_basic::dis_evaluate
T dis_evaluate(const point_basic< T > &x, size_type i_comp=0) const
Definition: field.cc:460
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::space_constitution::valued
const std::string & valued() const
Definition: space_constitution.h:452
rheolef::space_constitution::ios_ndof
size_type ios_ndof() const
Definition: space_constitution.h:414
rheolef::distributed
distributed
Definition: asr.cc:228
rheolef::field_basic::put
odiststream & put(odiststream &ops) const
Definition: field.cc:366
rheolef::dis_scatch
bool dis_scatch(idiststream &ips, const communicator &comm, std::string ch)
distributed version of scatch(istream&,string)
Definition: diststream.cc:43
rheolef::field_basic::get
idiststream & get(idiststream &ips)
Definition: field.cc:121
rheolef::space_constitution::dis_ndof
size_type dis_ndof() const
Definition: space_constitution.h:413
rheolef::space_constant::coordinate_type
coordinate_type
Definition: space_constant.h:121
rheolef::std
Definition: vec_expr_v2.h:402
rheolef::distributor::size_type
std::allocator< int >::size_type size_type
Definition: distributor.h:67
gmsh_pos
verbose clean transpose logscale grid shrink ball stereo iso volume skipvtk deformation fastfieldload lattice reader_on_stdin color format format format format format format format gmsh_pos
Definition: iorheo-members.h:85
rheolef::distributor::size
size_type size(size_type iproc) const
Definition: distributor.h:163
rheolef::space_constitution
Definition: space_constitution.h:381
rheolef::field_basic::size_type
std::size_t size_type
Definition: field.h:239
rheolef::field_basic::dis_reference
typename vec< T, M >::dis_reference dis_reference
Definition: field.h:249
T
Expr1::float_type T
Definition: field_expr.h:261
rheolef::space_constitution::get_scalar
const space_scalar_constitution< T, M > & get_scalar() const
Definition: space_constitution.h:443