helio Module

  • The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott
  • 160 statements
  • Source File

Definition of classes and methods specific to the Democratic Heliocentric Method Adapted from David E. Kaufmann’s Swifter routine: module_helio.f90


Uses

  • module~~helio~~UsesGraph module~helio helio module~swiftest swiftest module~helio->module~swiftest module~whm whm module~helio->module~whm globals globals module~swiftest->globals module~base base module~swiftest->module~base module~collision collision module~swiftest->module~collision module~encounter encounter module~swiftest->module~encounter module~io_progress_bar io_progress_bar module~swiftest->module~io_progress_bar module~lambda_function lambda_function module~swiftest->module~lambda_function module~netcdf_io netcdf_io module~swiftest->module~netcdf_io module~operators operators module~swiftest->module~operators module~solver solver module~swiftest->module~solver module~walltime walltime module~swiftest->module~walltime module~whm->module~swiftest module~base->globals module~coarray coarray module~base->module~coarray module~collision->globals module~collision->module~base module~collision->module~encounter module~encounter->globals module~encounter->module~base module~encounter->module~netcdf_io module~io_progress_bar->globals module~io_progress_bar->module~base module~lambda_function->globals module~netcdf_io->globals module~netcdf_io->module~base module~operators->globals module~solver->globals module~solver->module~base module~solver->module~lambda_function ieee_exceptions ieee_exceptions module~solver->ieee_exceptions module~walltime->globals module~walltime->module~base module~coarray->globals

Used by

  • module~~helio~~UsedByGraph module~helio helio module~s_helio_drift s_helio_drift module~s_helio_drift->module~helio module~s_helio_gr s_helio_gr module~s_helio_gr->module~helio module~s_helio_kick s_helio_kick module~s_helio_kick->module~helio module~s_helio_step s_helio_step module~s_helio_step->module~helio module~s_helio_util s_helio_util module~s_helio_util->module~helio module~s_swiftest_util s_swiftest_util module~s_swiftest_util->module~helio module~symba symba module~s_swiftest_util->module~symba module~symba->module~helio module~s_collision_check s_collision_check module~s_collision_check->module~symba module~s_fraggle_generate s_fraggle_generate module~s_fraggle_generate->module~symba module~s_swiftest_io s_swiftest_io module~s_swiftest_io->module~symba module~s_symba_discard s_symba_discard module~s_symba_discard->module~symba module~s_symba_drift s_symba_drift module~s_symba_drift->module~symba module~s_symba_encounter_check s_symba_encounter_check module~s_symba_encounter_check->module~symba module~s_symba_gr s_symba_gr module~s_symba_gr->module~symba module~s_symba_kick s_symba_kick module~s_symba_kick->module~symba module~s_symba_step s_symba_step module~s_symba_step->module~symba module~s_symba_util s_symba_util module~s_symba_util->module~symba

Interfaces

interface

  • public module subroutine helio_drift_body(self, nbody_system, param, dt)

    Arguments

    Type IntentOptional Attributes Name
    class(swiftest_body), intent(inout) :: self

    Swiftest massive body object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(in) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: dt

    Stepsize

interface

  • public module subroutine helio_drift_linear_pl(self, cb, dt, lbeg)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_pl), intent(inout) :: self

    Helio massive body object

    class(helio_cb), intent(inout) :: cb

    Helio central body

    real(kind=DP), intent(in) :: dt

    Stepsize

    logical, intent(in) :: lbeg

    Argument that determines whether or not this is the beginning or end of the step

interface

  • public module subroutine helio_drift_linear_tp(self, cb, dt, lbeg)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_tp), intent(inout) :: self

    Helio test particle object

    class(helio_cb), intent(in) :: cb

    Helio central body

    real(kind=DP), intent(in) :: dt

    Stepsize

    logical, intent(in) :: lbeg

    Argument that determines whether or not this is the beginning or end of the step

interface

  • public module subroutine helio_drift_pl(self, nbody_system, param, dt)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_pl), intent(inout) :: self

    Helio massive body object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(in) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: dt

    Stepsize

interface

  • public module subroutine helio_drift_tp(self, nbody_system, param, dt)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_tp), intent(inout) :: self

    Helio massive body object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(in) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: dt

    Stepsize

interface

  • public pure module subroutine helio_gr_kick_getacch_pl(self, param)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_pl), intent(inout) :: self

    Helio massive body particle data structure

    class(swiftest_parameters), intent(in) :: param

    Current run configuration parameters

interface

  • public pure module subroutine helio_gr_kick_getacch_tp(self, param)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_tp), intent(inout) :: self

    Helio massive body particle data structure

    class(swiftest_parameters), intent(in) :: param

    Current run configuration parameters

interface

  • public pure module subroutine helio_gr_p4_pl(self, nbody_system, param, dt)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_pl), intent(inout) :: self

    Swiftest particle object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(in) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: dt

    Step size

interface

  • public pure module subroutine helio_gr_p4_tp(self, nbody_system, param, dt)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_tp), intent(inout) :: self

    Swiftest particle object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(in) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: dt

    Step size

