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

Commit

Permalink
Created new swiftest_storage class to store simulation data between f…
Browse files Browse the repository at this point in the history
…ile outputs
  • Loading branch information
daminton committed Nov 30, 2022
1 parent 4cb57b9 commit 875e4c5
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/modules/swiftest_classes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,30 @@ module swiftest_classes
procedure :: write_particle_info => netcdf_write_particle_info_base !! Dump contents of particle information metadata to file
end type swiftest_base

type, abstract, extends(swiftest_base) :: swiftest_storage
!! An abstract superclass for a generic Swiftest object that is used to store simulation history data between file I/O
contains
procedure(abstract_store), deferred :: store !! Stores the state of the simulation in memory
procedure(abstract_dump_storage), deferred :: dump !! Dumps contents of the variable to file
end type swiftest_storage

abstract interface
subroutine abstract_store(self)
import swiftest_storage
class(swiftest_storage), intent(inout) :: self
end subroutine abstract_store

subroutine abstract_dump_storage(self)
import swiftest_storage
class(swiftest_storage), intent(inout) :: self
end subroutine abstract_dump_storage
end interface


!********************************************************************************************************************************
! swiftest_cb class definitions and methods
!********************************************************************************************************************************
!> A concrete lass for the central body in a Swiftest simulation
!> An abstract class for a generic central body in a Swiftest simulation
type, abstract, extends(swiftest_base) :: swiftest_cb
type(swiftest_particle_info) :: info !! Particle metadata information
integer(I4B) :: id = 0 !! External identifier (unique)
Expand Down

0 comments on commit 875e4c5

Please sign in to comment.