diff --git a/Docs/sphinx_documentation/source/AGN.rst b/Docs/sphinx_documentation/source/AGN.rst index 6b29e28d..19654f6c 100644 --- a/Docs/sphinx_documentation/source/AGN.rst +++ b/Docs/sphinx_documentation/source/AGN.rst @@ -188,10 +188,8 @@ Parameter Definition Acceptab =================================== =================================== ===================================== ========= **reeber.halo_int** timesteps between halo finder calls Integer -1 (none) **reeber.negate** allow negative values for analysis 0 if false, 1 if true 1 -**reeber.halo_density_vars** density variable list density, particle_mass_density “density” -**reeber.halo_extrema_threshold** extrema threshold for haloes Real 200. -**reeber.halo_component_threshold** component threshold for haloes Real 82. -**reeber.absolute_halo_thresholds** are halo thresholds absolute 0 if multiples of mean, 1 if absolute 0 +**reeber.halo_component_threshold** component threshold for haloes Real 81.66 +**reeber.min_halo_n_cells** min. number of halo cells Integer 10 =================================== =================================== ===================================== ========= [Table:Reeber-inputs] diff --git a/Docs/sphinx_documentation/source/InSitu.rst b/Docs/sphinx_documentation/source/InSitu.rst index 0673a2d2..98961dc4 100644 --- a/Docs/sphinx_documentation/source/InSitu.rst +++ b/Docs/sphinx_documentation/source/InSitu.rst @@ -56,16 +56,16 @@ Note that these codes are in separate repositories and are not included in Nyx d If you intend to use in situ halo finding, you should clone Reeber from its `GitHub page `_ and follow the installation instructions provided there. -In the Nyx inputs file, one should specify the time step interval for halo finder, fields which will be -used (to use the total density, one should specify both (gas) ``density`` and ``particle_mass_density``), -and thresholds of the boundary and extrema values:: +.. In the Nyx inputs file, one should specify the time step interval for halo finder, fields which will be +.. used (to use the total density, one should specify both (gas) ``density`` and ``particle_mass_density``), +.. and thresholds of the boundary and extrema values:: +In the Nyx inputs file, one should specify the time step interval for the halo finder, whether to permit negative values for analysis, the boundary isovalue threshold, and the minimum number of cells required for a region to be considered a halo:: # Halo Finder reeber.halo_int = 1 reeber.negate = 1 - reeber.halo_density_vars = density particle_mass_density - reeber.halo_extrema_threshold = 20 reeber.halo_component_threshold = 10 + reeber.min_n_halo_cells = 10 # Call reeber insitu analysis insitu.reeber_int = 100 diff --git a/Exec/LyA/inputs b/Exec/LyA/inputs index dea98f1b..5382509b 100644 --- a/Exec/LyA/inputs +++ b/Exec/LyA/inputs @@ -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 @@ -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 diff --git a/Source/Driver/Nyx.H b/Source/Driver/Nyx.H index 0890237a..63c8a560 100644 --- a/Source/Driver/Nyx.H +++ b/Source/Driver/Nyx.H @@ -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 diff --git a/Source/Driver/Nyx.cpp b/Source/Driver/Nyx.cpp index ba44135a..5409d39a 100644 --- a/Source/Driver/Nyx.cpp +++ b/Source/Driver/Nyx.cpp @@ -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 @@ -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 } diff --git a/Util/reeber/src/reeber.cpp b/Util/reeber/src/reeber.cpp index 9d0e3cfa..fa99f1b5 100644 --- a/Util/reeber/src/reeber.cpp +++ b/Util/reeber/src/reeber.cpp @@ -598,10 +598,7 @@ void Nyx::runReeberAnalysis(Vector& 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();