https://mooseframework.inl.gov
DataIO.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "DenseMatrix.h"
11 #include "DataIO.h"
12 #include "MooseMesh.h"
13 #include "FEProblemBase.h"
14 #include "NonlinearSystemBase.h"
15 
16 #include "libmesh/vector_value.h"
17 #include "libmesh/tensor_value.h"
18 #include "libmesh/fe_type.h"
19 
20 #include "libmesh/elem.h"
21 #include "libmesh/petsc_vector.h"
22 #include "libmesh/enum_solver_package.h"
23 #include "libmesh/petsc_solver_exception.h"
24 
25 using namespace libMesh;
26 
27 template <>
28 void
29 dataStore(std::ostream & stream, Real & v, void * /*context*/)
30 {
31  stream.write((char *)&v, sizeof(v));
32 }
33 
34 template <>
35 void
36 dataStore(std::ostream & stream, std::string & v, void * /*context*/)
37 {
38  // Write the size of the string
39  unsigned int size = v.size();
40  stream.write((char *)&size, sizeof(size));
41 
42  // Write the string (Do not store the null byte)
43  stream.write(v.c_str(), sizeof(char) * size);
44 }
45 
46 template <>
47 void
48 dataStore(std::ostream & stream, VariableName & v, void * context)
49 {
50  auto & name = static_cast<std::string &>(v);
51  dataStore(stream, name, context);
52 }
53 
54 template <>
55 void
56 dataStore(std::ostream & stream, UserObjectName & v, void * context)
57 {
58  auto & name = static_cast<std::string &>(v);
59  dataStore(stream, name, context);
60 }
61 
62 template <>
63 void
64 dataStore(std::ostream & stream, bool & v, void * /*context*/)
65 {
66  stream.write((char *)&v, sizeof(v));
67 }
68 
69 template <>
70 void
71 dataStore(std::ostream & stream, FEType & v, void * context)
72 {
73  auto order = v.order.get_order();
74  dataStore(stream, order, context);
75 
76  auto family = v.family;
77  dataStore(stream, family, context);
78 
79 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
80  auto radial_order = v.radial_order.get_order();
81  dataStore(stream, radial_order, context);
82 
83  auto radial_family = v.radial_family;
84  dataStore(stream, radial_family, context);
85 
86  auto inf_map = v.inf_map;
87  dataStore(stream, inf_map, context);
88 #endif
89 
90  auto p_refinement = v.p_refinement;
91  dataStore(stream, p_refinement, context);
92 }
93 
94 template <>
95 void
96 dataStore(std::ostream & stream, std::vector<bool> & v, void * context)
97 {
98  for (bool b : v)
99  dataStore(stream, b, context);
100 }
101 
102 template <>
103 void
104 dataStore(std::ostream & stream, RankTwoTensor & rtt, void * context)
105 {
106  dataStore(stream, rtt._coords, context);
107 }
108 
109 template <>
110 void
111 dataStore(std::ostream & stream, RankThreeTensor & rtht, void * context)
112 {
113  dataStore(stream, rtht._vals, context);
114 }
115 
116 template <>
117 void
118 dataStore(std::ostream & stream, RankFourTensor & rft, void * context)
119 {
120  dataStore(stream, rft._vals, context);
121 }
122 
123 template <>
124 void
125 dataStore(std::ostream & stream, ADReal & dn, void * context)
126 {
127  dataStore(stream, dn.value(), context);
128 
129  if (ADReal::do_derivatives)
130  {
131  auto & derivatives = dn.derivatives();
132  std::size_t size = derivatives.size();
133  dataStore(stream, size, context);
134  for (MooseIndex(size) i = 0; i < size; ++i)
135  {
136  dataStore(stream, derivatives.raw_index(i), context);
137  dataStore(stream, derivatives.raw_at(i), context);
138  }
139  }
140 }
141 
142 template <>
143 void
144 dataStore(std::ostream & stream, const Elem *& e, void * context)
145 {
146  // TODO: Write out the unique ID of this elem
148 
149  if (e)
150  {
151  id = e->id();
153  mooseError("Can't output Elems with invalid ids!");
154  }
155 
156  storeHelper(stream, id, context);
157 }
158 
159 template <>
160 void
161 dataStore(std::ostream & stream, const Node *& n, void * context)
162 {
163  // TODO: Write out the unique ID of this node
165 
166  if (n)
167  {
168  id = n->id();
170  mooseError("Can't output Nodes with invalid ids!");
171  }
172 
173  storeHelper(stream, id, context);
174 }
175 
176 template <>
177 void
178 dataStore(std::ostream & stream, Elem *& e, void * context)
179 {
180  // TODO: Write out the unique ID of this elem
182 
183  if (e)
184  {
185  id = e->id();
187  mooseError("Can't output Elems with invalid ids!");
188  }
189 
190  storeHelper(stream, id, context);
191 }
192 
193 template <>
194 void
195 dataStore(std::ostream & stream, Node *& n, void * context)
196 {
197  // TODO: Write out the unique ID of this node
199 
200  if (n)
201  {
202  id = n->id();
204  mooseError("Can't output Nodes with invalid ids!");
205  }
206 
207  storeHelper(stream, id, context);
208 }
209 
210 template <>
211 void
212 dataStore(std::ostream & stream, std::stringstream & s, void * /* context */)
213 {
214  const std::string & s_str = s.str();
215 
216  size_t s_size = s_str.size();
217  stream.write((char *)&s_size, sizeof(s_size));
218 
219  stream.write(s_str.c_str(), sizeof(char) * (s_str.size()));
220 }
221 
222 #ifdef MOOSE_LIBTORCH_ENABLED
223 template <>
224 void
225 dataStore(std::ostream & stream, torch::Tensor & t, void * context)
226 {
227  const auto tensor = LibtorchUtils::toCPUContiguous(t);
228  mooseAssert(tensor.scalar_type() == at::kDouble,
229  "Restart storage currently supports only double tensors.");
230 
231  auto rank = cast_int<unsigned int>(tensor.dim());
232  dataStore(stream, rank, nullptr);
233  for (unsigned int dim = 0; dim < rank; ++dim)
234  {
235  auto size = cast_int<unsigned int>(tensor.sizes()[dim]);
236  dataStore(stream, size, nullptr);
237  }
238 
239  const auto flattened = tensor.reshape({tensor.numel()});
240  const auto t_accessor = flattened.accessor<Real, 1>();
241  for (int64_t i = 0; i < flattened.numel(); ++i)
242  {
243  Real r = t_accessor[i];
244  dataStore(stream, r, context);
245  }
246 }
247 #endif
248 
249 template <typename T>
250 void
251 dataStore(std::ostream & stream, TensorValue<T> & v, void * context)
252 {
253  for (const auto i : make_range(Moose::dim))
254  for (const auto j : make_range(Moose::dim))
255  {
256  T r = v(i, j);
257  dataStore(stream, r, context);
258  }
259 }
260 
261 template void dataStore(std::ostream & stream, TensorValue<Real> & v, void * context);
262 template void dataStore(std::ostream & stream, TensorValue<ADReal> & v, void * context);
263 
264 template <typename T>
265 void
266 dataStore(std::ostream & stream, DenseMatrix<T> & v, void * context)
267 {
268  unsigned int m = v.m();
269  unsigned int n = v.n();
270  stream.write((char *)&m, sizeof(m));
271  stream.write((char *)&n, sizeof(n));
272  for (unsigned int i = 0; i < m; i++)
273  for (unsigned int j = 0; j < n; j++)
274  {
275  T r = v(i, j);
276  dataStore(stream, r, context);
277  }
278 }
279 
280 template void dataStore(std::ostream & stream, DenseMatrix<Real> & v, void * context);
281 template void dataStore(std::ostream & stream, DenseMatrix<ADReal> & v, void * context);
282 
283 template <typename T>
284 void
285 dataStore(std::ostream & stream, VectorValue<T> & v, void * context)
286 {
287  // Obviously if someone loads data with different LIBMESH_DIM than was used for saving them, it
288  // won't work.
289  for (const auto i : make_range(Moose::dim))
290  {
291  T r = v(i);
292  dataStore(stream, r, context);
293  }
294 }
295 
296 template void dataStore(std::ostream & stream, VectorValue<Real> & v, void * context);
297 template void dataStore(std::ostream & stream, VectorValue<ADReal> & v, void * context);
298 
299 void
300 dataStore(std::ostream & stream, Point & p, void * context)
301 {
302  for (const auto i : make_range(Moose::dim))
303  {
304  Real r = p(i);
305  dataStore(stream, r, context);
306  }
307 }
308 
309 template <>
310 void
311 dataStore(std::ostream & stream, libMesh::Parameters & p, void * context)
312 {
313  // First store the size of the map
314  unsigned int size = p.n_parameters();
315  stream.write((char *)&size, sizeof(size));
316 
317  auto it = p.begin();
318  auto end = p.end();
319 
320  for (; it != end; ++it)
321  {
322  auto & key = const_cast<std::string &>(it->first);
323  auto type = it->second->type();
324 
325  storeHelper(stream, key, context);
326  storeHelper(stream, type, context);
327 
328 #define storescalar(ptype) \
329  else if (it->second->type() == demangle(typeid(ptype).name())) storeHelper( \
330  stream, \
331  (dynamic_cast<libMesh::Parameters::Parameter<ptype> *>(MooseUtils::get(it->second)))->get(), \
332  context)
333 
334  if (false)
335  ;
336  storescalar(Real);
337  storescalar(short);
338  storescalar(int);
339  storescalar(long);
340  storescalar(unsigned short);
341  storescalar(unsigned int);
342  storescalar(unsigned long);
343 
344 #undef storescalar
345  }
346 }
347 
348 template <>
349 void
350 dataStore(std::ostream & stream,
351  std::unique_ptr<libMesh::NumericVector<Number>> & v,
352  void * context)
353 {
354  // Classes may declare unique pointers to vectors as restartable data and never actually create
355  // vector instances. This happens for example in the `TimeIntegrator` class where subvector
356  // instances are only created if multiple time integrators are present
357  bool have_vector = v.get();
358  dataStore(stream, have_vector, context);
359  if (!have_vector)
360  return;
361 
362  mooseAssert(context, "Needs a context of the communicator");
363  const auto & comm = *static_cast<const libMesh::Parallel::Communicator *>(context);
364  mooseAssert(&comm == &v->comm(), "Inconsistent communicator");
365 
366  if (v->type() == GHOSTED)
367  mooseError("Cannot store ghosted numeric vectors");
368 
369  // Store the communicator size for sanity checking later
370  unsigned int comm_size = comm.size();
371  dataStore(stream, comm_size, nullptr);
372 
373  // Store the solver package so that we know what vector type to construct
374  libMesh::SolverPackage solver_package;
375  if (dynamic_cast<libMesh::PetscVector<Number> *>(v.get()))
376  solver_package = PETSC_SOLVERS;
377  else
378  mooseError("Can only store unique_ptrs of PetscVectors");
379  int solver_package_int = solver_package;
380  dataStore(stream, solver_package_int, nullptr);
381 
382  // Store the sizes
383  dof_id_type size = v->size();
384  dataStore(stream, size, nullptr);
385  dof_id_type local_size = v->local_size();
386  dataStore(stream, local_size, nullptr);
387 
388  // Store the vector itself
389  dataStore(stream, *v, nullptr);
390 }
391 
392 // global load functions
393 
394 template <>
395 void
396 dataLoad(std::istream & stream, Real & v, void * /*context*/)
397 {
398  stream.read((char *)&v, sizeof(v));
399 }
400 
401 template <>
402 void
403 dataLoad(std::istream & stream, std::string & v, void * /*context*/)
404 {
405  // Read the size of the string
406  unsigned int size = 0;
407  stream.read((char *)&size, sizeof(size));
408 
409  // Resize the string data
410  v.resize(size);
411 
412  // Read the string
413  stream.read(&v[0], sizeof(char) * size);
414 }
415 
416 template <>
417 void
418 dataLoad(std::istream & stream, VariableName & v, void * context)
419 {
420  auto & name = static_cast<std::string &>(v);
421  dataLoad(stream, name, context);
422 }
423 
424 template <>
425 void
426 dataLoad(std::istream & stream, UserObjectName & v, void * context)
427 {
428  auto & name = static_cast<std::string &>(v);
429  dataLoad(stream, name, context);
430 }
431 
432 template <>
433 void
434 dataLoad(std::istream & stream, bool & v, void * /*context*/)
435 {
436  stream.read((char *)&v, sizeof(v));
437 }
438 
439 template <>
440 void
441 dataLoad(std::istream & stream, FEType & v, void * context)
442 {
443  int order = 0;
444  dataLoad(stream, order, context);
445  v.order = order;
446 
447  dataLoad(stream, v.family, context);
448 
449 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
450  int radial_order = 0;
451  dataLoad(stream, radial_order, context);
452  v.radial_order = radial_order;
453 
454  dataLoad(stream, v.radial_family, context);
455  dataLoad(stream, v.inf_map, context);
456 #endif
457 
458  dataLoad(stream, v.p_refinement, context);
459 }
460 
461 template <>
462 void
463 dataLoad(std::istream & stream, std::vector<bool> & v, void * context)
464 {
465  for (bool b : v)
466  dataLoad(stream, b, context);
467 }
468 
469 template <>
470 void
471 dataLoad(std::istream & stream, ADReal & dn, void * context)
472 {
473  dataLoad(stream, dn.value(), context);
474 
475  if (ADReal::do_derivatives)
476  {
477  auto & derivatives = dn.derivatives();
478  std::size_t size = 0;
479  stream.read((char *)&size, sizeof(size));
480  derivatives.resize(size);
481 
482  for (MooseIndex(derivatives) i = 0; i < derivatives.size(); ++i)
483  {
484  dataLoad(stream, derivatives.raw_index(i), context);
485  dataLoad(stream, derivatives.raw_at(i), context);
486  }
487  }
488 }
489 
490 template <>
491 void
492 dataLoad(std::istream & stream, const Elem *& e, void * context)
493 {
494  if (!context)
495  mooseError("Can only load Elem objects using a MooseMesh context!");
496 
497  MooseMesh * mesh = static_cast<MooseMesh *>(context);
498 
499  // TODO: Write out the unique ID of this element
501 
502  loadHelper(stream, id, context);
503 
505  e = mesh->elemPtr(id);
506  else
507  e = NULL;
508 }
509 
510 template <>
511 void
512 dataLoad(std::istream & stream, const Node *& n, void * context)
513 {
514  if (!context)
515  mooseError("Can only load Node objects using a MooseMesh context!");
516 
517  MooseMesh * mesh = static_cast<MooseMesh *>(context);
518 
519  // TODO: Write out the unique ID of this nodeent
521 
522  loadHelper(stream, id, context);
523 
525  n = mesh->nodePtr(id);
526  else
527  n = NULL;
528 }
529 
530 template <>
531 void
532 dataLoad(std::istream & stream, Elem *& e, void * context)
533 {
534  if (!context)
535  mooseError("Can only load Elem objects using a MooseMesh context!");
536 
537  MooseMesh * mesh = static_cast<MooseMesh *>(context);
538 
539  // TODO: Write out the unique ID of this element
541 
542  loadHelper(stream, id, context);
543 
545  e = mesh->elemPtr(id);
546  else
547  e = NULL;
548 }
549 
550 template <>
551 void
552 dataLoad(std::istream & stream, Node *& n, void * context)
553 {
554  if (!context)
555  mooseError("Can only load Node objects using a MooseMesh context!");
556 
557  MooseMesh * mesh = static_cast<MooseMesh *>(context);
558 
559  // TODO: Write out the unique ID of this nodeent
561 
562  loadHelper(stream, id, context);
563 
565  n = mesh->nodePtr(id);
566  else
567  n = NULL;
568 }
569 
570 template <>
571 void
572 dataLoad(std::istream & stream, std::stringstream & s, void * /* context */)
573 {
574  size_t s_size = 0;
575  stream.read((char *)&s_size, sizeof(s_size));
576 
577  std::unique_ptr<char[]> s_s = std::make_unique<char[]>(s_size);
578  stream.read(s_s.get(), s_size);
579 
580  // Clear the stringstream before loading new data into it.
581  s.str(std::string());
582  s.write(s_s.get(), s_size);
583 }
584 
585 #ifdef MOOSE_LIBTORCH_ENABLED
586 template <>
587 void
588 dataLoad(std::istream & stream, torch::Tensor & t, void * context)
589 {
590  unsigned int rank = 0;
591  dataLoad(stream, rank, nullptr);
592 
593  std::vector<int64_t> sizes(rank);
594  for (unsigned int dim = 0; dim < rank; ++dim)
595  {
596  unsigned int size = 0;
597  dataLoad(stream, size, nullptr);
598  sizes[dim] = size;
599  }
600 
601  t = torch::empty(sizes, at::kDouble);
602  auto flattened = t.reshape({t.numel()});
603  auto t_accessor = flattened.accessor<Real, 1>();
604  for (int64_t i = 0; i < flattened.numel(); ++i)
605  {
606  Real r = 0;
607  dataLoad(stream, r, context);
608  t_accessor[i] = r;
609  }
610 }
611 #endif
612 
613 template <typename T>
614 void
615 dataLoad(std::istream & stream, TensorValue<T> & v, void * context)
616 {
617  // Obviously if someone loads data with different LIBMESH_DIM than was used for saving them, it
618  // won't work.
619  for (const auto i : make_range(Moose::dim))
620  for (const auto j : make_range(Moose::dim))
621  {
622  T r = 0;
623  dataLoad(stream, r, context);
624  v(i, j) = r;
625  }
626 }
627 
628 template void dataLoad(std::istream & stream, TensorValue<Real> & v, void * context);
629 template void dataLoad(std::istream & stream, TensorValue<ADReal> & v, void * context);
630 
631 template <typename T>
632 void
633 dataLoad(std::istream & stream, DenseMatrix<T> & v, void * context)
634 {
635  unsigned int m = 0, n = 0;
636  stream.read((char *)&m, sizeof(m));
637  stream.read((char *)&n, sizeof(n));
638  v.resize(m, n);
639  for (unsigned int i = 0; i < m; i++)
640  for (unsigned int j = 0; j < n; j++)
641  {
642  T r = 0;
643  dataLoad(stream, r, context);
644  v(i, j) = r;
645  }
646 }
647 
648 template void dataLoad(std::istream & stream, DenseMatrix<Real> & v, void * context);
649 template void dataLoad(std::istream & stream, DenseMatrix<ADReal> & v, void * context);
650 
651 template <typename T>
652 void
653 dataLoad(std::istream & stream, VectorValue<T> & v, void * context)
654 {
655  // Obviously if someone loads data with different LIBMESH_DIM than was used for saving them, it
656  // won't work.
657  for (const auto i : make_range(Moose::dim))
658  {
659  T r = 0;
660  dataLoad(stream, r, context);
661  v(i) = r;
662  }
663 }
664 
665 template void dataLoad(std::istream & stream, VectorValue<Real> & v, void * context);
666 template void dataLoad(std::istream & stream, VectorValue<ADReal> & v, void * context);
667 
668 void
669 dataLoad(std::istream & stream, Point & p, void * context)
670 {
671  for (const auto i : make_range(Moose::dim))
672  {
673  Real r = 0;
674  dataLoad(stream, r, context);
675  p(i) = r;
676  }
677 }
678 
679 template <>
680 void
681 dataLoad(std::istream & stream, libMesh::Parameters & p, void * context)
682 {
683  p.clear();
684 
685  // First read the size of the map
686  unsigned int size = 0;
687  stream.read((char *)&size, sizeof(size));
688 
689  for (unsigned int i = 0; i < size; i++)
690  {
691  std::string key, type;
692  loadHelper(stream, key, context);
693  loadHelper(stream, type, context);
694 
695 #define loadscalar(ptype) \
696  else if (type == demangle(typeid(ptype).name())) do \
697  { \
698  ptype & value = p.set<ptype>(key); \
699  loadHelper(stream, value, context); \
700  } \
701  while (0)
702 
703  if (false)
704  ;
705  loadscalar(Real);
706  loadscalar(short);
707  loadscalar(int);
708  loadscalar(long);
709  loadscalar(unsigned short);
710  loadscalar(unsigned int);
711  loadscalar(unsigned long);
712 
713 #undef loadscalar
714  }
715 }
716 
717 template <>
718 void
719 dataLoad(std::istream & stream, std::unique_ptr<libMesh::NumericVector<Number>> & v, void * context)
720 {
721  bool have_vector;
722  dataLoad(stream, have_vector, context);
723 
724  if (!have_vector)
725  return;
726 
727  mooseAssert(context, "Needs a context of the communicator");
728  const auto & comm = *static_cast<const libMesh::Parallel::Communicator *>(context);
729  if (v)
730  mooseAssert(&comm == &v->comm(), "Inconsistent communicator");
731 
732  // Load the communicator size for consistency checks
733  unsigned int comm_size;
734  dataLoad(stream, comm_size, nullptr);
735  mooseAssert(comm.size() == comm_size, "Inconsistent communicator size");
736 
737  // Load the solver package to build the vector
738  int solver_package_int;
739  dataLoad(stream, solver_package_int, nullptr);
740  libMesh::SolverPackage solver_package = static_cast<libMesh::SolverPackage>(solver_package_int);
741 
742  // Load the sizes
743  dof_id_type size, local_size;
744  dataLoad(stream, size, nullptr);
745  dataLoad(stream, local_size, nullptr);
746 
747  // Construct the vector given the type, only if we need to. v could be non-null here
748  // if we're advancing back and loading a backup
749  if (!v)
750  {
751  v = NumericVector<Number>::build(comm, solver_package);
752  v->init(size, local_size);
753  }
754  else
755  mooseAssert(v->type() != GHOSTED, "Cannot be ghosted");
756 
757  // Make sure that the sizes are consistent; this will happen if we're calling this
758  // on a vector that has already been loaded previously
759  mooseAssert(v->size() == size, "Inconsistent size");
760  mooseAssert(v->local_size() == local_size, "Inconsistent local size");
761 
762  // Now that we have an initialized vector, fill the entries
763  dataLoad(stream, *v, nullptr);
764 }
765 
766 template <>
767 void
768 dataLoad(std::istream & stream, Vec & v, void * context)
769 {
770  PetscInt local_size;
771  LibmeshPetscCallA(PETSC_COMM_WORLD, VecGetLocalSize(v, &local_size));
772  PetscScalar * array;
773  LibmeshPetscCallA(PETSC_COMM_WORLD, VecGetArray(v, &array));
774  for (PetscInt i = 0; i < local_size; i++)
775  dataLoad(stream, array[i], context);
776 
777  LibmeshPetscCallA(PETSC_COMM_WORLD, VecRestoreArray(v, &array));
778 }
779 
780 template <>
781 void
782 dataStore(std::ostream & stream, Vec & v, void * context)
783 {
784  PetscInt local_size;
785  LibmeshPetscCallA(PETSC_COMM_WORLD, VecGetLocalSize(v, &local_size));
786  PetscScalar * array;
787  LibmeshPetscCallA(PETSC_COMM_WORLD, VecGetArray(v, &array));
788  for (PetscInt i = 0; i < local_size; i++)
789  dataStore(stream, array[i], context);
790 
791  LibmeshPetscCallA(PETSC_COMM_WORLD, VecRestoreArray(v, &array));
792 }
std::string name(const ElemQuality q)
RankFourTensorTempl is designed to handle any N-dimensional fourth order tensor, C.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
OrderWrapper radial_order
torch::Tensor toCPUContiguous(const torch::Tensor &tensor)
Return a detached contiguous CPU copy of a tensor.
MeshBase & mesh
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:165
OrderWrapper order
unsigned int m() const
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
T _coords[LIBMESH_DIM *LIBMESH_DIM]
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:42
RankThreeTensor is designed to handle any N-dimensional third order tensor, r.
void storeHelper(std::ostream &stream, P &data, void *context)
Scalar helper routine.
Definition: DataIO.h:965
dof_id_type id() const
static constexpr dof_id_type invalid_id
void dataLoad(std::istream &stream, Real &v, void *)
Definition: DataIO.C:396
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:94
T _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
InfMapType inf_map
T _vals[N4]
The values of the rank-four tensor stored by index=(((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) * LIBME...
FEFamily radial_family
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void clear()
void resize(const unsigned int new_m, const unsigned int new_n)
IntRange< T > make_range(T beg, T end)
static std::unique_ptr< NumericVector< T > > build(const Parallel::Communicator &comm, SolverPackage solver_package=libMesh::default_solver_package(), ParallelType parallel_type=AUTOMATIC)
std::size_t n_parameters() const
unsigned int n() const
void loadHelper(std::istream &stream, P &data, void *context)
Scalar helper routine.
Definition: DataIO.h:1057
void dataStore(std::ostream &stream, Real &v, void *)
Definition: DataIO.C:29
uint8_t dof_id_type