Skip to content

Commit

Permalink
reduce number of lines in ref output
Browse files Browse the repository at this point in the history
  • Loading branch information
Piyush Sharda authored and Piyush Sharda committed Aug 27, 2024
1 parent 3638ae8 commit 251a5ca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4,437 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/burn_cell_metal_chem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
value1=$(awk 'NR=='"$line_number"' {match($0, /[+-]?[0-9]+([.][0-9]+)?[eE]?[+-]?[0-9]+/); if (RSTART) print substr($0, RSTART, RLENGTH); else print 0}' test.out)
# Adjust the line number for reference_solution_1.out
reference_line_number=$((line_number - 24))
reference_line_number=$((line_number - 4461))
value2=$(awk 'NR=='"$reference_line_number"' {match($0, /[+-]?[0-9]+([.][0-9]+)?[eE]?[+-]?[0-9]+/); if (RSTART) print substr($0, RSTART, RLENGTH)}' reference_solution_1.out)
difference=$(awk -v val1="$value1" -v val2="$value2" 'BEGIN { printf "%.2f", (val1 - val2) / val2 }')
Expand Down
Loading

0 comments on commit 251a5ca

Please sign in to comment.