interface

  • public module subroutine helio_kick_getacch_pl(self, nbody_system, param, t, lbeg)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_pl), intent(inout) :: self

    Helio massive body object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(inout) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: t

    Current simulation time

    logical, intent(in) :: lbeg

    Logical flag that determines whether or not this is the beginning or end of the step

interface

  • public module subroutine helio_kick_getacch_tp(self, nbody_system, param, t, lbeg)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_tp), intent(inout) :: self

    Helio test particle object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(inout) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: t

    Current time

    logical, intent(in) :: lbeg

    Logical flag that determines whether or not this is the beginning or end of the step

interface

  • public module subroutine helio_kick_vb_pl(self, nbody_system, param, t, dt, lbeg)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_pl), intent(inout) :: self

    Helio massive body object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(inout) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: t

    Current time

    real(kind=DP), intent(in) :: dt

    Stepsize

    logical, intent(in) :: lbeg

    Logical flag indicating whether this is the beginning of the half step or not.

interface

  • public module subroutine helio_kick_vb_tp(self, nbody_system, param, t, dt, lbeg)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_tp), intent(inout) :: self

    Helio test particle object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(inout) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: t

    Current time

    real(kind=DP), intent(in) :: dt

    Stepsize

    logical, intent(in) :: lbeg

    Logical flag indicating whether this is the beginning of the half step or not.

interface

  • public module subroutine helio_step_pl(self, nbody_system, param, t, dt)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_pl), intent(inout) :: self

    Helio massive body particle object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system

    class(swiftest_parameters), intent(inout) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: t

    Current simulation time

    real(kind=DP), intent(in) :: dt

    Stepsize

interface

  • public module subroutine helio_step_system(self, param, t, dt)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_nbody_system), intent(inout) :: self

    Helio nbody system object

    class(swiftest_parameters), intent(inout) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: t

    Simulation time

    real(kind=DP), intent(in) :: dt

    Current stepsize

interface

  • public module subroutine helio_step_tp(self, nbody_system, param, t, dt)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_tp), intent(inout) :: self

    Helio test particle object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(inout) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: t

    Current simulation time

    real(kind=DP), intent(in) :: dt

    Stepsizee

interface

  • public module subroutine helio_util_setup_initialize_system(self, system_history, param)

    Arguments

    Type IntentOptional Attributes Name
    class(helio_nbody_system), intent(inout) :: self

    Helio nbody system object

    class(swiftest_storage), intent(inout), allocatable :: system_history

    Stores the system history between output dumps

    class(swiftest_parameters), intent(inout) :: param

    Current run configuration parameters


Derived Types

type, public, extends(swiftest_cb) ::  helio_cb

Helio central body particle class

Components

Type Visibility Attributes Name Initial
real(kind=DP), public :: GM0 = 0.0_DP

Initial G*mass of the central body

real(kind=DP), public :: Gmass = 0.0_DP

Central mass gravitational term G * mass (units GU * MU)

real(kind=DP), public, dimension(NDIM) :: Ip = 0.0_DP

Unitless principal moments of inertia (I1, I2, I3) / (MR**2). Principal axis rotation assumed.

real(kind=DP), public, dimension(NDIM) :: L0 = 0.0_DP

Initial angular momentum of the central body

real(kind=DP), public :: Q = 0.0_DP

Tidal quality factor

real(kind=DP), public :: R0 = 0.0_DP

Initial radius of the central body

real(kind=DP), public, dimension(NDIM) :: agr = 0.0_DP

Acceleration due to post-Newtonian correction

real(kind=DP), public, dimension(NDIM) :: aobl = 0.0_DP

Barycentric acceleration due to central body oblatenes

real(kind=DP), public, dimension(NDIM) :: aoblbeg = 0.0_DP

Barycentric acceleration due to central body oblatenes at beginning of step

real(kind=DP), public, dimension(NDIM) :: aoblend = 0.0_DP

Barycentric acceleration due to central body oblatenes at end of step

real(kind=DP), public, dimension(NDIM) :: atide = 0.0_DP

Barycentric acceleration due to central body oblatenes

real(kind=DP), public, dimension(NDIM) :: atidebeg = 0.0_DP

Barycentric acceleration due to central body oblatenes at beginning of step

real(kind=DP), public, dimension(NDIM) :: atideend = 0.0_DP

Barycentric acceleration due to central body oblatenes at end of step

real(kind=DP), public, dimension(:,:,:), allocatable :: c_lm

Spherical Harmonics coefficients for the central body

real(kind=DP), public :: dGM = 0.0_DP

Change in G*mass of the central body

real(kind=DP), public, dimension(NDIM) :: dL = 0.0_DP

Change in angular momentum of the central body

real(kind=DP), public :: dR = 0.0_DP

Change in the radius of the central body

real(kind=DP), public :: density = 1.0_DP

Central body mass density - calculated internally (units MU / DU**3)

integer(kind=I4B), public :: id = 0

External identifier (unique)

class(swiftest_particle_info), public, allocatable :: info

An abstract class for a generic central body in a Swiftest simulation Particle metadata information

real(kind=DP), public :: j2rp2 = 0.0_DP

J2*R^2 term for central body

