Base type definitions. This allows the collision and encounter modules to be defined before the swiftest module.
Append a single array of character string type onto another. If the destination array is not allocated, or is not big
enough, this will allocate space for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=STRMAX), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| character(len=STRMAX), | intent(in), | dimension(:), allocatable | :: | source |
Array to append |
|
| integer(kind=I4B), | intent(in), | optional | :: | nold |
Extent of original array. If passed, the source array will begin at arr(nold+1). Otherwise, the size of arr will be used. |
|
| logical, | intent(in), | optional, | dimension(:) | :: | lsource_mask |
Logical mask indicating which elements to append to |
Append a single array of double precision type onto another. If the destination array is not allocated, or is not big
enough, this will allocate space for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| real(kind=DP), | intent(in), | dimension(:), allocatable | :: | source |
Array to append |
|
| integer(kind=I4B), | intent(in), | optional | :: | nold |
Extent of original array. If passed, the source array will begin at arr(nold+1). Otherwise, the size of arr will be used. |
|
| logical, | intent(in), | optional, | dimension(:) | :: | lsource_mask |
Logical mask indicating which elements to append to |
Append a single array of double precision vector type of size (NDIM, n) onto another. If the destination array is not
allocated, or is not big enough, this will allocate space for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:,:), allocatable | :: | arr |
Destination array |
|
| real(kind=DP), | intent(in), | dimension(:,:), allocatable | :: | source |
Array to append |
|
| integer(kind=I4B), | intent(in), | optional | :: | nold |
Extent of original array. If passed, the source array will begin at arr(nold+1). Otherwise, the size of arr will be used. |
|
| logical, | intent(in), | optional, | dimension(:) | :: | lsource_mask |
Logical mask indicating which elements to append to |
Append a single array of integer(I4B) onto another. If the destination array is not allocated, or is not big enough, this will allocate space for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I4B), | intent(in), | dimension(:), allocatable | :: | source |
Array to append |
|
| integer(kind=I4B), | intent(in), | optional | :: | nold |
Extent of original array. If passed, the source array will begin at arr(nold+1). Otherwise, the size of arr will be used. |
|
| logical, | intent(in), | optional, | dimension(:) | :: | lsource_mask |
Logical mask indicating which elements to append to |
Append a single array of logical type onto another. If the destination array is not allocated, or is not big enough, this will allocate space for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| logical, | intent(in), | dimension(:), allocatable | :: | source |
Array to append |
|
| integer(kind=I4B), | intent(in), | optional | :: | nold |
Extent of original array. If passed, the source array will begin at arr(nold+1). Otherwise, the size of arr will be used. |
|
| logical, | intent(in), | optional, | dimension(:) | :: | lsource_mask |
Logical mask indicating which elements to append to |
Performs a fill operation on a single array of type character strings. This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=STRMAX), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| character(len=STRMAX), | intent(in), | dimension(:), allocatable | :: | inserts |
Array of values to insert into keep |
|
| logical, | intent(in), | dimension(:) | :: | lfill_list |
Logical array of bodies to merge into the keeps |
Performs a fill operation on a single array of type DP. This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| real(kind=DP), | intent(in), | dimension(:), allocatable | :: | inserts |
Array of values to insert into keep |
|
| logical, | intent(in), | dimension(:) | :: | lfill_list |
Logical array of bodies to merge into the keeps |
Performs a fill operation on a single array of DP vectors with shape (NDIM, n) This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:,:), allocatable | :: | keeps |
Array of values to keep |
|
| real(kind=DP), | intent(in), | dimension(:,:), allocatable | :: | inserts |
Array of values to insert into keep |
|
| logical, | intent(in), | dimension(:) | :: | lfill_list |
Logical array of bodies to merge into the keeps |
Performs a fill operation on a single array of type I4B This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| integer(kind=I4B), | intent(in), | dimension(:), allocatable | :: | inserts |
Array of values to insert into keep |
|
| logical, | intent(in), | dimension(:) | :: | lfill_list |
Logical array of bodies to merge into the keeps |
Performs a fill operation on a single array of logicals This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| logical, | intent(in), | dimension(:), allocatable | :: | inserts |
Array of values to insert into keep |
|
| logical, | intent(in), | dimension(:) | :: | lfill_list |
Logical array of bodies to merge into the keeps |
Resizes an array component of type character string. nnew = 0 will deallocate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=STRMAX), | intent(inout), | dimension(:), allocatable | :: | arr |
Array to resize |
|
| integer(kind=I4B), | intent(in) | :: | nnew |
New size |
Resizes an array component of double precision type. Passing nnew = 0 will deallocate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:), allocatable | :: | arr |
Array to resize |
|
| integer(kind=I4B), | intent(in) | :: | nnew |
New size |
Resizes an array component of double precision vectors of size (NDIM, n). Passing nnew = 0 will deallocate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:,:), allocatable | :: | arr |
Array to resize |
|
| integer(kind=I4B), | intent(in) | :: | nnew |
New size |
Resizes an array component of integer type. Passing nnew = 0 will deallocate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | arr |
Array to resize |
|
| integer(kind=I4B), | intent(in) | :: | nnew |
New size |
Resizes an array component of logical type. Passing nnew = 0 will deallocate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout), | dimension(:), allocatable | :: | arr |
Array to resize |
|
| integer(kind=I4B), | intent(in) | :: | nnew |
New size |
Sort input integer array in place into ascending numerical order using quick sort. This algorithm works well for partially sorted arrays (which is usually the case here)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:) | :: | arr |
Sort input integer array by index in ascending numerical order using quicksort. If ind is supplied already allocated, we assume it is an existing index array (e.g. a previously sorted array). If it is not allocated, this subroutine swiftest_allocates it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | arr | ||
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | ind |
Sort input integer array by index in ascending numerical order using quicksort. If ind is supplied already allocated, we assume it is an existing index array (e.g. a previously sorted array). If it is not allocated, this subroutine swiftest_allocates it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | arr | ||
| integer(kind=I8B), | intent(inout), | dimension(:), allocatable | :: | ind |
Sort input integer array by index in ascending numerical order using quicksort. If ind is supplied already allocated, we assume it is an existing index array (e.g. a previously sorted array). If it is not allocated, this subroutine swiftest_allocates it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I8B), | intent(in), | dimension(:) | :: | arr | ||
| integer(kind=I8B), | intent(inout), | dimension(:), allocatable | :: | ind |
Sort input DP precision array in place into ascending numerical order using quicksort.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=SP), | intent(inout), | dimension(:) | :: | arr |
Sort input DP precision array by index in ascending numerical order using quicksort. If ind is supplied already allocated, we assume it is an existing index array (e.g. a previously sorted array). If it is not allocated, this subroutine swiftest_allocates it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=SP), | intent(in), | dimension(:) | :: | arr | ||
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | ind |
Sort input DP precision array in place into ascending numerical order using quicksort.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:) | :: | arr |
Sort input DP precision array by index in ascending numerical order using quick sort. This algorithm works well for partially sorted arrays (which is usually the case here). If ind is supplied already allocated, we assume it is an existing index array (e.g. a previously sorted array). If it is not allocated, this subroutine swiftest_allocates it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(in), | dimension(:) | :: | arr | ||
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | ind |
Rearrange a single array of character string in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=STRMAX), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I4B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Rearrange a single array of DP type in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I4B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Rearrange a single array of (NDIM,n) DP-type vectors in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:,:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I4B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Rearrange a single array of integers in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I4B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Rearrange a single array of integers in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I8B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I8B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Rearrange a single array of logicals in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I4B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Rearrange a single array of logicals in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I8B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I8B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Performs a spill operation on a single array of type character strings This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=STRMAX), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| character(len=STRMAX), | intent(inout), | dimension(:), allocatable | :: | discards |
Array of discards |
|
| 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 the keeps array or not |
Performs a spill operation on a single array of type DP This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| real(kind=DP), | intent(inout), | dimension(:), allocatable | :: | discards |
Array of discards |
|
| logical, | intent(in), | dimension(:) | :: | lspill_list |
Logical array of bodies to spill into the discardss |
|
| logical, | intent(in) | :: | ldestructive |
Logical flag indicating whether or not this operation should alter the keeps array or not |
Performs a spill operation on a single array of DP vectors with shape (NDIM, n) This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:,:), allocatable | :: | keeps |
Array of values to keep |
|
| real(kind=DP), | intent(inout), | dimension(:,:), allocatable | :: | discards |
Array discards |
|
| 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 the keeps array or not |
Performs a spill operation on a single array of type I4B This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | discards |
Array of discards |
|
| 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 the keeps array or not |
Performs a spill operation on a single array of type I4B This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I8B), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| integer(kind=I8B), | intent(inout), | dimension(:), allocatable | :: | discards |
Array of discards |
|
| 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 the keeps array or not |
Performs a spill operation on a single array of logicals This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| logical, | intent(inout), | dimension(:), allocatable | :: | discards |
Array of discards |
|
| 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 |
Takes an input unsorted integer array and returns a new array of sorted, unique values (DP version)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(in), | dimension(:) | :: | input_array |
Unsorted input array |
|
| real(kind=DP), | intent(out), | dimension(:), allocatable | :: | output_array |
Sorted array of unique values |
|
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index_map |
An array of the same size as input_array that such that any for any index i, |
Takes an input unsorted integer array and returns a new array of sorted, unique values (I4B version)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | input_array |
Unsorted input array |
|
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | output_array |
Sorted array of unique values |
|
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index_map |
An array of the same size as input_array that such that any for any index i, |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_parameters), | intent(in) | :: | self |
Output collection of parameters |
||
| character(len=*), | intent(in) | :: | param_file_name |
Parameter input file name (i.e. param.in) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_parameters), | intent(inout) | :: | self |
Collection of parameters |
||
| integer(kind=I4B), | intent(in) | :: | unit |
File unit number |
||
| character(len=*), | intent(in) | :: | iotype |
Dummy argument passed to the input/output procedure contains the text from the char-literal-constant, prefixed with DT. If you do not include a char-literal-constant, the iotype argument contains only DT. |
||
| character(len=*), | intent(in) | :: | v_list(:) |
The first element passes the integrator code to the reader |
||
| integer(kind=I4B), | intent(out) | :: | iostat |
IO status code |
||
| character(len=*), | intent(inout) | :: | iomsg |
Message to pass if iostat /= 0 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_parameters), | intent(in) | :: | self |
Collection of parameters |
||
| integer(kind=I4B), | intent(in) | :: | unit |
File unit number |
||
| character(len=*), | intent(in) | :: | iotype |
Dummy argument passed to the input/output procedure contains the text from the char-literal-constant, prefixed with DT. If you do not include a char-literal-constant, the iotype argument contains only DT. |
||
| integer(kind=I4B), | intent(in) | :: | v_list(:) |
Not used in this procedure |
||
| integer(kind=I4B), | intent(out) | :: | iostat |
IO status code |
||
| character(len=*), | intent(inout) | :: | iomsg |
Message to pass if iostat /= 0 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_parameters), | intent(inout) | :: | self |
Current run configuration parameters |
||
| character(len=*), | intent(in) | :: | param_file_name |
Parameter input file name (i.e. param.in) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_object), | intent(inout) | :: | self |
Generic Swiftest object type |
Class definition for the kinship relationships used in bookkeeping multiple collisions bodies in a single time step.
An abstract class for a basic Swiftest nbody system
An abstract class for a generic collection of Swiftest bodies
| procedure(abstract_util_dealloc_object), public, deferred :: dealloc |
User defined parameters that are read in from the parameters input file. Each paramter is initialized to a default values.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=QP), | public | :: | DU2M | = | -1.0_QP |
Converts distance unit to centimeters |
|
| real(kind=DP), | public | :: | E_collisions | = | 0.0_DP |
Energy lost from system due to collisions |
|
| 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 system due to escaped bodies |
|
| real(kind=DP), | public | :: | GMTINY | = | -1.0_DP |
Smallest G*mass that is fully gravitating |
|
| real(kind=DP), | public | :: | GMescape | = | 0.0_DP |
Mass of bodies that escaped the system (used for bookeeping) |
|
| real(kind=DP), | public | :: | GMtot_orig | = | 0.0_DP |
Initial system mass |
|
| real(kind=DP), | public | :: | GU | = | -1.0_DP |
Universal gravitational constant in the system units |
|
| real(kind=DP), | public, | dimension(NDIM) | :: | L_escape | = | 0.0_DP |
Angular momentum of escaped bodies (used for bookeeping) |
| real(kind=DP), | public, | dimension(NDIM) | :: | L_orbit_orig | = | 0.0_DP |
Initial orbital angular momentum |
| 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_orig | = | 0.0_DP |
Initial total angular momentum vector |
| real(kind=QP), | public | :: | MU2KG | = | -1.0_QP |
Converts mass units to grams |
|
| real(kind=QP), | public | :: | TU2S | = | -1.0_QP |
Converts time units to seconds |
|
| character(len=STRMAX), | public | :: | collision_model | = | "MERGE" |
The Coll |
|
| character(len=NAMELEN), | public | :: | display_style |
Style of the output display [{“PROGRESS”}, “CLASSIC”, “QUIET”, “COMPACT”]). |
|||
| integer(kind=I4B), | public | :: | display_unit | = | OUTPUT_UNIT |
File unit number for display (either to stdout or to a log file) |
|
| real(kind=DP), | public | :: | dt | = | -1.0_DP |
Time step |
|
| integer(kind=I4B), | public | :: | dump_cadence | = | 10 |
Number of output steps between dumping simulation data to file |
|
| character(len=NAMELEN), | public | :: | encounter_check_plpl | = | "ADAPTIVE" |
Method used to compute pl-pl encounter checks. |
|
| character(len=NAMELEN), | public | :: | encounter_check_pltp | = | "ADAPTIVE" |
Method used to compute pl-tp encounter checks. |
|
| character(len=STRMAX), | public | :: | encounter_save | = | "NONE" |
Indicate if and how encounter data should be saved |
|
| real(kind=DP), | public | :: | fstep_out | = | 1.0_DP |
The output step time stretching factor |
|
| integer(kind=I4B), | public | :: | idump | = | 0 |
Dump cadence counter |
|
| integer(kind=I8B), | public | :: | iloop | = | 0_I8B |
Main loop counter |
|
| character(len=STRMAX), | public | :: | in_form | = | "XV" |
Format of input data files (“EL” or [“XV”]) |
|
| character(len=STRMAX), | public | :: | in_type | = | "NETCDF_DOUBLE" |
Data representation type of input data files |
|
| character(len=STRMAX), | public | :: | incbfile | = | CB_INFILE |
Name of input file for the central body |
|
| character(len=STRMAX), | public | :: | inplfile | = | PL_INFILE |
Name of input file for massive bodies |
|
| character(len=STRMAX), | public | :: | integrator |
Name of the nbody integrator used |
|||
| character(len=NAMELEN), | public | :: | interaction_loops | = | "ADAPTIVE" |
Method used to compute interaction loops. |
|
| character(len=STRMAX), | public | :: | intpfile | = | TP_INFILE |
Name of input file for test particles |
|
| real(kind=DP), | public | :: | inv_c2 | = | -1.0_DP |
Inverse speed of light squared in the system units |
|
| integer(kind=I4B), | public | :: | iout | = | 0 |
Output cadence counter |
|
| integer(kind=I8B), | public | :: | istart | = | 0_I8B |
Starting index for loop counter |
|
| integer(kind=I4B), | public | :: | istep | = | 0 |
Current value of istep (used for time stretching) |
|
| integer(kind=I4B), | public | :: | istep_out | = | -1 |
Number of time steps between saved outputs |
|
| logical, | public | :: | lbig_discard | = | .false. |
Save big bodies on every discard |
|
| logical, | public | :: | lclose | = | .false. |
Turn on close encounters |
|
| logical, | public | :: | lcoarray | = | .false. |
Use Coarrays for test particle parallelization. |
|
| logical, | public | :: | lenc_save_closest | = | .false. |
Indicates that when encounters are saved, the closest approach distance between pairs of bodies is saved |
|
| logical, | public | :: | lenc_save_trajectory | = | .false. |
Indicates that when encounters are saved, the full trajectory through recursion steps are saved |
|
| logical, | public | :: | lencounter_sas_plpl | = | .false. |
Use the Sort and Sweep algorithm to prune the encounter list before checking for close encounters |
|
| logical, | public | :: | lencounter_sas_pltp | = | .false. |
Use the Sort and Sweep algorithm to prune the encounter list before checking for close encounters |
|
| logical, | public | :: | lenergy | = | .false. |
Track the total energy of the system |
|
| logical, | public | :: | lextra_force | = | .false. |
User defined force function turned on |
|
| logical, | public | :: | lfirstenergy | = | .true. |
This is the first time computing energe |
|
| logical, | public | :: | lfirstkick | = | .true. |
Initiate the first kick in a symplectic step |
|
| logical, | public | :: | lflatten_interactions | = | .false. |
Use the flattened upper triangular matrix for pl-pl interaction loops |
|
| logical, | public | :: | lgr | = | .false. |
Turn on GR |
|
| logical, | public | :: | lmtiny_pl | = | .false. |
Include semi-interacting massive bodies |
|
| logical, | public | :: | lnon_spherical_cb | = | .false. |
Calculate acceleration from oblate central body (automatically turns true if nonzero J2, J4, or c_lm is input) |
|
| logical, | public | :: | log_output | = | .false. |
Logs the output to file instead of displaying it on the terminal |
|
| logical, | public | :: | lrestart | = | .false. |
Indicates whether or not this is a restarted run |
|
| logical, | public | :: | lrhill_present | = | .false. |
Hill radii are given as an input rather than calculated by the code (can be used to inflate close encounter regions manually) |
|
| logical, | public | :: | lrotation | = | .false. |
Include rotation states of big bodies |
|
| logical, | public | :: | ltides | = | .false. |
Include tidal dissipation |
|
| logical, | public | :: | ltstretch | = | .false. |
Whether to employ time stretching or not |
|
| logical, | public | :: | lyarkovsky | = | .false. |
Turn on Yarkovsky effect |
|
| logical, | public | :: | lyorp | = | .false. |
Turn on YORP effect |
|
| real(kind=DP), | public | :: | min_GMfrag | = | -1.0_DP |
Smallest G*mass that can be produced in a fragmentation event |
|
| character(len=STRMAX), | public | :: | nc_in | = | NC_INFILE |
Name of system input file for NetCDF input |
|
| real(kind=DP), | public | :: | nfrag_reduction | = | 30.0_DP |
Reduction factor for limiting the number of collision fragments |
|
| integer(kind=I8B), | public | :: | nloops | = | 0_I8B |
Total number of loops to execute |
|
| integer(kind=I4B), | public | :: | nout | = | 0 |
Current output step |
|
| integer(kind=I4B), | public | :: | nstep_out | = | -1 |
Total number of saved outputs |
|
| character(len=STRMAX), | public | :: | out_form | = | "XVEL" |
Data to write to output file |
|
| character(len=STRMAX), | public | :: | out_stat | = | 'NEW' |
Open status for output binary file |
|
| character(len=STRMAX), | public | :: | out_type | = | "NETCDF_DOUBLE" |
Binary format of output file |
|
| character(len=STRMAX), | public | :: | outfile | = | BIN_OUTFILE |
Name of output binary file |
|
| character(len=STRMAX), | public | :: | param_file_name |
The name of the parameter file |
|||
| real(kind=DP), | public | :: | qmin | = | -1.0_DP |
Minimum pericenter distance for test particle |
|
| real(kind=DP), | public | :: | qmin_ahi | = | -1.0_DP |
Maximum semimajor axis for qmin |
|
| real(kind=DP), | public | :: | qmin_alo | = | -1.0_DP |
Minimum semimajor axis for qmin |
|
| character(len=STRMAX), | public | :: | qmin_coord | = | "HELIO" |
Coordinate frame to use for qmin ([“HELIO”] or “BARY”) |
|
| real(kind=DP), | public | :: | rmax | = | -1.0_DP |
Maximum heliocentric radius for test particle |
|
| real(kind=DP), | public | :: | rmaxu | = | -1.0_DP |
Maximum unbound heliocentric radius for test particle |
|
| real(kind=DP), | public | :: | rmin | = | -1.0_DP |
Minimum heliocentric radius for test particle |
|
| integer(kind=I4B), | public, | dimension(:), allocatable | :: | seed |
Random seeds for fragmentation modeling |
||
| real(kind=DP), | public | :: | t0 | = | 0.0_DP |
Integration reference time |
|
| real(kind=DP), | public | :: | tstart | = | -1.0_DP |
Integration start time |
|
| real(kind=DP), | public | :: | tstop | = | -1.0_DP |
Integration stop time |
| procedure, public :: dealloc => base_util_dealloc_param | |
| procedure(abstract_io_dump_param), public, deferred :: dump | |
| procedure(abstract_io_read_in_param), public, deferred :: read_in | |
| procedure(abstract_io_param_reader), public, deferred :: reader | |
| procedure(abstract_io_param_writer), public, deferred :: writer |
Class definition for the particle origin information object. This object is used to track time, location, and collisional regime of fragments produced in collisional events.
An class that establishes the pattern for various storage objects
| 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 |
|
| 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 |
| procedure, public :: dealloc => base_util_dealloc_storage | Deallocates all allocatables |
| 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 |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| class(*), | public, | allocatable | :: | item |
| final :: base_final_storage_frame |
| generic, public :: assignment(=) => store | |
| procedure, public :: store => base_util_copy_store | Stores a snapshot of the nbody system so that later it can be |
Finalizer for the storage object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_storage), | intent(inout) | :: | self |
Finalizer for the storage frame data type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(base_storage_frame) | :: | self |
Append a single array of double precision type onto another. If the destination array is not allocated, or is not big
enough, this will allocate space for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| real(kind=DP), | intent(in), | dimension(:), allocatable | :: | source |
Array to append |
|
| integer(kind=I4B), | intent(in), | optional | :: | nold |
Extent of original array. If passed, the source array will begin at arr(nold+1). Otherwise, the size of arr will be used. |
|
| logical, | intent(in), | optional, | dimension(:) | :: | lsource_mask |
Logical mask indicating which elements to append to |
Append a single array of double precision vector type of size (NDIM, n) onto another. If the destination array is not
allocated, or is not big enough, this will allocate space for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:,:), allocatable | :: | arr |
Destination array |
|
| real(kind=DP), | intent(in), | dimension(:,:), allocatable | :: | source |
Array to append |
|
| integer(kind=I4B), | intent(in), | optional | :: | nold |
Extent of original array. If passed, the source array will begin at arr(nold+1). Otherwise, the size of arr will be used. |
|
| logical, | intent(in), | optional, | dimension(:) | :: | lsource_mask |
Logical mask indicating which elements to append to |
Append a single array of integer(I4B) onto another. If the destination array is not allocated, or is not big enough, this will allocate space for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I4B), | intent(in), | dimension(:), allocatable | :: | source |
Array to append |
|
| integer(kind=I4B), | intent(in), | optional | :: | nold |
Extent of original array. If passed, the source array will begin at arr(nold+1). Otherwise, the size of arr will be used. |
|
| logical, | intent(in), | optional, | dimension(:) | :: | lsource_mask |
Logical mask indicating which elements to append to |
Append a single array of character string type onto another. If the destination array is not allocated, or is not big
enough, this will allocate space for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=STRMAX), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| character(len=STRMAX), | intent(in), | dimension(:), allocatable | :: | source |
Array to append |
|
| integer(kind=I4B), | intent(in), | optional | :: | nold |
Extent of original array. If passed, the source array will begin at arr(nold+1). Otherwise, the size of arr will be used. |
|
| logical, | intent(in), | optional, | dimension(:) | :: | lsource_mask |
Logical mask indicating which elements to append to |
Append a single array of logical type onto another. If the destination array is not allocated, or is not big enough, this will allocate space for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| logical, | intent(in), | dimension(:), allocatable | :: | source |
Array to append |
|
| integer(kind=I4B), | intent(in), | optional | :: | nold |
Extent of original array. If passed, the source array will begin at arr(nold+1). Otherwise, the size of arr will be used. |
|
| logical, | intent(in), | optional, | dimension(:) | :: | lsource_mask |
Logical mask indicating which elements to append to |
Stores a snapshot of the nbody system so that later it can be retrieved for saving to file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_storage_frame), | intent(inout) | :: | self |
Swiftest storage frame object |
||
| class(*), | intent(in) | :: | source |
Swiftest n-body system object |
Deallocates all allocatables
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_parameters), | intent(inout) | :: | self |
Collection of parameters |
Resets a storage object by deallocating all items and resetting the frame counter to 0
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_storage), | intent(inout) | :: | self |
Swiftest storage object |
Print termination message and exit program
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(in) | :: | code | |||
| integer(kind=I4B), | intent(in), | optional | :: | unit |
Performs a fill operation on a single array of type DP. This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| real(kind=DP), | intent(in), | dimension(:), allocatable | :: | inserts |
Array of values to insert into keep |
|
| logical, | intent(in), | dimension(:) | :: | lfill_list |
Logical array of bodies to merge into the keeps |
Performs a fill operation on a single array of DP vectors with shape (NDIM, n) This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:,:), allocatable | :: | keeps |
Array of values to keep |
|
| real(kind=DP), | intent(in), | dimension(:,:), allocatable | :: | inserts |
Array of values to insert into keep |
|
| logical, | intent(in), | dimension(:) | :: | lfill_list |
Logical array of bodies to merge into the keeps |
Performs a fill operation on a single array of type I4B This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| integer(kind=I4B), | intent(in), | dimension(:), allocatable | :: | inserts |
Array of values to insert into keep |
|
| logical, | intent(in), | dimension(:) | :: | lfill_list |
Logical array of bodies to merge into the keeps |
Performs a fill operation on a single array of type character strings. This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=STRMAX), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| character(len=STRMAX), | intent(in), | dimension(:), allocatable | :: | inserts |
Array of values to insert into keep |
|
| logical, | intent(in), | dimension(:) | :: | lfill_list |
Logical array of bodies to merge into the keeps |
Performs a fill operation on a single array of logicals This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| logical, | intent(in), | dimension(:), allocatable | :: | inserts |
Array of values to insert into keep |
|
| logical, | intent(in), | dimension(:) | :: | lfill_list |
Logical array of bodies to merge into the keeps |
Resets the storage object back to its original state by removing all of the saved items from the storage frames, but
does not deallocate the frames
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_storage), | intent(inout) | :: | self |
Resizes an array component of double precision type. Passing nnew = 0 will deallocate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:), allocatable | :: | arr |
Array to resize |
|
| integer(kind=I4B), | intent(in) | :: | nnew |
New size |
Resizes an array component of double precision vectors of size (NDIM, n). Passing nnew = 0 will deallocate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:,:), allocatable | :: | arr |
Array to resize |
|
| integer(kind=I4B), | intent(in) | :: | nnew |
New size |
Resizes an array component of integer type. Passing nnew = 0 will deallocate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | arr |
Array to resize |
|
| integer(kind=I4B), | intent(in) | :: | nnew |
New size |
Resizes an array component of type character string. nnew = 0 will deallocate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=STRMAX), | intent(inout), | dimension(:), allocatable | :: | arr |
Array to resize |
|
| integer(kind=I4B), | intent(in) | :: | nnew |
New size |
Resizes an array component of logical type. Passing nnew = 0 will deallocate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout), | dimension(:), allocatable | :: | arr |
Array to resize |
|
| integer(kind=I4B), | intent(in) | :: | nnew |
New size |
Checks the current size of a Swiftest against the requested size and resizes it if it is too small.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_storage), | intent(inout) | :: | self |
Storage object |
||
| integer(kind=I4B), | intent(in) | :: | nnew |
New size |
Checks the current size of a Swiftest against the requested size and resizes it if it is too small.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_storage), | intent(inout) | :: | self |
Storage object |
||
| integer(kind=I4B), | intent(in) | :: | n |
New size |
Checks the current size of the storage object against the required size and extends it by a factor of 2 more than
requested if it is too small.
Note: The reason to extend it by a factor of 2 is for performance. When there are many enounters per step, resizing
every time you want to add an encounter takes significant computational effort. Resizing by a factor of 2 is a tradeoff
between performance (fewer resize calls) and memory managment. Memory usage grows by a factor of 2 each time it fills
up, but no more.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_storage), | intent(inout) | :: | self |
Storage encounter storage object |
||
| class(*), | intent(in) | :: | snapshot |
Object to snapshot |
Sort input DP precision array in place into ascending numerical order using quicksort.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:) | :: | arr |
Sort input integer array in place into ascending numerical order using quick sort. This algorithm works well for partially sorted arrays (which is usually the case here)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:) | :: | arr |
Sort input integer array by index in ascending numerical order using quicksort. If ind is supplied already allocated, we assume it is an existing index array (e.g. a previously sorted array). If it is not allocated, this subroutine swiftest_allocates it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | arr | ||
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | ind |
Sort input integer array by index in ascending numerical order using quicksort. If ind is supplied already allocated, we assume it is an existing index array (e.g. a previously sorted array). If it is not allocated, this subroutine swiftest_allocates it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | arr | ||
| integer(kind=I8B), | intent(inout), | dimension(:), allocatable | :: | ind |
Sort input integer array by index in ascending numerical order using quicksort. If ind is supplied already allocated, we assume it is an existing index array (e.g. a previously sorted array). If it is not allocated, this subroutine swiftest_allocates it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I8B), | intent(in), | dimension(:) | :: | arr | ||
| integer(kind=I8B), | intent(inout), | dimension(:), allocatable | :: | ind |
Sort input DP precision array by index in ascending numerical order using quick sort. This algorithm works well for partially sorted arrays (which is usually the case here). If ind is supplied already allocated, we assume it is an existing index array (e.g. a previously sorted array). If it is not allocated, this subroutine swiftest_allocates it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(in), | dimension(:) | :: | arr | ||
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | ind |
Sort input DP precision array by index in ascending numerical order using quicksort. If ind is supplied already allocated, we assume it is an existing index array (e.g. a previously sorted array). If it is not allocated, this subroutine swiftest_allocates it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=SP), | intent(in), | dimension(:) | :: | arr | ||
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | ind |
Partition function for quicksort on DP type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:) | :: | arr | ||
| integer(kind=I4B), | intent(out) | :: | marker | |||
| integer(kind=I4B), | intent(inout), | optional, | dimension(:) | :: | ind |
Partition function for quicksort on I4B type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:) | :: | arr | ||
| integer(kind=I4B), | intent(out) | :: | marker | |||
| integer(kind=I4B), | intent(inout), | optional, | dimension(:) | :: | ind |
Partition function for quicksort on I4B type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:) | :: | arr | ||
| integer(kind=I8B), | intent(out) | :: | marker | |||
| integer(kind=I8B), | intent(inout), | optional, | dimension(:) | :: | ind |
Partition function for quicksort on I8B type with I8B index
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I8B), | intent(inout), | dimension(:) | :: | arr | ||
| integer(kind=I8B), | intent(out) | :: | marker | |||
| integer(kind=I8B), | intent(inout), | optional, | dimension(:) | :: | ind |
Partition function for quicksort on SP type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=SP), | intent(inout), | dimension(:) | :: | arr | ||
| integer(kind=I4B), | intent(out) | :: | marker | |||
| integer(kind=I4B), | intent(inout), | optional, | dimension(:) | :: | ind |
Sort input DP precision array by index in ascending numerical order using quicksort sort.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:) | :: | arr | ||
| integer(kind=I4B), | intent(out), | optional, | dimension(:) | :: | ind |
Sort input I4B array by index in ascending numerical order using quicksort.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:) | :: | arr | ||
| integer(kind=I4B), | intent(out), | optional, | dimension(:) | :: | ind |
Sort input I4B array by index in ascending numerical order using quicksort.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:) | :: | arr | ||
| integer(kind=I8B), | intent(out), | optional, | dimension(:) | :: | ind |
Sort input I8B array by index in ascending numerical order using quicksort.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I8B), | intent(inout), | dimension(:) | :: | arr | ||
| integer(kind=I8B), | intent(out), | optional, | dimension(:) | :: | ind |
Sort input DP precision array by index in ascending numerical order using quicksort.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=SP), | intent(inout), | dimension(:) | :: | arr | ||
| integer(kind=I4B), | intent(out), | optional, | dimension(:) | :: | ind |
Rearrange a single array of DP type in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I4B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Rearrange a single array of (NDIM,n) DP-type vectors in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:,:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I4B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Rearrange a single array of integers in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I4B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Rearrange a single array of integers in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I8B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I8B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Rearrange a single array of character string in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=STRMAX), | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I4B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Rearrange a single array of logicals in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I4B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Rearrange a single array of logicals in-place from an index list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout), | dimension(:), allocatable | :: | arr |
Destination array |
|
| integer(kind=I8B), | intent(in), | dimension(:) | :: | ind |
Index to rearrange against |
|
| integer(kind=I8B), | intent(in) | :: | n |
Number of elements in arr and ind to rearrange |
Sort input DP precision array in place into ascending numerical order using quicksort.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=SP), | intent(inout), | dimension(:) | :: | arr |
Performs a spill operation on a single array of type DP This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| real(kind=DP), | intent(inout), | dimension(:), allocatable | :: | discards |
Array of discards |
|
| logical, | intent(in), | dimension(:) | :: | lspill_list |
Logical array of bodies to spill into the discardss |
|
| logical, | intent(in) | :: | ldestructive |
Logical flag indicating whether or not this operation should alter the keeps array or not |
Performs a spill operation on a single array of DP vectors with shape (NDIM, n) This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(inout), | dimension(:,:), allocatable | :: | keeps |
Array of values to keep |
|
| real(kind=DP), | intent(inout), | dimension(:,:), allocatable | :: | discards |
Array discards |
|
| 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 the keeps array or not |
Performs a spill operation on a single array of type I4B This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| integer(kind=I4B), | intent(inout), | dimension(:), allocatable | :: | discards |
Array of discards |
|
| 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 the keeps array or not |
Performs a spill operation on a single array of type I4B This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I8B), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| integer(kind=I8B), | intent(inout), | dimension(:), allocatable | :: | discards |
Array of discards |
|
| 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 the keeps array or not |
Performs a spill operation on a single array of type character strings This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=STRMAX), | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| character(len=STRMAX), | intent(inout), | dimension(:), allocatable | :: | discards |
Array of discards |
|
| 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 the keeps array or not |
Performs a spill operation on a single array of logicals This is the inverse of a spill operation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout), | dimension(:), allocatable | :: | keeps |
Array of values to keep |
|
| logical, | intent(inout), | dimension(:), allocatable | :: | discards |
Array of discards |
|
| 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 |
Takes an input unsorted integer array and returns a new array of sorted, unique values (DP version)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(in), | dimension(:) | :: | input_array |
Unsorted input array |
|
| real(kind=DP), | intent(out), | dimension(:), allocatable | :: | output_array |
Sorted array of unique values |
|
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index_map |
An array of the same size as input_array that such that any for any index i, |
Takes an input unsorted integer array and returns a new array of sorted, unique values (I4B version)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4B), | intent(in), | dimension(:) | :: | input_array |
Unsorted input array |
|
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | output_array |
Sorted array of unique values |
|
| integer(kind=I4B), | intent(out), | dimension(:), allocatable | :: | index_map |
An array of the same size as input_array that such that any for any index i, |