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

Go to the source code of this file.

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 415 of file RestartableEquationSystems.C.

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

416 {
417  res.load(stream);
418 }
void load(std::istream &stream)
Loads the EquationSystems from the given stream.

◆ dataLoad() [2/5]

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

Definition at line 428 of file RestartableEquationSystems.C.

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

◆ dataLoad() [3/5]

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

Definition at line 444 of file RestartableEquationSystems.C.

445 {
446  dataLoad(stream, header.name, nullptr);
447  dataLoad(stream, header.type, nullptr);
448  dataLoad(stream, header.variables, nullptr);
449  dataLoad(stream, header.vectors, nullptr);
450 }
std::string name
The name of the stored system.
std::map< std::string, RestartableEquationSystems::VectorHeader > vectors
The stored vectors in the system.
std::map< std::string, RestartableEquationSystems::VariableHeader > variables
The stored variables in the system.
std::string type
The type of the stored system.
void dataLoad(std::istream &stream, RestartableEquationSystems &res, void *)

◆ dataLoad() [4/5]

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

Definition at line 459 of file RestartableEquationSystems.C.

460 {
461  dataLoad(stream, header.name, nullptr);
462  dataLoad(stream, header.type, nullptr);
463 }
libMesh::FEType type
The type of the stored variable.
std::string name
The name of the stored variable.
void dataLoad(std::istream &stream, RestartableEquationSystems &res, void *)

◆ dataLoad() [5/5]

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

Definition at line 474 of file RestartableEquationSystems.C.

475 {
476  dataLoad(stream, header.name, nullptr);
477  dataLoad(stream, header.projections, nullptr);
478  dataLoad(stream, header.type, nullptr);
479  dataLoad(stream, header.variable_offset, nullptr);
480 }
bool projections
The projection flag (whether or not it should be projected or zeroed)
std::string name
The name of the stored vector.
libMesh::ParallelType type
The type of the stored vector.
void dataLoad(std::istream &stream, RestartableEquationSystems &res, void *)
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 409 of file RestartableEquationSystems.C.

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

410 {
411  res.store(stream);
412 }
void store(std::ostream &stream) const
Stores the EquationSystems to the given stream.

◆ dataStore() [2/5]

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

Definition at line 421 of file RestartableEquationSystems.C.

422 {
423  dataStore(stream, header.systems, nullptr);
424  dataStore(stream, header.data_size, nullptr);
425 }
std::size_t data_size
The total size of data for this EquationSystems.
std::map< std::string, RestartableEquationSystems::SystemHeader > systems
The stored systems in the equation systems.
void dataStore(std::ostream &stream, RestartableEquationSystems &res, void *)

◆ dataStore() [3/5]

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

Definition at line 435 of file RestartableEquationSystems.C.

436 {
437  dataStore(stream, header.name, nullptr);
438  dataStore(stream, header.type, nullptr);
439  dataStore(stream, header.variables, nullptr);
440  dataStore(stream, header.vectors, nullptr);
441 }
std::string name
The name of the stored system.
std::map< std::string, RestartableEquationSystems::VectorHeader > vectors
The stored vectors in the system.
std::map< std::string, RestartableEquationSystems::VariableHeader > variables
The stored variables in the system.
std::string type
The type of the stored system.
void dataStore(std::ostream &stream, RestartableEquationSystems &res, void *)

◆ dataStore() [4/5]

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

Definition at line 453 of file RestartableEquationSystems.C.

454 {
455  dataStore(stream, header.name, nullptr);
456  dataStore(stream, header.type, nullptr);
457 }
libMesh::FEType type
The type of the stored variable.
std::string name
The name of the stored variable.
void dataStore(std::ostream &stream, RestartableEquationSystems &res, void *)

◆ dataStore() [5/5]

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

Definition at line 466 of file RestartableEquationSystems.C.

467 {
468  dataStore(stream, header.name, nullptr);
469  dataStore(stream, header.projections, nullptr);
470  dataStore(stream, header.type, nullptr);
471  dataStore(stream, header.variable_offset, nullptr);
472 }
bool projections
The projection flag (whether or not it should be projected or zeroed)
std::string name
The name of the stored vector.
libMesh::ParallelType type
The type of the stored vector.
void dataStore(std::ostream &stream, RestartableEquationSystems &res, void *)
std::map< std::string, std::size_t > variable_offset
The position of each variable for this vector (relative to the start of the data) ...

◆ to_json()

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

Definition at line 483 of file RestartableEquationSystems.C.

484 {
485 
486  nlohmann::json loaded_vars = nlohmann::json::array();
487 
488  for (const auto & [system, vector, variable] : res.getLoadedVariables())
489  {
490  loaded_vars.push_back({{"system", system}, {"vector", vector}, {"variable", variable}});
491  }
492 
493  json["loaded_variables"] = loaded_vars;
494 }
const std::set< std::tuple< std::string, std::string, std::string > > & getLoadedVariables() const
Returns the set of variables that were loaded during the load() function. Each set of variables conta...