real(kind=DP), public :: j4rp4 = 0.0_DP

J4*R^4 term for central body

real(kind=DP), public :: k2 = 0.0_DP

Tidal Love number

real(kind=DP), public :: mass = 0.0_DP

Central body mass (units MU)

real(kind=DP), public, dimension(NDIM) :: ptbeg

negative barycentric velocity of the central body at the beginning of time step

real(kind=DP), public, dimension(NDIM) :: ptend

negative barycentric velocity of the central body at the end of time step

real(kind=DP), public :: radius = 0.0_DP

Central body radius (units DU)

real(kind=DP), public, dimension(NDIM) :: rb = 0.0_DP

Barycentric position (units DU)

real(kind=DP), public, dimension(NDIM) :: rot = 0.0_DP

Body rotation vector in inertial coordinate frame (units rad / TU)

real(kind=DP), public :: rotphase = 0.0_DP

Body rotation phase about the rotation pole (0 to 1)

real(kind=DP), public :: tlag = 0.0_DP

Tidal phase lag angle

real(kind=DP), public, dimension(NDIM) :: vb = 0.0_DP

Barycentric velocity (units DU / TU)

Type-Bound Procedures

procedure, public :: dealloc => swiftest_util_dealloc_cb ../../../../

Deallocates all allocatables and resets all values to defaults

procedure, public :: read_in => swiftest_io_read_in_cb ../../../../

Read in central body initial conditions from an ASCII file

procedure, public :: rotphase_update => swiftest_drift_cb_rotphase_update ../../../../

updates the central body rotation phase

procedure, public :: write_frame => swiftest_io_netcdf_write_frame_cb ../../../../

I/O routine for writing out a single frame of time-series data for all bodies in the system in NetCDF format

procedure, public :: write_info => swiftest_io_netcdf_write_info_cb ../../../../

Dump contents of particle information metadata to file

type, public, extends(whm_nbody_system) ::  helio_nbody_system

Components

Type Visibility Attributes Name Initial
real(kind=DP), public :: E_collisions = 0.0_DP

Energy lost from nbody_system due to collisions

real(kind=DP), public :: E_orbit_error = 0.0_DP
real(kind=DP), public :: E_orbit_orig = 0.0_DP

Initial orbital energy

real(kind=DP), public :: E_untracked = 0.0_DP

Energy gained from nbody_system due to escaped bodies

real(kind=DP), public :: E_untracked_error = 0.0_DP
real(kind=DP), public :: Ecoll_error = 0.0_DP
real(kind=DP), public :: GMescape = 0.0_DP

Mass of bodies that escaped the nbody_system (used for bookeeping)

real(kind=DP), public :: GMtot = 0.0_DP

Total nbody_system mass - used for barycentric coordinate conversion

real(kind=DP), public :: GMtot_orig = 0.0_DP

Initial nbody_system mass

real(kind=DP), public, dimension(NDIM) :: L_escape = 0.0_DP

Angular momentum of bodies that escaped the nbody_system (used for bookeeping)

real(kind=DP), public :: L_escape_error = 0.0_DP
real(kind=DP), public, dimension(NDIM) :: L_orbit = 0.0_DP

nbody_system orbital angular momentum vector

real(kind=DP), public :: L_orbit_error = 0.0_DP
real(kind=DP), public, dimension(NDIM) :: L_orbit_orig = 0.0_DP

Initial orbital angular momentum

real(kind=DP), public, dimension(NDIM) :: L_rot = 0.0_DP

nbody_system rotational angular momentum vector

real(kind=DP), public :: L_rot_error = 0.0_DP
real(kind=DP), public, dimension(NDIM) :: L_rot_orig = 0.0_DP

Initial rotational angular momentum vector

real(kind=DP), public, dimension(NDIM) :: L_total = 0.0_DP

nbody_system angular momentum vector

real(kind=DP), public :: L_total_error = 0.0_DP
real(kind=DP), public, dimension(NDIM) :: L_total_orig = 0.0_DP

Initial total angular momentum vector

real(kind=DP), public :: Mescape_error = 0.0_DP
real(kind=DP), public :: Mtot_error = 0.0_DP
real(kind=DP), public :: be = 0.0_DP

nbody_system binding energy of all bodies

real(kind=DP), public :: be_cb = 0.0_DP

Binding energy of central body (usually orders of magnitude larger than the rest of the system, and therefore tracked seperately)

real(kind=DP), public :: be_error = 0.0_DP
real(kind=DP), public :: be_orig = 0.0_DP

Initial gravitational binding energy

class(swiftest_cb), public, allocatable :: cb

Central body data structure

class(collision_basic), public, allocatable :: collider

Collision system object

class(collision_storage), public, allocatable :: collision_history

Stores encounter history for later retrieval and saving to file

class(encounter_storage), public, allocatable :: encounter_history

Stores encounter history for later retrieval and saving to file

real(kind=DP), public :: ke_orbit = 0.0_DP

nbody_system orbital kinetic energy

real(kind=DP), public :: ke_orbit_error = 0.0_DP
real(kind=DP), public :: ke_orbit_orig = 0.0_DP

