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

Reeber param input #101

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Exec/LyA/inputs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# ------------------ INPUTS TO MAIN PROGRAM -------------------
max_step = 10000000

# use managed memory
amrex.the_arena_is_managed=1

nyx.ppm_type = 1
nyx.use_colglaz = 0
nyx.corner_coupling = 1
Expand Down Expand Up @@ -140,12 +143,11 @@ nyx.plot_z_values = 7.0 6.0 5.0 4.0 3.0 2.0
amr.plot_vars = density xmom ymom zmom rho_e Temp phi_grav
amr.derive_plot_vars = particle_mass_density particle_count

# Halo Finder
#nyx.analysis_z_values = 150 10 5 4 3 2
reeber.halo_int = 1
# Halo finder
reeber.min_halo_n_cells = 10
reeber.negate = 1
reeber.halo_density_vars = density particle_mass_density
reeber.halo_extrema_threshold = 20
#reeber.halo_density_vars = density particle_mass_density
#reeber.halo_extrema_threshold = 20
reeber.halo_component_threshold = 10
#nyx.mass_halo_min = 1.e11
#nyx.mass_seed = 1.e6
Expand Down
5 changes: 5 additions & 0 deletions Source/Driver/Nyx.H
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,11 @@ protected:
// Seed mass of SMBH
//
static amrex::Real mass_seed;

static int min_halo_n_cells;
static bool halo_negate;
static amrex::Real halo_component_threshold;

#endif

// Previous maximum number of steps for sundials
Expand Down
8 changes: 8 additions & 0 deletions Source/Driver/Nyx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ Real Nyx::he_species = 0.24;
#ifdef REEBER
Real Nyx::mass_halo_min = 1.e10;
Real Nyx::mass_seed = 1.e5;
Real Nyx::halo_component_threshold = 81.66;
int Nyx::min_halo_n_cells = 10;
bool Nyx::halo_negate = true;
#endif

#ifdef _OPENMP
Expand Down Expand Up @@ -445,6 +448,11 @@ Nyx::read_params ()
#ifdef REEBER
pp_nyx.query("mass_halo_min", mass_halo_min);
pp_nyx.query("mass_seed", mass_seed);

ParmParse pp_reeber("reeber");
pp_reeber.query("min_halo_n_cells", min_halo_n_cells);
pp_reeber.query("halo_component_threshold", halo_component_threshold);
pp_reeber.query("negate", halo_negate);
#endif
}

Expand Down
5 changes: 1 addition & 4 deletions Util/reeber/src/reeber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,10 +598,7 @@ void Nyx::runReeberAnalysis(Vector<MultiFab*>& new_state,

diy::DiscreteBounds diy_domain(3);

// TODO: take rho, min_halo_n_cells as parameters
Real min_halo_n_cells = 10;
Real rho = 81.66;

Real rho = halo_component_threshold;
Real absolute_rho = (Nyx::average_dm_density + Nyx::average_gas_density) * rho;
bool negate = true; // sweep superlevel sets, highest density = root
int finest_level = parent->finestLevel();
Expand Down
Loading