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

Commit

Permalink
Get the maxid_collision when initializing the system
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jan 12, 2023
1 parent 083920b commit 28a4ac0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/symba/symba_util.f90
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,12 @@ module subroutine symba_util_setup_initialize_system(self, param)
select type(nc => collision_history%nc)
class is (collision_netcdf_parameters)
nc%file_name = COLLISION_OUTFILE
if (.not.param%lrestart) then
if (param%lrestart) then
call nc%open(param) ! This will find the nc%max_idslot variable
else
call nc%initialize(param)
call nc%close()
end if
call nc%close()
end select
allocate(nbody_system%collision_history, source=collision_history)

Expand All @@ -329,6 +331,10 @@ module subroutine symba_util_setup_initialize_system(self, param)
allocate(collision_fraggle :: nbody_system%collider)
end select
call nbody_system%collider%setup(nbody_system)
select type(nc => collision_history%nc)
class is (collision_netcdf_parameters)
nbody_system%collider%maxid_collision = nc%max_idslot
end select

end associate

Expand Down

0 comments on commit 28a4ac0

Please sign in to comment.