Initial orbital kinetic energy

real(kind=DP), public :: ke_rot = 0.0_DP

nbody_system rotational kinetic energy

real(kind=DP), public :: ke_rot_error = 0.0_DP
real(kind=DP), public :: ke_rot_orig = 0.0_DP

Initial rotational kinetic energy

logical, public :: lbeg

True if this is the beginning of a step. This is used so that test particle steps can be calculated separately from massive bodies. Massive body variables are saved at half steps, and passed to the test particles

logical, public :: lfirst_io = .true.

Flag to indicate that this is the first time to write to a file

logical, public :: lfirst_peri = .true.

Flag to indicate that this is the first pericenter passage

integer(kind=I4B), public :: maxid = -1

The current maximum particle id number

real(kind=DP), public :: oblpot = 0.0_DP

nbody_system potential energy due to oblateness of the central body

real(kind=DP), public :: pe = 0.0_DP

nbody_system potential energy

real(kind=DP), public :: pe_error = 0.0_DP
real(kind=DP), public :: pe_orig = 0.0_DP

Initial potential energy

class(swiftest_pl), public, allocatable :: pl

Massive body data structure

class(swiftest_pl), public, allocatable :: pl_adds

List of added bodies in mergers or collisions

class(swiftest_pl), public, allocatable :: pl_discards

Discarded massive body particle data structure

class(collision_list_plpl), public, allocatable :: plpl_collision

List of massive body-massive body collisions in a single step

class(encounter_list), public, allocatable :: plpl_encounter

List of massive body-massive body encounters in a single step

class(collision_list_pltp), public, allocatable :: pltp_collision

List of massive body-test particle collisions in a single step

class(encounter_list), public, allocatable :: pltp_encounter

List of massive body-test particle encounters in a single step

real(kind=DP), public :: t = -1.0_DP

Integration current time

real(kind=DP), public :: te = 0.0_DP

nbody_system total energy

real(kind=DP), public :: te_error = 0.0_DP
real(kind=DP), public :: te_orig = 0.0_DP

Initial total energy (sum of all sources of energy tracked)

class(swiftest_tp), public, allocatable :: tp

Test particle data structure

class(swiftest_tp), public, allocatable :: tp_adds

List of added bodies in mergers or collisions

class(swiftest_tp), public, allocatable :: tp_discards

Discarded test particle data structure

Type-Bound Procedures

procedure, public :: coarray_balance => swiftest_coarray_balance_system ../../../../

Checks whether or not the test particle coarrays need to be rebalanced.

procedure, public :: coarray_collect => swiftest_coarray_collect_system ../../../../

Collects all the test particles from other images into the image #1 test particle system

procedure, public :: coarray_distribute => swiftest_coarray_distribute_system ../../../../

Distributes test particles from image #1 out to all images.

procedure, public :: compact_output => swiftest_io_compact_output ../../../../

Prints out out terminal output when display_style is set to COMPACT

procedure, public :: conservation_report => swiftest_io_conservation_report ../../../../

Compute energy and momentum and print out the change with time

procedure, public :: dealloc => swiftest_util_dealloc_system ../../../../

Deallocates all allocatables and resets all values to defaults. Acts as a base for a finalizer

procedure, public :: discard => swiftest_discard_system ../../../../

Perform a discard step on the nbody_system

procedure, public :: display_run_information => swiftest_io_display_run_information ../../../../

Displays helpful information about the run

procedure, public :: dump => swiftest_io_dump_system ../../../../

Dump the state of the nbody_system to a file

procedure, public :: get_energy_and_momentum => swiftest_util_get_energy_and_momentum_system ../../../../

Calculates the total nbody_system energy and momentum

procedure, public :: get_idvals => swiftest_util_get_idvalues_system ../../../../

Returns an array of all id values in use in the nbody_system

procedure, public :: get_t0_values => swiftest_io_netcdf_get_t0_values_system ../../../../

Validates the dump file to check whether the dump file initial conditions duplicate the last frame of the netcdf output.

procedure, public :: init_particle_info => swiftest_util_setup_initialize_particle_info_system

Initialize the nbody_system from input files

Read more…
procedure, public :: initialize => helio_util_setup_initialize_system ../../../../

Performs Helio-specific initilization steps, including converting to DH coordinates

procedure, public :: initialize_output_file => swiftest_io_initialize_output_file_system ../../../../

Write a frame of input data from file

procedure, public :: obl_pot => swiftest_obl_pot_system ../../../../

Compute the contribution to the total gravitational potential due solely to the oblateness of the central body

procedure, public :: read_frame => swiftest_io_netcdf_read_frame_system ../../../../

Read in a frame of input data from file

procedure, public :: read_hdr => swiftest_io_netcdf_read_hdr_system ../../../../

Read a header for an output frame in NetCDF format

procedure, public :: read_in => swiftest_io_read_in_system ../../../../

Reads the initial conditions for an nbody system

procedure, public :: read_particle_info => swiftest_io_netcdf_read_particle_info_system ../../../../

Read in particle metadata from file

procedure, public :: rescale => swiftest_util_rescale_system ../../../../

Rescales the nbody_system into a new set of units

