base_util_copy_store Subroutine

public subroutine base_util_copy_store(self, source)

Stores a snapshot of the nbody system so that later it can be retrieved for saving to file.

Arguments

TypeIntentOptionalAttributesName
class(base_storage_frame), intent(inout) :: self

Swiftest storage frame object

class(*), intent(in) :: source

Swiftest n-body system object


Contents

Source Code


Source Code

      subroutine base_util_copy_store(self, source)
         !! author: David A. Minton 
         !! 
         !! Stores a snapshot of the nbody system so that later it can be retrieved for saving to file. 
         implicit none
         class(base_storage_frame),  intent(inout) :: self   
            !! Swiftest storage frame object 
         class(*),                   intent(in)    :: source 
            !! Swiftest n-body system object 

         if (allocated(self%item)) deallocate(self%item)
         allocate(self%item, source=source)
         
         return
      end subroutine base_util_copy_store