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

Improve folder structure of hdf5 / pouts / .dat #166

Merged
merged 8 commits into from
Mar 26, 2021
Merged
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
6 changes: 3 additions & 3 deletions Examples/BinaryBH/BinaryBHLevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ void BinaryBHLevel::specificPostTimeStep()
AMRReductions<VariableType::diagnostic> amr_reductions(m_gr_amr);
double L2_Ham = amr_reductions.norm(c_Ham);
double L2_Mom = amr_reductions.norm(Interval(c_Mom1, c_Mom3));
SmallDataIO constraints_file("constraint_norms", m_dt, m_time,
m_restart_time, SmallDataIO::APPEND,
first_step);
SmallDataIO constraints_file(m_p.data_path + "constraint_norms",
m_dt, m_time, m_restart_time,
SmallDataIO::APPEND, first_step);
constraints_file.remove_duplicate_time_data();
if (first_step)
{
Expand Down
2 changes: 1 addition & 1 deletion Examples/BinaryBH/Main_BinaryBH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int runGRChombo(int argc, char *argv[])
int puncture_tracker_min_level = sim_params.max_level - 1;
bh_amr.m_puncture_tracker.initial_setup(
{sim_params.bh1_params.center, sim_params.bh2_params.center},
sim_params.checkpoint_prefix, puncture_tracker_min_level);
"punctures", sim_params.data_path, puncture_tracker_min_level);
}

// The line below selects the problem that is simulated
Expand Down
8 changes: 3 additions & 5 deletions Examples/BinaryBH/SimulationParameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ class SimulationParameters : public SimulationParametersBase
/// Read shared parameters
void read_shared_params(GRParmParse &pp)
{
// Do we want Weyl extraction, puncture tracking and constraint norm
// calculation?
pp.load("activate_extraction", activate_extraction, false);
// Do we want puncture tracking and constraint norm calculation?
pp.load("track_punctures", track_punctures, false);
pp.load("puncture_tracking_level", puncture_tracking_level, max_level);
pp.load("calculate_constraint_norms", calculate_constraint_norms,
Expand Down Expand Up @@ -297,9 +295,9 @@ class SimulationParameters : public SimulationParametersBase
"must be between 0 and max_level (inclusive)");
}

// Initial data
bool activate_extraction, track_punctures, calculate_constraint_norms;
bool track_punctures, calculate_constraint_norms;
int puncture_tracking_level;

// Collection of parameters necessary for initial conditions
// Set these even in the case of TwoPunctures as they are used elsewhere
// e.g. for puncture tracking/tagging
Expand Down
153 changes: 109 additions & 44 deletions Examples/BinaryBH/params.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,56 @@
# and a guide to this specific example at
# https://github.com/GRChombo/GRChombo/wiki/Running-the-BBH-example

# location / naming of output files (must give full path)
#################################################
# Filesystem parameters

verbosity = 0

# location / naming of output files
# output_path = "" # Main path for all files. Must exist!
chk_prefix = BinaryBHChk_
plot_prefix = BinaryBHPlot_
#restart_file = BinaryBHChk_000000.3d.hdf5
# restart_file = BinaryBHChk_000000.3d.hdf5

# HDF5files are written every dt = L/N*dt_multiplier*checkpoint_interval
checkpoint_interval = 100
# set to 0 to turn off plot files (except at t=0 and t=stop_time)
# set to -1 to never ever print plotfiles
plot_interval = 10
num_plot_vars = 3
plot_vars = chi Weyl4_Re Weyl4_Im

# subpaths - specific directories for hdf5, pout, extraction data
# (these are created at runtime)
hdf5_subpath = "hdf5"
pout_subpath = "pout"
data_subpath = "data"

# change the name of output files
# pout_prefix = "pout"
print_progress_only_to_rank_0 = 1

# ignore_checkpoint_name_mismatch = 0
# write_plot_ghosts = 0

#################################################
# Initial Data parameters

# provide 'offset' or 'center'

massA = 0.48847892320123
massB = 0.48847892320123

offsetA = 0.0 6.10679 0.0
offsetB = 0.0 -6.10679 0.0
# centerA = 256 232 256
# centerB = 256 250 256

momentumA = -0.0841746 -0.000510846 0.0
momentumB = 0.0841746 0.000510846 0.0

#################################################
# Grid parameters

# 'N' is the number of subdivisions in each direction of a cubic box
# 'L' is the length of the longest side of the box, dx_coarsest = L/N
Expand All @@ -19,46 +64,29 @@ plot_prefix = BinaryBHPlot_
N_full = 64
L_full = 512

# Spatial derivative order (only affects CCZ4 RHS)
max_spatial_derivative_order = 4 # can be 4 or 6

