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

Commit

Permalink
Merge branch 'encounter_storage' into debug
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Nov 30, 2022
2 parents ccdb4a3 + 4cb57b9 commit 58f1ad3
Show file tree
Hide file tree
Showing 18 changed files with 99 additions and 1,042 deletions.
8 changes: 4 additions & 4 deletions examples/Basic_Simulation/initial_conditions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"outputs": [],
"source": [
"# Initialize the simulation object as a variable\n",
"sim = swiftest.Simulation(tstart=0.0, tstop=1.0e6, dt=0.005, tstep_out=1.0e3, fragmentation=True, minimum_fragment_mass = 2.5e-11, mtiny=2.5e-8)"
"sim = swiftest.Simulation(tstart=0.0, tstop=1.0e6, dt=0.01, tstep_out=1.0e3, fragmentation=True, minimum_fragment_mass = 2.5e-11, mtiny=2.5e-8)"
]
},
{
Expand Down Expand Up @@ -79,7 +79,7 @@
"metadata": {},
"outputs": [],
"source": [
"sim.add_body(name_pl, a_pl, e_pl, inc_pl, capom_pl, omega_pl, capm_pl, GMpl=GM_pl, Rpl=R_pl, rhill=Rh_pl, Ip1=Ip1_pl, Ip2=Ip2_pl, Ip3=Ip3_pl, rotx=rotx_pl, roty=roty_pl, rotz=rotz_pl)"
"sim.add_body(name_pl, a_pl, e_pl, inc_pl, capom_pl, omega_pl, capm_pl, Gmass=GM_pl, radius=R_pl, rhill=Rh_pl, Ip1=Ip1_pl, Ip2=Ip2_pl, Ip3=Ip3_pl, rotx=rotx_pl, roty=roty_pl, rotz=rotz_pl)"
]
},
{
Expand Down Expand Up @@ -144,9 +144,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "swiftest",
"display_name": "Python (My debug_env Kernel)",
"language": "python",
"name": "swiftest"
"name": "debug_env"
},
"language_info": {
"codemirror_mode": {
Expand Down
6 changes: 3 additions & 3 deletions examples/Basic_Simulation/initial_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from numpy.random import default_rng

# Initialize the simulation object as a variable
sim = swiftest.Simulation(tstart=0.0, tstop=1.0e3, dt=0.005, tstep_out=1.0e0, fragmentation=True, minimum_fragment_mass = 2.5e-11, mtiny=2.5e-8)
sim = swiftest.Simulation(tstart=0.0, tstop=1.0e3, dt=0.010, tstep_out=1.0e0, fragmentation=True, minimum_fragment_mass = 2.5e-11, mtiny=2.5e-8)

# Add the modern planets and the Sun using the JPL Horizons Database
sim.add_solar_system_body(["Sun","Mercury","Venus","Earth","Mars","Jupiter","Saturn","Uranus","Neptune","Pluto"])
Expand All @@ -49,7 +49,7 @@
roty_pl = [0.0, 0.0, 0.0, 0.0, 0.0]
rotz_pl = [0.0, 0.0, 0.0, 0.0, 0.0]

sim.add_body(name_pl, a_pl, e_pl, inc_pl, capom_pl, omega_pl, capm_pl, GMpl=GM_pl, Rpl=R_pl, rhill=Rh_pl, Ip1=Ip1_pl, Ip2=Ip2_pl, Ip3=Ip3_pl, rotx=rotx_pl, roty=roty_pl, rotz=rotz_pl)
sim.add_body(name=name_pl, v1=a_pl, v2=e_pl, v3=inc_pl, v4=capom_pl, v5=omega_pl, v6=capm_pl, Gmass=GM_pl, radius=R_pl, rhill=Rh_pl, Ip1=Ip1_pl, Ip2=Ip2_pl, Ip3=Ip3_pl, rotx=rotx_pl, roty=roty_pl, rotz=rotz_pl)

# Add 10 user-defined test particles
ntp = 10
Expand All @@ -62,7 +62,7 @@
omega_tp = default_rng().uniform(0.0, 360.0, ntp)
capm_tp = default_rng().uniform(0.0, 360.0, ntp)

sim.add_body(name_tp, a_tp, e_tp, inc_tp, capom_tp, omega_tp, capm_tp)
sim.add_body(name=name_tp, v1=a_tp, v2=e_tp, v3=inc_tp, v4=capom_tp, v5=omega_tp, v6=capm_tp)
# Display the run configuration parameters
sim.get_parameter()

Expand Down
2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ SET(FAST_MATH_FILES
${SRC}/discard/discard.f90
${SRC}/drift/drift.f90
${SRC}/encounter/encounter_check.f90
${SRC}/encounter/encounter_io.f90
${SRC}/encounter/encounter_setup.f90
${SRC}/encounter/encounter_util.f90
${SRC}/fraggle/fraggle_generate.f90
Expand All @@ -53,7 +52,6 @@ SET(FAST_MATH_FILES
${SRC}/orbel/orbel.f90
${SRC}/rmvs/rmvs_discard.f90
${SRC}/rmvs/rmvs_encounter_check.f90
${SRC}/rmvs/rmvs_io.f90
${SRC}/rmvs/rmvs_setup.f90
${SRC}/rmvs/rmvs_step.f90
${SRC}/rmvs/rmvs_util.f90
Expand Down
4 changes: 2 additions & 2 deletions src/discard/discard.f90
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ module subroutine discard_system(self, param)
call tp%discard(system, param)
ltp_discards = (tp_discards%nbody > 0)
end if

if (lpl_discards .or. ltp_discards) call system%write_discard(param)
if (ltp_discards) call tp_discards%write_particle_info(param%nciu, param)
if (lpl_discards) call pl_discards%write_particle_info(param%nciu, param)
if (lpl_discards .and. param%lenergy) call self%conservation_report(param, lterminal=.false.)
if (lpl_check) call pl_discards%setup(0,param)
if (ltp_check) call tp_discards%setup(0,param)
Expand Down
102 changes: 0 additions & 102 deletions src/encounter/encounter_io.f90

This file was deleted.

Loading

0 comments on commit 58f1ad3

Please sign in to comment.