https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
RestartableEquationSystems.h File Reference

Go to the source code of this file.

Classes

class  RestartableEquationSystems
 Wrapper class that owns a libMesh EquationSystem and adds advanced restart capability to it. More...
 
struct  RestartableEquationSystems::VectorHeader
 Represents a stored variable in restart. More...
 
struct  RestartableEquationSystems::VariableHeader
 Represents a stored variable in restart. More...
 
struct  RestartableEquationSystems::SystemHeader
 Represents a stored system in restart. More...
 
struct  RestartableEquationSystems::EquationSystemsHeader
 Represents a stored EquationSystems in restart. More...
 

Namespaces

namespace  libMesh
 The following methods are specializations for using the libMesh::Parallel::packed_range_* routines for std::strings.
 

Functions

void dataStore (std::ostream &stream, RestartableEquationSystems &res, void *)
 
void dataLoad (std::istream &stream, RestartableEquationSystems &res, void *)
 
void dataStore (std::ostream &stream, RestartableEquationSystems::EquationSystemsHeader &header, void *)
 
void dataLoad (std::istream &stream, RestartableEquationSystems::EquationSystemsHeader &header, void *)
 
void dataStore (std::ostream &stream, RestartableEquationSystems::SystemHeader &header, void *)
 
void dataLoad (std::istream &stream, RestartableEquationSystems::SystemHeader &header, void *)
 
void dataStore (std::ostream &stream, RestartableEquationSystems::VariableHeader &header, void *)
 
void dataLoad (std::istream &stream, RestartableEquationSystems::VariableHeader &header, void *)
 
void dataStore (std::ostream &stream, RestartableEquationSystems::VectorHeader &header, void *)
 
void dataLoad (std::istream &stream, RestartableEquationSystems::VectorHeader &header, void *)
 
void to_json (nlohmann::json &json, const RestartableEquationSystems &res)
 

Function Documentation

◆ dataLoad() [1/5]

void dataLoad ( std::istream &  stream,
RestartableEquationSystems res,
void *   
)

Definition at line 421 of file RestartableEquationSystems.C.

422{
423 res.load(stream);
424}
void load(std::istream &stream)
Loads the EquationSystems from the given stream.

Referenced by dataLoad(), dataLoad(), dataLoad(), dataLoad(), RestartableEquationSystems::load(), and RestartableEquationSystems::restore().

◆ dataLoad() [2/5]

void dataLoad ( std::istream &  stream,
RestartableEquationSystems::EquationSystemsHeader header,
void *   
)

Definition at line 434 of file RestartableEquationSystems.C.

435{
436 dataLoad(stream, header.systems, nullptr);
437 dataLoad(stream, header.data_size, nullptr);
438}
void dataLoad(std::istream &stream, RestartableEquationSystems &res, void *)
std::map< std::string, RestartableEquationSystems::SystemHeader > systems
The stored systems in the equation systems.
std::size_t data_size
The total size of data for this EquationSystems.

◆ dataLoad() [3/5]

void dataLoad ( std::istream &  stream,
RestartableEquationSystems::SystemHeader header,
void *   
)

Definition at line 450 of file RestartableEquationSystems.C.

451{
452 dataLoad(stream, header.name, nullptr);
453 dataLoad(stream, header.type, nullptr);
454 dataLoad(stream, header.variables, nullptr);
455 dataLoad(stream, header.vectors, nullptr);
456}
std::map< std::string, RestartableEquationSystems::VariableHeader > variables
The stored variables in the system.
std::string type
The type of the stored system.
std::string name
The name of the stored system.
std::map< std::string, RestartableEquationSystems::VectorHeader > vectors
The stored vectors in the system.

◆ dataLoad() [4/5]

void dataLoad ( std::istream &  stream,
RestartableEquationSystems::VariableHeader header,
void *   
)

Definition at line 465 of file RestartableEquationSystems.C.

466{
467 dataLoad(stream, header.name, nullptr);
468 dataLoad(stream, header.type, nullptr);
469}
std::string name
The name of the stored variable.
libMesh::FEType type
The type of the stored variable.

◆ dataLoad() [5/5]

void dataLoad ( std::istream &  stream,
RestartableEquationSystems::VectorHeader header,
void *   
)

Definition at line 480 of file RestartableEquationSystems.C.

481{
482 dataLoad(stream, header.name, nullptr);
483 dataLoad(stream, header.projections, nullptr);
484 dataLoad(stream, header.type, nullptr);
485 dataLoad(stream, header.variable_offset, nullptr);
486}
std::string name
The name of the stored vector.
bool projections
The projection flag (whether or not it should be projected or zeroed)
libMesh::ParallelType type
The type of the stored vector.
std::map< std::string, std::size_t > variable_offset
The position of each variable for this vector (relative to the start of the data)

◆ dataStore() [1/5]

void dataStore ( std::ostream &  stream,
RestartableEquationSystems res,
void *   
)

Definition at line 415 of file RestartableEquationSystems.C.

416{
417 res.store(stream);
418}
void store(std::ostream &stream) const
Stores the EquationSystems to the given stream.

Referenced by dataStore(), dataStore(), dataStore(), dataStore(), and RestartableEquationSystems::store().

◆ dataStore() [2/5]

void dataStore ( std::ostream &  stream,
RestartableEquationSystems::EquationSystemsHeader header,
void *   
)

Definition at line 427 of file RestartableEquationSystems.C.

428{
429 dataStore(stream, header.systems, nullptr);
430 dataStore(stream, header.data_size, nullptr);
431}
void dataStore(std::ostream &stream, RestartableEquationSystems &res, void *)

◆ dataStore() [3/5]

void dataStore ( std::ostream &  stream,
RestartableEquationSystems::SystemHeader header,
void *   
)

Definition at line 441 of file RestartableEquationSystems.C.

442{
443 dataStore(stream, header.name, nullptr);
444 dataStore(stream, header.type, nullptr);
445 dataStore(stream, header.variables, nullptr);
446 dataStore(stream, header.vectors, nullptr);
447}

◆ dataStore() [4/5]

void dataStore ( std::ostream &  stream,
RestartableEquationSystems::VariableHeader header,
void *   
)

Definition at line 459 of file RestartableEquationSystems.C.

460{
461 dataStore(stream, header.name, nullptr);
462 dataStore(stream, header.type, nullptr);
463}

◆ dataStore() [5/5]

void dataStore ( std::ostream &  stream,
RestartableEquationSystems::VectorHeader header,
void *   
)

Definition at line 472 of file RestartableEquationSystems.C.

473{
474 dataStore(stream, header.name, nullptr);
475 dataStore(stream, header.projections, nullptr);
476 dataStore(stream, header.type, nullptr);
477 dataStore(stream, header.variable_offset, nullptr);
478}

◆ to_json()

void to_json ( nlohmann::json &  json,
const RestartableEquationSystems res 
)

Definition at line 489 of file RestartableEquationSystems.C.

490{
491
492 nlohmann::json loaded_vars = nlohmann::json::array();
493
494 for (const auto & [system, vector, variable] : res.getLoadedVariables())
495 {
496 loaded_vars.push_back({{"system", system}, {"vector", vector}, {"variable", variable}});
497 }
498
499 json["loaded_variables"] = loaded_vars;
500}