# Defaults to center of grid L/2
# uncomment to change
#center = 256.0 256.0 256.0

# BH params, use puncture tracking to
# ensure horizons resolved
track_punctures = 1
puncture_tracking_level = 5
massA = 0.48847892320123
offsetA = 0.0 6.10679 0.0
momentumA = -0.0841746 -0.000510846 0.0
massB = 0.48847892320123
offsetB = 0.0 -6.10679 0.0
momentumB = 0.0841746 0.000510846 0.0
# Maximum number of times you can regrid above coarsest level
max_level = 9 # There are (max_level+1) grids, so min is zero

# regridding control, specify threshold (same on each level)
# Frequency of regridding at each level and thresholds on the tagging
# Need one for each level except the top one, ie max_level items
# Generally you do not need to regrid frequently on every level
# Level Regridding: 0 1 2 3 4 5 6 7 8
regrid_interval = 0 0 0 64 64 64 64 64 64
regrid_threshold = 0.05
max_level = 9
# need max_level entries for regrid interval
regrid_interval = 0 0 0 64 64 64 64 64 64

# Max and min box sizes
max_grid_size = 16
block_factor = 16
max_box_size = 16
min_box_size = 16

# Set up time steps
# dt will be dx*dt_multiplier on each grid level
# HDF5files are written every dt = L/N*dt_multiplier*checkpoint_interval
checkpoint_interval = 100
# set to zero to turn off plot files, comps defined in BinaryBHLevel.cpp
plot_interval = 10
num_plot_vars = 3
plot_vars = chi Weyl4_Re Weyl4_Im
dt_multiplier = 0.25
stop_time = 2200.0
# tag_buffer_size = 3
# grid_buffer_size = 8
# fill_ratio = 0.7
# num_ghosts = 3
# center = 256.0 256.0 256.0 # defaults to center of the grid

#################################################
# Boundary Conditions parameters

# boundaries and periodicity of grid
# Periodic directions - 0 = false, 1 = true
isPeriodic = 0 0 0
# if not periodic, then specify the boundary type
Expand Down Expand Up @@ -86,34 +114,62 @@ num_nonzero_asymptotic_vars = 5
nonzero_asymptotic_vars = chi h11 h22 h33 lapse
nonzero_asymptotic_values = 1.0 1.0 1.0 1.0 1.0

# if you are using extrapolating BC:
# extrapolation_order = 1
# num_extrapolating_vars = -1
# extrapolating_vars =

#################################################
# Evolution parameters

# dt will be dx*dt_multiplier on each grid level
dt_multiplier = 0.25
stop_time = 2200.0
# max_steps = 100

# Spatial derivative order (only affects CCZ4 RHS)
max_spatial_derivative_order = 4 # can be 4 or 6

nan_check = 1

# Lapse evolution
lapse_advec_coeff = 1.0
lapse_coeff = 2.0
lapse_power = 1.0

# Shift evolution
shift_advec_coeff = 0.0
shift_advec_coeff = 0.0 # Usually no advection for beta
shift_Gamma_coeff = 0.75
eta = 1.0
eta = 1.0 # eta of gamma driver, should be of order ~1/M_ADM of spacetime

# CCZ4 parameters
formulation = 0 # 1 for BSSN, 0 for CCZ4
kappa1 = 0.1
kappa2 = 0
kappa3 = 1.0
kappa2 = 0.
kappa3 = 1.
covariantZ4 = 1 # 0: keep kappa1; 1 [default]: replace kappa1 -> kappa1/lapse

# coefficient for KO numerical dissipation
sigma = 1.0

# extraction params
# default of extraction_center is center, uncomment to change
#extraction_center = 256 256 256
track_punctures = 1
puncture_tracking_level = 5

# calculate_constraint_norms = 0

# min_chi = 1.e-4
# min_lapse = 1.e-4

#################################################
# Extraction parameters

# extraction_center = 256 256 256 # defaults to center
activate_extraction = 1
num_extraction_radii = 2
extraction_radii = 50.0 100.0
extraction_levels = 2 1
num_points_phi = 24
num_points_theta = 36
num_points_theta = 37
num_modes = 8
modes = 2 0 # l m for spherical harmonics
2 1
Expand All @@ -123,3 +179,12 @@ modes = 2 0 # l m for spherical harmonics
4 2
4 3
4 4

# integral_file_prefix = "Weyl4_mode_"

# write_extraction = 0
# extraction_subpath = "data/extraction" # directory for 'write_extraction = 1'
# extraction_file_prefix = "Weyl4_extraction_"

#################################################

82 changes: 0 additions & 82 deletions Examples/BinaryBH/params_expensive.txt

This file was deleted.

Loading