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

Commit

Permalink
Improved the convergence of Fraggle on the energy constraint. Fixed i…
Browse files Browse the repository at this point in the history
…ssue where, because the data file is not written to every time there's a collision, particles can come and go before ever being recorded, leaving gaps in the name dimension of the NetCDF file.
  • Loading branch information
daminton committed Jan 12, 2023
1 parent 86e7812 commit 337b4bd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions python/swiftest/swiftest/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ def process_netcdf_input(ds, param):
elif param['OUT_TYPE'] == "NETCDF_FLOAT":
ds = fix_types(ds,ftype=np.float32)

ds = ds.where(ds['id']>=0, drop=True)
return ds

def swiftest2xr(param, verbose=True):
Expand Down
1 change: 0 additions & 1 deletion src/collision/collision_resolve.f90
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ module subroutine collision_resolve_mergeaddsub(nbody_system, param, t, status)
integer(I4B) :: merge_text_length
character(len=NAMELEN) :: merge_text
character(len=NAMELEN) :: newname, origin_type
character(len=STRMAX) :: message
real(DP) :: volume

select type(nbody_system)
Expand Down
2 changes: 1 addition & 1 deletion src/fraggle/fraggle_generate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu
real(DP), parameter :: vmax_initial_factor = 5.0_DP ! For the initial "guess" of fragment velocities, this is the maximum velocity relative to escape velocity that the fragments will have
integer(I4B), parameter :: MAXLOOP = 200
integer(I4B), parameter :: MAXTRY = 20
real(DP), parameter :: SUCCESS_METRIC = 1.0_DP
real(DP), parameter :: SUCCESS_METRIC = 1.0e-3_DP
class(collision_fraggle), allocatable :: collider_local
character(len=STRMAX) :: message

Expand Down

0 comments on commit 337b4bd

Please sign in to comment.