#include <orsa_integrator.h>
Public Member Functions | |
Stoer () | |
Stoer (int) | |
Stoer (const Stoer &) | |
~Stoer () | |
void | Step (const Frame &, Frame &, Interaction *) |
Integrator * | clone () 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 |
Definition at line 132 of file orsa_integrator.h.
Stoer | ( | ) |
Definition at line 32 of file orsa_integrator_stoer.cc.
References Integrator::m, orsa::STOER, and Integrator::type.
Referenced by Stoer::clone().
Stoer | ( | int | m_ | ) |
Definition at line 37 of file orsa_integrator_stoer.cc.
References Integrator::m, orsa::STOER, and Integrator::type.
Definition at line 42 of file orsa_integrator_stoer.cc.
References Integrator::accuracy, Integrator::m, Integrator::timestep, and Integrator::type.
00042 : MultistepIntegrator() { 00043 type = i.type; 00044 timestep = i.timestep; 00045 accuracy = i.accuracy; 00046 m = i.m; 00047 }
~Stoer | ( | ) |
void Step | ( | const Frame & | frame_in, | |
Frame & | frame_out, | |||
Interaction * | interaction | |||
) | [virtual] |
Implements Integrator.
Definition at line 57 of file orsa_integrator_stoer.cc.
References Interaction::Acceleration(), Frame::ForceJPLEphemerisData(), UniverseTypeAwareTimeStep::GetDouble(), Interaction::IsSkippingJPLPlanets(), Integrator::m, UniverseTypeAwareTime::SetTime(), Frame::size(), and Integrator::timestep.
00057 { 00058 00059 const unsigned int n = frame_in.size(); 00060 double h, h2, hh; // local_x; 00061 00062 unsigned int i, k; 00063 00064 // h = h_tot / m ; 00065 h = timestep.GetDouble() / m ; 00066 h2 = h * 0.5 ; 00067 hh = h * h ; 00068 00069 std::vector<Vector> temp(n),delta(n); 00070 00071 frame_out = frame_in; 00072 00073 // initial values 00074 interaction->Acceleration(frame_out,temp); 00075 00076 for (i=0;i<frame_out.size();++i) { 00077 delta[i] += h * ( frame_out[i].velocity() + h2 * temp[i] ); 00078 frame_out[i].AddToPosition(delta[i]); 00079 } 00080 00081 for ( k=1; k <= (m-1) ; ++k) { 00082 if (interaction->IsSkippingJPLPlanets()) { 00083 frame_out.SetTime(frame_in + h*k); 00084 frame_out.ForceJPLEphemerisData(); 00085 } 00086 for (i=0;i<frame_out.size();++i) { 00087 interaction->Acceleration(frame_out,temp); 00088 delta[i] += hh * temp[i]; 00089 frame_out[i].AddToPosition(delta[i]); 00090 } 00091 } 00092 00093 for (i=0;i<frame_out.size();++i) 00094 frame_out[i].SetVelocity(delta[i]/h + h2 * temp[i]); 00095 00096 // frame_out.time += timestep; 00097 // frame_out.SetTime(frame_in.Time() + timestep); 00098 // frame_out.AddTimeStep(timestep); 00099 // frame_out += timestep; 00100 frame_out.SetTime(frame_in + timestep); 00101 }
Integrator * clone | ( | ) | const [virtual] |
Implements Integrator.
Definition at line 53 of file orsa_integrator_stoer.cc.
References Stoer::Stoer().
00053 { 00054 return new Stoer(*this); 00055 }
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.
IntegratorType GetType | ( | ) | const [inline, inherited] |
Definition at line 98 of file orsa_integrator.h.
References Integrator::type.
Referenced by OrsaFile::Write().
00098 { return type; }
UniverseTypeAwareTimeStep timestep [inherited] |
Definition at line 84 of file orsa_integrator.h.
Referenced by DissipativeRungeKutta::DissipativeRungeKutta(), Evolution::GetIntegratorTimeStep(), Evolution::Integrate(), Leapfrog::Leapfrog(), OptimizedOrbitPositions::PropagatedOrbit(), orsa::PropagatedSky_J2000(), Radau15::Radau15(), RungeKutta::RungeKutta(), Evolution::SetIntegratorTimeStep(), orsa::StartFrame(), Stoer::Step(), DissipativeRungeKutta::Step(), RungeKutta::Step(), Radau15::Step(), Leapfrog::Step(), Stoer::Stoer(), and OrsaFile::Write().
UniverseTypeAwareTimeStep timestep_done [protected, inherited] |
double accuracy [inherited] |
Definition at line 91 of file orsa_integrator.h.
Referenced by DissipativeRungeKutta::DissipativeRungeKutta(), Evolution::GetIntegratorAccuracy(), Leapfrog::Leapfrog(), OptimizedOrbitPositions::PropagatedOrbit(), orsa::PropagatedSky_J2000(), Radau15::Radau15(), RungeKutta::RungeKutta(), Evolution::SetIntegratorAccuracy(), Radau15::Step(), Stoer::Stoer(), and OrsaFile::Write().
unsigned int m [inherited] |
used only with variable step size integrators
Definition at line 92 of file orsa_integrator.h.
Referenced by Stoer::Step(), Stoer::Stoer(), and OrsaFile::Write().
IntegratorType type [protected, inherited] |
Definition at line 101 of file orsa_integrator.h.
Referenced by DissipativeRungeKutta::DissipativeRungeKutta(), Integrator::GetType(), Leapfrog::Leapfrog(), Radau15::Radau15(), RungeKutta::RungeKutta(), and Stoer::Stoer().