Leapfrog Class Reference

#include <orsa_integrator.h>

Inheritance diagram for Leapfrog:

Inheritance graph
[legend]
Collaboration diagram for Leapfrog:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Leapfrog ()
 Leapfrog (const Leapfrog &)
 ~Leapfrog ()
void Step (const Frame &, Frame &, Interaction *)
Integratorclone () const
virtual bool can_handle_velocity_dependant_interactions () const
 substeps for multisteps integrators
IntegratorType GetType () const

Public Attributes

UniverseTypeAwareTimeStep timestep
double accuracy
unsigned int m
 used only with variable step size integrators

Protected Attributes

UniverseTypeAwareTimeStep timestep_done
IntegratorType type

Constructor & Destructor Documentation

Leapfrog  ) 
 

Definition at line 46 of file orsa_integrator.cc.

References orsa::LEAPFROG.

Referenced by Leapfrog::clone().

00046                      : FixedTimestepIntegrator() {
00047     type = LEAPFROG;
00048   }

Leapfrog const Leapfrog  ) 
 

Definition at line 50 of file orsa_integrator.cc.

00050                                        : FixedTimestepIntegrator() {
00051     type     = i.type;
00052     timestep = i.timestep;
00053     accuracy = i.accuracy;
00054     // m        = i.m;
00055   }

~Leapfrog  ) 
 

Definition at line 61 of file orsa_integrator.cc.

00061                       {
00062     
00063   }


Member Function Documentation

virtual bool can_handle_velocity_dependant_interactions  )  const [inline, virtual, inherited]
 

substeps for multisteps integrators

Reimplemented in DissipativeRungeKutta, and Radau15.

Definition at line 95 of file orsa_integrator.h.

00095 { return false; }

Integrator * clone  )  const [virtual]
 

Implements Integrator.

Definition at line 57 of file orsa_integrator.cc.

References Leapfrog::Leapfrog().

00057                                      {
00058     return new Leapfrog(*this);
00059   }

Here is the call graph for this function:

IntegratorType GetType  )  const [inline, inherited]
 

Definition at line 98 of file orsa_integrator.h.

References Integrator::type.

00098 { return type; }

void Step const Frame ,
Frame ,
Interaction
[virtual]
 

Implements Integrator.

Definition at line 107 of file orsa_integrator.cc.

References UniverseTypeAwareTimeStep::GetDouble().

00107                                                                                           {
00108     
00109     // NON-DISSIPATIVE (velocity indipendent) version
00110     
00111     const unsigned int n = frame_in.size();
00112     
00113     const double h  = timestep.GetDouble();
00114     const double h2 = 0.5*h;
00115     
00116     frame_out = frame_in;
00117     
00118     frame_out += 0.5*timestep;
00119     for (unsigned int j=0;j<n;++j) {
00120       frame_out[j].AddToPosition(frame_out[j].velocity()*h2);
00121     }
00122     
00123     std::vector<Vector> acc(n);
00124     //
00125     if (interaction->IsSkippingJPLPlanets()) {
00126       frame_out.ForceJPLEphemerisData();
00127     }
00128     //
00129     interaction->Acceleration(frame_out,acc);
00130     
00131     for (unsigned int j=0;j<n;++j) {
00132       frame_out[j].AddToVelocity(acc[j]*h);
00133     }
00134     
00135     frame_out += 0.5*timestep;
00136     for (unsigned int j=0;j<n;++j) {
00137       frame_out[j].AddToPosition(frame_out[j].velocity()*h2);
00138     }
00139     
00140   }

Here is the call graph for this function:


Member Data Documentation

double accuracy [inherited]
 

Definition at line 91 of file orsa_integrator.h.

Referenced by Evolution::GetIntegratorAccuracy(), OptimizedOrbitPositions::PropagatedOrbit(), orsa::PropagatedSky_J2000(), and Evolution::SetIntegratorAccuracy().

unsigned int m [inherited]
 

used only with variable step size integrators

Definition at line 92 of file orsa_integrator.h.

UniverseTypeAwareTimeStep timestep [inherited]
 

Definition at line 84 of file orsa_integrator.h.

Referenced by Evolution::GetIntegratorTimeStep(), Evolution::Integrate(), OptimizedOrbitPositions::PropagatedOrbit(), orsa::PropagatedSky_J2000(), and Evolution::SetIntegratorTimeStep().

UniverseTypeAwareTimeStep timestep_done [protected, inherited]
 

Definition at line 87 of file orsa_integrator.h.

IntegratorType type [protected, inherited]
 

Definition at line 101 of file orsa_integrator.h.

Referenced by Integrator::GetType().


The documentation for this class was generated from the following files:
Generated on Tue Jan 11 15:29:13 2005 for liborsa by  doxygen 1.4.0