OSHUN  beta
Arbitrary Order Spherical-Harmonic 1D-3P Vlasov-Fokker-Planck-Maxwell code
Clock Class Reference

#include <lib-algorithms.h>

Public Member Functions

 Clock (int tout_start, double dt_out, double CFL)
 
double h () const
 
size_t numh () const
 
size_t tick () const
 
double time () const
 
Clockoperator++ ()
 

Private Attributes

double _t_start
 
size_t _numh
 
double _h
 
size_t _hstep
 

Detailed Description

Definition at line 927 of file lib-algorithms.h.

Constructor & Destructor Documentation

◆ Clock()

Clock::Clock ( int  tout_start,
double  dt_out,
double  CFL 
)
inline

Definition at line 930 of file lib-algorithms.h.

930  {
931  _hstep = 0;
932  _t_start = double(tout_start)*dt_out;
933  _numh = size_t(static_cast<int>(dt_out/CFL))+1;
934  _h = dt_out/static_cast<double>(_numh);
935  }
double _h
size_t _numh
size_t _hstep
double _t_start

Member Function Documentation

◆ h()

double Clock::h ( ) const
inline

Definition at line 938 of file lib-algorithms.h.

938 {return _h;} // Step size
double _h

◆ numh()

size_t Clock::numh ( ) const
inline

Definition at line 939 of file lib-algorithms.h.

939 {return _numh;} // # steps
size_t _numh

◆ operator++()

Clock& Clock::operator++ ( )
inline

Definition at line 944 of file lib-algorithms.h.

944 { ++_hstep; return *this;}
size_t _hstep

◆ tick()

size_t Clock::tick ( ) const
inline

Definition at line 940 of file lib-algorithms.h.

Referenced by main().

940 {return _hstep;} // Current step
size_t _hstep
Here is the caller graph for this function:

◆ time()

double Clock::time ( ) const
inline

Definition at line 941 of file lib-algorithms.h.

Referenced by collisions::advancef0().

941 {return tick()*h() + _t_start;} // Current time
size_t tick() const
double h() const
double _t_start
Here is the caller graph for this function:

Field Documentation

◆ _h

double Clock::_h
private

Definition at line 949 of file lib-algorithms.h.

◆ _hstep

size_t Clock::_hstep
private

Definition at line 950 of file lib-algorithms.h.

◆ _numh

size_t Clock::_numh
private

Definition at line 948 of file lib-algorithms.h.

◆ _t_start

double Clock::_t_start
private

Definition at line 947 of file lib-algorithms.h.


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