JPLPlanetsNewton Class Reference

#include <orsa_interaction.h>

Inheritance diagram for JPLPlanetsNewton:

Inheritance graph
[legend]
Collaboration diagram for JPLPlanetsNewton:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 JPLPlanetsNewton (std::list< JPL_planets > &)
 JPLPlanetsNewton (const JPLPlanetsNewton &)
void Acceleration (const orsa::Frame &, std::vector< orsa::Vector > &)
double PotentialEnergy (const orsa::Frame &)
Interactionclone () const
InteractionType GetType () const
virtual void Acceleration (const Frame &, std::vector< Vector > &)=0
virtual double PotentialEnergy (const Frame &)=0
virtual bool depends_on_velocity () const
void SkipJPLPlanets (const bool b)
bool IsSkippingJPLPlanets () const

Protected Attributes

bool skip_JPL_planets

Constructor & Destructor Documentation

JPLPlanetsNewton std::list< JPL_planets > &   ) 
 

Definition at line 949 of file orsa_interaction.cc.

References orsa::GetG(), Universe::GetUniverseType(), orsa::Real, and orsa::universe.

Referenced by JPLPlanetsNewton::clone().

00949                                                              : Interaction(), l(l_in) {
00950     if (universe->GetUniverseType() != Real) {
00951       cerr << "error: using the JPLPlanetsNewton interaction in a non-Real universe!" << endl;
00952       exit(0);
00953     }
00954     g = GetG();
00955   }

Here is the call graph for this function:

JPLPlanetsNewton const JPLPlanetsNewton  ) 
 

Definition at line 957 of file orsa_interaction.cc.

References orsa::GetG(), Universe::GetUniverseType(), orsa::Real, and orsa::universe.

00957                                                                : Interaction(), l(i.l) {
00958     if (universe->GetUniverseType() != Real) {
00959       cerr << "error: using the JPLPlanetsNewton interaction in a non-Real universe!" << endl;
00960       exit(0);
00961     }
00962     g = GetG();
00963   }

Here is the call graph for this function:


Member Function Documentation

virtual void Acceleration const Frame ,
std::vector< Vector > & 
[pure virtual, inherited]
 

Implemented in Newton, GravitationalTree, Relativistic, ArmonicOscillator, GalacticPotentialAllen, and GalacticPotentialAllenPlusNewton.

void Acceleration const orsa::Frame ,
std::vector< orsa::Vector > & 
 

Definition at line 969 of file orsa_interaction.cc.

References UniverseTypeAwareTime::GetDate(), Vector::IsZero(), Vector::Length(), ORSA_ERROR, ORSA_WARNING, Vector::Set(), orsa::SetupSolarSystem(), and Frame::size().

00969                                                                          {
00970     
00971     a.resize(f.size());
00972     
00973     if (planets_frame.GetDate() != f.GetDate()) SetupSolarSystem(planets_frame,l,f);
00974     
00975     for (unsigned int i=0;i<a.size();++i)
00976       a[i].Set(0,0,0);
00977     
00978     for (unsigned int i=0;i<f.size();++i) {
00979       if (f[i].mass() > 0) {
00980         ORSA_ERROR("using the JPLPlanetsNewton interaction with massive objects!");
00981         // exit(0);
00982         return;
00983       }
00984     }
00985     
00986     Vector d;
00987     
00988     double l;
00989     
00990     for (unsigned int i=0;i<f.size();++i) {
00991       
00992       // if (!f[i].StillAlive()) continue;
00993       
00994       for (unsigned int j=0;j<planets_frame.size();++j) {
00995         
00996         // d  =              f[i].position;
00997         // d -=  planets_frame[j].position;
00998         
00999         d = f[i].DistanceVector(planets_frame[j]);
01000         
01001         // ls = d.LengthSquared();
01002         l = d.Length();
01003         
01004         if (d.IsZero()) {
01005           ORSA_WARNING("two objects in the same position! (%s and %s)",
01006                   f[i].name().c_str(),
01007                   planets_frame[j].name().c_str());
01008           continue;
01009         }
01010         
01011         // d *= secure_pow(ls,-1.5);
01012         d /= l*l*l;
01013         
01014         a[i] += d * planets_frame[j].mass();
01015         
01016       }
01017     }
01018     
01019     for (unsigned int i=0;i<a.size();++i) a[i] *= g;
01020   }

Here is the call graph for this function:

Interaction * clone  )  const [virtual]
 

Implements Interaction.

Definition at line 965 of file orsa_interaction.cc.

References JPLPlanetsNewton::JPLPlanetsNewton().

00965                                               {
00966     return new JPLPlanetsNewton(*this);
00967   }

Here is the call graph for this function:

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

Reimplemented in Newton, and Relativistic.

Definition at line 92 of file orsa_interaction.h.

00092 { return false; }

InteractionType GetType  )  const [inline, virtual]
 

Implements Interaction.

Definition at line 510 of file orsa_interaction.h.

References orsa::JPL_PLANETS_NEWTON.

00510                                     {
00511       return JPL_PLANETS_NEWTON;
00512     }

bool IsSkippingJPLPlanets  )  const [inline, inherited]
 

Definition at line 98 of file orsa_interaction.h.

References Interaction::skip_JPL_planets.

Referenced by Evolution::Integrate().

00098                                       {
00099       return skip_JPL_planets;
00100     }

virtual double PotentialEnergy const Frame  )  [pure virtual, inherited]
 

Implemented in Newton, GravitationalTree, Relativistic, ArmonicOscillator, GalacticPotentialAllen, and GalacticPotentialAllenPlusNewton.

double PotentialEnergy const orsa::Frame  ) 
 

Definition at line 1022 of file orsa_interaction.cc.

References Newton::PotentialEnergy(), and orsa::SetupSolarSystem().

01022                                                           {
01023     SetupSolarSystem(planets_frame,l,f);
01024     return newton_itg.PotentialEnergy(planets_frame);
01025   }

Here is the call graph for this function:

void SkipJPLPlanets const bool  b  )  [inline, inherited]
 

Definition at line 95 of file orsa_interaction.h.

References Interaction::skip_JPL_planets.

Referenced by OrsaFile::Read().

00095                                       {
00096       skip_JPL_planets = b;
00097     }


Member Data Documentation

bool skip_JPL_planets [protected, inherited]
 

Definition at line 102 of file orsa_interaction.h.

Referenced by Interaction::IsSkippingJPLPlanets(), and Interaction::SkipJPLPlanets().


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