celestial_body Derived Type

type, public, extends(base_class) :: celestial_body

A celestial body (Planet, moon, etc.) The ID from the base_class is the NAIF SPICE ID code for the body


Inherits

type~~celestial_body~~InheritsGraph type~celestial_body celestial_body type~base_class base_class type~celestial_body->type~base_class

Inherited by

type~~celestial_body~~InheritedByGraph type~celestial_body celestial_body type~reference_frame reference_frame type~reference_frame->type~celestial_body primary_body type~two_body_rotating_frame two_body_rotating_frame type~two_body_rotating_frame->type~celestial_body secondary_body type~rotating_frame_class rotating_frame_class type~two_body_rotating_frame->type~rotating_frame_class type~inertial_frame_class inertial_frame_class type~inertial_frame_class->type~reference_frame type~rotating_frame_class->type~reference_frame type~two_body_rotating_pulsating_frame two_body_rotating_pulsating_frame type~two_body_rotating_pulsating_frame->type~two_body_rotating_frame type~ecliptic_frame ecliptic_frame type~ecliptic_frame->type~inertial_frame_class type~iau_rotating_frame_class iau_rotating_frame_class type~iau_rotating_frame_class->type~rotating_frame_class type~icrf_frame icrf_frame type~icrf_frame->type~inertial_frame_class type~iau_earth_rotating_frame iau_earth_rotating_frame type~iau_earth_rotating_frame->type~iau_rotating_frame_class type~iau_moon_rotating_frame iau_moon_rotating_frame type~iau_moon_rotating_frame->type~iau_rotating_frame_class

Components

Type Visibility Attributes Name Initial
integer, public :: id = 0

a unique ID code that distinguishes a variable from other variables of the same type.

character(len=name_len), public :: name = ''

the variable name

real(kind=wp), public :: mu = zero

gravitational parameter []


Type-Bound Procedures

generic, public :: operator(==) => base_class_equal

  • public pure elemental function base_class_equal(b1, b2) result(is_equal)

    == operator for base_class variables. To be equal, they must be the same type and have the same ID.

    Arguments

    Type IntentOptional Attributes Name
    class(base_class), intent(in) :: b1
    class(base_class), intent(in) :: b2

    Return Value logical

generic, public :: operator(/=) => base_class_not_equal

  • public pure elemental function base_class_not_equal(b1, b2) result(not_equal)

    /= operator for base_class variables. To be equal, they must be the same type and have the same ID.

    Arguments

    Type IntentOptional Attributes Name
    class(base_class), intent(in) :: b1
    class(base_class), intent(in) :: b2

    Return Value logical

Source Code

    type,extends(base_class),public :: celestial_body
        !! A celestial body (Planet, moon, etc.)
        !! The `ID` from the [[base_class]] is the NAIF SPICE ID code for the body
        real(wp) :: mu = zero   !! gravitational parameter \( \mu \) [\(km^3/s^2\)]
    end type celestial_body