Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full implementation of AGN feedback for the cool-core destruction project #339

Open
wants to merge 116 commits into
base: main
Choose a base branch
from

Conversation

ShuangShuang0411
Copy link

This pull request includes the complete implementation of AGN feedback for the cool-core destruction project. The key components are:

  1. The AGN feedback module in the ClusterMerger test problem.
  2. The ExactCooling test problem for the currently private ExactCooling source term module.

@hyschive
Copy link
Contributor

@ShuangShuang0411 Some quick and general comments. I'll check the entire PR thoroughly after it is approved by other reviewers.

  • Make sure that this PR can reproduce the original results of the main branch, including but not limited to the ClusterMerger test. For example,
    • The line # define NCOMP_PASSIVE_BUILTIN2 1 in Macro.h (and other similar lines/files related to cooling). should be activated only when enabling cooling. You may need to add a compilation option in configure.py to control the cooling module. Ask @ChunYen-Chen for details.
    • You have slightly modified some parameters in Input__Parameter (e.g., MU_NORM, MIN_DENS, ...). @jzuhone What do you think about this? If you prefer, we can have different Input__Parameter files (in the same ClusterMerger folder) tailored for different applications.
  • Remove all trailing spaces
  • Replace all tabs with spaces
  • Polish the code format further to conform better with the GAMER style (e.g., indent, code alignment, add empty lines for separating different code segments, add more comments)
  • Fix all the CPU and GPU warning messages during compilation
  • IIRC, dual-energy is important when enabling cooling and/or feedback. Clarify that in README (along with other things that can be important; for example, how to conduct simulations with cooling and feedback in general).

@hyschive
Copy link
Contributor

hyschive commented Jul 20, 2024

@jzuhone Since this PR is most related to your work, could you help review it? I'll also take a close look after you approve it.

First, do you prefer to modify the existing ClusterMerger test (as in the current PR) or add a new test problem?

@hyschive hyschive requested a review from jzuhone July 20, 2024 03:27
@hyschive hyschive assigned jzuhone and hyschive and unassigned hyschive Jul 20, 2024
@hyschive hyschive added enhancement hydro Hydrodynamics test Test problems gpu GPU issues and implementation labels Jul 20, 2024
@jzuhone
Copy link
Collaborator

jzuhone commented Jul 20, 2024

@ShuangShuang0411 @hyschive I plan on reviewing this in detail over the next few days.

const int NT = 1;
# endif

double dt_EC = HUGE_NUMBER;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to still support this time-step criterion even though we may disable it by default.

# endif

double dt_EC = HUGE_NUMBER;
double *OMP_dt_EC = new double [NT];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will cause memory leakage.

jzuhone and others added 11 commits February 10, 2025 07:48
…gamer-fork into cool-core-public

* 'cool-core-public' of ssh://github.com/ShuangShuang0411/gamer-fork:
  Abort if SRC_EXACTCOOLING is enabled before its release
  Include exact-cooling dt only when necessary
  Fix minor compilation issues in Init_GAMER.cpp and Mis_GetTimeStep.cpp
* main: (35 commits)
  Address review comments
  Record NCONREF_MAX
  Add check
  Reduce ConRef[] array size
  Rename ConservedRef* to ConRef*
  Restore file format
  Minor
  Apply suggestions from code review
  Bugfix
  Remove useless variable
  Simplify header
  Store conserved variables in an array
  Update comment
  Rename ConservedRefLoaded to ConservedRefInitialized
  Dump data before ELBDM_RemoveMotionCM()
  Minor
  Apply suggestions from code review
  Update comment
  Apply suggestions from code review
  Remove comments
  ...

# Conflicts:
#	src/Output/Output_DumpData_Total_HDF5.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement gpu GPU issues and implementation hydro Hydrodynamics test Test problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants