diff --git a/python/swiftest/swiftest/init_cond.py b/python/swiftest/swiftest/init_cond.py index 8dcf08cf2..02ff6f8e1 100644 --- a/python/swiftest/swiftest/init_cond.py +++ b/python/swiftest/swiftest/init_cond.py @@ -285,8 +285,8 @@ def vec2xr(param: Dict, **kwargs: Any): if param['ROTATION']: if "rot" not in kwargs and "Gmass" in kwargs: kwargs['rot'] = np.zeros((len(kwargs['Gmass']),3)) - if "Ip" not in kwargs and "rot" in kwargs: - kwargs['Ip'] = np.full_like(kwargs['rot'], 0.4) + if "Ip" not in kwargs and "Gmass" in kwargs: + kwargs['Ip'] = np.full_like(kwargs['Gmass'], 0.4) if "time" not in kwargs: kwargs["time"] = np.array([0.0]) diff --git a/src/swiftest/swiftest_io.f90 b/src/swiftest/swiftest_io.f90 index fe4ecba18..8ae50ba2d 100644 --- a/src/swiftest/swiftest_io.f90 +++ b/src/swiftest/swiftest_io.f90 @@ -2094,7 +2094,6 @@ module subroutine swiftest_io_param_reader(self, unit, iotype, v_list, iostat, i return end if - if ((param%collision_model /= "MERGE") .and. & (param%collision_model /= "BOUNCE") .and. & (param%collision_model /= "FRAGGLE")) then @@ -2127,7 +2126,6 @@ module subroutine swiftest_io_param_reader(self, unit, iotype, v_list, iostat, i param%inv_c2 = (param%inv_c2)**(-2) end if - select case(trim(adjustl(param%interaction_loops))) case("ADAPTIVE") param%ladaptive_interactions = .true. @@ -2230,6 +2228,7 @@ module subroutine swiftest_io_param_writer(self, unit, iotype, v_list, iostat, i character(*),parameter :: Ifmt = '(I0)' !! Format label for integer values character(*),parameter :: Rfmt = '(ES25.17)' !! Format label for real values character(*),parameter :: Lfmt = '(L1)' !! Format label for logical values + integer(I4B) :: nseeds associate(param => self) call io_param_writer_one("T0", param%t0, unit) @@ -2275,6 +2274,7 @@ module subroutine swiftest_io_param_writer(self, unit, iotype, v_list, iostat, i call io_param_writer_one("INTERACTION_LOOPS", param%interaction_loops, unit) call io_param_writer_one("ENCOUNTER_CHECK_PLPL", param%encounter_check_plpl, unit) call io_param_writer_one("ENCOUNTER_CHECK_PLTP", param%encounter_check_pltp, unit) + call io_param_writer_one("ENCOUNTER_SAVE", param%encounter_save, unit) if (param%lenergy) then call io_param_writer_one("FIRSTENERGY", param%lfirstenergy, unit) @@ -2282,6 +2282,14 @@ module subroutine swiftest_io_param_writer(self, unit, iotype, v_list, iostat, i call io_param_writer_one("FIRSTKICK",param%lfirstkick, unit) call io_param_writer_one("MAXID",param%maxid, unit) call io_param_writer_one("MAXID_COLLISION",param%maxid_collision, unit) + + if (param%GMTINY > 0.0_DP) call io_param_writer_one("GMTINY",param%GMTINY, unit) + if (param%min_GMfrag > 0.0_DP) call io_param_writer_one("MIN_GMFRAG",param%min_GMfrag, unit) + call io_param_writer_one("COLLISION_MODEL",param%collision_model, unit) + if (param%collision_model == "FRAGGLE" ) then + nseeds = size(param%seed) + call io_param_writer_one("SEED", [nseeds, param%seed(:)], unit) + end if iostat = 0 iomsg = "UDIO not implemented" @@ -2837,7 +2845,6 @@ module subroutine swiftest_io_toupper(string) end subroutine swiftest_io_toupper - module subroutine swiftest_io_write_discard(self, param) !! author: David A. Minton !!