danieljprice / phantom

Phantom Smoothed Particle Hydrodynamics and Magnetohydrodynamics code
https://phantomsph.github.io
Other
103 stars 224 forks source link

Damping bcs #351

Closed danieljprice closed 1 year ago

danieljprice commented 1 year ago

Type of PR: Bug fix

Description: couple of small bug fixes, restart with particle injection would fail if particle updates occurred at t=0, because updated particles are tagged as unknown until update_injected_particles is called. The failure gave:

 FATAL ERROR! energies: particle type <= 0

 FATAL ERROR! energies: particle type <= 0

also fixed a floating point exception in accretion energy since accradius1 can be equal to zero if a softened potential is employed

Testing: Successful ability to restart the code for a simulation with particle re-injection (inject_steadydisc.f90)

Did you run the bots? no