Newton Class Reference

#include <orsa_interaction.h>

Inheritance diagram for Newton:
Inheritance graph
[legend]
Collaboration diagram for Newton:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Newton ()
 Newton (const Newton &)
void Acceleration (const Frame &, std::vector< Vector > &)
double PotentialEnergy (const Frame &)
bool depends_on_velocity () const
Interactionclone () const
InteractionType GetType () const
void IncludeMultipoleMoments (const bool b)
bool IsIncludingMultipoleMoments () const
void IncludeRelativisticEffects (const bool b)
bool IsIncludingRelativisticEffects () const
void IncludeFastRelativisticEffects (const bool b)
bool IsIncludingFastRelativisticEffects () const
void SkipJPLPlanets (const bool b)
bool IsSkippingJPLPlanets () const

Protected Attributes

bool skip_JPL_planets

Detailed Description

Definition at line 240 of file orsa_interaction.h.


Constructor & Destructor Documentation

Newton (  ) 

Definition at line 153 of file orsa_interaction.cc.

References Interaction::skip_JPL_planets.

Referenced by Newton::clone().

00153                  : Interaction(), include_multipole_moments(false), include_relativistic_effects(false), include_fast_relativistic_effects(false), one_over_c2(1.0/(GetC()*GetC())) {
00154     skip_JPL_planets = false;
00155   }

Newton ( const Newton n  ) 

Definition at line 157 of file orsa_interaction.cc.

References Interaction::skip_JPL_planets.

00157                                  : Interaction(), include_multipole_moments(n.include_multipole_moments), include_relativistic_effects(n.include_relativistic_effects), include_fast_relativistic_effects(n.include_fast_relativistic_effects), one_over_c2(1.0/(GetC()*GetC())) {
00158     skip_JPL_planets = n.skip_JPL_planets;
00159   }


Member Function Documentation

void Acceleration ( const Frame ,
std::vector< Vector > &   
) [virtual]
Interaction * clone (  )  const [virtual]

Implements Interaction.

Definition at line 161 of file orsa_interaction.cc.

References Newton::Newton().

00161                                     {
00162     return new Newton(*this);
00163   }

Here is the call graph for this function:

bool depends_on_velocity (  )  const [inline, virtual]

Reimplemented from Interaction.

Definition at line 250 of file orsa_interaction.h.

00250                                             { 
00251       return (include_relativistic_effects || include_fast_relativistic_effects); 
00252     }

InteractionType GetType (  )  const [inline, virtual]

Implements Interaction.

Definition at line 257 of file orsa_interaction.h.

References orsa::NEWTON.

00257                                     {
00258       return NEWTON;
00259     }

void IncludeFastRelativisticEffects ( const bool  b  )  [inline]

Definition at line 300 of file orsa_interaction.h.

Referenced by OrsaFile::Read().

00300                                                       {
00301       include_fast_relativistic_effects = b;
00302     }

void IncludeMultipoleMoments ( const bool  b  )  [inline]

Definition at line 271 of file orsa_interaction.h.

Referenced by OrsaFile::Read().

00271                                                {
00272       include_multipole_moments = b;
00273     }

void IncludeRelativisticEffects ( const bool  b  )  [inline]

Definition at line 291 of file orsa_interaction.h.

Referenced by OrsaFile::Read().

00291                                                   {
00292       include_relativistic_effects = b;
00293     }

bool IsIncludingFastRelativisticEffects (  )  const [inline]

Definition at line 303 of file orsa_interaction.h.

Referenced by OrsaFile::Write().

00303                                                     {
00304       return include_fast_relativistic_effects;
00305     }

bool IsIncludingMultipoleMoments (  )  const [inline]

Definition at line 274 of file orsa_interaction.h.

Referenced by OrsaFile::Write().

00274                                              {
00275       return include_multipole_moments;
00276     }

bool IsIncludingRelativisticEffects (  )  const [inline]

Definition at line 294 of file orsa_interaction.h.

Referenced by OrsaFile::Write().

00294                                                 {
00295       return include_relativistic_effects;
00296     }

bool IsSkippingJPLPlanets (  )  const [inline, inherited]
double PotentialEnergy ( const Frame f  )  [virtual]

Implements Interaction.

Definition at line 601 of file orsa_interaction.cc.

References Vector::IsZero(), Vector::Length(), ORSA_WARNING, and Frame::size().

Referenced by GalacticPotentialAllenPlusNewton::PotentialEnergy(), JPLPlanetsNewton::PotentialEnergy(), and Relativistic::PotentialEnergy().

00601                                                {
00602     
00603     if (f.size() < 2) return(0.0);
00604     
00605     double energy = 0.0;
00606     
00607     unsigned int i,j;
00608     
00609     Vector d;
00610     
00611     double l;
00612     
00613     for (i=1;i<f.size();++i) {
00614       
00615       if (f[i].mu()==0) continue;
00616       
00617       for (j=0;j<i;++j) {
00618         
00619         if (f[j].mu()==0) continue;
00620         
00621         d = f[i].DistanceVector(f[j]);
00622         
00623         l = d.Length();
00624         
00625         if (d.IsZero()) {
00626           ORSA_WARNING("two objects in the same position! (%s and %s)",f[i].name().c_str(),f[j].name().c_str());
00627           continue;
00628         }
00629         
00630         energy -= f[i].mu()*f[j].mass()/l;
00631         
00632       } 
00633     }  
00634     
00635     return (energy);
00636   }

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.

00095                                       {
00096       skip_JPL_planets = b;
00097     }


Member Data Documentation

bool skip_JPL_planets [protected, inherited]

The documentation for this class was generated from the following files:

Generated on Fri Nov 6 11:19:59 2009 for liborsa by  doxygen 1.6.1