DissipativeRungeKutta Class Reference

#include <orsa_integrator.h>

Inheritance diagram for DissipativeRungeKutta:

Inheritance graph
[legend]
Collaboration diagram for DissipativeRungeKutta:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DissipativeRungeKutta ()
 DissipativeRungeKutta (const DissipativeRungeKutta &)
 ~DissipativeRungeKutta ()
bool can_handle_velocity_dependant_interactions () const
 substeps for multisteps integrators
void Step (const Frame &, Frame &, Interaction *)
Integratorclone () const
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

DissipativeRungeKutta  ) 
 

Definition at line 124 of file orsa_integrator_runge_kutta.cc.

References orsa::DISSIPATIVERUNGEKUTTA.

Referenced by DissipativeRungeKutta::clone().

00124                                                : FixedTimestepIntegrator() {
00125     type = DISSIPATIVERUNGEKUTTA;
00126   }

DissipativeRungeKutta const DissipativeRungeKutta  ) 
 

Definition at line 128 of file orsa_integrator_runge_kutta.cc.

00128                                                                               : FixedTimestepIntegrator() {
00129     type     = i.type;
00130     timestep = i.timestep;
00131     accuracy = i.accuracy;
00132     // m        = i.m;
00133   }

~DissipativeRungeKutta  ) 
 

Definition at line 135 of file orsa_integrator_runge_kutta.cc.

00135                                                 {
00136     
00137   }


Member Function Documentation

bool can_handle_velocity_dependant_interactions  )  const [inline, virtual]
 

substeps for multisteps integrators

Reimplemented from Integrator.

Definition at line 199 of file orsa_integrator.h.

00199 { return true; }

Integrator * clone  )  const [virtual]
 

Implements Integrator.

Definition at line 139 of file orsa_integrator_runge_kutta.cc.

References DissipativeRungeKutta::DissipativeRungeKutta().

00139                                                   {
00140     return new DissipativeRungeKutta(*this);
00141   }

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

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

00143                                                                                                        {
00144     
00145     // DISSIPATIVE (velocity dependent) version
00146     
00147     const unsigned int n =  frame_in.size();
00148     
00149     const double h = timestep.GetDouble();
00150     
00151     vector<Vector> acc(n);
00152     
00153     vector<Vector> b1(n), b2(n), b3(n), b4(n);
00154     
00155     unsigned int j;
00156     
00157     interaction->Acceleration(frame_in,acc);
00158     //
00159     b1 = acc;
00160     
00161     Frame tmp_frame = frame_in;
00162     for (j=0;j<tmp_frame.size();++j) {
00163       tmp_frame[j].AddToPosition(frame_in[j].velocity() * h / 2.0 + b1[j] * h * h / 8.0);
00164       tmp_frame[j].AddToVelocity(b1[j] * h / 2.0);
00165     }
00166     //
00167     if (interaction->IsSkippingJPLPlanets()) {
00168       tmp_frame.SetTime(frame_in + h / 2.0);
00169       tmp_frame.ForceJPLEphemerisData();
00170     }
00171     //
00172     interaction->Acceleration(tmp_frame,acc);
00173     //
00174     b2 = acc;
00175     
00176     tmp_frame = frame_in;
00177     for (j=0;j<tmp_frame.size();++j) {
00178       tmp_frame[j].AddToPosition(frame_in[j].velocity() * h / 2.0 + b1[j] * h * h / 8.0);
00179       tmp_frame[j].AddToVelocity(b2[j] * h / 2.0);
00180     }
00181     //
00182     if (interaction->IsSkippingJPLPlanets()) {
00183       tmp_frame.SetTime(frame_in + h / 2.0);
00184       tmp_frame.ForceJPLEphemerisData();
00185     }
00186     //
00187     interaction->Acceleration(tmp_frame,acc);
00188     //
00189     b3 = acc;
00190     
00191     tmp_frame = frame_in;
00192     for (j=0;j<tmp_frame.size();++j) {
00193       tmp_frame[j].AddToPosition(frame_in[j].velocity() * h + b3[j] * h * h / 2.0);
00194       tmp_frame[j].AddToVelocity(b3[j] * h);
00195     }
00196     //
00197     if (interaction->IsSkippingJPLPlanets()) {
00198       tmp_frame.SetTime(frame_in + timestep);
00199       tmp_frame.ForceJPLEphemerisData();
00200     }
00201     //
00202     interaction->Acceleration(tmp_frame,acc);
00203     //
00204     b4 = acc;
00205     
00206     frame_out = frame_in;
00207     for (j=0;j<frame_out.size();++j) {
00208       frame_out[j].AddToPosition(frame_in[j].velocity() * h + h * h / 6.0 * ( b1[j] + b2[j] + b3[j] ));
00209       frame_out[j].AddToVelocity(h / 6.0 * ( b1[j] + 2 * b2[j] + 2 * b3[j] + b4[j] ));
00210     }
00211     
00212     frame_out += timestep;
00213   }

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