diff --git a/source/objects.kepler_orbits.F90 b/source/objects.kepler_orbits.F90 index e52005aa64..86e2c3fff7 100644 --- a/source/objects.kepler_orbits.F90 +++ b/source/objects.kepler_orbits.F90 @@ -36,22 +36,27 @@ module Kepler_Orbits keplerOrbit Properties of Kepler orbit objects. + 1 + yes yes - - - - - - - - - - - - - - - + yes + + + + + + + + + + + + + + + + + !!] @@ -71,7 +76,7 @@ module Kepler_Orbits private double precision :: massHostValue , specificReducedMassValue double precision :: radiusApocenterValue , radiusPericenterValue , & - & radiusValue + & radiusValue , massSatelliteValue double precision :: velocityRadialValue , velocityTangentialValue double precision :: thetaValue , phiValue , & & epsilonValue @@ -162,6 +167,7 @@ module Kepler_Orbits procedure :: semiMajorAxisSet => Kepler_Orbits_Semi_Major_Axis_Set procedure :: specificReducedMass => Kepler_Orbits_Specific_Reduced_Mass procedure :: massHost => Kepler_Orbits_Host_Mass + procedure :: massSatellite => Kepler_Orbits_Satellite_Mass procedure :: velocityScale => Kepler_Orbits_Velocity_Scale procedure :: radius => Kepler_Orbits_Radius procedure :: theta => Kepler_Orbits_Theta @@ -187,7 +193,7 @@ module Kepler_Orbits end interface keplerOrbit ! A null orbit. - type(keplerOrbit), public :: zeroKeplerOrbit=keplerOrbit(0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,.false.,.false.,.false.,.false.,.false.,.false.,.false.,.false.,.false.,.false.,.false.,.false.,.false.) + type(keplerOrbit), public :: zeroKeplerOrbit=keplerOrbit(0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,0.0d0,.false.,.false.,.false.,.false.,.false.,.false.,.false.,.false.,.false.,.false.,.false.,.false.,.false.) contains @@ -432,6 +438,7 @@ subroutine Kepler_Orbits_Masses_Set(orbit,massSatellite,massHost) ! Set the mass factor and flag that is set. orbit%specificReducedMassValue=1.0d0/(1.0d0+massSatellite/massHost) orbit%massHostValue =massHost + orbit%massSatelliteValue =massSatellite orbit%massesIsSet =.true. return end subroutine Kepler_Orbits_Masses_Set @@ -656,6 +663,19 @@ double precision function Kepler_Orbits_Specific_Reduced_Mass(orbit) return end function Kepler_Orbits_Specific_Reduced_Mass + double precision function Kepler_Orbits_Satellite_Mass(orbit) + !!{ + Return the mass for this orbit. + !!} + use :: Error, only : Error_Report + implicit none + class(keplerOrbit), intent(inout) :: orbit + + if (.not.orbit%massesIsSet) call Error_Report('satellite mass has not been set for this orbit'//{introspection:location}) + Kepler_Orbits_Satellite_Mass=orbit%massSatelliteValue + return + end function Kepler_Orbits_Satellite_Mass + double precision function Kepler_Orbits_Host_Mass(orbit) !!{ Return the host mass for this orbit.