Skip to content

Commit

Permalink
[OneD] Add docstrings for save/restore
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl authored and bryanwweber committed Sep 5, 2022
1 parent a64d240 commit de35145
Showing 1 changed file with 38 additions and 6 deletions.
44 changes: 38 additions & 6 deletions include/cantera/oneD/Sim1D.h
Expand Up @@ -96,15 +96,50 @@ class Sim1D : public OneDim

//! @}

//! @name Logging, saving and restoring of solutions
//!
//! @{

/**
* Output information on current solution for all domains to stream.
* @param s Output stream
*/
void showSolution(std::ostream& s);

/**
* Show logging information on current solution for all domains.
*/
void showSolution();

/**
* Save the current solution to a container file.
* @param fname Name of output container file
* @param id Identifier of solution within the container file
* @param desc Description of the solution
* @param loglevel Level of diagnostic output
*/
void save(const std::string& fname, const std::string& id,
const std::string& desc, int loglevel=1);

/**
* Save the residual of the current solution to a container file.
* @param fname Name of output container file
* @param id Identifier of solution within the container file
* @param desc Description of the solution
* @param loglevel Level of diagnostic output
*/
void saveResidual(const std::string& fname, const std::string& id,
const std::string& desc, int loglevel=1);

//! Print to stream s the current solution for all domains.
void showSolution(std::ostream& s);
void showSolution();
/**
* Initialize the solution with a previously-saved solution.
* @param fname Name of container file
* @param id Identifier of solution within the container file
* @param loglevel Level of diagnostic output
*/
void restore(const std::string& fname, const std::string& id, int loglevel=2);

//! @}

const doublereal* solution() {
return m_x.data();
Expand Down Expand Up @@ -173,9 +208,6 @@ class Sim1D : public OneDim
*/
void setGridMin(int dom, double gridmin);

//! Initialize the solution with a previously-saved solution.
void restore(const std::string& fname, const std::string& id, int loglevel=2);

//! Set the current solution vector to the last successful time-stepping
//! solution. This can be used to examine the solver progress after a failed
//! integration.
Expand Down

0 comments on commit de35145

Please sign in to comment.