SWIFTsim merge requestshttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests2023-11-29T12:57:42Zhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1827added check for valid thread number provided2023-11-29T12:57:42ZMladen Ivkovicadded check for valid thread number providedMatthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1826Draft: Magnetosonic speed in timescale used in updating the viscosity alphas2024-02-23T21:01:39ZOrestis KarapiperisDraft: Magnetosonic speed in timescale used in updating the viscosity alphasAlso changed hydro parameters to what works best for me in the shock tubes, and is consistent with the value suggested for hydro. Let me know what you think.Also changed hydro parameters to what works best for me in the shock tubes, and is consistent with the value suggested for hydro. Let me know what you think.Matthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1825Chemistry API changes for metal fluxes2024-01-24T09:40:37ZYolan UyttenhoveChemistry API changes for metal fluxesThis merge request extends the chemistry API as discussed in #834 to correctly advect metals in hydro schemes with mass fluxes between particles.
The approach is very similar to @mivkov's approach to tracking the mass fractions of the i...This merge request extends the chemistry API as discussed in #834 to correctly advect metals in hydro schemes with mass fluxes between particles.
The approach is very similar to @mivkov's approach to tracking the mass fractions of the ionizing species in GEAR-RT.
## Current status
This is a working implementation for the EAGLE chemistry scheme.
Chemistry schemes other than `EAGLE` and `none` currently throw a compile time error trying to compile with a hydro scheme that does mass fluxes (in this branch, only `gizmo-mfv`).
## To-do
- [ ] Implement the new functions for other chemistry schemes
- [ ] How to treat diffusion in this case? (only necessary when implementing for GEAR-diffusion)
- [ ] Advect other quantities tracked by chemistry as well (e.g. `mass_from_SNIa`, `metal_mass_fraction_from_SNIa` and others)?
## Other thoughts
As discussed in #834, we would also need to disable metal smoothing when using this with e.g. moving mesh hydro.Matthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1824Sink : bugs fixing2024-03-25T17:14:24ZDarwinSink : bugs fixingAll known bugs that lead to crashes are solved.All known bugs that lead to crashes are solved.https://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1823Support optimization for the AMD aocc compiler2023-11-30T15:24:19ZPeter W. DraperSupport optimization for the AMD aocc compilerMake sure we use the optimized maths library and interprocedural optimization. Both are needed to get
optimization that works as well as other clang based-compilers.
Note in this MR we enable interprocedural optimization by default, unl...Make sure we use the optimized maths library and interprocedural optimization. Both are needed to get
optimization that works as well as other clang based-compilers.
Note in this MR we enable interprocedural optimization by default, unless the `--enable-debug`
or `--disable-optimization`
flags are used.Peter W. DraperPeter W. Draperhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1822Fix radiated energy saved to statistics for EAGLE cooling.2023-11-23T22:43:39ZYolan UyttenhoveFix radiated energy saved to statistics for EAGLE cooling.(cherry picked from commit 340658c0a4ba9b4bfc37623002d9c7ef21199466)
I think the radiated energy stored in `xp.cooling_data` was incorrect for the EAGLE cooling scheme.
The variable `cooling_du_dt` actually stores the total `du_dt` (hy...(cherry picked from commit 340658c0a4ba9b4bfc37623002d9c7ef21199466)
I think the radiated energy stored in `xp.cooling_data` was incorrect for the EAGLE cooling scheme.
The variable `cooling_du_dt` actually stores the total `du_dt` (hydro + cooling), so the `hydro_du_dt` needs to be subtracted when computing the radiated energy.
Some examples (from CoolingSedovBlast3D):
| | Without fix | With fix |
|:----:|:----:|:----:|
| Sphenix: | ![energy_sphenix_before](/uploads/29b7bf22fa890bb7b09642f971b2c32a/energy_sphenix_before.png) | ![energy_sphenix_after](/uploads/bed18fab3b8606ed8ecbf3a3b173580c/energy_sphenix_after.png) |
| Gizmo-MFV: |![energy_gizmo-mfv_before](/uploads/df048e870074d2b795e6cab00a8d6922/energy_gizmo-mfv_before.png) |![energy_gizmo-mfv_after](/uploads/15b6424e22de51fc429cd41ad3e3ae22/energy_gizmo-mfv_after.png)Matthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1821Fstasys/fast rotor test multiple schemes2023-11-15T08:56:28ZFederico Andrés StasyszynFstasys/fast rotor test multiple schemesAdded scripts and plotting routines for the MHD Fast Rotor
added extra information also for the MHD Blast waveAdded scripts and plotting routines for the MHD Fast Rotor
added extra information also for the MHD Blast wavehttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1820Fstasys/blast wave additional files2023-11-14T14:45:38ZFederico Andrés StasyszynFstasys/blast wave additional filesmimimum work to comprare codes.... easy to check also MAGMA.
Still needed to add a pattern informationmimimum work to comprare codes.... easy to check also MAGMA.
Still needed to add a pattern informationhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1819Prevent overflows in time step calculations with RT2023-11-13T15:49:11ZMladen IvkovicPrevent overflows in time step calculations with RTIn certain cases, overflows may occur when computing the hydro time step sizes in the timestep tasks. Specifically, this may occur when a) the total physical simulation time to be covered is short; b) there are particles with long time s...In certain cases, overflows may occur when computing the hydro time step sizes in the timestep tasks. Specifically, this may occur when a) the total physical simulation time to be covered is short; b) there are particles with long time step sizes (e.g. like in voids); and c) a large number of sub-cycles is permitted.
I added a check and a fix for that.
I also noticed that I'm not properly initializing the RT time step data anywhere. It shouldn't be a problem, but I added it during first_init anyway. Better safe than sorry.Matthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1818Fstasys/clean blast now with vp2023-11-10T21:23:50ZFederico Andrés StasyszynFstasys/clean blast now with vpNow the Blast wave with VP.
Note that I changed the IC a little bit following Seo & Ryu, 2023Now the Blast wave with VP.
Note that I changed the IC a little bit following Seo & Ryu, 2023Federico Andrés StasyszynFederico Andrés Stasyszynhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1817Fstasys/clean fast rotor now with vp2023-11-10T21:24:15ZFederico Andrés StasyszynFstasys/clean fast rotor now with vpI clean the Fast Rotor test. @okarapiperis you can check the new versions, and compare with the parameters that you are studing.
I propose to remove files and clean up the folder, it should run from scratch.
Of course old scripts are i...I clean the Fast Rotor test. @okarapiperis you can check the new versions, and compare with the parameters that you are studing.
I propose to remove files and clean up the folder, it should run from scratch.
Of course old scripts are in git.Matthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1816Simpler MHD signal velocity that considerably helps in reducing noise in...2023-11-09T16:17:55ZOrestis KarapiperisSimpler MHD signal velocity that considerably helps in reducing noise in...Simpler MHD signal velocity that considerably helps in reducing noise in velocity and magnetic field profiles in the RJ1A shock tubeSimpler MHD signal velocity that considerably helps in reducing noise in velocity and magnetic field profiles in the RJ1A shock tubeMatthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1815Missing README file in examples/Cooling/CoolingBox2023-11-08T19:50:24ZYves RevazMissing README file in examples/Cooling/CoolingBoxJust add a README file in examples/Cooling/CoolingBoxJust add a README file in examples/Cooling/CoolingBoxMatthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1814typo in thermochemistry2023-11-08T16:02:43ZMladen Ivkovictypo in thermochemistryMatthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1813Update METIS and ParMETIS checks to allow for an external GKlib2023-11-07T16:59:14ZPeter W. DraperUpdate METIS and ParMETIS checks to allow for an external GKlibUpdate METIS and ParMETIS checks to allow for an external GKlib as the latest github releases use this method.
Fixes #874Update METIS and ParMETIS checks to allow for an external GKlib as the latest github releases use this method.
Fixes #874Peter W. DraperPeter W. Draperhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1812Upgrade to FOF to treat some types differently2023-12-01T13:08:26ZMatthieu SchallerUpgrade to FOF to treat some types differently- Supersedes !1798.
- Implements #820.
- Implements #872.
- Fixes an old bug in the calculation of the linking length when the DM particle masses are not constant.
- Fixes an old bug which would crash the code at the end of a stand-alone...- Supersedes !1798.
- Implements #820.
- Implements #872.
- Fixes an old bug in the calculation of the linking length when the DM particle masses are not constant.
- Fixes an old bug which would crash the code at the end of a stand-alone FOF call.
Some important changes to the FOF algorithm.
We create two kinds of particles: `linkable` and `attachable`:
* The linkable ones behave as before. They build groups with each other.
* The attachable ones can only be linked to a linkable. (i.e. no attach-to-attach links allowed). They can't be root. They attach to the *nearest* linkable. Max distance for search is set by the linking length.
The two categories are specified at runtime in the parameter file.
The use case is to run FOF on the DM only and then attach the gas/stars/BHs to the nearest DM particle they find. With some minor caveats, this is what other FOF codes do.
The strategy is as follows:
- Perform a regular FOF search only involving the linkables.
- Same over MPI and construct the array of possible links.
- Launch a new pass over the particle where each attachable identifies the nearest linkable. Store that info.
- Once the pass is done, loop over the *local* attachables and act:
- If the nearest linkable is also local --> update the arrays
- If the nearest linkable is foreign --> create a new link
- Process all the links as before
- Compute group properties.
Additional improvements:
- Do not attempt to write subgrid info in the snapshots produced as it hasn't been read in.
Todo:
- [x] #872.
- [x] Can we skip the regular `engine_maketasks()` in the first `engine_rebuild()`? --> No. Need the comms.
- [x] Update all relevant parameter files.
- [x] Threadpoolize some of the new loops.
- [x] Update the docs.Matthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1811Small changes in the Grackle cooling2023-11-08T15:15:09ZYves RevazSmall changes in the Grackle coolingSome imporovements of the Grackle coolingSome imporovements of the Grackle coolingMatthieu SchallerMatthieu Schallerhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1810Use a locally-defined macro to bypass a GCC optimization bug2023-11-08T09:23:50ZMatthieu SchallerUse a locally-defined macro to bypass a GCC optimization bugFixes #859.
This solution seems dirty but I don't know of another way to bypass what seems to be a bad decision by GCC.
@fastasyszyn could you confirm that this works for you?Fixes #859.
This solution seems dirty but I don't know of another way to bypass what seems to be a bad decision by GCC.
@fastasyszyn could you confirm that this works for you?Peter W. DraperPeter W. Draperhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1809Fstasys/cosmological box mhd gen ic2023-11-01T16:43:44ZFederico Andrés StasyszynFstasys/cosmological box mhd gen icdraft version running 64^3 only
Notes:
@matthieu I have to change the omega_cdm in the YML fine, is that fine?
Files have everything in comoving.... how we deal that for the ICs in the IO or makeIC?draft version running 64^3 only
Notes:
@matthieu I have to change the omega_cdm in the YML fine, is that fine?
Files have everything in comoving.... how we deal that for the ICs in the IO or makeIC?Federico Andrés StasyszynFederico Andrés Stasyszynhttps://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/merge_requests/1808Fstasys/fix cosmo factors fdi vp2023-10-31T15:15:36ZFederico Andrés StasyszynFstasys/fix cosmo factors fdi vpThe timesteps for resitivity are now smaller. The timesteps due gradients (divB) now are depdendent on the MHD_prefactors.
additionally, the Gauge evolution now is properly done. Previously, I dont care to much as it is a correction. w...The timesteps for resitivity are now smaller. The timesteps due gradients (divB) now are depdendent on the MHD_prefactors.
additionally, the Gauge evolution now is properly done. Previously, I dont care to much as it is a correction. will be tested with CosmologicalBox.