Skip to content

Flag/tag based refinement additions#14

Open
shivankhullar wants to merge 123 commits into
pfhopkins:gizmo-cppfrom
shivankhullar:sk_refine_dev
Open

Flag/tag based refinement additions#14
shivankhullar wants to merge 123 commits into
pfhopkins:gizmo-cppfrom
shivankhullar:sk_refine_dev

Conversation

@shivankhullar

Copy link
Copy Markdown

Pulled in flag based refinement changes from my older C version. Tested these changes out, seems to be working fine for me with this C++ version. Summary of additions:

  1. Makefile changes to rusty, timestep.cc had a syntax error on line 735, increased InitCondFile and OutputDir memory allocations to 200 characters.
  2. Added FLAG_BASED_REFINEMENT flags to do the flag based refinement (explained in Template_Config.sh). Essentially these flags will read in a field called "RefinementFlag" from the IC file and then use those tags to calculate a center for the refinement region. Allows one to tag particles of any type in principle and use their COM as the RefinementRegionCenter. To generate ICs for these, simply add another field called RefinementFlag and add a header attribute called RefinementRegionCenter (which can be initialized to zero since we calculate this on initialization anyway).
  3. FLAG_BASED_REFINEMENT_MAXDENSITY will lock-in the refinement region center on the maximum density (replacing the COM calculation). Useful for choosing one region among many collapsing centers in a large 0.5 kpc cloud.
  4. JEANS_REFINEMENT_IN_REGION and JEANS_REFINEMENT_IN_REGION_RADIUS_PC should be used with FIRE_SUPERLAGRANGIAN_JEANS_REFINEMENT to define a region within which refinement is allowed. JEANS_REFINEMENT_IN_REGION_RADIUS_PC sets the outer radius of the region. The inner radius (at highest res, beyond which there's no splitting), is set to JEANS_REFINEMENT_IN_REGION_RADIUS_PC/20 for now, but can be modified as needed. There's a condition to choose the maximum of this m(r) function and the target resolution based on the FIRE_SUPERLAGRANGIAN_JEANS_REFINEMENT criteria, so we have a spatial gradient in resolution that's set automatically as gas collapses.

mikegrudic and others added 30 commits July 22, 2025 11:13
fix: zero-initialize all bytes in  at startup to mitigate known issue…
remove jaco files from build system until the codegen is fully automated
…e dust temperature values in setups with COOLING but without RT_INFRARED
jaco build system temporary fix
pfhopkins and others added 29 commits March 27, 2026 22:40
This reverts commit 7f8e841.
PR to make a couple minor tweaks i accidentally coded through here, and one test, compiler-flag-locked, for 2nd-order reconstruction of RHD fluxes, which I am testing. can be deleted as needed and will not be on by default
… still single-cell-and-neighbor based, with more robust mach estimation, using OUTPUT_SHOCK_MACH_NUMBER flag. note currently doesnt work with EOS_GENERAL because of assumption of hydrodynamic shock jump conditions. need to free this to get an approximate estimator, even, because ideal use cases do heavily involve EOS_GENERAL cases like CRs
targeted wakeup timebin: bump woken particles to dt_waker/WAKEUP instead of max_time_bin_active
…e timestep value compared to a threshold (saves some time when timestep is too small)
…ent. Also need to carry a variable All.RefinementRegionCenter around.
…S_REFINEMENT_IN_REGION flag and JEANS_REFINEMENT_IN_REGION_RADIUS_PC functionality to only refine in a given radius from the refinement center.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants