#include <orsa_integrator.h>
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 *) |
Integrator * | clone () 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 |
Definition at line 192 of file orsa_integrator.h.
Definition at line 124 of file orsa_integrator_runge_kutta.cc.
References orsa::DISSIPATIVERUNGEKUTTA, and Integrator::type.
Referenced by DissipativeRungeKutta::clone().
00124 : FixedTimestepIntegrator() { 00125 type = DISSIPATIVERUNGEKUTTA; 00126 }
DissipativeRungeKutta | ( | const DissipativeRungeKutta & | i | ) |
Definition at line 128 of file orsa_integrator_runge_kutta.cc.
References Integrator::accuracy, Integrator::timestep, and Integrator::type.
00128 : FixedTimestepIntegrator() { 00129 type = i.type; 00130 timestep = i.timestep; 00131 accuracy = i.accuracy; 00132 // m = i.m; 00133 }
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.
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 }
IntegratorType GetType | ( | ) | const [inline, inherited] |
Definition at line 98 of file orsa_integrator.h.
References Integrator::type.
Referenced by OrsaFile::Write().
00098 { return type; }
void Step | ( | const Frame & | frame_in, | |
Frame & | frame_out, | |||
Interaction * | interaction | |||
) | [virtual] |
Implements Integrator.
Definition at line 143 of file orsa_integrator_runge_kutta.cc.
References Interaction::Acceleration(), Frame::ForceJPLEphemerisData(), UniverseTypeAwareTimeStep::GetDouble(), Interaction::IsSkippingJPLPlanets(), UniverseTypeAwareTime::SetTime(), Frame::size(), and Integrator::timestep.
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 }
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().
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] |
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().