From ec62633968b589780672c08da58659bd9ac052f3 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Tue, 7 Aug 2018 16:55:03 +0200 Subject: [PATCH] [test][fix] Fix tests that used tl->willBeFinished instead of tl->finished --- test/porousmediumflow/1p/implicit/CMakeLists.txt | 12 ++++++------ test/porousmediumflow/1p/implicit/test_1pnifv.cc | 2 +- test/porousmediumflow/1pnc/implicit/CMakeLists.txt | 12 ++++++------ .../1pnc/implicit/test_1p2cni_conduction_fv.cc | 4 ++-- .../1pnc/implicit/test_1p2cni_convection_fv.cc | 4 ++-- test/porousmediumflow/3p/implicit/CMakeLists.txt | 8 ++++---- .../3p/implicit/test_3pni_fv_conduction.cc | 2 +- .../3p/implicit/test_3pni_fv_convection.cc | 2 +- .../richards/implicit/CMakeLists.txt | 2 +- .../richards/implicit/test_ccrichardsanalytical.cc | 6 +++--- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/test/porousmediumflow/1p/implicit/CMakeLists.txt b/test/porousmediumflow/1p/implicit/CMakeLists.txt index 6ef54d943d..61f36568ff 100644 --- a/test/porousmediumflow/1p/implicit/CMakeLists.txt +++ b/test/porousmediumflow/1p/implicit/CMakeLists.txt @@ -49,7 +49,7 @@ dune_add_test(NAME test_1pnibox_conduction COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/1pniboxconduction-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pnibox_conduction-00006.vtu + ${CMAKE_CURRENT_BINARY_DIR}/1pnibox_conduction-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnibox_conduction test_1pnifv_conduction.input -Problem.Name 1pnibox_conduction" --zeroThreshold {"velocity_H2O":1e-8}) @@ -59,7 +59,7 @@ dune_add_test(NAME test_1pnibox_convection COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/1pniboxconvection-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pnibox_convection-00010.vtu + ${CMAKE_CURRENT_BINARY_DIR}/1pnibox_convection-00009.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnibox_convection test_1pnifv_convection.input -Problem.Name 1pnibox_convection" --zeroThreshold {"velocity":1e-15}) @@ -69,7 +69,7 @@ dune_add_test(NAME test_1pnicctpfa_conduction COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/1pniccconduction-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pnicctpfa_conduction-00006.vtu + ${CMAKE_CURRENT_BINARY_DIR}/1pnicctpfa_conduction-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnicctpfa_conduction test_1pnifv_conduction.input -Problem.Name 1pnicctpfa_conduction" --zeroThreshold {"velocity":1e-8}) @@ -79,7 +79,7 @@ dune_add_test(NAME test_1pnicctpfa_convection COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/1pniccconvection-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pnicctpfa_convection-00010.vtu + ${CMAKE_CURRENT_BINARY_DIR}/1pnicctpfa_convection-00009.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnicctpfa_convection test_1pnifv_convection.input -Problem.Name 1pnicctpfa_convection") dune_add_test(NAME test_1pniccmpfa_conduction @@ -88,7 +88,7 @@ dune_add_test(NAME test_1pniccmpfa_conduction COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/ccmpfa1pniconduction-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pniccmpfa_conduction-00006.vtu + ${CMAKE_CURRENT_BINARY_DIR}/1pniccmpfa_conduction-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pniccmpfa_conduction test_1pnifv_conduction.input -Problem.Name 1pniccmpfa_conduction") dune_add_test(NAME test_1pniccmpfa_convection @@ -97,7 +97,7 @@ dune_add_test(NAME test_1pniccmpfa_convection COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/ccmpfa1pniconvection-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pniccmpfa_convection-00010.vtu + ${CMAKE_CURRENT_BINARY_DIR}/1pniccmpfa_convection-00009.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pniccmpfa_convection test_1pnifv_convection.input -Problem.Name 1pniccmpfa_convection") # dim < dimWorld tests with Dune::Foamgrid<1,3> diff --git a/test/porousmediumflow/1p/implicit/test_1pnifv.cc b/test/porousmediumflow/1p/implicit/test_1pnifv.cc index 39fb147daf..41b729e46e 100644 --- a/test/porousmediumflow/1p/implicit/test_1pnifv.cc +++ b/test/porousmediumflow/1p/implicit/test_1pnifv.cc @@ -191,7 +191,7 @@ int main(int argc, char** argv) try // set new dt as suggested by the newton solver timeLoop->setTimeStepSize(nonLinearSolver.suggestTimeStepSize(timeLoop->timeStepSize())); - if (timeLoop->timeStepIndex()==0 || timeLoop->timeStepIndex() % vtkOutputInterval == 0 || timeLoop->willBeFinished()) + if (timeLoop->timeStepIndex()==0 || timeLoop->timeStepIndex() % vtkOutputInterval == 0 || timeLoop->finished()) vtkWriter.write(timeLoop->time()); } while (!timeLoop->finished()); diff --git a/test/porousmediumflow/1pnc/implicit/CMakeLists.txt b/test/porousmediumflow/1pnc/implicit/CMakeLists.txt index 96af0283d3..6d3ff5ea17 100644 --- a/test/porousmediumflow/1pnc/implicit/CMakeLists.txt +++ b/test/porousmediumflow/1pnc/implicit/CMakeLists.txt @@ -49,7 +49,7 @@ dune_add_test(NAME test_1p2cni_conduction_box COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/1p2cniboxconduction-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p2cni_conductiontest_box-00006.vtu + ${CMAKE_CURRENT_BINARY_DIR}/1p2cni_conductiontest_box-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_box test_1p2cni_conduction_fv.input -Problem.Name 1p2cni_conductiontest_box" --zeroThreshold {"velocity_w \(m/s\)":1e-9}) @@ -59,7 +59,7 @@ dune_add_test(NAME test_1p2cni_conduction_tpfa COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/1p2cniccconduction-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p2cni_conductiontest_tpfa-00006.vtu + ${CMAKE_CURRENT_BINARY_DIR}/1p2cni_conductiontest_tpfa-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_tpfa test_1p2cni_conduction_fv.input -Problem.Name 1p2cni_conductiontest_tpfa" --zeroThreshold {"velocity_w \(m/s\)_0":1e-9}) @@ -71,7 +71,7 @@ dune_add_test(NAME test_1p2cni_conduction_mpfa COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/1p2cniccmpfaconduction-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p2cni_conductiontest_mpfa-00006.vtu + ${CMAKE_CURRENT_BINARY_DIR}/1p2cni_conductiontest_mpfa-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_mpfa test_1p2cni_conduction_fv.input -Problem.Name 1p2cni_conductiontest_mpfa -Vtk.AddVelocity false") # convection @@ -81,7 +81,7 @@ dune_add_test(NAME test_1p2cni_convection_box COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/1p2cniboxconvection-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p2cni_convectiontest_box-00010.vtu + ${CMAKE_CURRENT_BINARY_DIR}/1p2cni_convectiontest_box-00009.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_box test_1p2cni_convection_fv.input -Problem.Name 1p2cni_convectiontest_box" --zeroThreshold {"velocity_w \(m/s\)":1e-9}) @@ -91,7 +91,7 @@ dune_add_test(NAME test_1p2cni_convection_tpfa COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/1p2cniccconvection-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p2cni_convectiontest_tpfa-00010.vtu + ${CMAKE_CURRENT_BINARY_DIR}/1p2cni_convectiontest_tpfa-00009.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_tpfa test_1p2cni_convection_fv.input -Problem.Name 1p2cni_convectiontest_tpfa" --zeroThreshold {"velocity_w \(m/s\)_0":1e-9}) @@ -103,5 +103,5 @@ dune_add_test(NAME test_1p2cni_convection_mpfa COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/1p2cniccmpfaconvection-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p2cni_convectiontest_mpfa-00010.vtu + ${CMAKE_CURRENT_BINARY_DIR}/1p2cni_convectiontest_mpfa-00009.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_mpfa test_1p2cni_convection_fv.input -Problem.Name 1p2cni_convectiontest_mpfa -Vtk.AddVelocity false") diff --git a/test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.cc b/test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.cc index 0a5b093a6a..0f5f7d2acc 100644 --- a/test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.cc +++ b/test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.cc @@ -157,8 +157,8 @@ int main(int argc, char** argv) try timeLoop->advanceTimeStep(); // write vtk output - if (timeLoop->timeStepIndex()==0 || timeLoop->timeStepIndex() % vtkOutputInterval == 0 || timeLoop->willBeFinished()) - vtkWriter.write(timeLoop->time()); + if (timeLoop->timeStepIndex()==0 || timeLoop->timeStepIndex() % vtkOutputInterval == 0 || timeLoop->finished()) + vtkWriter.write(timeLoop->time()); // report statistics of this time step timeLoop->reportTimeStep(); diff --git a/test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.cc b/test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.cc index df9dfdf7d7..5cb98b4f12 100644 --- a/test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.cc +++ b/test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.cc @@ -157,8 +157,8 @@ int main(int argc, char** argv) try timeLoop->advanceTimeStep(); // write vtk output - if (timeLoop->timeStepIndex()==0 || timeLoop->timeStepIndex() % vtkOutputInterval == 0 || timeLoop->willBeFinished()) - vtkWriter.write(timeLoop->time()); + if (timeLoop->timeStepIndex()==0 || timeLoop->timeStepIndex() % vtkOutputInterval == 0 || timeLoop->finished()) + vtkWriter.write(timeLoop->time()); // report statistics of this time step timeLoop->reportTimeStep(); diff --git a/test/porousmediumflow/3p/implicit/CMakeLists.txt b/test/porousmediumflow/3p/implicit/CMakeLists.txt index 4c3385dfdc..7001201af3 100644 --- a/test/porousmediumflow/3p/implicit/CMakeLists.txt +++ b/test/porousmediumflow/3p/implicit/CMakeLists.txt @@ -26,7 +26,7 @@ dune_add_test(NAME test_box3pniconvection COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/3pniconvectionbox-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/test_box3pniconvection-00010.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_box3pniconvection-00009.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_box3pniconvection test_3pni_fv_convection.input -Problem.Name test_box3pniconvection" --zeroThreshold {"velocity_w \(m/s\)_1":1e-8}) @@ -36,7 +36,7 @@ dune_add_test(NAME test_cc3pniconvection COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/3pniconvectioncc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/test_cc3pniconvection-00010.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_cc3pniconvection-00009.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_cc3pniconvection test_3pni_fv_convection.input -Problem.Name test_cc3pniconvection" --zeroThreshold {"velocity_w \(m/s\)_1":1e-8}) @@ -46,7 +46,7 @@ dune_add_test(NAME test_box3pniconduction COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/3pniconductionbox-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/test_box3pniconduction-00006.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_box3pniconduction-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_box3pniconduction test_3pni_fv_conduction.input -Problem.Name test_box3pniconduction" --zeroThreshold {"velocity_w \(m/s\)_1":1e-8}) @@ -56,7 +56,7 @@ dune_add_test(NAME test_cc3pniconduction COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/3pniconductioncc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/test_cc3pniconduction-00006.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_cc3pniconduction-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_cc3pniconduction test_3pni_fv_conduction.input -Problem.Name test_cc3pniconduction" --zeroThreshold {"velocity_w \(m/s\)_1":1e-8}) diff --git a/test/porousmediumflow/3p/implicit/test_3pni_fv_conduction.cc b/test/porousmediumflow/3p/implicit/test_3pni_fv_conduction.cc index 07921c8967..7856bb4292 100644 --- a/test/porousmediumflow/3p/implicit/test_3pni_fv_conduction.cc +++ b/test/porousmediumflow/3p/implicit/test_3pni_fv_conduction.cc @@ -192,7 +192,7 @@ int main(int argc, char** argv) try // set new dt as suggested by the newton solver timeLoop->setTimeStepSize(nonLinearSolver.suggestTimeStepSize(timeLoop->timeStepSize())); - if (timeLoop->timeStepIndex()==0 || timeLoop->timeStepIndex() % vtkOutputInterval == 0 || timeLoop->willBeFinished()) + if (timeLoop->timeStepIndex()==0 || timeLoop->timeStepIndex() % vtkOutputInterval == 0 || timeLoop->finished()) vtkWriter.write(timeLoop->time()); } while (!timeLoop->finished()); diff --git a/test/porousmediumflow/3p/implicit/test_3pni_fv_convection.cc b/test/porousmediumflow/3p/implicit/test_3pni_fv_convection.cc index 95ed2be98a..cb86e54fa7 100644 --- a/test/porousmediumflow/3p/implicit/test_3pni_fv_convection.cc +++ b/test/porousmediumflow/3p/implicit/test_3pni_fv_convection.cc @@ -193,7 +193,7 @@ int main(int argc, char** argv) try timeLoop->setTimeStepSize(nonLinearSolver.suggestTimeStepSize(timeLoop->timeStepSize())); // write vtk output - if(timeLoop->timeStepIndex()==0 || timeLoop->timeStepIndex() % vtkOutputInterval == 0 || timeLoop->willBeFinished()) + if (timeLoop->timeStepIndex()==0 || timeLoop->timeStepIndex() % vtkOutputInterval == 0 || timeLoop->finished()) vtkWriter.write(timeLoop->time()); } while (!timeLoop->finished()); diff --git a/test/porousmediumflow/richards/implicit/CMakeLists.txt b/test/porousmediumflow/richards/implicit/CMakeLists.txt index 64b581b0b9..d67c5b3858 100644 --- a/test/porousmediumflow/richards/implicit/CMakeLists.txt +++ b/test/porousmediumflow/richards/implicit/CMakeLists.txt @@ -91,7 +91,7 @@ dune_add_test(SOURCES test_ccrichardsanalytical.cc COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/richardsanalyticalcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsanalytical-00002.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsanalytical-00001.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsanalytical test_ccrichardsanalytical.input -Problem.Name test_ccrichardsanalytical") # non-isothermal tests dune_add_test(SOURCES test_richardsniconvection_fv.cc diff --git a/test/porousmediumflow/richards/implicit/test_ccrichardsanalytical.cc b/test/porousmediumflow/richards/implicit/test_ccrichardsanalytical.cc index 78d37cb8ca..ead3331fbc 100644 --- a/test/porousmediumflow/richards/implicit/test_ccrichardsanalytical.cc +++ b/test/porousmediumflow/richards/implicit/test_ccrichardsanalytical.cc @@ -177,9 +177,9 @@ int main(int argc, char** argv) try // advance to the time loop to the next step timeLoop->advanceTimeStep(); - // write vtk output - if(timeLoop->willBeFinished()) - vtkWriter.write(timeLoop->time()); + // write vtk output only on last time step + if (timeLoop->finished()) + vtkWriter.write(timeLoop->time()); // report statistics of this time step timeLoop->reportTimeStep(); -- GitLab