Skip to content
Snippets Groups Projects
Commit ab80e586 authored by Timo Koch's avatar Timo Koch
Browse files

[timeloop][doc] Improve documentation

parent 8b4ca54c
No related branches found
No related tags found
1 merge request!1160Fix/checkpoint timeloop
...@@ -219,7 +219,7 @@ public: ...@@ -219,7 +219,7 @@ public:
* episode, the timeStep() method will take care that the step * episode, the timeStep() method will take care that the step
* size won't exceed the episode or the end of the simulation, * size won't exceed the episode or the end of the simulation,
* though. * though.
* \note Always call this after TimeLoop::advanceTimeStep() * \note Always call this after TimeLoop::advanceTimeStep() and TimeLoop::reportTimeStep()
* *
* \param dt The new value for the time step size \f$\mathrm{[s]}\f$ * \param dt The new value for the time step size \f$\mathrm{[s]}\f$
*/ */
...@@ -234,6 +234,7 @@ public: ...@@ -234,6 +234,7 @@ public:
* \brief Set the maximum time step size to a given value. * \brief Set the maximum time step size to a given value.
* *
* \param maxDt The new value for the maximum time step size \f$\mathrm{[s]}\f$ * \param maxDt The new value for the maximum time step size \f$\mathrm{[s]}\f$
* \note This also updates the time step size
*/ */
void setMaxTimeStepSize(Scalar maxDt) void setMaxTimeStepSize(Scalar maxDt)
{ {
...@@ -489,8 +490,10 @@ public: ...@@ -489,8 +490,10 @@ public:
checkPoints_.pop(); checkPoints_.pop();
} }
//! Whether now is a time checkpoint /*!
//! has to be called after TimeLoop::advanceTimeStep() * \brief Whether now is a time checkpoint
* \note has to be called after TimeLoop::advanceTimeStep()
*/
bool isCheckPoint() const bool isCheckPoint() const
{ return isCheckPoint_; } { return isCheckPoint_; }
...@@ -498,6 +501,7 @@ public: ...@@ -498,6 +501,7 @@ public:
* \brief add a checkpoint to the queue * \brief add a checkpoint to the queue
* \note checkpoints have to be provided in ascending order * \note checkpoints have to be provided in ascending order
* \param t the check point (in seconds) * \param t the check point (in seconds)
* \note This also updates the time step size and potentially reduces the time step size to meet the next check point
*/ */
void setCheckPoint(Scalar t) void setCheckPoint(Scalar t)
{ {
...@@ -512,6 +516,7 @@ public: ...@@ -512,6 +516,7 @@ public:
* \brief add checkpoints to the queue from a vector of time points * \brief add checkpoints to the queue from a vector of time points
* \note checkpoints have to be provided in ascending order * \note checkpoints have to be provided in ascending order
* \param checkPoints the vector of check points * \param checkPoints the vector of check points
* \note This also updates the time step size and potentially reduces the time step size to meet the next check point
*/ */
void setCheckPoint(const std::vector<Scalar>& checkPoints) void setCheckPoint(const std::vector<Scalar>& checkPoints)
{ setCheckPoint(checkPoints.begin(), checkPoints.end()); } { setCheckPoint(checkPoints.begin(), checkPoints.end()); }
...@@ -521,6 +526,7 @@ public: ...@@ -521,6 +526,7 @@ public:
* \note checkpoints have to be provided in ascending order * \note checkpoints have to be provided in ascending order
* \param first iterator to the first element to be inserted * \param first iterator to the first element to be inserted
* \param last iterator to the one-after-last element to be inserted * \param last iterator to the one-after-last element to be inserted
* \note This also updates the time step size and potentially reduces the time step size to meet the next check point
*/ */
template<class ForwardIterator> template<class ForwardIterator>
void setCheckPoint(ForwardIterator first, ForwardIterator last) void setCheckPoint(ForwardIterator first, ForwardIterator last)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment