Commit 9aedc9a 1 parent 613f38f commit 9aedc9a Copy full SHA for 9aedc9a
File tree 1 file changed +18
-3
lines changed
1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -62,10 +62,25 @@ jobs:
62
62
63
63
ref_line_number_z10=(1 2 3 5 7 10 17 23 28)
64
64
65
+ # Original input file
66
+ original_input_file="inputs_metal_chem_1"
67
+ modified_input_file="inputs_metal_chem_modified"
68
+
65
69
for Z in "Z=1" "Z=1_z10" "Z=1e-1" "Z=1e-2" "Z=1e-3" "Z=1e-4" "Z=1e-5" "Z=1e-6"; do
66
- input_file="inputs_metal_chem_${Z//Z=/}"
67
- output_file="test_${Z//Z=/}.out"
68
- ./main1d.gnu.DEBUG.ex $input_file amrex.fpe_trap_{invalid,zero,overflow}=1 > $output_file
70
+ cp $original_input_file $modified_input_file
71
+ Z_val=${Z//Z=/}
72
+
73
+ if [[ "$Z" == "Z=1_z10" ]]; then
74
+ # Modify the redshift line for Z=1_z10
75
+ sed -i 's/network.redshift = 0.0/network.redshift = 10.0/g' $modified_input_file
76
+ else
77
+ # Replace the metallicity and dust2gas_ratio values for other Z values
78
+ sed -i 's/network.metallicity = .*/network.metallicity = '"$Z_val"'/g' $modified_input_file
79
+ sed -i 's/network.dust2gas_ratio = .*/network.dust2gas_ratio = '"$Z_val"'/g' $modified_input_file
80
+ fi
81
+
82
+ output_file="test_${Z_val}.out"
83
+ ./main1d.gnu.DEBUG.ex $modified_input_file amrex.fpe_trap_{invalid,zero,overflow}=1 > $output_file
69
84
70
85
line_numbers="${line_numbers_map[$Z]}"
71
86
ref_file="${ref_map[$Z]}"
You can’t perform that action at this time.
0 commit comments