SMILE  v2.5
Schwarzschild Modelling Interactive expLoratory Environment
Public Types | Public Member Functions | Protected Attributes | List of all members
smile::CBasicOrbitRuntimeFnc Class Referenceabstract

defines a routine which may be called after each integration timestep to perform user-specific data collection. More...

#include <common.h>

Inheritance diagram for smile::CBasicOrbitRuntimeFnc:
Inheritance graph
[legend]
Collaboration diagram for smile::CBasicOrbitRuntimeFnc:
Collaboration graph
[legend]

Public Types

enum  FNCTYPE {
  FT_TRAJ_ANALYSIS, FT_TRAJ_SAMPLE, FT_POINCARE, FT_PERICENTER,
  FT_SCHW, FT_VEL_PERTURBER
}
 lists all possible runtime functions More...
 
enum  STEPRESULT { SR_CONTINUE, SR_TERMINATE, SR_REINIT }
 result of processing of a timestep More...
 

Public Member Functions

 CBasicOrbitRuntimeFnc (const COrbit *_orbit)
 constructs instance and initializes some internal data
 
virtual ~CBasicOrbitRuntimeFnc ()
 destroys all necessary internal data
 
virtual FNCTYPE FncType () const =0
 derived classes return their type
 
virtual STEPRESULT Timestep (const double told, const double tcur, CPosVelPoint< double > *vars)=0
 the following method is called after each timestep. More...
 
virtual void Finish ()
 called when integration is finished, performs cleanup/postprocessing but doesn't destroy collected data
 
virtual CBasicInformationgetData () const =0
 returns the collected data as an instance of an information object
 

Protected Attributes

const COrbitorbit
 pointer to the orbit that is being integrated
 

Detailed Description

defines a routine which may be called after each integration timestep to perform user-specific data collection.

(such as computing cell occupation times in Schw model or recording Poincare section points).

Member Enumeration Documentation

lists all possible runtime functions

Enumerator
FT_TRAJ_ANALYSIS 

COrbitRuntimeTrajectory.

FT_TRAJ_SAMPLE 

COrbitRuntimeTrajSample.

FT_POINCARE 

COrbitRuntimePoincare.

FT_PERICENTER 

COrbitRuntimePericenter.

FT_SCHW 

COrbitRuntimeSchw.

FT_VEL_PERTURBER 

COrbitRuntimeVelPerturber.

result of processing of a timestep

Enumerator
SR_CONTINUE 

need to continue integration

SR_TERMINATE 

may terminate integration if necessary

SR_REINIT 

variables have changed, need to re-initialize integrator

Member Function Documentation

virtual STEPRESULT smile::CBasicOrbitRuntimeFnc::Timestep ( const double  told,
const double  tcur,
CPosVelPoint< double > *  vars 
)
pure virtual

the following method is called after each timestep.

Parameters
[in]toldis the value of time at the beginning of the timestep
[in]tcuris the time at the end of timestep
[in,out]varsare the phase-space variables at the end of timestep; the function may change them and return SR_REINIT to indicate that the ODE integrator needs to be restarted.

This procedure may call orbit->getPos() and orbit->getVel() to get interpolated coordinates on the interval [told, tcur].

Returns
true if integration may be finished right now [default], false if needs to continue. (the ultimate decision is taken by orbit integration routine and may ignore the demands of runtime functions)

Implemented in smile::COrbitRuntimeSchwDensSH, smile::COrbitRuntimeSchwDensGrid, smile::COrbitRuntimeSchwAngMomDist, smile::COrbitRuntimeVelPerturber, smile::COrbitRuntimeSchwKinemShell, smile::COrbitRuntimePericenter, smile::COrbitRuntimePoincare, smile::COrbitRuntimeTrajSample, and smile::COrbitRuntimeTrajectory.


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