Skip to content

Commit

Permalink
switched tolerances of test checks to be consitent with default lin-s…
Browse files Browse the repository at this point in the history
…ol tol and replacing ref soln. numerical-integ defaults to false now
  • Loading branch information
Sigfried Haering committed Jun 21, 2024
1 parent 099782e commit 6d3c610
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 22 deletions.
2 changes: 2 additions & 0 deletions test/autoPeriodic.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RESTART="ref_solns/sgsLoMach/restart_output.sol.h5"
setup() {
SOLN_FILE=restart_output.sol.h5
REF_FILE=ref_solns/sgsLoMach/restart_output.sol.h5
OUT_FILE=output_solns/restart_output_autoPeriodic.sol.h5
}

@test "[$TEST] check for input file $RUNFILE" {
Expand All @@ -27,4 +28,5 @@ setup() {
test -s $SOLN_FILE
test -s $REF_FILE
h5diff -r --delta=1e-10 $SOLN_FILE $REF_FILE /velocity
cp $SOLN_FILE $OUT_FILE
}
2 changes: 2 additions & 0 deletions test/aveLoMach.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RESTART="ref_solns/aveLoMach/restart_output.sol.h5"
setup() {
SOLN_FILE=restart_output.sol.h5
REF_FILE=ref_solns/aveLoMach/restart_output.sol.h5
OUT_FILE=output_solns/restart_output_aveLoMach.sol.h5
}

@test "[$TEST] check for input file $RUNFILE" {
Expand All @@ -27,4 +28,5 @@ setup() {
test -s $SOLN_FILE
test -s $REF_FILE
h5diff -r --delta=1e-11 $SOLN_FILE $REF_FILE meanVel
cp $SOLN_FILE $OUT_FILE
}
4 changes: 3 additions & 1 deletion test/heatEq.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RESTART="ref_solns/heatedBox/restart_output.sol.h5"
setup() {
SOLN_FILE=restart_output.sol.h5
REF_FILE=ref_solns/heatedBox/restart_output.sol.h5
OUT_FILE=output_solns/restart_output_heatedBox.sol.h5
}

@test "[$TEST] check for input file $RUNFILE" {
Expand All @@ -25,5 +26,6 @@ setup() {
@test "[$TEST] verify tps output with input -> $RUNFILE" {
test -s $SOLN_FILE
test -s $REF_FILE
h5diff -r --relative=1e-13 $SOLN_FILE $REF_FILE /temperature/temperature
h5diff -r --relative=1e-10 $SOLN_FILE $REF_FILE /temperature/temperature
cp $SOLN_FILE $OUT_FILE
}
4 changes: 3 additions & 1 deletion test/interpInlet.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RESTART=
setup() {
SOLN_FILE=restart_output.sol.h5
REF_FILE=ref_solns/interpInlet/restart_output.sol.h5
OUT_FILE=output_solns/restart_output_interpInlet.sol.h5
}

@test "[$TEST] check for input file $RUNFILE" {
Expand All @@ -33,5 +34,6 @@ setup() {
@test "[$TEST] verify tps output with input -> $RUNFILE" {
test -s $SOLN_FILE
test -s $REF_FILE
h5diff -r --relative=1e-9 $SOLN_FILE $REF_FILE /temperature/temperature
h5diff -r --relative=1e-10 $SOLN_FILE $REF_FILE /temperature/temperature
cp $SOLN_FILE $OUT_FILE
}
22 changes: 14 additions & 8 deletions test/lomach-flow.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ setup() {

RUNFILE_PIPE="inputs/lomach.pipe.ini"
REF_SOLN_PIPE="ref_solns/pipe/restart_output-pipe-lam.sol.h5"
OUT_SOLN_PIPE="output_solns/restart_output-pipe-lam.sol.h5"

RUNFILE_TC="inputs/lomach.taylor.couette.ini"
REF_SOLN_TC="ref_solns/taylor-couette/restart_output-tc.Re100.h5"
OUT_SOLN_TC="output_solns/restart_output-tc.Re100.h5"

RUNFILE_PIPE_ARANS="inputs/lomach.pipe.arans.ini"
REF_SOLN_PIPE_ARANS="ref_solns/pipe/restart_output-pipe-arans.sol.h5"
OUT_SOLN_PIPE_ARANS="output_solns/restart_output-pipe-arans.sol.h5"

MPIRUN=`./sniff_mpirun.sh`
}
Expand Down Expand Up @@ -109,8 +112,8 @@ setup() {
[[ ${status} -eq 0 ]]

# check solutions are the same!
h5diff -r --delta=1e-11 restart_output-lid.sol.h5 restart_output-lid.sol.2.h5

h5diff -r --delta=1e-11 restart_output-lid.sol.h5 restart_output-lid.sol.2.h5
# delete intermediate files
rm -f restart_output-lid*.h5
rm $RUNFILE_LID_MOD
Expand Down Expand Up @@ -149,22 +152,25 @@ setup() {
run $EXE --runFile $RUNFILE_PIPE
[[ ${status} -eq 0 ]]
test -s restart_output-pipe-lam.sol.h5
h5diff -r --delta=1e-8 restart_output-pipe-lam.sol.h5 $REF_SOLN_PIPE /velocity
h5diff -r --delta=1e-8 restart_output-pipe-lam.sol.h5 $REF_SOLN_PIPE /swirl
h5diff -r --delta=1e-10 restart_output-pipe-lam.sol.h5 $REF_SOLN_PIPE /velocity
h5diff -r --delta=1e-10 restart_output-pipe-lam.sol.h5 $REF_SOLN_PIPE /swirl
cp restart_output-pipe-lam.sol.h5 $OUT_SOLN_PIPE
}

@test "[$TEST] check that Taylor-Couette (axisymmetric, with swirl) runs and verify result" {
run $EXE --runFile $RUNFILE_TC
[[ ${status} -eq 0 ]]
test -s restart_output-tc.sol.h5
h5diff -r --delta=1e-8 restart_output-tc.sol.h5 $REF_SOLN_TC /velocity
h5diff -r --delta=1e-8 restart_output-tc.sol.h5 $REF_SOLN_TC /swirl
h5diff -r --delta=1e-10 restart_output-tc.sol.h5 $REF_SOLN_TC /velocity
h5diff -r --delta=1e-10 restart_output-tc.sol.h5 $REF_SOLN_TC /swirl
cp restart_output-tc.sol.h5 $OUT_SOLN_TC
}

@test "[$TEST] check pipe (axisymmetric) flow with algebraic rans model" {
run $EXE --runFile $RUNFILE_PIPE_ARANS
[[ ${status} -eq 0 ]]
test -s restart_output-pipe-arans.sol.h5
h5diff -r --delta=1e-8 restart_output-pipe-arans.sol.h5 $REF_SOLN_PIPE_ARANS /velocity
h5diff -r --delta=1e-8 restart_output-pipe-arans.sol.h5 $REF_SOLN_PIPE_ARANS /swirl
h5diff -r --delta=1e-10 restart_output-pipe-arans.sol.h5 $REF_SOLN_PIPE_ARANS /velocity
h5diff -r --delta=1e-10 restart_output-pipe-arans.sol.h5 $REF_SOLN_PIPE_ARANS /swirl
cp restart_output-pipe-arans.sol.h5 $OUT_SOLN_PIPE_ARANS
}
8 changes: 5 additions & 3 deletions test/lomach-lequere.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ setup() {
RUNFILE="inputs/lomach.lequere.varmu.ini"
REF_SOLN="ref_solns/lequere-varmu/reference-lequere-varmu.sol.h5"
SOLN_FILE="restart_output-lequere-varmu.sol.h5"
OUT_SOLN="output_solns/reference-lequere-varmu.sol.h5"
}

@test "[$TEST] Le Quere low Mach, thermally-driven cavity regression with variable viscosity" {
Expand All @@ -24,8 +25,9 @@ setup() {
$EXE --runFile $RUNFILE

# check
h5diff -r --relative=1e-8 $SOLN_FILE $REF_SOLN /temperature/temperature
h5diff -r --delta=1e-8 $SOLN_FILE $REF_SOLN /velocity/x-comp
h5diff -r --delta=1e-8 $SOLN_FILE $REF_SOLN /velocity/y-comp
h5diff -r --relative=1e-10 $SOLN_FILE $REF_SOLN /temperature/temperature
h5diff -r --delta=1e-10 $SOLN_FILE $REF_SOLN /velocity/x-comp
h5diff -r --delta=1e-10 $SOLN_FILE $REF_SOLN /velocity/y-comp
cp $SOLN_FILE $OUT_SOLN
}

2 changes: 1 addition & 1 deletion test/ref_solns/aveLoMach/restart_output.sol.h5
Git LFS file not shown
2 changes: 1 addition & 1 deletion test/ref_solns/heatedBox/restart_output.sol.h5
Git LFS file not shown
4 changes: 2 additions & 2 deletions test/ref_solns/interpInlet/restart_output.sol.h5
Git LFS file not shown
Git LFS file not shown
4 changes: 2 additions & 2 deletions test/ref_solns/pipe/restart_output-pipe-lam.sol.h5
Git LFS file not shown
2 changes: 1 addition & 1 deletion test/ref_solns/sgsLoMach/restart_output.sol.h5
Git LFS file not shown
4 changes: 3 additions & 1 deletion test/sgsLoMach.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RESTART="ref_solns/sgsLoMach/restart_output.sol.h5"
setup() {
SOLN_FILE=restart_output.sol.h5
REF_FILE=ref_solns/sgsLoMach/restart_output.sol.h5
OUT_FILE=output_solns/restart_output_sgsLoMach.sol.h5
}

@test "[$TEST] check for input file $RUNFILE" {
Expand All @@ -26,5 +27,6 @@ setup() {
@test "[$TEST] verify tps output with input -> $RUNFILE" {
test -s $SOLN_FILE
test -s $REF_FILE
h5diff -r --delta=1e-11 $SOLN_FILE $REF_FILE /velocity
h5diff -r --delta=1e-10 $SOLN_FILE $REF_FILE /velocity
cp $SOLN_FILE $OUT_FILE
}

0 comments on commit 6d3c610

Please sign in to comment.