Skip to content

Commit 9aedc9a

Browse files
Piyush ShardaPiyush Sharda
Piyush Sharda
authored and
Piyush Sharda
committed
only use one input file
1 parent 613f38f commit 9aedc9a

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.github/workflows/burn_cell_metal_chem.yml

+18-3
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,25 @@ jobs:
6262
6363
ref_line_number_z10=(1 2 3 5 7 10 17 23 28)
6464
65+
# Original input file
66+
original_input_file="inputs_metal_chem_1"
67+
modified_input_file="inputs_metal_chem_modified"
68+
6569
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
6984
7085
line_numbers="${line_numbers_map[$Z]}"
7186
ref_file="${ref_map[$Z]}"

0 commit comments

Comments
 (0)