procedure, public :: set_msys => swiftest_util_set_msys ../../../../

Sets the value of msys from the masses of nbody_system bodies.

procedure, public :: step => helio_step_system ../../../../

Advance the Helio nbody system forward in time by one step

procedure, public :: validate_ids => swiftest_util_valid_id_system ../../../../

Validate the numerical ids passed to the nbody_system and save the maximum value

procedure, public :: write_frame => swiftest_io_netcdf_write_frame_system ../../../../

Write a frame of input data from file

procedure, public :: write_hdr => swiftest_io_netcdf_write_hdr_system ../../../../

Write a header for an output frame in NetCDF format

type, public, extends(swiftest_pl) ::  helio_pl

Helio massive body particle class

Components

Type Visibility Attributes Name Initial
real(kind=DP), public, dimension(:), allocatable :: Gmass

Mass gravitational term G * mass (units GU * MU)

real(kind=DP), public, dimension(:,:), allocatable :: Ip

Unitless principal moments of inertia (I1, I2, I3) / (MR**2). Principal axis rotation assumed.

real(kind=DP), public, dimension(:), allocatable :: Q

Tidal quality factor

real(kind=DP), public, dimension(:), allocatable :: a

Semimajor axis (pericentric distance for a parabolic orbit)

real(kind=DP), public, dimension(:,:), allocatable :: agr

Acceleration due to post-Newtonian correction

real(kind=DP), public, dimension(:,:), allocatable :: ah

Total heliocentric acceleration

real(kind=DP), public, dimension(:,:), allocatable :: aobl

Barycentric accelerations of bodies due to central body oblatenes

real(kind=DP), public, dimension(:,:), allocatable :: atide

Tanngential component of acceleration of bodies due to tides

real(kind=DP), public, dimension(:), allocatable :: atp

semimajor axis following perihelion passage

real(kind=DP), public, dimension(:), allocatable :: capm

Mean anomaly

real(kind=DP), public, dimension(:), allocatable :: capom

Longitude of ascending node

real(kind=DP), public, dimension(:), allocatable :: density

Body mass density - calculated internally (units MU / DU**3)

real(kind=DP), public, dimension(:), allocatable :: e

Eccentricity

integer(kind=I4B), public, dimension(:), allocatable :: id

Identifier

real(kind=DP), public, dimension(:), allocatable :: inc

Inclination

type(swiftest_particle_info), public, dimension(:), allocatable :: info

Particle metadata information

real(kind=DP), public, dimension(:), allocatable :: ir3h

Inverse heliocentric radius term (1/rh**3)

integer(kind=I4B), public, dimension(:), allocatable :: isperi

perihelion passage flag

real(kind=DP), public, dimension(:), allocatable :: k2

Tidal Love number

integer(kind=I4B), public, dimension(:,:), allocatable :: k_plpl

Index array used to convert flattened the body-body comparison upper triangular matrix

type(swiftest_kinship), public, dimension(:), allocatable :: kin

Array of merger relationship structures that can account for multiple pairwise mergers in a single step

logical, public, dimension(:), allocatable :: lcollision

flag indicating whether body has merged with another this time step

logical, public, dimension(:), allocatable :: ldiscard

Body should be discarded

logical, public, dimension(:), allocatable :: lencounter

flag indicating whether body is part of an encounter this time step

logical, public :: lfirst = .true.

Run the current step as a first

logical, public, dimension(:), allocatable :: lmask

Logical mask used to select a subset of bodies when performing certain operations (drift, kick, accel, etc.)

logical, public, dimension(:), allocatable :: lmtiny

flag indicating whether this body is below the GMTINY cutoff value

real(kind=DP), public, dimension(:), allocatable :: mass

Body mass (units MU)

real(kind=DP), public, dimension(:), allocatable :: mu

G * (Mcb + [m])

integer(kind=I4B), public :: nbody = 0

Number of bodies

integer(kind=I4B), public, dimension(:), allocatable :: nplenc

number of encounters with other planets this time step

integer(kind=I4B), public :: nplm = 0

number of bodies above the GMTINY limit

integer(kind=I8B), public :: nplpl

Number of body-body comparisons in the flattened upper triangular matrix

integer(kind=I8B), public :: nplplm

Number of body (all massive)-body (only those above GMTINY) comparisons in the flattened upper triangular matrix

integer(kind=I4B), public, dimension(:), allocatable :: ntpenc

number of encounters with test particles this time step

real(kind=DP), public, dimension(:), allocatable :: omega

Argument of pericenter

real(kind=DP), public, dimension(:), allocatable :: peri

perihelion distance

real(kind=DP), public, dimension(:), allocatable :: radius

Body radius (units DU)

real(kind=DP), public, dimension(:,:), allocatable :: rb

Barycentric position

real(kind=DP), public, dimension(:,:), allocatable :: rbeg

Position at beginning of step

real(kind=DP), public, dimension(:), allocatable :: renc

Critical radius for close encounters

real(kind=DP), public, dimension(:,:), allocatable :: rend

Position at end of step

real(kind=DP), public, dimension(:,:), allocatable :: rh

Heliocentric position

