SMILE  v2.5
Schwarzschild Modelling Interactive expLoratory Environment
Public Types | Public Member Functions | Private Attributes | List of all members
smile::COrbitDesc Class Reference

Container for orbit initial conditions and information objects. More...

#include <orbitlib.h>

Collaboration diagram for smile::COrbitDesc:
Collaboration graph
[legend]

Public Types

enum  ORBITSTATE {
  OS_INITIALIZED, OS_PREPARING, OS_RUNNING, OS_NEEDTOTERMINATE,
  OS_DONE, OS_FAILED
}
 lists all possible states of orbit integration More...
 

Public Member Functions

template<typename NumT >
 COrbitDesc (const CPosVelPoint< NumT > &_initCond, const NumT _intTime, const NumT _maxTime, const double _weight, const double _weightPrior, const vectorInformation *_info=NULL)
 Create the object for the given initial conditions, without the results of orbit integration (OS_INITIALIZED)
 
 ~COrbitDesc ()
 destroy all information containers
 
void run (const COrbitLauncher *launcher)
 create an internal COrbit instance using the launcher, and run orbit integration and analysis
 
void halt ()
 if running, immediately stop computation (set the state to OS_NEEDTOTERMINATE)
 
const CPosVelPoint< float > & getInitCond () const
 return the initial conditions for the orbit
 
void setInitCond (const CPosVelPoint< float > &ic)
 assign initial conditions
 
float getIntTime () const
 return the integration time, whether the actual one if orbit is done, or the intended one if only initialized
 
void setIntTime (float time)
 assign the integration time
 
float getMaxTime () const
 return the maximum time for adaptive integration
 
void setMaxTime (float time)
 assign maximum integration time
 
size_t getInfoNum () const
 return the number of CBasicInformation objects
 
const CBasicInformationgetInfo (size_t index) const
 return a pointer to the given information object (a private data member!)
 
const CBasicInformationgetInfoByType (CBasicInformation::INFOTYPE InfoType) const
 convenience function to get a pointer to information of a given type, or NULL if it doesn't exist
 
std::string toString () const
 returns string representation of all information objects associated with the orbit, plus the weight and integration time
 
double getWeight () const
 return orbit weight in the Schwarzschild model
 
void setWeight (double w)
 assign the orbit weight
 
double getWeightPrior () const
 return orbit weight prior in the Schwarzschild model
 
void setWeightPrior (double w)
 
ORBITSTATE getState () const
 return the state of orbit integration (init/running/done)
 
void setState (ORBITSTATE _state)
 set the state to OS_PREPARING if it is going to be started by the orbit library class, or reset it to OS_INITIALIZED if it was completed. More...
 

Private Attributes

CPosVelPoint< float > initCond
 orbit initial conditions
 
COrbitorbit
 pointer to the internal object created in run()
 
float intTime
 
float maxTime
 integration and max integration time
 
vectorInformation info
 array of CBasicOrbitInformation objects
 
double weight
 weight of the orbit in the Schwarzschild model
 
double weightPrior
 prior on orbit weight (for proper normalization of entropy; default 0 means Mtotal/Norbits)
 
volatile ORBITSTATE state
 current state of affairs
 

Detailed Description

Container for orbit initial conditions and information objects.

This class serves as an interface between a single COrbit and the entire COrbitLibrary. It keeps the initial data for an orbit, and internally creates an instance of COrbit for the integration and analysis; then it records the results in the form of an array of CBasicInformation and deletes the COrbit to free up memory.

A collection of this objects constitutes the COrbitLibrary.

Member Enumeration Documentation

lists all possible states of orbit integration

Enumerator
OS_INITIALIZED 

the object is created but only contains initial data

OS_PREPARING 

the run() method is called

OS_RUNNING 

the internal COrbit::run() is in progress

OS_NEEDTOTERMINATE 

the user requested to stop orbit integration

OS_DONE 

integration completed, all information objects are stored (also set when all data is loaded from a file).

OS_FAILED 

if the integration failed for some reason (did not produce any orbit)

Member Function Documentation

void smile::COrbitDesc::setState ( ORBITSTATE  _state)
inline

set the state to OS_PREPARING if it is going to be started by the orbit library class, or reset it to OS_INITIALIZED if it was completed.


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