Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Moved swiftest_particle_info further up in the code before it is used…
Browse files Browse the repository at this point in the history
… in the swiftest_body type definition.
  • Loading branch information
daminton committed May 24, 2023
1 parent 571b4a2 commit 0605144
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/swiftest/swiftest_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,25 @@ module swiftest
end type swiftest_kinship


type, extends(base_particle_info) :: swiftest_particle_info
character(len=NAMELEN) :: name !! Non-unique name
character(len=NAMELEN) :: particle_type !! String containing a description of the particle type (e.g. Central Body, Massive Body, Test Particle)
character(len=NAMELEN) :: origin_type !! String containing a description of the origin of the particle (e.g. Initial Conditions, Supercatastrophic, Disruption, etc.)
real(DP) :: origin_time !! The time of the particle's formation
integer(I4B) :: collision_id !! The ID of the collision that formed the particle
real(DP), dimension(NDIM) :: origin_rh !! The heliocentric distance vector at the time of the particle's formation
real(DP), dimension(NDIM) :: origin_vh !! The heliocentric velocity vector at the time of the particle's formation
real(DP) :: discard_time !! The time of the particle's discard
character(len=NAMELEN) :: status !! Particle status description: Active, Merged, Fragmented, etc.
real(DP), dimension(NDIM) :: discard_rh !! The heliocentric distance vector at the time of the particle's discard
real(DP), dimension(NDIM) :: discard_vh !! The heliocentric velocity vector at the time of the particle's discard
integer(I4B) :: discard_body_id !! The id of the other body involved in the discard (0 if no other body involved)
contains
procedure :: copy => swiftest_util_copy_particle_info !! Copies one set of information object components into another, component-by-component
procedure :: set_value => swiftest_util_set_particle_info !! Sets one or more values of the particle information metadata object
end type swiftest_particle_info


!> An abstract class for a generic collection of Swiftest bodies
type, abstract, extends(base_object) :: swiftest_body
!! Superclass that defines the generic elements of a Swiftest particle
Expand Down Expand Up @@ -167,25 +186,6 @@ module swiftest
end type swiftest_body


type, extends(base_particle_info) :: swiftest_particle_info
character(len=NAMELEN) :: name !! Non-unique name
character(len=NAMELEN) :: particle_type !! String containing a description of the particle type (e.g. Central Body, Massive Body, Test Particle)
character(len=NAMELEN) :: origin_type !! String containing a description of the origin of the particle (e.g. Initial Conditions, Supercatastrophic, Disruption, etc.)
real(DP) :: origin_time !! The time of the particle's formation
integer(I4B) :: collision_id !! The ID of the collision that formed the particle
real(DP), dimension(NDIM) :: origin_rh !! The heliocentric distance vector at the time of the particle's formation
real(DP), dimension(NDIM) :: origin_vh !! The heliocentric velocity vector at the time of the particle's formation
real(DP) :: discard_time !! The time of the particle's discard
character(len=NAMELEN) :: status !! Particle status description: Active, Merged, Fragmented, etc.
real(DP), dimension(NDIM) :: discard_rh !! The heliocentric distance vector at the time of the particle's discard
real(DP), dimension(NDIM) :: discard_vh !! The heliocentric velocity vector at the time of the particle's discard
integer(I4B) :: discard_body_id !! The id of the other body involved in the discard (0 if no other body involved)
contains
procedure :: copy => swiftest_util_copy_particle_info !! Copies one set of information object components into another, component-by-component
procedure :: set_value => swiftest_util_set_particle_info !! Sets one or more values of the particle information metadata object
end type swiftest_particle_info


type, abstract, extends(base_object) :: swiftest_cb
!> An abstract class for a generic central body in a Swiftest simulation
class(swiftest_particle_info), allocatable :: info !! Particle metadata information
Expand Down

0 comments on commit 0605144

Please sign in to comment.