real(kind=DP), public, dimension(:), allocatable :: rhill

Body mass (units MU)

real(kind=DP), public, dimension(:,:), allocatable :: rot

Body rotation vector in inertial coordinate frame (units rad / TU)

integer(kind=I4B), public, dimension(:), allocatable :: status

An integrator-specific status indicator

real(kind=DP), public, dimension(:), allocatable :: tlag

Tidal phase lag

real(kind=DP), public, dimension(:,:), allocatable :: vb

Barycentric velocity

real(kind=DP), public, dimension(:,:), allocatable :: vbeg

Velocity at beginning of step

real(kind=DP), public, dimension(:,:), allocatable :: vh

Heliocentric velocity

Type-Bound Procedures

procedure, public :: accel => helio_kick_getacch_pl ../../../../

Compute heliocentric accelerations of massive bodies

procedure, public :: accel_gr => helio_gr_kick_getacch_pl ../../../../

Acceleration term arising from the post-Newtonian correction

procedure, public :: accel_int => swiftest_kick_getacch_int_pl ../../../../

Compute direct cross (third) term heliocentric accelerations of massive bodies

procedure, public :: accel_non_spherical_cb => swiftest_non_spherical_cb_acc_pl ../../../../

Compute the barycentric accelerations of bodies due to the oblateness of the central body

procedure, public :: accel_user => swiftest_user_kick_getacch_body ../../../../

Add user-supplied heliocentric accelerations to planets

procedure, public :: append => swiftest_util_append_pl ../../../../

Appends elements from one structure to another

procedure, public :: b2h => swiftest_util_coord_b2h_pl ../../../../

Convert massive bodies from barycentric to heliocentric coordinates (position and velocity)

procedure, public :: dealloc => swiftest_util_dealloc_pl ../../../../

Deallocates all allocatable arrays

procedure, public :: discard => swiftest_discard_pl ../../../../

Placeholder method for discarding massive bodies

procedure, public :: drift => helio_drift_pl ../../../../

Method for Danby drift in Democratic Heliocentric coordinates

procedure, public :: el2xv => swiftest_orbel_el2xv_vec ../../../../

Convert orbital elements to position and velocity vectors

procedure, public :: fill => swiftest_util_fill_pl ../../../../

“Fills” bodies from one object into another depending on the results of a mask (uses the UNPACK intrinsic)

procedure, public :: flatten => swiftest_util_flatten_eucl_plpl ../../../../

Sets up the (i, j) -> k indexing used for the single-loop blocking Euclidean distance matrix

procedure, public :: get_peri => swiftest_util_peri_body ../../../../

Determine nbody_system pericenter passages for test particles

procedure, public :: gr_pos_kick => helio_gr_p4_pl ../../../../

Position kick due to p**4 term in the post-Newtonian correction

procedure, public :: h2b => swiftest_util_coord_h2b_pl ../../../../

Convert massive bodies from heliocentric to barycentric coordinates (position and velocity)

procedure, public :: kick => helio_kick_vb_pl ../../../../

Kicks the barycentric velocities

procedure, public :: lindrift => helio_drift_linear_pl ../../../../

Method for linear drift of massive bodies due to barycentric momentum of Sun

procedure, public :: make_impactors => swiftest_util_make_impactors_pl ../../../../

Make impactors out of the current kinship relationships

procedure, public :: pv2v => swiftest_gr_pv2vh_body ../../../../

Converts from psudeovelocity to velocity for GR calculations using symplectic integrators

generic, public :: read_frame => read_frame_bin ../../../../

Add the generic read frame for Fortran binary files

procedure, public :: read_frame_bin => swiftest_io_read_frame_body ../../../../

I/O routine for writing out a single frame of time-series data for the central body

procedure, public :: read_in => swiftest_io_read_in_body ../../../../

Read in body initial conditions from an ascii file

procedure, public :: rearrange => swiftest_util_sort_rearrange_pl ../../../../

Rearranges the order of array elements of body based on an input index array. Used in sorting methods

procedure, public :: rearray => swiftest_util_rearray_pl ../../../../

Clean up the massive body structures to remove discarded bodies and add new bodies

procedure, public :: reset_kinship => swiftest_util_reset_kinship_pl ../../../../

Resets the kinship status of bodies

procedure, public :: resize => swiftest_util_resize_pl ../../../../

Checks the current size of a Swiftest body against the requested size and resizes it if it is too small.

procedure, public :: rh2rb => swiftest_util_coord_rh2rb_pl ../../../../

Convert massive bodies from heliocentric to barycentric coordinates (position only)

procedure, public :: save_discard => swiftest_util_save_discard_body ../../../../

Saves a snapshot of the this body to the collision storage object

procedure, public :: set_beg_end => swiftest_util_set_beg_end_pl ../../../../

Sets the beginning and ending positions and velocities of planets.

procedure, public :: set_ir3 => swiftest_util_set_ir3h ../../../../

Sets the inverse heliocentric radius term (1/rh**3)

procedure, public :: set_mu => swiftest_util_set_mu_pl ../../../../

Method used to construct the vectorized form of the central body mass

generic, public :: set_renc => set_renc_I4B, set_renc_DP
procedure, public :: set_renc_DP => swiftest_util_set_renc_DP ../../../../

Sets the critical radius for encounter given an input real scale factor

procedure, public :: set_renc_I4B => swiftest_util_set_renc_I4B ../../../../

Sets the critical radius for encounter given an inpput integer scale factor

procedure, public :: set_rhill => swiftest_util_set_rhill ../../../../

Calculates the Hill’s radii for each body

procedure, public :: setup => swiftest_util_setup_pl

A base constructor that sets the number of bodies and allocates and initializes all arrays

Read more…
procedure, public :: sort => swiftest_util_sort_pl ../../../../

Sorts body arrays by a sortable component

procedure, public :: spill => swiftest_util_spill_pl ../../../../

“Spills” bodies from one object to another depending on the results of a mask (uses the PACK intrinsic)

procedure, public :: step => helio_step_pl ../../../../

Steps the body forward one stepsize

procedure, public :: v2pv => swiftest_gr_vh2pv_body ../../../../

Converts from velocity to psudeovelocity for GR calculations using symplectic integrators

procedure, public :: vb2vh => swiftest_util_coord_vb2vh_pl ../../../../

Convert massive bodies from barycentric to heliocentric coordinates (velocity only)

procedure, public :: vh2vb => swiftest_util_coord_vh2vb_pl ../../../../

Convert massive bodies from heliocentric to barycentric coordinates (velocity only)

procedure, public :: write_frame => swiftest_io_netcdf_write_frame_body ../../../../

I/O routine for writing out a single frame of time-series data for all bodies in the nbody_system in NetCDF format

procedure, public :: write_info => swiftest_io_netcdf_write_info_body ../../../../

Dump contents of particle information metadata to file

procedure, public :: xv2el => swiftest_orbel_xv2el_vec ../../../../

Convert position and velocity vectors to orbital elements

type, public, extends(swiftest_tp) ::  helio_tp

Helio test particle class

Components

Type Visibility Attributes Name Initial
real(kind=DP), public, dimension(:), allocatable :: a

Semimajor axis (pericentric distance for a parabolic orbit)

real(kind=DP), public, dimension(:,:), allocatable :: agr

Acceleration due to post-Newtonian correction

real(kind=DP), public, dimension(:,:), allocatable :: ah

Total heliocentric acceleration

real(kind=DP), public, dimension(:,:), allocatable :: aobl

Barycentric accelerations of bodies due to central body oblatenes

real(kind=DP), public, dimension(:,:), allocatable :: atide

Tanngential component of acceleration of bodies due to tides

real(kind=DP), public, dimension(:), allocatable :: atp

semimajor axis following perihelion passage

real(kind=DP), public, dimension(:), allocatable :: capm

Mean anomaly

real(kind=DP), public, dimension(:), allocatable :: capom

Longitude of ascending node

real(kind=DP), public, dimension(:), allocatable :: e

Eccentricity

integer(kind=I4B), public, dimension(:), allocatable :: id

Identifier

real(kind=DP), public, dimension(:), allocatable :: inc

Inclination

type(swiftest_particle_info), public, dimension(:), allocatable :: info

Particle metadata information

real(kind=DP), public, dimension(:), allocatable :: ir3h

Inverse heliocentric radius term (1/rh**3)

integer(kind=I4B), public, dimension(:), allocatable :: isperi

perihelion passage flag

integer(kind=I4B), public, dimension(:,:), allocatable :: k_pltp

Index array used to convert flattened the body-body comparison upper triangular matrix

logical, public, dimension(:), allocatable :: lcollision

flag indicating whether body has merged with another this time step

logical, public, dimension(:), allocatable :: ldiscard

Body should be discarded

logical, public, dimension(:), allocatable :: lencounter

flag indicating whether body is part of an encounter this time step

logical, public :: lfirst = .true.

Run the current step as a first

logical, public, dimension(:), allocatable :: lmask

Logical mask used to select a subset of bodies when performing certain operations (drift, kick, accel, etc.)

real(kind=DP), public, dimension(:), allocatable :: mu

G * (Mcb + [m])

integer(kind=I4B), public :: nbody = 0

Number of bodies

integer(kind=I4B), public, dimension(:), allocatable :: nplenc

number of encounters with planets this time step

integer(kind=I8B), public :: npltp

Number of pl-tp comparisons in the flattened upper triangular matrix

real(kind=DP), public, dimension(:), allocatable :: omega

Argument of pericenter

real(kind=DP), public, dimension(:), allocatable :: peri

perihelion distance

real(kind=DP), public, dimension(:,:), allocatable :: rb

Barycentric position

real(kind=DP), public, dimension(:,:), allocatable :: rh

Heliocentric position

integer(kind=I4B), public, dimension(:), allocatable :: status

An integrator-specific status indicator

real(kind=DP), public, dimension(:,:), allocatable :: vb

Barycentric velocity

real(kind=DP), public, dimension(:,:), allocatable :: vh

Heliocentric velocity

Type-Bound Procedures

procedure, public :: accel => helio_kick_getacch_tp ../../../../

Compute heliocentric accelerations of massive bodies

procedure, public :: accel_gr => helio_gr_kick_getacch_tp ../../../../

Acceleration term arising from the post-Newtonian correction

procedure, public :: accel_int => swiftest_kick_getacch_int_tp ../../../../

Compute direct cross (third) term heliocentric accelerations of test particles by massive bodies

procedure, public :: accel_non_spherical_cb => swiftest_non_spherical_cb_acc_tp ../../../../

Compute the barycentric accelerations of bodies due to the oblateness of the central body

procedure, public :: accel_user => swiftest_user_kick_getacch_body ../../../../

Add user-supplied heliocentric accelerations to planets

procedure, public :: append => swiftest_util_append_tp ../../../../

Appends elements from one structure to another

procedure, public :: b2h => swiftest_util_coord_b2h_tp ../../../../

Convert test particles from barycentric to heliocentric coordinates (position and velocity)

procedure, public :: dealloc => swiftest_util_dealloc_tp ../../../../

Deallocates all allocatable arrays

procedure, public :: discard => swiftest_discard_tp ../../../../

Check to see if test particles should be discarded based on their positions relative to the massive bodies

procedure, public :: drift => helio_drift_tp ../../../../

Method for Danby drift in Democratic Heliocentric coordinates

procedure, public :: el2xv => swiftest_orbel_el2xv_vec ../../../../

Convert orbital elements to position and velocity vectors

procedure, public :: fill => swiftest_util_fill_tp ../../../../

“Fills” bodies from one object into another depending on the results of a mask (uses the UNPACK intrinsic)

procedure, public :: get_peri => swiftest_util_peri_body ../../../../

Determine nbody_system pericenter passages for test particles

procedure, public :: gr_pos_kick => helio_gr_p4_tp ../../../../

Position kick due to p**4 term in the post-Newtonian correction

procedure, public :: h2b => swiftest_util_coord_h2b_tp ../../../../

Convert test particles from heliocentric to barycentric coordinates (position and velocity)

procedure, public :: kick => helio_kick_vb_tp ../../../../

Kicks the barycentric velocities

procedure, public :: lindrift => helio_drift_linear_tp ../../../../

Method for linear drift of massive bodies due to barycentric momentum of Sun

procedure, public :: pv2v => swiftest_gr_pv2vh_body ../../../../

Converts from psudeovelocity to velocity for GR calculations using symplectic integrators

generic, public :: read_frame => read_frame_bin ../../../../

Add the generic read frame for Fortran binary files

procedure, public :: read_frame_bin => swiftest_io_read_frame_body ../../../../

I/O routine for writing out a single frame of time-series data for the central body

procedure, public :: read_in => swiftest_io_read_in_body ../../../../

Read in body initial conditions from an ascii file

procedure, public :: rearrange => swiftest_util_sort_rearrange_tp ../../../../

Rearranges the order of array elements of body based on an input index array. Used in sorting methods

procedure, public :: rearray => swiftest_util_rearray_tp ../../../../

Clean up the test particle structures to remove discarded bodies

procedure, public :: resize => swiftest_util_resize_tp ../../../../

Checks the current size of a Swiftest body against the requested size and resizes it if it is too small.

procedure, public :: rh2rb => swiftest_util_coord_rh2rb_tp ../../../../

Convert test particles from heliocentric to barycentric coordinates (position only)

procedure, public :: save_discard => swiftest_util_save_discard_body ../../../../

Saves a snapshot of the this body to the collision storage object

procedure, public :: set_ir3 => swiftest_util_set_ir3h ../../../../

Sets the inverse heliocentric radius term (1/rh**3)

procedure, public :: set_mu => swiftest_util_set_mu_tp ../../../../

Method used to construct the vectorized form of the central body mass

procedure, public :: setup => swiftest_util_setup_tp ../../../../

A base constructor that sets the number of bodies and

procedure, public :: sort => swiftest_util_sort_tp ../../../../

Sorts body arrays by a sortable component

procedure, public :: spill => swiftest_util_spill_tp ../../../../

“Spills” bodies from one object to another depending on the results of a mask (uses the PACK intrinsic)

procedure, public :: step => helio_step_tp ../../../../

Steps the body forward one stepsize

procedure, public :: v2pv => swiftest_gr_vh2pv_body ../../../../

Converts from velocity to psudeovelocity for GR calculations using symplectic integrators

procedure, public :: vb2vh => swiftest_util_coord_vb2vh_tp ../../../../

Convert test particles from barycentric to heliocentric coordinates (velocity only)

procedure, public :: vh2vb => swiftest_util_coord_vh2vb_tp ../../../../

Convert test particles from heliocentric to barycentric coordinates (velocity only)

procedure, public :: write_frame => swiftest_io_netcdf_write_frame_body ../../../../

I/O routine for writing out a single frame of time-series data for all bodies in the nbody_system in NetCDF format

procedure, public :: write_info => swiftest_io_netcdf_write_info_body ../../../../

Dump contents of particle information metadata to file

procedure, public :: xv2el => swiftest_orbel_xv2el_vec ../../../../

Convert position and velocity vectors to orbital elements