Definition of classes and methods used to determine close encounters
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=*), | public, | parameter | :: | ENCOUNTER_OUTFILE | = | 'encounters.nc' | Name of NetCDF output file for encounter information |
| real(kind=DP), | public, | parameter | :: | RSWEEP_FACTOR | = | 1.1_DP |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_parameters), | intent(inout) | :: | param | Current Swiftest run configuration parameter5s |
||
| integer(kind=I4B), | intent(in) | :: | npl | Total number of massive bodies |
||
| real(kind=DP), | intent(in), | dimension(:,:) | :: | r | Position vectors of massive bodies |
|
| real(kind=DP), | intent(in), | dimension(:,:) | :: | v | Velocity vectors of massive bodies |
|
| real(kind=DP), | intent(in), | dimension(:) | :: | renc | Critical radii of massive bodies that defines an encounter |
|
| real(kind=DP), | intent(in) | :: | dt | Step size |
||
| integer(kind=I8B), | intent(out) | :: | nenc | Total number of encounters |
||
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index1 | List of indices for body 1 in each encounter |
|
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index2 | List of indices for body 2 in each encounter |
|
| logical, | intent(out), | dimension(:), allocatable | :: | lvdotr | Logical flag indicating the sign of v .dot. x |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_parameters), | intent(inout) | :: | param | Current Swiftest run configuration parameter5s |
||
| integer(kind=I4B), | intent(in) | :: | nplm | Total number of fully interacting massive bodies |
||
| integer(kind=I4B), | intent(in) | :: | nplt | Total number of partially interacting masive bodies (GM < GMTINY) |
||
| real(kind=DP), | intent(in), | dimension(:,:) | :: | rplm | Position vectors of fully interacting massive bodies |
|
| real(kind=DP), | intent(in), | dimension(:,:) | :: | vplm | Velocity vectors of fully interacting massive bodies |
|
| real(kind=DP), | intent(in), | dimension(:,:) | :: | rplt | Position vectors of partially interacting massive bodies |
|
| real(kind=DP), | intent(in), | dimension(:,:) | :: | vplt | Velocity vectors of partially interacting massive bodies |
|
| real(kind=DP), | intent(in), | dimension(:) | :: | rencm | Critical radii of fully interacting massive bodies that defines an encounter |
|
| real(kind=DP), | intent(in), | dimension(:) | :: | renct | Critical radii of partially interacting massive bodies that defines an encounter |
|
| real(kind=DP), | intent(in) | :: | dt | Step size |
||
| integer(kind=I8B), | intent(out) | :: | nenc | Total number of encounters |
||
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index1 | List of indices for body 1 in each encounter |
|
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index2 | List of indices for body 2 in each encounter |
|
| logical, | intent(out), | dimension(:), allocatable | :: | lvdotr | Logical flag indicating the sign of v .dot. x |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_parameters), | intent(inout) | :: | param | Current Swiftest run configuration parameter5s |
||
| integer(kind=I4B), | intent(in) | :: | npl | Total number of massive bodies |
||
| integer(kind=I4B), | intent(in) | :: | ntp | Total number of test particles |
||
| real(kind=DP), | intent(in), | dimension(:,:) | :: | rpl | Position vectors of massive bodies |
|
| real(kind=DP), | intent(in), | dimension(:,:) | :: | vpl | Velocity vectors of massive bodies |
|
| real(kind=DP), | intent(in), | dimension(:,:) | :: | rtp | Position vectors of massive bodies |
|
| real(kind=DP), | intent(in), | dimension(:,:) | :: | vtp | Velocity vectors of massive bodies |
|
| real(kind=DP), | intent(in), | dimension(:) | :: | renc | Critical radii of massive bodies that defines an encounter |
|
| real(kind=DP), | intent(in) | :: | dt | Step size |
||
| integer(kind=I8B), | intent(out) | :: | nenc | Total number of encounters |
||
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index1 | List of indices for body 1 in each encounter |
|
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index2 | List of indices for body 2 in each encounter |
|
| logical, | intent(out), | dimension(:), allocatable | :: | lvdotr | Logical flag indicating the sign of v .dot. x |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_list), | intent(in), | dimension(:) | :: | ragged_list | The ragged encounter list |
|
| integer(kind=I4B), | intent(in) | :: | n1 | Number of bodies 1 |
||
| integer(kind=I8B), | intent(out) | :: | nenc | Total number of encountersj |
||
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index1 | Array of indices for body 1 |
|
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index2 | Array of indices for body 1 |
|
| logical, | intent(out), | optional | dimension(:), allocatable | :: | lvdotr | Array indicating which bodies are approaching |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(in) | :: | xr | Relative distance vector components |
||
| real(kind=DP), | intent(in) | :: | yr | Relative distance vector components |
||
| real(kind=DP), | intent(in) | :: | zr | Relative distance vector components |
||
| real(kind=DP), | intent(in) | :: | vxr | Relative velocity vector components |
||
| real(kind=DP), | intent(in) | :: | vyr | Relative velocity vector components |
||
| real(kind=DP), | intent(in) | :: | vzr | Relative velocity vector components |
||
| real(kind=DP), | intent(in) | :: | renc | Critical encounter distance |
||
| real(kind=DP), | intent(in) | :: | dt | Step size |
||
| logical, | intent(out) | :: | lencounter | Flag indicating that an encounter has occurred |
||
| logical, | intent(out) | :: | lvdotr | Logical flag indicating the direction of the v .dot. r vector |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_bounding_box_1D), | intent(inout) | :: | self | Bounding box structure along a single dimension |
||
| integer(kind=I4B), | intent(in) | :: | n | Number of bodies with extents |
||
| real(kind=DP), | intent(in), | dimension(:) | :: | extent_arr | Array of extents of size 2*n |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_bounding_box), | intent(inout) | :: | self | Multi-dimensional bounding box structure |
||
| integer(kind=I4B), | intent(in) | :: | n1 | Number of bodies 1 |
||
| integer(kind=I4B), | intent(in) | :: | n2 | Number of bodies 2 |
||
| real(kind=DP), | intent(in), | dimension(:,:) | :: | r1 | Array of indices of bodies 1 |
|
| real(kind=DP), | intent(in), | dimension(:,:) | :: | v1 | Array of indices of bodies 1 |
|
| real(kind=DP), | intent(in), | dimension(:,:) | :: | r2 | Array of indices of bodies 2 |
|
| real(kind=DP), | intent(in), | dimension(:,:) | :: | v2 | Array of indices of bodies 2 |
|
| real(kind=DP), | intent(in), | dimension(:) | :: | renc1 | Radius of encounter regions of bodies 1 |
|
| real(kind=DP), | intent(in), | dimension(:) | :: | renc2 | Radius of encounter regions of bodies 2 |
|
| real(kind=DP), | intent(in) | :: | dt | Step size |
||
| integer(kind=I8B), | intent(out) | :: | nenc | Total number of encounter candidates |
||
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index1 | List of indices for body 1 in each encounter candidate pair |
|
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index2 | List of indices for body 2 in each encounter candidate pair |
|
| logical, | intent(out), | dimension(:), allocatable | :: | lvdotr | Logical array indicating which pairs are approaching |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_bounding_box), | intent(inout) | :: | self | Multi-dimensional bounding box structure |
||
| integer(kind=I4B), | intent(in) | :: | n | Number of bodies |
||
| real(kind=DP), | intent(in), | dimension(:,:) | :: | r | Array of position and velocity vectors |
|
| real(kind=DP), | intent(in), | dimension(:,:) | :: | v | Array of position and velocity vectors |
|
| real(kind=DP), | intent(in), | dimension(:) | :: | renc | Radius of encounter regions of bodies 1 |
|
| real(kind=DP), | intent(in) | :: | dt | Step size |
||
| integer(kind=I8B), | intent(out) | :: | nenc | Total number of encounter candidates |
||
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index1 | List of indices for one body in each encounter candidate pair |
|
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index2 | List of indices for the other body in each encounter candidate pair |
|
| logical, | intent(out), | dimension(:), allocatable | :: | lvdotr | Logical array indicating which pairs are approaching |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_storage), | intent(inout) | :: | self | Encounter storage object |
||
| class(base_parameters), | intent(inout) | :: | param | Current run configuration parameters |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_netcdf_parameters), | intent(inout) | :: | self | Parameters used to identify a particular NetCDF dataset |
||
| class(base_parameters), | intent(in) | :: | param |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_netcdf_parameters), | intent(inout) | :: | self | Parameters used to identify a particular NetCDF dataset |
||
| class(base_parameters), | intent(in) | :: | param | Current run configuration parameters |
||
| logical, | intent(in), | optional | :: | readonly | Logical flag indicating that this should be open read only |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_snapshot), | intent(in) | :: | self | Swiftest encounter structure |
||
| class(encounter_storage), | intent(inout) | :: | history | Encounter storage object |
||
| class(base_parameters), | intent(inout) | :: | param | Current run configuration parameters |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_list), | intent(inout) | :: | self | Swiftest encounter list object |
||
| class(encounter_list), | intent(in) | :: | source | Source object to append |
||
| logical, | intent(in), | dimension(:) | :: | lsource_mask | Logical mask indicating which elements to append to |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_list), | intent(inout) | :: | self | Encounter list |
||
| class(encounter_list), | intent(in) | :: | source | Source object to copy into |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_bounding_box_1D), | intent(inout) | :: | self | Bounding box structure along a single dimension |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_bounding_box), | intent(inout) | :: | self | Bounding box structure |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_list), | intent(inout) | :: | self | Swiftest encounter list object |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_snapshot), | intent(inout) | :: | self | Encounter shapshot object |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_storage), | intent(inout) | :: | self | Swiftest storage object |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_snapshot), | intent(in) | :: | self | Encounter snapshot object |
||
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | idvals | Array of all id values saved in this snapshot |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_storage), | intent(in) | :: | self | Encounter storages object |
||
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | idvals | Array of all id values in all snapshots |
|
| real(kind=DP), | intent(out), | dimension(:), allocatable | :: | tvals | Array of all time values in all snapshots |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_storage), | intent(inout) | :: | self | Encounter storage object |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_list), | intent(inout) | :: | self | Swiftest encounter list |
||
| integer(kind=I8B), | intent(in) | :: | nnew | New size of list needed |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_bounding_box), | intent(inout) | :: | self | Swiftest encounter structure |
||
| integer(kind=I4B), | intent(in) | :: | n | Number of objects with bounding box extents |
||
| integer(kind=I4B), | intent(in) | :: | n_last | Number of objects with bounding box extents the previous time this was called |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_list), | intent(inout) | :: | self | Swiftest encounter structure |
||
| integer(kind=I8B), | intent(in) | :: | n | Number of encounters to allocate space for |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_storage), | intent(inout) | :: | self | Swiftest storage object |
||
| class(base_parameters), | intent(inout) | :: | param | Current run configuration parameters |
||
| class(base_nbody_system), | intent(inout) | :: | nbody_system | Swiftest nbody system object to store |
||
| real(kind=DP), | intent(in), | optional | :: | t | Time of snapshot if different from system time |
|
| character, | intent(in), | optional | :: | arg | Optional argument (needed for extended storage type used in collision snapshots) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(encounter_list), | intent(inout) | :: | self | Swiftest encounter list |
||
| class(encounter_list), | intent(inout) | :: | discards | Discarded object |
||
| logical, | intent(in), | dimension(:) | :: | lspill_list | Logical array of bodies to spill into the discards |
|
| logical, | intent(in) | :: | ldestructive | Logical flag indicating whether or not this operation should alter body by removing the discard list |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(encounter_bounding_box_1D), | public | :: | aabb |
| final :: encounter_final_bounding_box |
| procedure, public :: dealloc => encounter_util_dealloc_bounding_box | Deallocates all allocatables |
| procedure, public :: setup => encounter_util_setup_aabb | Setup a new axis-aligned bounding box structure |
| generic, public :: sweep => sweep_single, sweep_double | |
| procedure, public :: sweep_double => encounter_check_sweep_aabb_double_list | Sweeps the sorted bounding box extents and returns the encounter candidates |
| procedure, public :: sweep_single => encounter_check_sweep_aabb_single_list | Sweeps the sorted bounding box extents and returns the encounter candidates |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=I8B), | public, | dimension(:), allocatable | :: | ibeg | Beginning index for box |
||
| integer(kind=I8B), | public, | dimension(:), allocatable | :: | iend | Ending index for box |
||
| integer(kind=I4B), | public, | dimension(:), allocatable | :: | ind | Sorted minimum/maximum extent indices (value > n indicates an ending index) |
||
| integer(kind=I4B), | public | :: | n | Number of bodies with extents |
| final :: encounter_final_aabb | Finalize the axis-aligned bounding box (1D) - deallocates all allocatables |
| procedure, public :: dealloc => encounter_util_dealloc_aabb | Deallocates all allocatables |
| procedure, public :: sort => encounter_check_sort_aabb_1D | Sorts the bounding box extents along a single dimension prior to the sweep phase |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=I4B), | public, | dimension(:), allocatable | :: | id1 | id of the first body in the encounter |
||
| integer(kind=I4B), | public, | dimension(:), allocatable | :: | id2 | id of the second body in the encounter |
||
| integer(kind=I4B), | public, | dimension(:), allocatable | :: | index1 | position of the first body in the encounter |
||
| integer(kind=I4B), | public, | dimension(:), allocatable | :: | index2 | position of the second body in the encounter |
||
| logical, | public, | dimension(:), allocatable | :: | lclosest | indicates that thie pair of bodies is in currently at its closest approach point |
||
| logical, | public | :: | lcollision | Indicates if the encounter resulted in at least one collision |
|||
| integer(kind=I4B), | public, | dimension(:), allocatable | :: | level | Recursion level (used in SyMBA) |
||
| logical, | public, | dimension(:), allocatable | :: | lvdotr | relative vdotr flag |
||
| integer(kind=I8B), | public | :: | nenc | = | 0 | Total number of encounters |
|
| real(kind=DP), | public, | dimension(:,:), allocatable | :: | r1 | the position of body 1 in the encounter |
||
| real(kind=DP), | public, | dimension(:,:), allocatable | :: | r2 | the position of body 2 in the encounter |
||
| integer(kind=I4B), | public, | dimension(:), allocatable | :: | status | status of the interaction |
||
| real(kind=DP), | public | :: | t | Time of encounter |
|||
| real(kind=DP), | public, | dimension(:), allocatable | :: | tcollision | Time of collision |
||
| real(kind=DP), | public, | dimension(:,:), allocatable | :: | v1 | the velocity of body 1 in the encounter |
||
| real(kind=DP), | public, | dimension(:,:), allocatable | :: | v2 | the velocity of body 2 in the encounter |
| procedure, public :: append => encounter_util_append_list | Appends elements from one structure to another |
| procedure, public :: copy => encounter_util_copy_list | Copies elements from the source encounter list into self. |
| procedure, public :: dealloc => encounter_util_dealloc_list | Deallocates all allocatables |
| procedure, public :: resize => encounter_util_resize_list | Checks the current size of the encounter list against the required size and extends it by a factor of 2 more than requested if it is too small. |
| procedure, public :: setup => encounter_util_setup_list | A constructor that sets the number of encounters and allocates and initializes all arrays |
| procedure, public :: spill => encounter_util_spill_list | “Spills” bodies from one object to another depending on the results of a mask (uses the PACK intrinsic) |
NetCDF dimension and variable names for the enounter save object
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=I4B), | public | :: | BE_varid | ID for the system binding energy variable |
|||
| integer(kind=I4B), | public | :: | E_collisions_varid | ID for the energy lost in collisions variable |
|||
| character, | public | :: | E_collisions_varname | = | "E_collisions" | name of the escaped angular momentum y variable |
|
| integer(kind=I4B), | public | :: | E_untracked_varid | ID for the energy that is untracked due to loss (due to mergers and body energy for escaped bodies) |
|||
| character, | public | :: | E_untracked_varname | = | "E_untracked" | name of the energy that is untracked due to loss (due to mergers and body energy for escaped bodies) |
|
| integer(kind=I4B), | public | :: | GMescape_varid | ID for the G*Mass of bodies that escape the system |
|||
| character, | public | :: | GMescape_varname | = | "GMescape" | name of the G*Mass of bodies that escape the system |
|
| integer(kind=I4B), | public | :: | Gmass_varid | ID for the G*mass variable |
|||
| character, | public | :: | Gmass_varname | = | "Gmass" | name of the G*mass variable |
|
| integer(kind=I4B), | public | :: | Ip_varid | ID for the axis principal moment of inertia variable |
|||
| character, | public | :: | Ip_varname | = | "Ip" | name of the principal moment of inertial variable |
|
| integer(kind=I4B), | public | :: | KE_orb_varid | ID for the system orbital kinetic energy variable |
|||
| integer(kind=I4B), | public | :: | KE_rot_varid | ID for the system rotational kinetic energy variable |
|||
| integer(kind=I4B), | public | :: | L_escape_varid | ID for the escaped angular momentum vector variable |
|||
| character, | public | :: | L_escape_varname | = | "L_escape" | name of the escaped angular momentum vector variable |
|
| integer(kind=I4B), | public | :: | L_orbit_varid | ID for the system orbital angular momentum vector variable |
|||
| character, | public | :: | L_orbit_varname | = | "L_orbit" | name of the orbital angular momentum vector variable |
|
| integer(kind=I4B), | public | :: | L_rot_varid | ID for the system rotational angular momentum vector variable |
|||
| character, | public | :: | L_rot_varname | = | "L_rot" | name of the rotational angular momentum vector variable |
|
| integer(kind=I4B), | public | :: | PE_varid | ID for the system potential energy variable |
|||
| integer(kind=I4B), | public | :: | Q_varid | ID for the energy dissipation variable |
|||
| integer(kind=I4B), | public | :: | TE_varid | ID for the system binding energy variable |
|||
| integer(kind=I4B), | public | :: | a_varid | ID for the semimajor axis variable |
|||
| character, | public | :: | a_varname | = | "a" | name of the semimajor axis variable |
|
| character, | public | :: | be_varname | = | "BE" | name of the system binding energy variable |
|
| integer(kind=I4B), | public | :: | c_lm_varid | ID for the c_lm aqrray |
|||
| character, | public | :: | c_lm_varname | = | "c_lm" | name for the c_lm array |
|
| integer(kind=I4B), | public | :: | cape_varid | ID for the eccentric/hyperbolic anomaly variable |
|||
| character, | public | :: | cape_varname | = | "cape" | name of the eccentric/hyperbolic anomaly variable |
|
| integer(kind=I4B), | public | :: | capm_varid | ID for the mean anomaly variable |
|||
| character, | public | :: | capm_varname | = | "capm" | name of the mean anomaly variable |
|
| integer(kind=I4B), | public | :: | capom_varid | ID for the long. asc. node variable |
|||
| character, | public | :: | capom_varname | = | "capom" | name of the long. asc. node variable |
|
| character, | public | :: | collision_id_dimname | = | "collision_id" | name of the collision id variable |
|
| integer(kind=I4B), | public | :: | collision_id_varid | Netcdf ID for the origin collision ID |
|||
| integer(kind=I4B), | public | :: | discard_body_id_varid | ID for the id of the other body involved in the discard |
|||
| character, | public | :: | discard_body_id_varname | = | "discard_body_id" | name of the id of the other body involved in the discard |
|
| integer(kind=I4B), | public | :: | discard_rh_varid | ID for the heliocentric position vector of the body at the time of discard variable |
|||
| character, | public | :: | discard_rh_varname | = | "discard_rh" | name of the heliocentric position vector of the body at the time of discard variable |
|
| integer(kind=I4B), | public | :: | discard_time_varid | ID for the time of discard variable |
|||
| character, | public | :: | discard_time_varname | = | "discard_time" | name of the time of discard variable |
|
| integer(kind=I4B), | public | :: | discard_vh_varid | ID for the heliocentric velocity vector of the body at the time of discard variable |
|||
| character, | public | :: | discard_vh_varname | = | "discard_vh" | name of the heliocentric velocity vector of the body at the time of discard variable |
|
| integer(kind=I4B), | public | :: | e_varid | ID for the eccentricity variable |
|||
| character, | public | :: | e_varname | = | "e" | name of the eccentricity variable |
|
| integer(kind=I4B), | public | :: | f_varid | ID for the true anomaly variable |
|||
| character, | public | :: | f_varname | = | "f" | name of the true anomaly variable |
|
| character, | public | :: | file_name | Name of the output file |
|||
| integer(kind=I4B), | public | :: | gr_pseudo_vh_varid | ID for the heliocentric pseudovelocity vector variable (used in GR) |
|||
| character, | public | :: | gr_pseudo_vh_varname | = | "gr_pseudo_vh" | name of the heliocentric pseudovelocity vector variable (GR) |
|
| integer(kind=I4B), | public | :: | id | ID for the output file |
|||
| integer(kind=I4B), | public | :: | id_varid | ID for the id variable |
|||
| character, | public | :: | id_varname | = | "id" | name of the particle id variable |
|
| integer(kind=I4B), | public | :: | idslot | = | 1 | The current id slot that gets passed to the NetCDF reader/writer |
|
| integer(kind=I4B), | public, | dimension(:), allocatable | :: | idvals | Array of id values in this NetCDF file |
||
| integer(kind=I4B), | public | :: | inc_varid | ID for the inclination variable |
|||
| character, | public | :: | inc_varname | = | "inc" | name of the inclination variable |
|
| integer(kind=I4B), | public | :: | j2rp2_varid | ID for the j2 variable |
|||
| character, | public | :: | j2rp2_varname | = | "j2rp2" | name of the j2rp2 variable |
|
| integer(kind=I4B), | public | :: | j4rp4_varid | ID for the j4 variable |
|||
| character, | public | :: | j4rp4_varname | = | "j4rp4" | name of the j4pr4 variable |
|
| integer(kind=I4B), | public | :: | k2_varid | ID for the Love number variable |
|||
| character, | public | :: | k2_varname | = | "k2" | name of the Love number variable |
|
| character, | public | :: | ke_orbit_varname | = | "KE_orbit" | name of the system orbital kinetic energy variable |
|
| character, | public | :: | ke_rot_varname | = | "KE_rot" | name of the system rotational kinetic energy variable |
|
| integer(kind=I4B), | public | :: | l_dim_max | = | 6 | Maximum value of the l dimension |
|
| integer(kind=I4B), | public | :: | l_dimid | ID for the l dimension for c_lm |
|||
| character, | public | :: | l_dimname | = | "l" | name of l dimension for c_lm |
|
| integer(kind=I4B), | public | :: | l_varid | ID for the l variable |
|||
| integer(kind=I4B), | public | :: | lam_varid | ID for the mean longitude variable |
|||
| character, | public | :: | lam_varname | = | "lam" | name of the mean longitude variable |
|
| logical, | public | :: | lc_lm_exists | = | .false. | Logical flag to indicate whether or not the c_lm array was present in an old file. |
|
| logical, | public | :: | lfile_is_open | = | .false. | Flag indicating that the linked file is currently open |
|
| logical, | public | :: | lpseudo_vel_exists | = | .false. | Logical flag to indicate whether or not the pseudovelocity vectors were present in an old file. |
|
| integer(kind=I4B), | public | :: | m_dim_max | = | 6 | Maximum value of the m dimension |
|
| integer(kind=I4B), | public | :: | m_dimid | ID for the m dimension for c_lm |
|||
| character, | public | :: | m_dimname | = | "m" | name of m dimension for c_lm |
|
| integer(kind=I4B), | public | :: | m_varid | ID for the m variable |
|||
| integer(kind=I4B), | public | :: | mass_varid | ID for the mass variable |
|||
| character, | public | :: | mass_varname | = | "mass" | name of the mass variable |
|
| integer(kind=I4B), | public | :: | max_idslot | = | 0 | Records the last index value of id in the NetCDF file |
|
| integer(kind=I4B), | public | :: | max_tslot | = | 0 | Records the last index value of time in the NetCDF file |
|
| integer(kind=I4B), | public | :: | name_dimid | ID for the particle name dimension |
|||
| character, | public | :: | name_dimname | = | "name" | name of the particle name dimension |
|
| integer(kind=I4B), | public | :: | name_varid | ID for the particle name variable |
|||
| integer(kind=I4B), | public | :: | npl_varid | ID for the number of active massive bodies variable |
|||
| character, | public | :: | npl_varname | = | "npl" | name of the number of active massive bodies variable |
|
| integer(kind=I4B), | public | :: | nplm_varid | ID for the number of active fully interacting massive bodies variable (SyMBA) |
|||
| character, | public | :: | nplm_varname | = | "nplm" | name of the number of active fully interacting massive bodies variable (SyMBA) |
|
| integer(kind=I4B), | public | :: | ntp_varid | ID for the number of active test particles variable |
|||
| character, | public | :: | ntp_varname | = | "ntp" | name of the number of active test particles variable |
|
| integer(kind=I4B), | public | :: | omega_varid | ID for the arg. of periapsis variable |
|||
| character, | public | :: | omega_varname | = | "omega" | name of the arg. of periapsis variable |
|
| integer(kind=I4B), | public | :: | origin_rh_varid | ID for the origin position vector variable |
|||
| character, | public | :: | origin_rh_varname | = | "origin_rh" | name of the heliocentric position vector of the body at the time of origin variable |
|
| integer(kind=I4B), | public | :: | origin_time_varid | ID for the origin time |
|||
| character, | public | :: | origin_time_varname | = | "origin_time" | name of the time of origin variable |
|
| integer(kind=I4B), | public | :: | origin_type_varid | ID for the origin type |
|||
| character, | public | :: | origin_type_varname | = | "origin_type" | name of the origin type variable |
|
| integer(kind=I4B), | public | :: | origin_vh_varid | ID for the origin velocity vector component |
|||
| character, | public | :: | origin_vh_varname | = | "origin_vh" | name of the heliocentric velocity vector of the body at the time of origin variable |
|
| integer(kind=I4B), | public | :: | out_type | output type (will be assigned either NF90_DOUBLE or NF90_FLOAT, depending on the user parameter) |
|||
| character, | public | :: | pe_varname | = | "PE" | name of the system potential energy variable |
|
| integer(kind=I4B), | public | :: | ptype_varid | ID for the particle type variable |
|||
| character, | public | :: | ptype_varname | = | "particle_type" | name of the particle type variable |
|
| character, | public | :: | q_varname | = | "Q" | name of the energy dissipation variable |
|
| integer(kind=I4B), | public | :: | radius_varid | ID for the radius variable |
|||
| character, | public | :: | radius_varname | = | "radius" | name of the radius variable |
|
| integer(kind=I4B), | public | :: | rh_varid | ID for the heliocentric position vector variable |
|||
| character, | public | :: | rh_varname | = | "rh" | name of the heliocentric position vector variable |
|
| integer(kind=I4B), | public | :: | rhill_varid | ID for the hill radius variable |
|||
| character, | public | :: | rhill_varname | = | "rhill" | name of the hill radius variable |
|
| integer(kind=I4B), | public | :: | rot_varid | ID for the rotation vector variable |
|||
| character, | public | :: | rot_varname | = | "rot" | name of the rotation vector variable |
|
| integer(kind=I4B), | public | :: | rotphase_varid | ID for the rotation phase variable |
|||
| character, | public | :: | rotphase_varname | = | "rotphase" | name of the rotation phase variable |
|
| integer(kind=I4B), | public, | dimension(2) | :: | sign_coords | = | [-1, 1] | The sign dimension coordinate labels |
| integer(kind=I4B), | public | :: | sign_dimid | ID for sign dimension |
|||
| character, | public | :: | sign_dimname | = | "sign" | name of the sign dimension for c_lm |
|
| integer(kind=I4B), | public | :: | sign_varid | ID for sign variable |
|||
| character(len=1), | public, | dimension(3) | :: | space_coords | = | ["x", "y", "z"] | The space dimension coordinate labels |
| integer(kind=I4B), | public | :: | space_dimid | ID for the space dimension |
|||
| character, | public | :: | space_dimname | = | "space" | name of the space dimension |
|
| integer(kind=I4B), | public | :: | space_varid | ID for the space variable |
|||
| integer(kind=I4B), | public | :: | status_varid | ID for the status variable |
|||
| character, | public | :: | status_varname | = | "status" | name of the particle status variable |
|
| integer(kind=I4B), | public | :: | str_dimid | ID for the character string dimension |
|||
| character, | public | :: | str_dimname | = | "string32" | name of the character string dimension |
|
| character, | public | :: | te_varname | = | "TE" | name of the system binding energy variable |
|
| integer(kind=I4B), | public | :: | time_dimid | ID for the time dimension |
|||
| character, | public | :: | time_dimname | = | "time" | name of the time dimension |
|
| integer(kind=I4B), | public | :: | time_varid | ID for the time variable |
|||
| integer(kind=I4B), | public | :: | tslot | = | 1 | The current time slot that gets passed to the NetCDF reader/writer |
|
| integer(kind=I4B), | public | :: | varpi_varid | ID for the long. of periapsis variable |
|||
| character, | public | :: | varpi_varname | = | "varpi" | name of the long. of periapsis variable |
|
| integer(kind=I4B), | public | :: | vh_varid | ID for the heliocentric velocity vector variable |
|||
| character, | public | :: | vh_varname | = | "vh" | name of the heliocentric velocity vector variable |
| final :: encounter_final_netcdf_parameters | Finalizer will close the NetCDF file |
| procedure, public :: close => netcdf_io_close | Closes an open NetCDF file |
| procedure, public :: find_idslot => netcdf_io_find_idslot | Finds the id dimension index for a given value of id |
| procedure, public :: find_tslot => netcdf_io_find_tslot | Finds the time dimension index for a given value of t |
| procedure, public :: get_idvals => netcdf_io_get_idvals | Gets the valid id numbers currently stored in this dataset |
| procedure, public :: initialize => encounter_io_netcdf_initialize_output | Initialize a set of parameters used to identify a NetCDF output object |
| procedure, public :: open => encounter_io_netcdf_open | Open an encounter NetCDF file |
| procedure, public :: sync => netcdf_io_sync | Syncrhonize the disk and memory buffer of the NetCDF file (e.g. commit the frame files stored in memory to disk) |
A simplified version of a SyMBA nbody system object for storing minimal snapshots of the system state during encounters
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=I8B), | public | :: | iloop | Loop number at time of snapshot |
|||
| class(base_object), | public, | allocatable | :: | pl | Massive body data structure |
||
| real(kind=DP), | public | :: | t | Simulation time when snapshot was taken |
|||
| class(base_object), | public, | allocatable | :: | tp | Test particle data structure |
| final :: encounter_final_snapshot |
| procedure, public :: dealloc => encounter_util_dealloc_snapshot | Deallocates all allocatables |
| procedure, public :: get_idvals => encounter_util_get_idvalues_snapshot | Gets an array of all id values saved in this snapshot |
| procedure, public :: write_frame => encounter_io_netcdf_write_frame_snapshot | Writes a frame of encounter data to file |
A class that that is used to store simulation history data between file output
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(base_storage_frame), | public, | dimension(:), allocatable | :: | frame | Array of stored frames |
||
| integer(kind=I4B), | public, | dimension(:), allocatable | :: | idmap | The id value -> index map |
||
| integer(kind=I4B), | public, | dimension(:), allocatable | :: | idvals | The set of unique id values contained in the snapshots |
||
| integer(kind=I4B), | public | :: | iframe | = | 0 | Index of the last frame stored in the system |
|
| class(encounter_netcdf_parameters), | public, | allocatable | :: | nc | NetCDF object attached to this storage object |
||
| integer(kind=I4B), | public | :: | nframes | Total number of frames that can be stored An class that establishes the pattern for various storage objects |
|||
| integer(kind=I4B), | public | :: | nid | Number of unique id values in all saved snapshots |
|||
| integer(kind=I4B), | public | :: | nt | Number of unique time values in all saved snapshots |
|||
| integer(kind=I4B), | public, | dimension(:), allocatable | :: | tmap | The t value -> index map |
||
| real(kind=DP), | public, | dimension(:), allocatable | :: | tvals | The set of unique time values contained in the snapshots |
| final :: encounter_final_storage |
| procedure, public :: dealloc => encounter_util_dealloc_storage | Deallocates all allocatables |
| procedure, public :: dump => encounter_io_netcdf_dump | Dumps contents of encounter history to file |
| procedure, public :: get_index_values => encounter_util_get_vals_storage | Gets the unique values of the indices of a storage object (i.e. body id or time value) |
| procedure, public :: make_index_map => encounter_util_index_map | Maps body id values to storage index values so we don’t have to use unlimited dimensions for id |
| procedure, public :: reset => base_util_reset_storage | Resets the storage object back to its original state by removing all of the saved items from the storage frames |
| procedure, public :: resize => base_util_resize_storage | Resizes storage if it is too small |
| procedure, public :: save => base_util_snapshot_save | Takes a snapshot of the current system |
| procedure, public :: setup => base_util_setup_storage | Sets up a storage system with a set number of frames |
| procedure, public :: take_snapshot => encounter_util_snapshot | Take a minimal snapshot of the system through an encounter |
Finalize the axis aligned bounding box (1D) - deallocates all allocatables
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(encounter_bounding_box_1D), | intent(inout) | :: | self |
Finalize the bounding box object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(encounter_bounding_box), | intent(inout) | :: | self |
Finalize the NetCDF by closing the file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(encounter_netcdf_parameters), | intent(inout) | :: | self |
Deallocates allocatable arrays in an encounter snapshot
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(encounter_snapshot), | intent(inout) | :: | self | Encounter storage object |
Deallocates allocatable arrays in an encounter snapshot
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(encounter_storage), | intent(inout) | :: | self | Encounter storage object |