https://mooseframework.inl.gov
Functions
SolutionStateData.C File Reference

Go to the source code of this file.

Functions

template<>
void dataStore (std::ostream &stream, Moose::MFEM::SolutionState &, void *context)
 
template<>
void dataLoad (std::istream &stream, Moose::MFEM::SolutionState &, void *context)
 

Function Documentation

◆ dataLoad()

template<>
void dataLoad ( std::istream &  stream,
Moose::MFEM::SolutionState ,
void context 
)

Definition at line 77 of file SolutionStateData.C.

78 {
79  auto * const data = static_cast<MFEMProblemData *>(context);
80 
81  int num_gridfunctions = 0;
82  dataLoad(stream, num_gridfunctions, context);
83  for (int i = 0; i < num_gridfunctions; ++i)
84  {
85  std::string name;
86  dataLoad(stream, name, context);
87  auto & gf = data->gridfunctions.GetRef(name);
88  loadGridFunction(stream, gf, context);
89  }
90 
91  int num_complex_gridfunctions = 0;
92  dataLoad(stream, num_complex_gridfunctions, context);
93  for (int i = 0; i < num_complex_gridfunctions; ++i)
94  {
95  std::string name;
96  dataLoad(stream, name, context);
97  auto & gf = data->cmplx_gridfunctions.GetRef(name);
98  loadGridFunction(stream, gf.real(), context);
99  loadGridFunction(stream, gf.imag(), context);
100  }
101 }
std::string name(const ElemQuality q)
Base problem data struct.
void dataLoad(std::istream &stream, Moose::MFEM::SolutionState &, void *context)

◆ dataStore()

template<>
void dataStore ( std::ostream &  stream,
Moose::MFEM::SolutionState ,
void context 
)

Definition at line 51 of file SolutionStateData.C.

52 {
53  auto * const data = static_cast<MFEMProblemData *>(context);
54 
55  auto num_gridfunctions = data->gridfunctions.size();
56  dataStore(stream, num_gridfunctions, context);
57  for (const auto & [name, gridfunction] : data->gridfunctions)
58  {
59  auto stored_name = name;
60  dataStore(stream, stored_name, context);
61  storeGridFunction(stream, *gridfunction, context);
62  }
63 
64  auto num_complex_gridfunctions = data->cmplx_gridfunctions.size();
65  dataStore(stream, num_complex_gridfunctions, context);
66  for (const auto & [name, gridfunction] : data->cmplx_gridfunctions)
67  {
68  auto stored_name = name;
69  dataStore(stream, stored_name, context);
70  storeGridFunction(stream, gridfunction->real(), context);
71  storeGridFunction(stream, gridfunction->imag(), context);
72  }
73 }
std::string name(const ElemQuality q)
Base problem data struct.
void dataStore(std::ostream &stream, Moose::MFEM::SolutionState &, void *context)
int size()
Returns the number of elements in the map.
Moose::MFEM::GridFunctions gridfunctions