FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
CProgress Class Reference
+ Inheritance diagram for CProgress:
+ Collaboration diagram for CProgress:

Public Member Functions

 CProgress (const std::string &name, ISimObjectCreator *const creator)
 
 ~CProgress () override
 Writes the last accepted step's progress if the file does not hold it yet.
 
void OdeFcn (const double t, const double *const x, double *const xdot) const override
 
void AcceptedStep (const double t, const double *const x) override
 
void FinalSetup (const double T, const double *const X, ISimObjectCreator *const creator)
 

Protected Member Functions

std::string FormatProgress (double t) const
 The progress text for accepted time t: the percentage of the end time, or 0.00 when it is infinite.
 
void Write (const std::string &progress)
 Replaces the file's content with progress.
 

Protected Attributes

std::string m_output_name
 
double m_end_time
 
std::string m_last_written
 
std::string m_latest
 
std::chrono::steady_clock::time_point m_last_write_time
 
std::chrono::steady_clock::duration m_min_write_interval = std::chrono::milliseconds(500)
 

Member Data Documentation

◆ m_end_time

double CProgress::m_end_time
protected

The end time retreived from the integrator options

◆ m_last_write_time

std::chrono::steady_clock::time_point CProgress::m_last_write_time
protected

When the file was last written

◆ m_last_written

std::string CProgress::m_last_written
protected

The progress text last written to the file; empty before the first write

◆ m_latest

std::string CProgress::m_latest
protected

The progress text of the last accepted step

◆ m_min_write_interval

std::chrono::steady_clock::duration CProgress::m_min_write_interval = std::chrono::milliseconds(500)
protected

The least wall time between two writes; the first write is never held back (BASE-0078)

◆ m_output_name

std::string CProgress::m_output_name
protected

The file where the output will be written. Default: fhsim_progress


The documentation for this class was generated from the following file: