Wrapper class that owns a libMesh EquationSystem and adds advanced restart capability to it. More...
#include <RestartableEquationSystems.h>
Classes | |
struct | EquationSystemsHeader |
Represents a stored EquationSystems in restart. More... | |
struct | SystemHeader |
Represents a stored system in restart. More... | |
struct | VariableHeader |
Represents a stored variable in restart. More... | |
struct | VectorHeader |
Represents a stored variable in restart. More... | |
Public Member Functions | |
RestartableEquationSystems (libMesh::MeshBase &mesh) | |
void | store (std::ostream &stream) const |
Stores the EquationSystems to the given stream. More... | |
void | load (std::istream &stream) |
Loads the EquationSystems from the given stream. More... | |
void | setLoadAllVectors (const bool load_all_vectors) |
Sets whether or not all vectors are to be loaded. More... | |
libMesh::EquationSystems & | es () |
const libMesh::EquationSystems & | es () const |
Private Member Functions | |
EquationSystemsHeader | buildHeader (const std::vector< const libMesh::DofObject *> &ordered_objects) const |
Internal method for building the header struct. More... | |
std::vector< const libMesh::DofObject * > | orderDofObjects () const |
Internal method for ordering the DofObjects by ID (elems and the nodes) More... | |
void | restore (const SystemHeader &from_sys_header, const VectorHeader &from_vec_header, const VariableHeader &from_var_header, const libMesh::System &to_sys, libMesh::NumericVector< libMesh::Number > &to_vec, const libMesh::Variable &to_var, std::istream &stream) |
Private Attributes | |
libMesh::EquationSystems | _es |
The underlying EquationSystems. More... | |
bool | _load_all_vectors |
Whether or not to load all of the vectors, including ones that haven't been added yet. More... | |
std::size_t | _loaded_stream_data_begin |
The starting position for the vector data in the input stream. More... | |
std::vector< const libMesh::DofObject * > | _loaded_ordered_objects |
The object ordering for this data. More... | |
EquationSystemsHeader | _loaded_header |
The loaded header. More... | |
Wrapper class that owns a libMesh EquationSystem and adds advanced restart capability to it.
Definition at line 31 of file RestartableEquationSystems.h.
RestartableEquationSystems::RestartableEquationSystems | ( | libMesh::MeshBase & | mesh | ) |
Definition at line 22 of file RestartableEquationSystems.C.
|
private |
Internal method for building the header struct.
Definition at line 28 of file RestartableEquationSystems.C.
Referenced by store().
|
inline |
Definition at line 129 of file RestartableEquationSystems.h.
Referenced by FEProblemBase::es().
|
inline |
Definition at line 130 of file RestartableEquationSystems.h.
void RestartableEquationSystems::load | ( | std::istream & | stream | ) |
Loads the EquationSystems from the given stream.
Definition at line 223 of file RestartableEquationSystems.C.
Referenced by dataLoad().
|
private |
Internal method for ordering the DofObjects by ID (elems and the nodes)
Definition at line 121 of file RestartableEquationSystems.C.
Referenced by load(), and store().
|
private |
Definition at line 313 of file RestartableEquationSystems.C.
Referenced by load().
|
inline |
Sets whether or not all vectors are to be loaded.
By default, this is true. This means that all vectors that do not currently exist in the system will be added and loaded.
Typically, we would want this to be false in the case of restart.
Definition at line 143 of file RestartableEquationSystems.h.
Referenced by FEProblemBase::initialSetup().
void RestartableEquationSystems::store | ( | std::ostream & | stream | ) | const |
Stores the EquationSystems to the given stream.
Definition at line 138 of file RestartableEquationSystems.C.
Referenced by dataStore().
|
private |
The underlying EquationSystems.
Definition at line 162 of file RestartableEquationSystems.h.
Referenced by buildHeader(), es(), load(), orderDofObjects(), restore(), and store().
|
private |
Whether or not to load all of the vectors, including ones that haven't been added yet.
Definition at line 165 of file RestartableEquationSystems.h.
Referenced by load(), and setLoadAllVectors().
|
private |
The loaded header.
Definition at line 171 of file RestartableEquationSystems.h.
|
private |
The object ordering for this data.
Definition at line 169 of file RestartableEquationSystems.h.
|
private |
The starting position for the vector data in the input stream.
Definition at line 167 of file RestartableEquationSystems.h.