RungeKutta Class Reference

#include <orsa_integrator.h>

Inheritance diagram for RungeKutta:

Inheritance graph
[legend]
Collaboration diagram for RungeKutta:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RungeKutta ()
 RungeKutta (const RungeKutta &)
 ~RungeKutta ()
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

RungeKutta  ) 
 

Definition at line 34 of file orsa_integrator_runge_kutta.cc.

References orsa::RUNGEKUTTA.

Referenced by RungeKutta::clone().

00034                          : FixedTimestepIntegrator() {
00035     type = RUNGEKUTTA;
00036   }

RungeKutta const RungeKutta  ) 
 

Definition at line 38 of file orsa_integrator_runge_kutta.cc.

00038                                              : FixedTimestepIntegrator() {
00039     type     = i.type;
00040     timestep = i.timestep;
00041     accuracy = i.accuracy;
00042     // m        = i.m;
00043   }

~RungeKutta  ) 
 

Definition at line 45 of file orsa_integrator_runge_kutta.cc.

00045                           {
00046     
00047   }


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 49 of file orsa_integrator_runge_kutta.cc.

References RungeKutta::RungeKutta().

00049                                        {
00050     return new RungeKutta(*this);
00051   }

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 53 of file orsa_integrator_runge_kutta.cc.

References Frame::ForceJPLEphemerisData(), UniverseTypeAwareTimeStep::GetDouble(), UniverseTypeAwareTime::SetTime(), and Frame::size().

00053                                                                                             {
00054     
00055     // NON-DISSIPATIVE (velocity indipendent) version
00056     
00057     const unsigned int n =  frame_in.size();
00058     
00059     const double h = timestep.GetDouble();
00060     
00061     vector<Vector> acc(n);
00062     
00063     vector<Vector> b1(n), b2(n), b3(n), b4(n);
00064     
00065     unsigned int j;
00066     
00067     interaction->Acceleration(frame_in,acc);
00068     //
00069     b1 = acc;
00070     
00071     Frame tmp_frame = frame_in;
00072     for (j=0;j<tmp_frame.size();++j) {
00073       tmp_frame[j].AddToPosition(frame_in[j].velocity() * h / 2.0);
00074     }
00075     //
00076     if (interaction->IsSkippingJPLPlanets()) {
00077       tmp_frame.SetTime(frame_in + h / 2.0);
00078       tmp_frame.ForceJPLEphemerisData();
00079     }
00080     //
00081     interaction->Acceleration(tmp_frame,acc);
00082     //
00083     b2 = acc;
00084     
00085     tmp_frame = frame_in;
00086     for (j=0;j<tmp_frame.size();++j) {
00087       tmp_frame[j].AddToPosition(frame_in[j].velocity() * h / 2.0 + b1[j] * h * h / 4.0);
00088     }
00089     //
00090     if (interaction->IsSkippingJPLPlanets()) {
00091       tmp_frame.SetTime(frame_in + h / 2.0);
00092       tmp_frame.ForceJPLEphemerisData();
00093     }
00094     //
00095     interaction->Acceleration(tmp_frame,acc);
00096     //
00097     b3 = acc;
00098     
00099     tmp_frame = frame_in;
00100     for (j=0;j<tmp_frame.size();++j) {
00101       tmp_frame[j].AddToPosition(frame_in[j].velocity() * h + b2[j] * h * h / 2.0);
00102     }
00103     //
00104     if (interaction->IsSkippingJPLPlanets()) {
00105       tmp_frame.SetTime(frame_in + timestep);
00106       tmp_frame.ForceJPLEphemerisData();
00107     }
00108     //
00109     interaction->Acceleration(tmp_frame,acc);
00110     //
00111     b4 = acc;
00112     
00113     frame_out = frame_in;
00114     for (j=0;j<frame_out.size();++j) {
00115       frame_out[j].AddToPosition(frame_in[j].velocity() * h + h * h / 6.0 * ( b1[j] + b2[j] + b3[j] ));
00116       frame_out[j].AddToVelocity(h / 6.0 * ( b1[j] + 2 * b2[j] + 2 * b3[j] + b4[j] ));
00117     }
00118     
00119     frame_out += timestep;
00120   }

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:09 2005 for liborsa by  doxygen 1.4.0