Skip to content

Commit

Permalink
WIP (#75): A little regression test for SEQS Maxwell capability
Browse files Browse the repository at this point in the history
  • Loading branch information
trevilo committed Oct 25, 2021
1 parent 0e265cb commit 8d093cc
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ EXTRA_DIST = tap-driver.sh soln_differ inputs meshes ref_solns/*.h5 \
vpath.sh die.sh cyl3d.gpu.test cyl3d.mflow.gpu.test wedge.gpu.test \
averages.gpu.test cyl3d.test cyl3d.mflow.test cyl3d.dtconst.test \
die.test averages.test wedge.test cyl3d.interp.test qms.rings.test \
valgrind.test
valgrind.test seqs.bar.test

TESTS = vpath.sh

Expand All @@ -20,7 +20,8 @@ TESTS += cyl3d.test \
die.test \
averages.test \
wedge.test \
qms.rings.test
qms.rings.test \
seqs.bar.test
endif

if GSLIB_ENABLED
Expand Down
3 changes: 3 additions & 0 deletions test/meshes/simple_bar.msh
Git LFS file not shown
25 changes: 25 additions & 0 deletions test/seqs.bar.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!./bats
# -*- mode: sh -*-

TEST="seqs"

setup() {
MESH_FILE=meshes/simple_bar.msh
CMD_LINE="--em-only -seqs -m $MESH_FILE --rtol 1e-12 --atol 1e-15 --maxiter 200"
CMD_LINE="$CMD_LINE -cd 1 -nbc 4 -p0 3 -p1 5"
CMD_LINE="$CMD_LINE -s 1e8 -f 0.0001 -Vs0r 1.0 -Vs1r -1.0"
}

@test "[$TEST] verify tps SEQS Maxwell solver runs with np = 1" {
test -s $MESH_FILE
run mpirun -np 1 ../src/tps $CMD_LINE
[[ "${status}" -eq 0 ]]
[[ "${output}" =~ "I_tot_real = 1.54692270e-02" ]]
}

@test "[$TEST] verify tps SEQS Maxwell solver runs with np = 4" {
test -s $MESH_FILE
run mpirun -np 4 ../src/tps $CMD_LINE
[[ "${status}" -eq 0 ]]
[[ "${output}" =~ "I_tot_real = 1.54692270e-02" ]]
}

0 comments on commit 8d093cc

Please sign in to comment.