From d700db2a43df817cbe580665ad85e093155eb42f Mon Sep 17 00:00:00 2001 From: Felix Weinhardt Date: Thu, 8 Nov 2018 15:26:14 +0100 Subject: [PATCH 1/2] [1p test names and folders modified] added some folders in implicit: - fracture2d3d - isothermal - noniothermal - network1d3d in subdirectory compressible new folders: -instationary -stationary --- .../1p/implicit/CMakeLists.txt | 180 +--------------- .../1p/implicit/compressible/CMakeLists.txt | 61 +----- .../compressible/instationary/CMakeLists.txt | 31 +++ .../{test_1p.cc => instationary/main.cc} | 0 .../params.input} | 0 .../{ => instationary}/problem.hh | 0 .../{ => instationary}/spatialparams.hh | 0 .../compressible/stationary/CMakeLists.txt | 31 +++ .../main.cc} | 0 .../params.input} | 0 .../compressible/stationary/problem.hh | 173 +++++++++++++++ .../compressible/stationary/spatialparams.hh | 111 ++++++++++ .../1p/implicit/fracture2d3d/CMakeLists.txt | 41 ++++ .../{ => fracture2d3d}/grids/fracture2d3d.msh | 0 .../main.cc} | 2 +- .../params.input} | 0 .../problem.hh} | 2 +- .../spatialparams.hh} | 0 .../1p/implicit/incompressible/CMakeLists.txt | 54 ++--- .../incompressible/{test_1pfv.cc => main.cc} | 0 .../{test_1p.input => params.input} | 0 .../1p/implicit/isothermal/CMakeLists.txt | 54 +++++ .../implicit/{ => isothermal}/control.gstat | 0 .../{test_1pfv.cc => isothermal/main.cc} | 2 +- .../params.input} | 0 .../params_forchheimer.input} | 0 .../params_gstat.input} | 0 .../problem.hh} | 2 +- .../spatialparams.hh} | 0 .../1p/implicit/network1d3d/CMakeLists.txt | 27 +++ .../convergencetest.py} | 0 .../{ => network1d3d}/grids/network1d3d.msh | 0 .../main.cc} | 2 +- .../params.input} | 0 .../problem.hh} | 2 +- .../spatialparams.hh} | 0 .../1p/implicit/nonisothermal/CMakeLists.txt | 73 +++++++ .../{test_1pnifv.cc => nonisothermal/main.cc} | 4 +- .../params_conduction.input} | 0 .../params_convection.input} | 0 .../problem_conduction.hh} | 2 +- .../problem_convection.hh} | 2 +- .../spatialparams.hh} | 0 .../1p/implicit/periodicbc/CMakeLists.txt | 32 +-- .../periodicbc/{test_1pfv.cc => main.cc} | 0 .../{test_1p.input => params.input} | 0 .../1p/implicit/pointsources/CMakeLists.txt | 40 +--- ...arityspatialparams.hh => spatialparams.hh} | 0 .../pointsources/timedependent/CMakeLists.txt | 18 ++ .../main.cc} | 2 +- .../params.input} | 0 .../problem.hh} | 2 +- .../timeindependent/CMakeLists.txt | 27 +++ .../main.cc} | 2 +- .../pointsources/timeindependent/params.input | 16 ++ .../problem.hh} | 2 +- .../1pnc/implicit/1p2c/CMakeLists.txt | 2 + .../implicit/1p2c/isothermal/CMakeLists.txt | 34 +++ .../isothermal/main.cc} | 5 +- .../isothermal/params.input} | 0 .../isothermal/problem.hh} | 2 +- .../saltwaterintrusion/CMakeLists.txt | 11 + .../isothermal/saltwaterintrusion/main.cc | 198 ++++++++++++++++++ .../saltwaterintrusion/params.input} | 0 .../isothermal/saltwaterintrusion/problem.hh} | 2 +- .../1p2c/nonisothermal/CMakeLists.txt | 2 + .../nonisothermal/conduction/CMakeLists.txt | 34 +++ .../nonisothermal/conduction/main.cc} | 2 +- .../nonisothermal/conduction/params.input} | 0 .../nonisothermal/conduction/problem.hh} | 2 +- .../nonisothermal/convection/CMakeLists.txt | 34 +++ .../nonisothermal/convection/main.cc} | 2 +- .../nonisothermal/convection/params.input} | 0 .../nonisothermal/convection/problem.hh} | 2 +- .../spatialparams.hh} | 0 .../1pnc/implicit/CMakeLists.txt | 108 +--------- ...1p2c_saltwaterintrusion_box-reference.vtu} | 0 ... => test_1p2c_transport_box-reference.vtu} | 0 ...=> test_1p2c_transport_mpfa-reference.vtu} | 0 ...=> test_1p2c_transport_tpfa-reference.vtu} | 0 ... test_1p2cni_conduction_box-reference.vtu} | 0 ...test_1p2cni_conduction_mpfa-reference.vtu} | 0 ...test_1p2cni_conduction_tpfa-reference.vtu} | 0 ... test_1p2cni_convection_box-reference.vtu} | 0 ...test_1p2cni_convection_mpfa-reference.vtu} | 0 ...test_1p2cni_convection_tpfa-reference.vtu} | 0 ...eference.vtu => test_1p_box-reference.vtu} | 0 ...vtu => test_1p_box_periodic-reference.vtu} | 0 ...reference.vtu => test_1p_cc-reference.vtu} | 0 ...=> test_1p_forchheimer_tpfa-reference.vtu} | 0 ...=> test_1p_fracture2d3d_box-reference.vtu} | 0 ... => test_1p_fracture2d3d_cc-reference.vtu} | 0 ...tsources_timedependent_tpfa-reference.vtu} | 0 ...sources_timeindependent_box-reference.vtu} | 0 ...tsources_timeindependent_cc-reference.vtu} | 0 ...tu => test_1p_tpfa_periodic-reference.vtu} | 0 ...=> test_1pni_conduction_box-reference.vtu} | 0 ... => test_1pni_conduction_cc-reference.vtu} | 0 ...> test_1pni_conduction_mpfa-reference.vtu} | 0 ...=> test_1pni_convection_box-reference.vtp} | 0 ... => test_1pni_convection_cc-reference.vtp} | 0 101 files changed, 991 insertions(+), 446 deletions(-) create mode 100644 test/porousmediumflow/1p/implicit/compressible/instationary/CMakeLists.txt rename test/porousmediumflow/1p/implicit/compressible/{test_1p.cc => instationary/main.cc} (100%) rename test/porousmediumflow/1p/implicit/compressible/{test_1p.input => instationary/params.input} (100%) rename test/porousmediumflow/1p/implicit/compressible/{ => instationary}/problem.hh (100%) rename test/porousmediumflow/1p/implicit/compressible/{ => instationary}/spatialparams.hh (100%) create mode 100644 test/porousmediumflow/1p/implicit/compressible/stationary/CMakeLists.txt rename test/porousmediumflow/1p/implicit/compressible/{test_1p_stationary.cc => stationary/main.cc} (100%) rename test/porousmediumflow/1p/implicit/compressible/{test_1p_stationary.input => stationary/params.input} (100%) create mode 100644 test/porousmediumflow/1p/implicit/compressible/stationary/problem.hh create mode 100644 test/porousmediumflow/1p/implicit/compressible/stationary/spatialparams.hh create mode 100644 test/porousmediumflow/1p/implicit/fracture2d3d/CMakeLists.txt rename test/porousmediumflow/1p/implicit/{ => fracture2d3d}/grids/fracture2d3d.msh (100%) rename test/porousmediumflow/1p/implicit/{test_1pfv_fracture2d3d.cc => fracture2d3d/main.cc} (99%) rename test/porousmediumflow/1p/implicit/{test_1pfv_fracture2d3d.input => fracture2d3d/params.input} (100%) rename test/porousmediumflow/1p/implicit/{fractureproblem.hh => fracture2d3d/problem.hh} (99%) rename test/porousmediumflow/1p/implicit/{fracturespatialparams.hh => fracture2d3d/spatialparams.hh} (100%) rename test/porousmediumflow/1p/implicit/incompressible/{test_1pfv.cc => main.cc} (100%) rename test/porousmediumflow/1p/implicit/incompressible/{test_1p.input => params.input} (100%) create mode 100644 test/porousmediumflow/1p/implicit/isothermal/CMakeLists.txt rename test/porousmediumflow/1p/implicit/{ => isothermal}/control.gstat (100%) rename test/porousmediumflow/1p/implicit/{test_1pfv.cc => isothermal/main.cc} (99%) rename test/porousmediumflow/1p/implicit/{test_1pfv.input => isothermal/params.input} (100%) rename test/porousmediumflow/1p/implicit/{test_1pforchheimercctpfa.input => isothermal/params_forchheimer.input} (100%) rename test/porousmediumflow/1p/implicit/{test_1pwithgstat.input => isothermal/params_gstat.input} (100%) rename test/porousmediumflow/1p/implicit/{1ptestproblem.hh => isothermal/problem.hh} (99%) rename test/porousmediumflow/1p/implicit/{1ptestspatialparams.hh => isothermal/spatialparams.hh} (100%) create mode 100644 test/porousmediumflow/1p/implicit/network1d3d/CMakeLists.txt rename test/porousmediumflow/1p/implicit/{tubesconvergencetest.py => network1d3d/convergencetest.py} (100%) rename test/porousmediumflow/1p/implicit/{ => network1d3d}/grids/network1d3d.msh (100%) rename test/porousmediumflow/1p/implicit/{test_1pfv_network1d3d.cc => network1d3d/main.cc} (99%) rename test/porousmediumflow/1p/implicit/{test_1pfv_network1d3d.input => network1d3d/params.input} (100%) rename test/porousmediumflow/1p/implicit/{tubesproblem.hh => network1d3d/problem.hh} (99%) rename test/porousmediumflow/1p/implicit/{tubesspatialparams.hh => network1d3d/spatialparams.hh} (100%) create mode 100644 test/porousmediumflow/1p/implicit/nonisothermal/CMakeLists.txt rename test/porousmediumflow/1p/implicit/{test_1pnifv.cc => nonisothermal/main.cc} (99%) rename test/porousmediumflow/1p/implicit/{test_1pnifv_conduction.input => nonisothermal/params_conduction.input} (100%) rename test/porousmediumflow/1p/implicit/{test_1pnifv_convection.input => nonisothermal/params_convection.input} (100%) rename test/porousmediumflow/1p/implicit/{1pniconductionproblem.hh => nonisothermal/problem_conduction.hh} (99%) rename test/porousmediumflow/1p/implicit/{1pniconvectionproblem.hh => nonisothermal/problem_convection.hh} (99%) rename test/porousmediumflow/1p/implicit/{1pnispatialparams.hh => nonisothermal/spatialparams.hh} (100%) rename test/porousmediumflow/1p/implicit/periodicbc/{test_1pfv.cc => main.cc} (100%) rename test/porousmediumflow/1p/implicit/periodicbc/{test_1p.input => params.input} (100%) rename test/porousmediumflow/1p/implicit/pointsources/{1psingularityspatialparams.hh => spatialparams.hh} (100%) create mode 100644 test/porousmediumflow/1p/implicit/pointsources/timedependent/CMakeLists.txt rename test/porousmediumflow/1p/implicit/pointsources/{test_1pfv_pointsources_timedependent.cc => timedependent/main.cc} (99%) rename test/porousmediumflow/1p/implicit/pointsources/{test_1pfv_pointsources.input => timedependent/params.input} (100%) rename test/porousmediumflow/1p/implicit/pointsources/{1psingularityproblemtimedependent.hh => timedependent/problem.hh} (99%) create mode 100644 test/porousmediumflow/1p/implicit/pointsources/timeindependent/CMakeLists.txt rename test/porousmediumflow/1p/implicit/pointsources/{test_1pfv_pointsources.cc => timeindependent/main.cc} (99%) create mode 100644 test/porousmediumflow/1p/implicit/pointsources/timeindependent/params.input rename test/porousmediumflow/1p/implicit/pointsources/{1psingularityproblem.hh => timeindependent/problem.hh} (99%) create mode 100644 test/porousmediumflow/1pnc/implicit/1p2c/CMakeLists.txt create mode 100644 test/porousmediumflow/1pnc/implicit/1p2c/isothermal/CMakeLists.txt rename test/porousmediumflow/1pnc/implicit/{test_1p2c_fv.cc => 1p2c/isothermal/main.cc} (99%) rename test/porousmediumflow/1pnc/implicit/{test_1p2c_fv.input => 1p2c/isothermal/params.input} (100%) rename test/porousmediumflow/1pnc/implicit/{1p2ctestproblem.hh => 1p2c/isothermal/problem.hh} (99%) create mode 100644 test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/CMakeLists.txt create mode 100644 test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/main.cc rename test/porousmediumflow/1pnc/implicit/{saltwaterintrusion.input => 1p2c/isothermal/saltwaterintrusion/params.input} (100%) rename test/porousmediumflow/1pnc/implicit/{saltwaterintrusionproblem.hh => 1p2c/isothermal/saltwaterintrusion/problem.hh} (99%) create mode 100644 test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/CMakeLists.txt create mode 100644 test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/CMakeLists.txt rename test/porousmediumflow/1pnc/implicit/{test_1p2cni_conduction_fv.cc => 1p2c/nonisothermal/conduction/main.cc} (99%) rename test/porousmediumflow/1pnc/implicit/{test_1p2cni_conduction_fv.input => 1p2c/nonisothermal/conduction/params.input} (100%) rename test/porousmediumflow/1pnc/implicit/{1p2cniconductionproblem.hh => 1p2c/nonisothermal/conduction/problem.hh} (99%) create mode 100644 test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/CMakeLists.txt rename test/porousmediumflow/1pnc/implicit/{test_1p2cni_convection_fv.cc => 1p2c/nonisothermal/convection/main.cc} (99%) rename test/porousmediumflow/1pnc/implicit/{test_1p2cni_convection_fv.input => 1p2c/nonisothermal/convection/params.input} (100%) rename test/porousmediumflow/1pnc/implicit/{1p2cniconvectionproblem.hh => 1p2c/nonisothermal/convection/problem.hh} (99%) rename test/porousmediumflow/1pnc/implicit/{1pnctestspatialparams.hh => 1p2c/spatialparams.hh} (100%) rename test/references/{saltwaterintrusion-reference.vtu => test_1p2c_saltwaterintrusion_box-reference.vtu} (100%) rename test/references/{outflowbox-reference.vtu => test_1p2c_transport_box-reference.vtu} (100%) rename test/references/{1p2ctestmpfa-reference.vtu => test_1p2c_transport_mpfa-reference.vtu} (100%) rename test/references/{1p2ctestcc-reference.vtu => test_1p2c_transport_tpfa-reference.vtu} (100%) rename test/references/{1p2cniboxconduction-reference.vtu => test_1p2cni_conduction_box-reference.vtu} (100%) rename test/references/{1p2cniccmpfaconduction-reference.vtu => test_1p2cni_conduction_mpfa-reference.vtu} (100%) rename test/references/{1p2cniccconduction-reference.vtu => test_1p2cni_conduction_tpfa-reference.vtu} (100%) rename test/references/{1p2cniboxconvection-reference.vtu => test_1p2cni_convection_box-reference.vtu} (100%) rename test/references/{1p2cniccmpfaconvection-reference.vtu => test_1p2cni_convection_mpfa-reference.vtu} (100%) rename test/references/{1p2cniccconvection-reference.vtu => test_1p2cni_convection_tpfa-reference.vtu} (100%) rename test/references/{1ptestbox-reference.vtu => test_1p_box-reference.vtu} (100%) rename test/references/{test-1p-box-periodic-reference.vtu => test_1p_box_periodic-reference.vtu} (100%) rename test/references/{1ptestcc-reference.vtu => test_1p_cc-reference.vtu} (100%) rename test/references/{1pforchheimercctpfa.vtu => test_1p_forchheimer_tpfa-reference.vtu} (100%) rename test/references/{1pboxfracture2d3d-reference.vtu => test_1p_fracture2d3d_box-reference.vtu} (100%) rename test/references/{1pccfracture2d3d-reference.vtu => test_1p_fracture2d3d_cc-reference.vtu} (100%) rename test/references/{1psingularitycctimedependent-reference.vtu => test_1p_pointsources_timedependent_tpfa-reference.vtu} (100%) rename test/references/{1psingularitybox-reference.vtu => test_1p_pointsources_timeindependent_box-reference.vtu} (100%) rename test/references/{1psingularitycc-reference.vtu => test_1p_pointsources_timeindependent_cc-reference.vtu} (100%) rename test/references/{test-1p-tpfa-periodic-reference.vtu => test_1p_tpfa_periodic-reference.vtu} (100%) rename test/references/{1pniboxconduction-reference.vtu => test_1pni_conduction_box-reference.vtu} (100%) rename test/references/{1pniccconduction-reference.vtu => test_1pni_conduction_cc-reference.vtu} (100%) rename test/references/{ccmpfa1pniconduction-reference.vtu => test_1pni_conduction_mpfa-reference.vtu} (100%) rename test/references/{1pniboxconvection-reference.vtp => test_1pni_convection_box-reference.vtp} (100%) rename test/references/{1pniccconvection-reference.vtp => test_1pni_convection_cc-reference.vtp} (100%) diff --git a/test/porousmediumflow/1p/implicit/CMakeLists.txt b/test/porousmediumflow/1p/implicit/CMakeLists.txt index 46fbd35b2c..dbbc593c5a 100644 --- a/test/porousmediumflow/1p/implicit/CMakeLists.txt +++ b/test/porousmediumflow/1p/implicit/CMakeLists.txt @@ -2,179 +2,7 @@ add_subdirectory(pointsources) add_subdirectory(incompressible) add_subdirectory(compressible) add_subdirectory(periodicbc) - -add_input_file_links() -add_gstat_file_links() - -dune_symlink_to_source_files(FILES grids) -dune_symlink_to_source_files(FILES "tubesconvergencetest.py") - -# isothermal tests -dune_add_test(NAME test_1pcctpfa - SOURCES test_1pfv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTestCCTpfa - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1ptestcctpfa-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pcctpfa test_1pfv.input -Problem.Name 1ptestcctpfa") - -dune_add_test(NAME test_1pccmpfa - SOURCES test_1pfv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTestCCMpfa - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1ptestccmpfa-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pccmpfa test_1pfv.input -Problem.Name 1ptestccmpfa") - -dune_add_test(NAME test_1pbox - SOURCES test_1pfv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTestBox - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestbox-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1ptestbox-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pbox test_1pfv.input -Problem.Name 1ptestbox") - -dune_add_test(NAME test_1pforchheimercctpfa - SOURCES test_1pfv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTestCCTpfa FORCHHEIMER=1 - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1pforchheimercctpfa.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1ptestforchheimertpfa-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pforchheimercctpfa" - --zeroThreshold {"velocity_liq \(m/s\)":1e-12}) - -# a gstat test (becaue it's a random permeability field we can't test against a reference solution) -dune_add_test(NAME test_1pwithgstat - SOURCES test_1pfv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTestCCTpfa - CMAKE_GUARD HAVE_GSTAT) - -# non-isothermal tests -dune_add_test(NAME test_1pnibox_conduction - SOURCES test_1pnifv.cc - COMPILE_DEFINITIONS TYPETAG=OnePNIConductionBox - 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-00005.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnibox_conduction test_1pnifv_conduction.input -Problem.Name 1pnibox_conduction" - --zeroThreshold {"velocity_liq":1e-8}) - -add_executable(test_1pnibox_convection EXCLUDE_FROM_ALL test_1pnifv.cc) -target_compile_definitions(test_1pnibox_convection PUBLIC TYPETAG=OnePNIConvectionBox) - -dune_add_test(NAME test_1pnibox_convection - TARGET test_1pnibox_convection - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1pniboxconvection-reference.vtp - ${CMAKE_CURRENT_BINARY_DIR}/1pnibox_convection-00009.vtp - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnibox_convection test_1pnifv_convection.input -Problem.Name 1pnibox_convection" - --zeroThreshold {"velocity":1e-15}) - -dune_add_test(NAME test_1pnibox_convection_restart - TARGET test_1pnibox_convection - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1pniboxconvection-reference.vtp - ${CMAKE_CURRENT_BINARY_DIR}/1pnibox_convection_restart-00004.vtp - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnibox_convection test_1pnifv_convection.input -Problem.Name 1pnibox_convection_restart -TimeLoop.DtInitial 1000 -Restart.Time 16768 -Restart.File 1pnibox_convection-00006.vtp" - --zeroThreshold {"velocity":1e-15}) - -# the restart test has to run after the test that produces the corresponding vtu file -set_tests_properties(test_1pnibox_convection_restart PROPERTIES DEPENDS test_1pnibox_convection) - -dune_add_test(NAME test_1pnicctpfa_conduction - SOURCES test_1pnifv.cc - COMPILE_DEFINITIONS TYPETAG=OnePNIConductionCCTpfa - 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-00005.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnicctpfa_conduction test_1pnifv_conduction.input -Problem.Name 1pnicctpfa_conduction" - --zeroThreshold {"velocity":1e-8}) - -dune_add_test(NAME test_1pnicctpfa_convection - SOURCES test_1pnifv.cc - COMPILE_DEFINITIONS TYPETAG=OnePNIConvectionCCTpfa - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1pniccconvection-reference.vtp - ${CMAKE_CURRENT_BINARY_DIR}/1pnicctpfa_convection-00009.vtp - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnicctpfa_convection test_1pnifv_convection.input -Problem.Name 1pnicctpfa_convection") - -dune_add_test(NAME test_1pniccmpfa_conduction - SOURCES test_1pnifv.cc - COMPILE_DEFINITIONS TYPETAG=OnePNIConductionCCMpfa - 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-00005.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pniccmpfa_conduction test_1pnifv_conduction.input -Problem.Name 1pniccmpfa_conduction") - -# dim < dimWorld tests with Dune::Foamgrid<1,3> -dune_add_test(NAME test_1pcctpfa_network1d3d - SOURCES test_1pfv_network1d3d.cc - COMPILE_DEFINITIONS TYPETAG=TubesTestCCTpfa - CMAKE_GUARD dune-foamgrid_FOUND - COMMAND ./tubesconvergencetest.py - CMD_ARGS test_1pcctpfa_network1d3d test_1pfv_network1d3d.input -Problem.Name test_1pcctpfa_network1d3d) - -dune_add_test(NAME test_1pbox_network1d3d - SOURCES test_1pfv_network1d3d.cc - COMPILE_DEFINITIONS TYPETAG=TubesTestBox - CMAKE_GUARD dune-foamgrid_FOUND - COMMAND ./tubesconvergencetest.py - CMD_ARGS test_1pbox_network1d3d test_1pfv_network1d3d.input -Problem.Name test_1pbox_network1d3d) - -# dim < dimWorld tests with Dune::Foamgrid<2,3> -dune_add_test(NAME test_1pbox_fracture2d3d - SOURCES test_1pfv_fracture2d3d.cc - COMPILE_DEFINITIONS TYPETAG=FractureBox - CMAKE_GUARD dune-foamgrid_FOUND - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1pboxfracture2d3d-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pbox_fracture2d3d-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pbox_fracture2d3d test_1pfv_fracture2d3d.input -Problem.Name 1pbox_fracture2d3d") - -dune_add_test(NAME test_1pcctpfa_fracture2d3d - SOURCES test_1pfv_fracture2d3d.cc - COMPILE_DEFINITIONS TYPETAG=FractureCCTpfa - CMAKE_GUARD dune-foamgrid_FOUND - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1pccfracture2d3d-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pcctpfa_fracture2d3d-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pcctpfa_fracture2d3d test_1pfv_fracture2d3d.input -Problem.Name 1pcctpfa_fracture2d3d") - -dune_add_test(NAME test_1pccmpfa_fracture2d3d - SOURCES test_1pfv_fracture2d3d.cc - COMPILE_DEFINITIONS TYPETAG=FractureCCMpfa - CMAKE_GUARD dune-foamgrid_FOUND - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1pccfracture2d3d-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pccmpfa_fracture2d3d-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pccmpfa_fracture2d3d test_1pfv_fracture2d3d.input -Problem.Name 1pccmpfa_fracture2d3d") - -#install sources -install(FILES -1pniconductionproblem.hh -1pniconvectionproblem.hh -1pnispatialparams.hh -1ptestproblem.hh -1ptestspatialparams.hh -fractureproblem.hh -fracturespatialparams.hh -tubesproblem.hh -tubesspatialparams.hh -test_1pfv.cc -test_1pnifv.cc -test_1pfv_fracture2d3d.cc -test_1pfv_network1d3d.cc -DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/implicit/1p) +add_subdirectory(fracture2d3d) +add_subdirectory(isothermal) +add_subdirectory(nonisothermal) +add_subdirectory(network1d3d) diff --git a/test/porousmediumflow/1p/implicit/compressible/CMakeLists.txt b/test/porousmediumflow/1p/implicit/compressible/CMakeLists.txt index 93803d4db5..92d3e20bd1 100644 --- a/test/porousmediumflow/1p/implicit/compressible/CMakeLists.txt +++ b/test/porousmediumflow/1p/implicit/compressible/CMakeLists.txt @@ -1,59 +1,2 @@ -dune_symlink_to_source_files(FILES "test_1p.input" "test_1p_stationary.input") - -# compressible instationary -dune_add_test(NAME test_1p_compressible_tpfa - SOURCES test_1p.cc - COMPILE_DEFINITIONS TYPETAG=OnePCompressibleTpfa - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p_tpfa-00010.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_tpfa test_1p.input -Problem.Name 1p_tpfa") - -dune_add_test(NAME test_1p_compressible_mpfa - SOURCES test_1p.cc - COMPILE_DEFINITIONS TYPETAG=OnePCompressibleMpfa - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p_mpfa-00010.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_mpfa test_1p.input -Problem.Name 1p_mpfa") - -dune_add_test(NAME test_1p_compressible_box - SOURCES test_1p.cc - COMPILE_DEFINITIONS TYPETAG=OnePCompressibleBox - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestbox-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p_box-00010.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_box test_1p.input -Problem.Name 1p_box") - -# compressible stationary -dune_add_test(NAME test_1p_compressible_stationary_tpfa - SOURCES test_1p_stationary.cc - COMPILE_DEFINITIONS TYPETAG=OnePCompressibleTpfa - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p_stationary_tpfa-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_stationary_tpfa test_1p_stationary.input -Problem.Name 1p_stationary_tpfa") - -dune_add_test(NAME test_1p_compressible_stationary_mpfa - SOURCES test_1p_stationary.cc - COMPILE_DEFINITIONS TYPETAG=OnePCompressibleMpfa - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p_stationary_mpfa-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_stationary_mpfa test_1p_stationary.input -Problem.Name 1p_stationary_mpfa") - -dune_add_test(NAME test_1p_compressible_stationary_box - SOURCES test_1p_stationary.cc - COMPILE_DEFINITIONS TYPETAG=OnePCompressibleBox - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestbox-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p_stationary_box-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_stationary_box test_1p_stationary.input -Problem.Name 1p_stationary_box") - -set(CMAKE_BUILD_TYPE Release) +add_subdirectory(stationary) +add_subdirectory(instationary) diff --git a/test/porousmediumflow/1p/implicit/compressible/instationary/CMakeLists.txt b/test/porousmediumflow/1p/implicit/compressible/instationary/CMakeLists.txt new file mode 100644 index 0000000000..8d9ae29be8 --- /dev/null +++ b/test/porousmediumflow/1p/implicit/compressible/instationary/CMakeLists.txt @@ -0,0 +1,31 @@ +dune_symlink_to_source_files(FILES "params.input") + +# compressible instationary +dune_add_test(NAME test_1p_compressible_instationary_tpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePCompressibleTpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_instationary_tpfa-00010.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_instationary_tpfa params.input -Problem.Name test_1p_compressible_instationary_tpfa") + +dune_add_test(NAME test_1p_compressible_instationary_mpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePCompressibleMpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_instationary_mpfa-00010.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_instationary_mpfa params.input -Problem.Name test_1p_compressible_instationary_mpfa") + +dune_add_test(NAME test_1p_compressible_instationary_box + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePCompressibleBox + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_box-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_instationary_box-00010.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_instationary_box params.input -Problem.Name test_1p_compressible_instationary_box") + +set(CMAKE_BUILD_TYPE Release) diff --git a/test/porousmediumflow/1p/implicit/compressible/test_1p.cc b/test/porousmediumflow/1p/implicit/compressible/instationary/main.cc similarity index 100% rename from test/porousmediumflow/1p/implicit/compressible/test_1p.cc rename to test/porousmediumflow/1p/implicit/compressible/instationary/main.cc diff --git a/test/porousmediumflow/1p/implicit/compressible/test_1p.input b/test/porousmediumflow/1p/implicit/compressible/instationary/params.input similarity index 100% rename from test/porousmediumflow/1p/implicit/compressible/test_1p.input rename to test/porousmediumflow/1p/implicit/compressible/instationary/params.input diff --git a/test/porousmediumflow/1p/implicit/compressible/problem.hh b/test/porousmediumflow/1p/implicit/compressible/instationary/problem.hh similarity index 100% rename from test/porousmediumflow/1p/implicit/compressible/problem.hh rename to test/porousmediumflow/1p/implicit/compressible/instationary/problem.hh diff --git a/test/porousmediumflow/1p/implicit/compressible/spatialparams.hh b/test/porousmediumflow/1p/implicit/compressible/instationary/spatialparams.hh similarity index 100% rename from test/porousmediumflow/1p/implicit/compressible/spatialparams.hh rename to test/porousmediumflow/1p/implicit/compressible/instationary/spatialparams.hh diff --git a/test/porousmediumflow/1p/implicit/compressible/stationary/CMakeLists.txt b/test/porousmediumflow/1p/implicit/compressible/stationary/CMakeLists.txt new file mode 100644 index 0000000000..1c33a0e077 --- /dev/null +++ b/test/porousmediumflow/1p/implicit/compressible/stationary/CMakeLists.txt @@ -0,0 +1,31 @@ +dune_symlink_to_source_files(FILES "params.input") + +# compressible stationary +dune_add_test(NAME test_1p_compressible_stationary_tpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePCompressibleTpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_stationary_tpfa-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_stationary_tpfa params.input -Problem.Name test_1p_compressible_stationary_tpfa") + +dune_add_test(NAME test_1p_compressible_stationary_mpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePCompressibleMpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_stationary_mpfa-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_stationary_mpfa params.input -Problem.Name test_1p_compressible_stationary_mpfa") + +dune_add_test(NAME test_1p_compressible_stationary_box + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePCompressibleBox + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_box-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_stationary_box-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_compressible_stationary_box params.input -Problem.Name test_1p_compressible_stationary_box") + +set(CMAKE_BUILD_TYPE Release) diff --git a/test/porousmediumflow/1p/implicit/compressible/test_1p_stationary.cc b/test/porousmediumflow/1p/implicit/compressible/stationary/main.cc similarity index 100% rename from test/porousmediumflow/1p/implicit/compressible/test_1p_stationary.cc rename to test/porousmediumflow/1p/implicit/compressible/stationary/main.cc diff --git a/test/porousmediumflow/1p/implicit/compressible/test_1p_stationary.input b/test/porousmediumflow/1p/implicit/compressible/stationary/params.input similarity index 100% rename from test/porousmediumflow/1p/implicit/compressible/test_1p_stationary.input rename to test/porousmediumflow/1p/implicit/compressible/stationary/params.input diff --git a/test/porousmediumflow/1p/implicit/compressible/stationary/problem.hh b/test/porousmediumflow/1p/implicit/compressible/stationary/problem.hh new file mode 100644 index 0000000000..5bcade3c59 --- /dev/null +++ b/test/porousmediumflow/1p/implicit/compressible/stationary/problem.hh @@ -0,0 +1,173 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + *****************************************************************************/ +/*! + * \file + * \ingroup OnePTests + * \brief The properties for the incompressible test + */ +#ifndef DUMUX_COMPRESSIBLE_ONEP_TEST_PROBLEM_HH +#define DUMUX_COMPRESSIBLE_ONEP_TEST_PROBLEM_HH + +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "spatialparams.hh" + +namespace Dumux +{ +// forward declarations +template class OnePTestProblem; + +namespace Properties +{ +// create the type tag nodes +NEW_TYPE_TAG(OnePCompressible, INHERITS_FROM(OneP)); +NEW_TYPE_TAG(OnePCompressibleTpfa, INHERITS_FROM(CCTpfaModel, OnePCompressible)); +NEW_TYPE_TAG(OnePCompressibleMpfa, INHERITS_FROM(CCMpfaModel, OnePCompressible)); +NEW_TYPE_TAG(OnePCompressibleBox, INHERITS_FROM(BoxModel, OnePCompressible)); + +// Set the grid type +SET_TYPE_PROP(OnePCompressible, Grid, Dune::YaspGrid<2>); + +// Set the problem type +SET_TYPE_PROP(OnePCompressible, Problem, OnePTestProblem); + +// set the spatial params +SET_PROP(OnePCompressible, SpatialParams) +{ + using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using type = OnePTestSpatialParams; +}; + +// the fluid system +SET_PROP(OnePCompressible, FluidSystem) +{ +private: + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); +public: + using type = FluidSystems::OnePLiquid>>; +}; + +// Disable caching (for testing purposes) +SET_BOOL_PROP(OnePCompressible, EnableGridVolumeVariablesCache, false); +SET_BOOL_PROP(OnePCompressible, EnableGridFluxVariablesCache, false); +SET_BOOL_PROP(OnePCompressible, EnableFVGridGeometryCache, false); + +} // end namespace Properties +/*! + * \ingroup OnePTests + * \brief Test problem for the compressible one-phase model: + *\todo doc me! + * ./test_box1pfv or + * ./test_cc1pfv + */ +template +class OnePTestProblem : public PorousMediumFlowProblem +{ + using ParentType = PorousMediumFlowProblem; + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Element = typename GridView::template Codim<0>::Entity; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); + using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + static constexpr int dimWorld = GridView::dimensionworld; + using GlobalPosition = typename Element::Geometry::GlobalCoordinate; + +public: + OnePTestProblem(std::shared_ptr fvGridGeometry) + : ParentType(fvGridGeometry) + { + Components::TabulatedComponent>::init(272.15, 294.15, 10, + 1.0e4, 1.0e6, 200); + } + + /*! + * \brief Specifies which kind of boundary condition should be + * used for which equation on a given boundary control volume. + * + * \param values The boundary types for the conservation equations + * \param globalPos The position of the center of the finite volume + */ + BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const + { + BoundaryTypes values; + + Scalar eps = 1.0e-6; + if (globalPos[dimWorld-1] < eps || globalPos[dimWorld-1] > this->fvGridGeometry().bBoxMax()[dimWorld-1] - eps) + values.setAllDirichlet(); + else + values.setAllNeumann(); + + return values; + } + + /*! + * \brief Evaluate the boundary conditions for a dirichlet + * control volume. + * + * \param values The dirichlet values for the primary variables + * \param globalPos The center of the finite volume which ought to be set. + * + * For this method, the \a values parameter stores primary variables. + */ + PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const + { + PrimaryVariables values(0); + values[0] = 1.0e+5*(2.0 - globalPos[dimWorld-1]); + return values; + } + + /*! + * \brief Evaluate the initial conditions + * + * \param globalPos The center of the finite volume which ought to be set. + */ + PrimaryVariables initialAtPos(const GlobalPosition& globalPos) const + { + return PrimaryVariables(1.0e5); + } + + /*! + * \brief Returns the temperature \f$\mathrm{[K]}\f$ for an isothermal problem. + * + * This is not specific to the discretization. By default it just + * throws an exception so it must be overloaded by the problem if + * no energy equation is used. + */ + Scalar temperature() const + { + return 283.15; // 10°C + } +}; + +} // end namespace Dumux + +#endif diff --git a/test/porousmediumflow/1p/implicit/compressible/stationary/spatialparams.hh b/test/porousmediumflow/1p/implicit/compressible/stationary/spatialparams.hh new file mode 100644 index 0000000000..dfc19c4e64 --- /dev/null +++ b/test/porousmediumflow/1p/implicit/compressible/stationary/spatialparams.hh @@ -0,0 +1,111 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + *****************************************************************************/ +/*! + * \file + * \ingroup OnePTests + * \brief The spatial params the incompressible test + */ +#ifndef DUMUX_COMPRESSIBLE_ONEP_TEST_SPATIAL_PARAMS_HH +#define DUMUX_COMPRESSIBLE_ONEP_TEST_SPATIAL_PARAMS_HH + +#include +#include + +namespace Dumux { + +/*! + * \ingroup OnePTests + * \brief The spatial parameters class for the test problem using the + * compressible 1p model + */ +template +class OnePTestSpatialParams +: public FVSpatialParamsOneP> +{ + using GridView = typename FVGridGeometry::GridView; + using Element = typename GridView::template Codim<0>::Entity; + using FVElementGeometry = typename FVGridGeometry::LocalView; + using SubControlVolume = typename FVElementGeometry::SubControlVolume; + using ParentType = FVSpatialParamsOneP>; + + static constexpr int dimWorld = GridView::dimensionworld; + using GlobalPosition = typename Element::Geometry::GlobalCoordinate; + +public: + using PermeabilityType = Scalar; + OnePTestSpatialParams(std::shared_ptr fvGridGeometry) + : ParentType(fvGridGeometry) + { + permeability_ = getParam("SpatialParams.Permeability"); + permeabilityLens_ = getParam("SpatialParams.PermeabilityLens"); + + lensLowerLeft_ = getParam("SpatialParams.LensLowerLeft"); + lensUpperRight_ = getParam("SpatialParams.LensUpperRight"); + } + + /*! + * \brief Function for defining the (intrinsic) permeability \f$[m^2]\f$. + * + * \param element The element + * \param scv The sub control volume + * \param elemSol The element solution vector + * \return the intrinsic permeability + */ + template + PermeabilityType permeability(const Element& element, + const SubControlVolume& scv, + const ElementSolution& elemSol) const + { + if (isInLens_(scv.dofPosition())) + return permeabilityLens_; + else + return permeability_; + } + + /*! + * \brief Define the porosity \f$\mathrm{[-]}\f$. + * + * \param globalPos The global position + */ + Scalar porosityAtPos(const GlobalPosition& globalPos) const + { return 0.4; } + +private: + bool isInLens_(const GlobalPosition &globalPos) const + { + for (int i = 0; i < dimWorld; ++i) { + if (globalPos[i] < lensLowerLeft_[i] + eps_ || globalPos[i] > lensUpperRight_[i] - eps_) + return false; + } + return true; + } + + GlobalPosition lensLowerLeft_; + GlobalPosition lensUpperRight_; + + Scalar permeability_, permeabilityLens_; + + static constexpr Scalar eps_ = 1.5e-7; +}; + +} // end namespace Dumux + +#endif diff --git a/test/porousmediumflow/1p/implicit/fracture2d3d/CMakeLists.txt b/test/porousmediumflow/1p/implicit/fracture2d3d/CMakeLists.txt new file mode 100644 index 0000000000..e19f258852 --- /dev/null +++ b/test/porousmediumflow/1p/implicit/fracture2d3d/CMakeLists.txt @@ -0,0 +1,41 @@ +add_input_file_links() + +dune_symlink_to_source_files(FILES grids) + +# dim < dimWorld tests with Dune::Foamgrid<2,3> +dune_add_test(NAME test_1p_fracture2d3d_box + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=FractureBox + CMAKE_GUARD dune-foamgrid_FOUND + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_fracture2d3d_box-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_fracture2d3d_box-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_fracture2d3d_box params.input -Problem.Name test_1p_fracture2d3d_box") + +dune_add_test(NAME test_1p_fracture2d3d_tpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=FractureCCTpfa + CMAKE_GUARD dune-foamgrid_FOUND + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_fracture2d3d_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_fracture2d3d_tpfa-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_fracture2d3d_tpfa params.input -Problem.Name test_1p_fracture2d3d_tpfa") + +dune_add_test(NAME test_1p_fracture2d3d_mpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=FractureCCMpfa + CMAKE_GUARD dune-foamgrid_FOUND + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_fracture2d3d_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_fracture2d3d_mpfa-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_fracture2d3d_mpfa params.input -Problem.Name test_1p_fracture2d3d_mpfa") + +#install sources +install(FILES +problem.hh +spatialparams.hh +main.cc +DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/implicit/1p) diff --git a/test/porousmediumflow/1p/implicit/grids/fracture2d3d.msh b/test/porousmediumflow/1p/implicit/fracture2d3d/grids/fracture2d3d.msh similarity index 100% rename from test/porousmediumflow/1p/implicit/grids/fracture2d3d.msh rename to test/porousmediumflow/1p/implicit/fracture2d3d/grids/fracture2d3d.msh diff --git a/test/porousmediumflow/1p/implicit/test_1pfv_fracture2d3d.cc b/test/porousmediumflow/1p/implicit/fracture2d3d/main.cc similarity index 99% rename from test/porousmediumflow/1p/implicit/test_1pfv_fracture2d3d.cc rename to test/porousmediumflow/1p/implicit/fracture2d3d/main.cc index da93fd8fcc..d75c705273 100644 --- a/test/porousmediumflow/1p/implicit/test_1pfv_fracture2d3d.cc +++ b/test/porousmediumflow/1p/implicit/fracture2d3d/main.cc @@ -32,7 +32,7 @@ #include #include -#include "fractureproblem.hh" +#include "problem.hh" #include #include diff --git a/test/porousmediumflow/1p/implicit/test_1pfv_fracture2d3d.input b/test/porousmediumflow/1p/implicit/fracture2d3d/params.input similarity index 100% rename from test/porousmediumflow/1p/implicit/test_1pfv_fracture2d3d.input rename to test/porousmediumflow/1p/implicit/fracture2d3d/params.input diff --git a/test/porousmediumflow/1p/implicit/fractureproblem.hh b/test/porousmediumflow/1p/implicit/fracture2d3d/problem.hh similarity index 99% rename from test/porousmediumflow/1p/implicit/fractureproblem.hh rename to test/porousmediumflow/1p/implicit/fracture2d3d/problem.hh index cf66ed6499..de95c19842 100644 --- a/test/porousmediumflow/1p/implicit/fractureproblem.hh +++ b/test/porousmediumflow/1p/implicit/fracture2d3d/problem.hh @@ -38,7 +38,7 @@ #include #include -#include "fracturespatialparams.hh" +#include "spatialparams.hh" namespace Dumux { diff --git a/test/porousmediumflow/1p/implicit/fracturespatialparams.hh b/test/porousmediumflow/1p/implicit/fracture2d3d/spatialparams.hh similarity index 100% rename from test/porousmediumflow/1p/implicit/fracturespatialparams.hh rename to test/porousmediumflow/1p/implicit/fracture2d3d/spatialparams.hh diff --git a/test/porousmediumflow/1p/implicit/incompressible/CMakeLists.txt b/test/porousmediumflow/1p/implicit/incompressible/CMakeLists.txt index 3fd0f23700..daa510481f 100644 --- a/test/porousmediumflow/1p/implicit/incompressible/CMakeLists.txt +++ b/test/porousmediumflow/1p/implicit/incompressible/CMakeLists.txt @@ -1,70 +1,70 @@ -dune_symlink_to_source_files(FILES "test_1p.input") +dune_symlink_to_source_files(FILES "params.input") # using tpfa and analytical Jacobian dune_add_test(NAME test_1p_incompressible_tpfa - SOURCES test_1pfv.cc + SOURCES main.cc COMPILE_DEFINITIONS TYPETAG=OnePIncompressibleTpfa NUMDIFFMETHOD=DiffMethod::analytic COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1ptestcctpfa-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_tpfa test_1p.input -Problem.Name 1ptestcctpfa") + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_tpfa-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_tpfa params.input -Problem.Name test_1p_incompressible_tpfa") # using tpfa, analytical Jacobian and quad precision dune_add_test(NAME test_1p_incompressible_tpfa_quad - SOURCES test_1pfv.cc + SOURCES main.cc CMAKE_GUARD HAVE_QUAD COMPILE_DEFINITIONS TYPETAG=OnePIncompressibleTpfaQuad NUMDIFFMETHOD=DiffMethod::analytic LINK_LIBRARIES ${QUADMATH_LIBRARIES} COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1ptestcctpfaquad-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_tpfa_quad test_1p.input -Problem.Name 1ptestcctpfaquad") + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_tpfa_quad-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_tpfa_quad params.input -Problem.Name test_1p_incompressible_tpfa_quad") # using mpfa and analytical Jacobian dune_add_test(NAME test_1p_incompressible_mpfa - SOURCES test_1pfv.cc + SOURCES main.cc COMPILE_DEFINITIONS TYPETAG=OnePIncompressibleMpfa NUMDIFFMETHOD=DiffMethod::analytic COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1ptestccmpfa-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_mpfa test_1p.input -Problem.Name 1ptestccmpfa") + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_mpfa-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_mpfa params.input -Problem.Name test_1p_incompressible_mpfa") # using box and analytical Jacobian dune_add_test(NAME test_1p_incompressible_box - SOURCES test_1pfv.cc + SOURCES main.cc COMPILE_DEFINITIONS TYPETAG=OnePIncompressibleBox NUMDIFFMETHOD=DiffMethod::analytic COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestbox-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1ptestbox-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_box test_1p.input -Problem.Name 1ptestbox") + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_box-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_box-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_box params.input -Problem.Name test_1p_incompressible_box") # using tpfa and numeric differentiation dune_add_test(NAME test_1p_incompressible_tpfa_numdiff - SOURCES test_1pfv.cc + SOURCES main.cc COMPILE_DEFINITIONS TYPETAG=OnePIncompressibleTpfa NUMDIFFMETHOD=DiffMethod::numeric COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1ptestcctpfa_numdiff-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_tpfa_numdiff test_1p.input - -Problem.Name 1ptestcctpfa_numdiff + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_tpfa_numdiff-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_tpfa_numdiff params.input + -Problem.Name test_1p_incompressible_tpfa_numdiff -Assembly.NumericDifference.PriVarMagnitude 1e5") # using box and numeric differentiation dune_add_test(NAME test_1p_incompressible_box_numdiff - SOURCES test_1pfv.cc + SOURCES main.cc COMPILE_DEFINITIONS TYPETAG=OnePIncompressibleBox NUMDIFFMETHOD=DiffMethod::numeric COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1ptestbox-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1ptestbox_numdiff-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_box_numdiff test_1p.input - -Problem.Name 1ptestbox_numdiff + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_box-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_box_numdiff-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_incompressible_box_numdiff params.input + -Problem.Name test_1p_incompressible_box_numdiff -Assembly.NumericDifference.PriVarMagnitude 1e5") set(CMAKE_BUILD_TYPE Release) diff --git a/test/porousmediumflow/1p/implicit/incompressible/test_1pfv.cc b/test/porousmediumflow/1p/implicit/incompressible/main.cc similarity index 100% rename from test/porousmediumflow/1p/implicit/incompressible/test_1pfv.cc rename to test/porousmediumflow/1p/implicit/incompressible/main.cc diff --git a/test/porousmediumflow/1p/implicit/incompressible/test_1p.input b/test/porousmediumflow/1p/implicit/incompressible/params.input similarity index 100% rename from test/porousmediumflow/1p/implicit/incompressible/test_1p.input rename to test/porousmediumflow/1p/implicit/incompressible/params.input diff --git a/test/porousmediumflow/1p/implicit/isothermal/CMakeLists.txt b/test/porousmediumflow/1p/implicit/isothermal/CMakeLists.txt new file mode 100644 index 0000000000..e77e5f3a5e --- /dev/null +++ b/test/porousmediumflow/1p/implicit/isothermal/CMakeLists.txt @@ -0,0 +1,54 @@ + +add_input_file_links() +add_gstat_file_links() + +# isothermal tests +dune_add_test(NAME test_1p_tpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTestCCTpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_tpfa-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_tpfa params.input -Problem.Name test_1p_tpfa") + +dune_add_test(NAME test_1p_mpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTestCCMpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_mpfa-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_mpfa params.input -Problem.Name test_1p_mpfa") + +dune_add_test(NAME test_1p_box + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTestBox + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_box-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_box-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_box params.input -Problem.Name test_1p_box") + +dune_add_test(NAME test_1p_forchheimer_tpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTestCCTpfa FORCHHEIMER=1 + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_forchheimer_tpfa-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_forchheimer_tpfa-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_forchheimer_tpfa params_forchheimer.input -Problem.Name test_1p_forchheimer_tpfa" + --zeroThreshold {"velocity_liq \(m/s\)":1e-12}) + +# a gstat test (becaue it's a random permeability field we can't test against a reference solution) +dune_add_test(NAME test_1p_gstat + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTestCCTpfa + CMAKE_GUARD HAVE_GSTAT) + +#install sources +install(FILES +problem.hh +spatialparams.hh +main.cc +DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/implicit/1p) diff --git a/test/porousmediumflow/1p/implicit/control.gstat b/test/porousmediumflow/1p/implicit/isothermal/control.gstat similarity index 100% rename from test/porousmediumflow/1p/implicit/control.gstat rename to test/porousmediumflow/1p/implicit/isothermal/control.gstat diff --git a/test/porousmediumflow/1p/implicit/test_1pfv.cc b/test/porousmediumflow/1p/implicit/isothermal/main.cc similarity index 99% rename from test/porousmediumflow/1p/implicit/test_1pfv.cc rename to test/porousmediumflow/1p/implicit/isothermal/main.cc index 1a388afcb8..a7c48ad33d 100644 --- a/test/porousmediumflow/1p/implicit/test_1pfv.cc +++ b/test/porousmediumflow/1p/implicit/isothermal/main.cc @@ -32,7 +32,7 @@ #include #include -#include "1ptestproblem.hh" +#include "problem.hh" #include #include diff --git a/test/porousmediumflow/1p/implicit/test_1pfv.input b/test/porousmediumflow/1p/implicit/isothermal/params.input similarity index 100% rename from test/porousmediumflow/1p/implicit/test_1pfv.input rename to test/porousmediumflow/1p/implicit/isothermal/params.input diff --git a/test/porousmediumflow/1p/implicit/test_1pforchheimercctpfa.input b/test/porousmediumflow/1p/implicit/isothermal/params_forchheimer.input similarity index 100% rename from test/porousmediumflow/1p/implicit/test_1pforchheimercctpfa.input rename to test/porousmediumflow/1p/implicit/isothermal/params_forchheimer.input diff --git a/test/porousmediumflow/1p/implicit/test_1pwithgstat.input b/test/porousmediumflow/1p/implicit/isothermal/params_gstat.input similarity index 100% rename from test/porousmediumflow/1p/implicit/test_1pwithgstat.input rename to test/porousmediumflow/1p/implicit/isothermal/params_gstat.input diff --git a/test/porousmediumflow/1p/implicit/1ptestproblem.hh b/test/porousmediumflow/1p/implicit/isothermal/problem.hh similarity index 99% rename from test/porousmediumflow/1p/implicit/1ptestproblem.hh rename to test/porousmediumflow/1p/implicit/isothermal/problem.hh index 405c9c309d..335ede7091 100644 --- a/test/porousmediumflow/1p/implicit/1ptestproblem.hh +++ b/test/porousmediumflow/1p/implicit/isothermal/problem.hh @@ -35,7 +35,7 @@ #include #include -#include "1ptestspatialparams.hh" +#include "spatialparams.hh" #if FORCHHEIMER #include diff --git a/test/porousmediumflow/1p/implicit/1ptestspatialparams.hh b/test/porousmediumflow/1p/implicit/isothermal/spatialparams.hh similarity index 100% rename from test/porousmediumflow/1p/implicit/1ptestspatialparams.hh rename to test/porousmediumflow/1p/implicit/isothermal/spatialparams.hh diff --git a/test/porousmediumflow/1p/implicit/network1d3d/CMakeLists.txt b/test/porousmediumflow/1p/implicit/network1d3d/CMakeLists.txt new file mode 100644 index 0000000000..4f1b1f82c5 --- /dev/null +++ b/test/porousmediumflow/1p/implicit/network1d3d/CMakeLists.txt @@ -0,0 +1,27 @@ +add_input_file_links() +add_gstat_file_links() + +dune_symlink_to_source_files(FILES grids) +dune_symlink_to_source_files(FILES "convergencetest.py") + +# dim < dimWorld tests with Dune::Foamgrid<1,3> +dune_add_test(NAME test_1p_network1d3d_tpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=TubesTestCCTpfa + CMAKE_GUARD dune-foamgrid_FOUND + COMMAND ./convergencetest.py + CMD_ARGS test_1p_network1d3d_tpfa params.input -Problem.Name test_1p_network1d3d_tpfa) + +dune_add_test(NAME test_1p_network1d3d_box + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=TubesTestBox + CMAKE_GUARD dune-foamgrid_FOUND + COMMAND ./convergencetest.py + CMD_ARGS test_1p_network1d3d_box params.input -Problem.Name test_1p_network1d3d_box) + +#install sources +install(FILES +problem.hh +spatialparams.hh +main.cc +DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/implicit/1p) diff --git a/test/porousmediumflow/1p/implicit/tubesconvergencetest.py b/test/porousmediumflow/1p/implicit/network1d3d/convergencetest.py similarity index 100% rename from test/porousmediumflow/1p/implicit/tubesconvergencetest.py rename to test/porousmediumflow/1p/implicit/network1d3d/convergencetest.py diff --git a/test/porousmediumflow/1p/implicit/grids/network1d3d.msh b/test/porousmediumflow/1p/implicit/network1d3d/grids/network1d3d.msh similarity index 100% rename from test/porousmediumflow/1p/implicit/grids/network1d3d.msh rename to test/porousmediumflow/1p/implicit/network1d3d/grids/network1d3d.msh diff --git a/test/porousmediumflow/1p/implicit/test_1pfv_network1d3d.cc b/test/porousmediumflow/1p/implicit/network1d3d/main.cc similarity index 99% rename from test/porousmediumflow/1p/implicit/test_1pfv_network1d3d.cc rename to test/porousmediumflow/1p/implicit/network1d3d/main.cc index 3b3f754d6f..13f8e325de 100644 --- a/test/porousmediumflow/1p/implicit/test_1pfv_network1d3d.cc +++ b/test/porousmediumflow/1p/implicit/network1d3d/main.cc @@ -32,7 +32,7 @@ #include #include -#include "tubesproblem.hh" +#include "problem.hh" #include #include diff --git a/test/porousmediumflow/1p/implicit/test_1pfv_network1d3d.input b/test/porousmediumflow/1p/implicit/network1d3d/params.input similarity index 100% rename from test/porousmediumflow/1p/implicit/test_1pfv_network1d3d.input rename to test/porousmediumflow/1p/implicit/network1d3d/params.input diff --git a/test/porousmediumflow/1p/implicit/tubesproblem.hh b/test/porousmediumflow/1p/implicit/network1d3d/problem.hh similarity index 99% rename from test/porousmediumflow/1p/implicit/tubesproblem.hh rename to test/porousmediumflow/1p/implicit/network1d3d/problem.hh index e5ce4389df..fe96367b9d 100644 --- a/test/porousmediumflow/1p/implicit/tubesproblem.hh +++ b/test/porousmediumflow/1p/implicit/network1d3d/problem.hh @@ -42,7 +42,7 @@ #include #include -#include "tubesspatialparams.hh" +#include "spatialparams.hh" namespace Dumux { diff --git a/test/porousmediumflow/1p/implicit/tubesspatialparams.hh b/test/porousmediumflow/1p/implicit/network1d3d/spatialparams.hh similarity index 100% rename from test/porousmediumflow/1p/implicit/tubesspatialparams.hh rename to test/porousmediumflow/1p/implicit/network1d3d/spatialparams.hh diff --git a/test/porousmediumflow/1p/implicit/nonisothermal/CMakeLists.txt b/test/porousmediumflow/1p/implicit/nonisothermal/CMakeLists.txt new file mode 100644 index 0000000000..5d8b7df888 --- /dev/null +++ b/test/porousmediumflow/1p/implicit/nonisothermal/CMakeLists.txt @@ -0,0 +1,73 @@ +add_input_file_links() + + +# non-isothermal tests +dune_add_test(NAME test_1pni_conduction_box + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePNIConductionBox + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1pni_conduction_box-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1pni_conduction_box-00005.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pni_conduction_box params_conduction.input -Problem.Name test_1pni_conduction_box" + --zeroThreshold {"velocity_liq":1e-8}) + +add_executable(test_1pni_convection_box EXCLUDE_FROM_ALL main.cc) +target_compile_definitions(test_1pni_convection_box PUBLIC TYPETAG=OnePNIConvectionBox) + +dune_add_test(NAME test_1pni_convection_box + TARGET test_1pni_convection_box + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1pni_convection_box-reference.vtp + ${CMAKE_CURRENT_BINARY_DIR}/test_1pni_convection_box-00009.vtp + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pni_convection_box params_convection.input -Problem.Name test_1pni_convection_box" + --zeroThreshold {"velocity":1e-15}) + +dune_add_test(NAME test_1pni_convection_box_restart + TARGET test_1pni_convection_box + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1pni_convection_box-reference.vtp + ${CMAKE_CURRENT_BINARY_DIR}/test_1pni_convection_box_restart-00004.vtp + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pni_convection_box params_convection.input -Problem.Name test_1pni_convection_box_restart -TimeLoop.DtInitial 1000 -Restart.Time 16768 -Restart.File test_1pni_convection_box-00006.vtp" + --zeroThreshold {"velocity":1e-15}) + +# the restart test has to run after the test that produces the corresponding vtu file +set_tests_properties(test_1pni_convection_box_restart PROPERTIES DEPENDS test_1pni_convection_box) + +dune_add_test(NAME test_1pni_conduction_tpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePNIConductionCCTpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1pni_conduction_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1pni_conduction_tpfa-00005.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pni_conduction_tpfa params_conduction.input -Problem.Name test_1pni_conduction_tpfa" + --zeroThreshold {"velocity":1e-8}) + +dune_add_test(NAME test_1pni_convection_tpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePNIConvectionCCTpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1pni_convection_cc-reference.vtp + ${CMAKE_CURRENT_BINARY_DIR}/test_1pni_convection_tpfa-00009.vtp + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pni_convection_tpfa params_convection.input -Problem.Name test_1pni_convection_tpfa") + +dune_add_test(NAME test_1pni_conduction_mpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePNIConductionCCMpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1pni_conduction_mpfa-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1pni_conduction_mpfa-00005.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pni_conduction_mpfa params_conduction.input -Problem.Name test_1pni_conduction_mpfa") + +#install sources +install(FILES +problem_conduction.hh +problem_convection.hh +spatialparams.hh +main.cc +DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/implicit/1p) diff --git a/test/porousmediumflow/1p/implicit/test_1pnifv.cc b/test/porousmediumflow/1p/implicit/nonisothermal/main.cc similarity index 99% rename from test/porousmediumflow/1p/implicit/test_1pnifv.cc rename to test/porousmediumflow/1p/implicit/nonisothermal/main.cc index 2009502d47..12b1db81c1 100644 --- a/test/porousmediumflow/1p/implicit/test_1pnifv.cc +++ b/test/porousmediumflow/1p/implicit/nonisothermal/main.cc @@ -32,8 +32,8 @@ #include #include -#include "1pniconductionproblem.hh" -#include "1pniconvectionproblem.hh" +#include "problem_conduction.hh" +#include "problem_convection.hh" #include #include diff --git a/test/porousmediumflow/1p/implicit/test_1pnifv_conduction.input b/test/porousmediumflow/1p/implicit/nonisothermal/params_conduction.input similarity index 100% rename from test/porousmediumflow/1p/implicit/test_1pnifv_conduction.input rename to test/porousmediumflow/1p/implicit/nonisothermal/params_conduction.input diff --git a/test/porousmediumflow/1p/implicit/test_1pnifv_convection.input b/test/porousmediumflow/1p/implicit/nonisothermal/params_convection.input similarity index 100% rename from test/porousmediumflow/1p/implicit/test_1pnifv_convection.input rename to test/porousmediumflow/1p/implicit/nonisothermal/params_convection.input diff --git a/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh b/test/porousmediumflow/1p/implicit/nonisothermal/problem_conduction.hh similarity index 99% rename from test/porousmediumflow/1p/implicit/1pniconductionproblem.hh rename to test/porousmediumflow/1p/implicit/nonisothermal/problem_conduction.hh index b766e32dd1..bdab5ed666 100644 --- a/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh +++ b/test/porousmediumflow/1p/implicit/nonisothermal/problem_conduction.hh @@ -39,7 +39,7 @@ #include #include -#include "1pnispatialparams.hh" +#include "spatialparams.hh" namespace Dumux { diff --git a/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh b/test/porousmediumflow/1p/implicit/nonisothermal/problem_convection.hh similarity index 99% rename from test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh rename to test/porousmediumflow/1p/implicit/nonisothermal/problem_convection.hh index d0c22c6f24..39b39b89f5 100644 --- a/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh +++ b/test/porousmediumflow/1p/implicit/nonisothermal/problem_convection.hh @@ -38,7 +38,7 @@ #include #include #include -#include "1pnispatialparams.hh" +#include "spatialparams.hh" namespace Dumux { diff --git a/test/porousmediumflow/1p/implicit/1pnispatialparams.hh b/test/porousmediumflow/1p/implicit/nonisothermal/spatialparams.hh similarity index 100% rename from test/porousmediumflow/1p/implicit/1pnispatialparams.hh rename to test/porousmediumflow/1p/implicit/nonisothermal/spatialparams.hh diff --git a/test/porousmediumflow/1p/implicit/periodicbc/CMakeLists.txt b/test/porousmediumflow/1p/implicit/periodicbc/CMakeLists.txt index 4681b65a4b..bffd888926 100644 --- a/test/porousmediumflow/1p/implicit/periodicbc/CMakeLists.txt +++ b/test/porousmediumflow/1p/implicit/periodicbc/CMakeLists.txt @@ -1,10 +1,10 @@ -dune_symlink_to_source_files(FILES "test_1p.input" "periodic.dgf") +dune_symlink_to_source_files(FILES "params.input" "periodic.dgf") set(CMAKE_BUILD_TYPE Release) # test using periodic boundary conditions dune_add_test(NAME test_1p_periodic_tpfa - SOURCES test_1pfv.cc + SOURCES main.cc COMPILE_DEFINITIONS TYPETAG=OnePIncompressibleTpfa FVGEOMCACHING=false CMAKE_GUARD dune-spgrid_FOUND COMPILE_ONLY) @@ -14,9 +14,9 @@ dune_add_test(NAME test_1p_periodic_tpfa_sequential CMAKE_GUARD dune-spgrid_FOUND COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/test-1p-tpfa-periodic-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/test_1p_tpfa-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_periodic_tpfa test_1p.input -Problem.Name test_1p_tpfa") + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_tpfa_periodic-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_periodic_tpfa_sequential-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_periodic_tpfa params.input -Problem.Name test_1p_periodic_tpfa_sequential") dune_add_test(NAME test_1p_periodic_tpfa_parallel TARGET test_1p_periodic_tpfa @@ -24,26 +24,26 @@ dune_add_test(NAME test_1p_periodic_tpfa_parallel COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --zeroThreshold {"process rank":100} - --files ${CMAKE_SOURCE_DIR}/test/references/test-1p-tpfa-periodic-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/s0002-test_1p_tpfa_parallel-00001.pvtu - --command "${MPIEXEC} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_1p_periodic_tpfa test_1p.input -Problem.Name test_1p_tpfa_parallel") + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_tpfa_periodic-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/s0002-test_1p_periodic_tpfa_parallel-00001.pvtu + --command "${MPIEXEC} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_1p_periodic_tpfa params.input -Problem.Name test_1p_periodic_tpfa_parallel") dune_add_test(NAME test_1p_periodic_tpfa_caching - SOURCES test_1pfv.cc + SOURCES main.cc COMPILE_DEFINITIONS TYPETAG=OnePIncompressibleTpfa FVGEOMCACHING=true CMAKE_GUARD dune-spgrid_FOUND COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/test-1p-tpfa-periodic-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/test_1p_tpfa_caching-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_periodic_tpfa test_1p.input -Problem.Name test_1p_tpfa_caching") + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_tpfa_periodic-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_periodic_tpfa_caching-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_periodic_tpfa params.input -Problem.Name test_1p_periodic_tpfa_caching") dune_add_test(NAME test_1p_periodic_box - SOURCES test_1pfv.cc + SOURCES main.cc COMPILE_DEFINITIONS TYPETAG=OnePIncompressibleBox CMAKE_GUARD dune-spgrid_FOUND COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/test-1p-box-periodic-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/test_1p_box-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_periodic_box test_1p.input -Problem.Name test_1p_box") + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_box_periodic-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_periodic_box-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_periodic_box params.input -Problem.Name test_1p_periodic_box") diff --git a/test/porousmediumflow/1p/implicit/periodicbc/test_1pfv.cc b/test/porousmediumflow/1p/implicit/periodicbc/main.cc similarity index 100% rename from test/porousmediumflow/1p/implicit/periodicbc/test_1pfv.cc rename to test/porousmediumflow/1p/implicit/periodicbc/main.cc diff --git a/test/porousmediumflow/1p/implicit/periodicbc/test_1p.input b/test/porousmediumflow/1p/implicit/periodicbc/params.input similarity index 100% rename from test/porousmediumflow/1p/implicit/periodicbc/test_1p.input rename to test/porousmediumflow/1p/implicit/periodicbc/params.input diff --git a/test/porousmediumflow/1p/implicit/pointsources/CMakeLists.txt b/test/porousmediumflow/1p/implicit/pointsources/CMakeLists.txt index cdf4c7cea8..ef57bf2c78 100644 --- a/test/porousmediumflow/1p/implicit/pointsources/CMakeLists.txt +++ b/test/porousmediumflow/1p/implicit/pointsources/CMakeLists.txt @@ -1,38 +1,2 @@ -add_input_file_links() - -dune_add_test(NAME test_1pcctpfa_pointsources - SOURCES test_1pfv_pointsources.cc - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - COMPILE_DEFINITIONS TYPETAG=OnePSingularityCCTpfa - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1psingularitycc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pcctpfa_singularity-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pcctpfa_pointsources test_1pfv_pointsources.input -Problem.Name 1pcctpfa_singularity") - -dune_add_test(NAME test_1pcctpfa_pointsources_timedependent - SOURCES test_1pfv_pointsources_timedependent.cc - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - COMPILE_DEFINITIONS TYPETAG=OnePSingularityTimeDependentCCTpfa - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1psingularitycctimedependent-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pcctpfa_singularity_timedependent-00003.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pcctpfa_pointsources_timedependent test_1pfv_pointsources.input -TimeLoop.TEnd 4 -Problem.Name 1pcctpfa_singularity_timedependent") - -dune_add_test(NAME test_1pbox_pointsources - SOURCES test_1pfv_pointsources.cc - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - COMPILE_DEFINITIONS TYPETAG=OnePSingularityBox - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1psingularitybox-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pbox_singularity-00001.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pbox_pointsources test_1pfv_pointsources.input -Problem.Name 1pbox_singularity") - - -#install sources -install(FILES -1psingularityproblem.hh -1psingularityproblemtimedependent.hh -1psingularityspatialparams.hh -test_1p_pointsources.cc -test_1p_pointsources_timedependent.cc -DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/porousmediumflow/1p/implicit/pointsources) +add_subdirectory(timeindependent) +add_subdirectory(timedependent) diff --git a/test/porousmediumflow/1p/implicit/pointsources/1psingularityspatialparams.hh b/test/porousmediumflow/1p/implicit/pointsources/spatialparams.hh similarity index 100% rename from test/porousmediumflow/1p/implicit/pointsources/1psingularityspatialparams.hh rename to test/porousmediumflow/1p/implicit/pointsources/spatialparams.hh diff --git a/test/porousmediumflow/1p/implicit/pointsources/timedependent/CMakeLists.txt b/test/porousmediumflow/1p/implicit/pointsources/timedependent/CMakeLists.txt new file mode 100644 index 0000000000..689ebf913a --- /dev/null +++ b/test/porousmediumflow/1p/implicit/pointsources/timedependent/CMakeLists.txt @@ -0,0 +1,18 @@ +add_input_file_links("params.input") + +dune_add_test(NAME test_1p_pointsources_timedependent_tpfa + SOURCES main.cc + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + COMPILE_DEFINITIONS TYPETAG=OnePSingularityTimeDependentCCTpfa + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_pointsources_timedependent_tpfa-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_pointsources_timedependent_tpfa-00003.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_pointsources_timedependent_tpfa params.input -TimeLoop.TEnd 4 + -Problem.Name test_1p_pointsources_timedependent_tpfa") + +#install sources +install(FILES +problem.hh +../spatialparams.hh +main.cc +DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/porousmediumflow/1p/implicit/pointsources) diff --git a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources_timedependent.cc b/test/porousmediumflow/1p/implicit/pointsources/timedependent/main.cc similarity index 99% rename from test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources_timedependent.cc rename to test/porousmediumflow/1p/implicit/pointsources/timedependent/main.cc index 319ada366a..436099b51b 100644 --- a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources_timedependent.cc +++ b/test/porousmediumflow/1p/implicit/pointsources/timedependent/main.cc @@ -32,7 +32,7 @@ #include #include -#include "1psingularityproblemtimedependent.hh" +#include "problem.hh" #include #include diff --git a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.input b/test/porousmediumflow/1p/implicit/pointsources/timedependent/params.input similarity index 100% rename from test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.input rename to test/porousmediumflow/1p/implicit/pointsources/timedependent/params.input diff --git a/test/porousmediumflow/1p/implicit/pointsources/1psingularityproblemtimedependent.hh b/test/porousmediumflow/1p/implicit/pointsources/timedependent/problem.hh similarity index 99% rename from test/porousmediumflow/1p/implicit/pointsources/1psingularityproblemtimedependent.hh rename to test/porousmediumflow/1p/implicit/pointsources/timedependent/problem.hh index 068de8038f..aeecb34c26 100644 --- a/test/porousmediumflow/1p/implicit/pointsources/1psingularityproblemtimedependent.hh +++ b/test/porousmediumflow/1p/implicit/pointsources/timedependent/problem.hh @@ -25,7 +25,7 @@ #ifndef DUMUX_1P_SINGULARITY_TIME_DEP_PROBLEM_HH #define DUMUX_1P_SINGULARITY_TIME_DEP_PROBLEM_HH -#include "1psingularityproblem.hh" +#include "../timeindependent/problem.hh" namespace Dumux { diff --git a/test/porousmediumflow/1p/implicit/pointsources/timeindependent/CMakeLists.txt b/test/porousmediumflow/1p/implicit/pointsources/timeindependent/CMakeLists.txt new file mode 100644 index 0000000000..4360055d0d --- /dev/null +++ b/test/porousmediumflow/1p/implicit/pointsources/timeindependent/CMakeLists.txt @@ -0,0 +1,27 @@ +add_input_file_links("params.input") + +dune_add_test(NAME test_1p_pointsources_timeindependent_tpfa + SOURCES main.cc + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + COMPILE_DEFINITIONS TYPETAG=OnePSingularityCCTpfa + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_pointsources_timeindependent_cc-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_pointsources_timeindependent_tpfa-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_pointsources_timeindependent_tpfa params.input -Problem.Name test_1p_pointsources_timeindependent_tpfa") + +dune_add_test(NAME test_1p_pointsources_timeindependent_box + SOURCES main.cc + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + COMPILE_DEFINITIONS TYPETAG=OnePSingularityBox + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p_pointsources_timeindependent_box-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p_pointsources_timeindependent_box-00001.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p_pointsources_timeindependent_box params.input -Problem.Name test_1p_pointsources_timeindependent_box") + + +#install sources +install(FILES +problem.hh +../spatialparams.hh +main.cc +DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/porousmediumflow/1p/implicit/pointsources) diff --git a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.cc b/test/porousmediumflow/1p/implicit/pointsources/timeindependent/main.cc similarity index 99% rename from test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.cc rename to test/porousmediumflow/1p/implicit/pointsources/timeindependent/main.cc index e509f4dc7e..5bb2eb901e 100644 --- a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.cc +++ b/test/porousmediumflow/1p/implicit/pointsources/timeindependent/main.cc @@ -32,7 +32,7 @@ #include #include -#include "1psingularityproblem.hh" +#include "problem.hh" #include #include diff --git a/test/porousmediumflow/1p/implicit/pointsources/timeindependent/params.input b/test/porousmediumflow/1p/implicit/pointsources/timeindependent/params.input new file mode 100644 index 0000000000..e19a25b1c3 --- /dev/null +++ b/test/porousmediumflow/1p/implicit/pointsources/timeindependent/params.input @@ -0,0 +1,16 @@ +[TimeLoop] +DtInitial = 1 # [s] +TEnd = 1 # [s] + +[Grid] +LowerLeft = -1 -1 +UpperRight = 1 1 +Cells = 100 100 + +[Problem] +Name = 1pfv_singularity +EnableGravity = false + +[SpatialParams] +Permeability = 1e-10 # [m^2] +Porosity = 0.3 diff --git a/test/porousmediumflow/1p/implicit/pointsources/1psingularityproblem.hh b/test/porousmediumflow/1p/implicit/pointsources/timeindependent/problem.hh similarity index 99% rename from test/porousmediumflow/1p/implicit/pointsources/1psingularityproblem.hh rename to test/porousmediumflow/1p/implicit/pointsources/timeindependent/problem.hh index b176c52cc9..419624f066 100644 --- a/test/porousmediumflow/1p/implicit/pointsources/1psingularityproblem.hh +++ b/test/porousmediumflow/1p/implicit/pointsources/timeindependent/problem.hh @@ -34,7 +34,7 @@ #include #include -#include "1psingularityspatialparams.hh" +#include "../spatialparams.hh" namespace Dumux { diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/CMakeLists.txt b/test/porousmediumflow/1pnc/implicit/1p2c/CMakeLists.txt new file mode 100644 index 0000000000..bc7eb9a410 --- /dev/null +++ b/test/porousmediumflow/1pnc/implicit/1p2c/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(isothermal) +add_subdirectory(nonisothermal) diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/CMakeLists.txt b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/CMakeLists.txt new file mode 100644 index 0000000000..ee3957a22c --- /dev/null +++ b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/CMakeLists.txt @@ -0,0 +1,34 @@ +add_subdirectory(saltwaterintrusion) + +add_input_file_links() + +dune_add_test(NAME test_1p2c_transport_box + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTwoCTestBox + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2c_transport_box-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p2c_transport_box-00009.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2c_transport_box params.input -Problem.Name test_1p2c_transport_box" + --zeroThreshold {"velocity_liq \(m/s\)_1":1e-15}) + +dune_add_test(NAME test_1p2c_transport_tpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTwoCTestCCTpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2c_transport_tpfa-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p2c_transport_tpfa-00009.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2c_transport_tpfa params.input -Problem.Name test_1p2c_transport_tpfa" + --zeroThreshold {"velocity_liq \(m/s\)_1":1e-15}) + +#Note: The mpfa model does not support velocity output yet. We therefore deactivate it for the test and use a copy of the tpfa reference +# solution where the velocities have been removed. +dune_add_test(NAME test_1p2c_transport_mpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTwoCTestCCMpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2c_transport_mpfa-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p2c_transport_mpfa-00009.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2c_transport_mpfa params.input -Problem.Name test_1p2c_transport_mpfa -Vtk.AddVelocity false") diff --git a/test/porousmediumflow/1pnc/implicit/test_1p2c_fv.cc b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/main.cc similarity index 99% rename from test/porousmediumflow/1pnc/implicit/test_1p2c_fv.cc rename to test/porousmediumflow/1pnc/implicit/1p2c/isothermal/main.cc index d6eccc18a8..36284d306c 100644 --- a/test/porousmediumflow/1pnc/implicit/test_1p2c_fv.cc +++ b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/main.cc @@ -23,9 +23,6 @@ */ #include -#include "1p2ctestproblem.hh" -#include "saltwaterintrusionproblem.hh" - #include #include @@ -50,6 +47,8 @@ #include #include +#include "problem.hh" + int main(int argc, char** argv) try { using namespace Dumux; diff --git a/test/porousmediumflow/1pnc/implicit/test_1p2c_fv.input b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/params.input similarity index 100% rename from test/porousmediumflow/1pnc/implicit/test_1p2c_fv.input rename to test/porousmediumflow/1pnc/implicit/1p2c/isothermal/params.input diff --git a/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/problem.hh similarity index 99% rename from test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh rename to test/porousmediumflow/1pnc/implicit/1p2c/isothermal/problem.hh index 481b968d35..4fd7b1675e 100644 --- a/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh +++ b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/problem.hh @@ -41,7 +41,7 @@ #include #include -#include "1pnctestspatialparams.hh" +#include "../spatialparams.hh" namespace Dumux { diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/CMakeLists.txt b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/CMakeLists.txt new file mode 100644 index 0000000000..934b5e4c7d --- /dev/null +++ b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/CMakeLists.txt @@ -0,0 +1,11 @@ +add_input_file_links() + +# salt-water intrusion test using the box model +dune_add_test(NAME test_1p2c_saltwaterintrusion_box + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=SaltWaterIntrusionTest + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2c_saltwaterintrusion_box-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p2c_saltwaterintrusion_box-00035.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2c_saltwaterintrusion_box params.input -Problem.Name test_1p2c_saltwaterintrusion_box") diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/main.cc b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/main.cc new file mode 100644 index 0000000000..96b0af2464 --- /dev/null +++ b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/main.cc @@ -0,0 +1,198 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + *****************************************************************************/ +/*! + * \file + * + * \brief salt water intrusion test for the 1pnc model + */ +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include + +#include "problem.hh" + +int main(int argc, char** argv) try +{ + using namespace Dumux; + + // define the type tag for this problem + using TypeTag = TTAG(TYPETAG); + + //////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////// + + // initialize MPI, finalize is done automatically on exit + const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + + // print dumux start message + if (mpiHelper.rank() == 0) + DumuxMessage::print(/*firstCall=*/true); + + // initialize parameter tree + Parameters::init(argc, argv); + + ////////////////////////////////////////////////////////////////////// + // try to create a grid (from the given grid file or the input file) + ///////////////////////////////////////////////////////////////////// + + GridManager gridManager; + gridManager.init(); + + //////////////////////////////////////////////////////////// + // run instationary non-linear problem on this grid + //////////////////////////////////////////////////////////// + + // we compute on the leaf grid view + const auto& leafGridView = gridManager.grid().leafGridView(); + + // create the finite volume grid geometry + using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); + auto fvGridGeometry = std::make_shared(leafGridView); + fvGridGeometry->update(); + + // the problem (initial and boundary conditions) + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + auto problem = std::make_shared(fvGridGeometry); + + // the solution vector + using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); + SolutionVector x(fvGridGeometry->numDofs()); + problem->applyInitialSolution(x); + auto xOld = x; + + // the grid variables + using GridVariables = typename GET_PROP_TYPE(TypeTag, GridVariables); + auto gridVariables = std::make_shared(problem, fvGridGeometry); + gridVariables->init(x, xOld); + + // get some time loop parameters + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + auto tEnd = getParam("TimeLoop.TEnd"); + auto dt = getParam("TimeLoop.DtInitial"); + auto maxDt = getParam("TimeLoop.MaxTimeStepSize"); + + // intialize the vtk output module + VtkOutputModule vtkWriter(*gridVariables, x, problem->name()); + using VelocityOutput = typename GET_PROP_TYPE(TypeTag, VelocityOutput); + vtkWriter.addVelocityOutput(std::make_shared(*gridVariables)); + using VtkOutputFields = typename GET_PROP_TYPE(TypeTag, VtkOutputFields); + VtkOutputFields::init(vtkWriter); //!< Add model specific output fields + vtkWriter.write(0.0); + + // instantiate time loop + auto timeLoop = std::make_shared>(0.0, dt, tEnd); + timeLoop->setMaxTimeStepSize(maxDt); + + // the assembler with time loop for instationary problem + using Assembler = FVAssembler; + auto assembler = std::make_shared(problem, fvGridGeometry, gridVariables, timeLoop); + + // the linear solver + using LinearSolver = ILU0BiCGSTABBackend; + auto linearSolver = std::make_shared(); + + // the non-linear solver + NewtonSolver nonLinearSolver(assembler, linearSolver); + + // time loop + timeLoop->start(); do + { + // set previous solution for storage evaluations + assembler->setPreviousSolution(xOld); + + // solve the non-linear system with time step control + nonLinearSolver.solve(x, *timeLoop); + + // make the new solution the old solution + xOld = x; + gridVariables->advanceTimeStep(); + + // advance to the time loop to the next step + timeLoop->advanceTimeStep(); + + // write vtk output + vtkWriter.write(timeLoop->time()); + + // report statistics of this time step + timeLoop->reportTimeStep(); + + // set new dt as suggested by the newton solver + timeLoop->setTimeStepSize(nonLinearSolver.suggestTimeStepSize(timeLoop->timeStepSize())); + + } while (!timeLoop->finished()); + + timeLoop->finalize(leafGridView.comm()); + + //////////////////////////////////////////////////////////// + // finalize, print dumux message to say goodbye + //////////////////////////////////////////////////////////// + + // print dumux end message + if (mpiHelper.rank() == 0) + DumuxMessage::print(/*firstCall=*/false); + + return 0; +} + +catch (Dumux::ParameterException &e) +{ + std::cerr << std::endl << e << " ---> Abort!" << std::endl; + return 1; +} +catch (Dune::DGFException & e) +{ + std::cerr << "DGF exception thrown (" << e << + "). Most likely, the DGF file name is wrong " + "or the DGF file is corrupted, " + "e.g. missing hash at end of file or wrong number (dimensions) of entries." + << " ---> Abort!" << std::endl; + return 2; +} +catch (Dune::Exception &e) +{ + std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl; + return 3; +} +catch (...) +{ + std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl; + return 4; +} diff --git a/test/porousmediumflow/1pnc/implicit/saltwaterintrusion.input b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/params.input similarity index 100% rename from test/porousmediumflow/1pnc/implicit/saltwaterintrusion.input rename to test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/params.input diff --git a/test/porousmediumflow/1pnc/implicit/saltwaterintrusionproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/problem.hh similarity index 99% rename from test/porousmediumflow/1pnc/implicit/saltwaterintrusionproblem.hh rename to test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/problem.hh index f6719c9437..de7c7abb85 100644 --- a/test/porousmediumflow/1pnc/implicit/saltwaterintrusionproblem.hh +++ b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/problem.hh @@ -30,7 +30,7 @@ #include #include -#include "1pnctestspatialparams.hh" +#include "../../spatialparams.hh" namespace Dumux { diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/CMakeLists.txt b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/CMakeLists.txt new file mode 100644 index 0000000000..4b0f16da4a --- /dev/null +++ b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory("conduction") +add_subdirectory("convection") diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/CMakeLists.txt b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/CMakeLists.txt new file mode 100644 index 0000000000..f544a71266 --- /dev/null +++ b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/CMakeLists.txt @@ -0,0 +1,34 @@ +add_input_file_links() + +# non-isothermal tests +# conduction +dune_add_test(NAME test_1p2cni_conduction_box + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTwoCNIConductionBox + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2cni_conduction_box-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_box-00005.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_box params.input -Problem.Name test_1p2cni_conduction_box" + --zeroThreshold {"velocity_liq \(m/s\)":1e-9}) + +dune_add_test(NAME test_1p2cni_conduction_tpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTwoCNIConductionCCTpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2cni_conduction_tpfa-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_tpfa-00005.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_tpfa params.input -Problem.Name test_1p2cni_conduction_tpfa" + --zeroThreshold {"velocity_liq \(m/s\)_0":1e-9}) + +#Note: The mpfa model does not support velocity output yet. We therefore deactivate it for the test and use a copy of the tpfa reference +# solution where the velocities have been removed. +dune_add_test(NAME test_1p2cni_conduction_mpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTwoCNIConductionCCMpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2cni_conduction_mpfa-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_mpfa-00005.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_mpfa params.input -Problem.Name test_1p2cni_conduction_mpfa -Vtk.AddVelocity false") diff --git a/test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.cc b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/main.cc similarity index 99% rename from test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.cc rename to test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/main.cc index 0f5f7d2acc..c44ef1b241 100644 --- a/test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.cc +++ b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/main.cc @@ -23,7 +23,7 @@ */ #include -#include "1p2cniconductionproblem.hh" +#include "problem.hh" #include #include diff --git a/test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.input b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/params.input similarity index 100% rename from test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.input rename to test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/params.input diff --git a/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/problem.hh similarity index 99% rename from test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh rename to test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/problem.hh index 8bd884e077..7f57305929 100644 --- a/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh +++ b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/problem.hh @@ -40,7 +40,7 @@ #include #include #include -#include "1pnctestspatialparams.hh" +#include "../../spatialparams.hh" namespace Dumux { diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/CMakeLists.txt b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/CMakeLists.txt new file mode 100644 index 0000000000..0050a0e832 --- /dev/null +++ b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/CMakeLists.txt @@ -0,0 +1,34 @@ +add_input_file_links() + +# non-isothermal tests +# convection +dune_add_test(NAME test_1p2cni_convection_box + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTwoCNIConvectionBox + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2cni_convection_box-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_box-00009.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_box params.input -Problem.Name test_1p2cni_convection_box" + --zeroThreshold {"velocity_liq \(m/s\)":1e-9}) + +dune_add_test(NAME test_1p2cni_convection_tpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTwoCNIConvectionCCTpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2cni_convection_tpfa-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_tpfa-00009.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_tpfa params.input -Problem.Name test_1p2cni_convection_tpfa" + --zeroThreshold {"velocity_liq \(m/s\)_0":1e-9}) + +#Note: The mpfa model does not support velocity output yet. We therefore deactivate it for the test and use a copy of the tpfa reference +# solution where the velocities have been removed. +dune_add_test(NAME test_1p2cni_convection_mpfa + SOURCES main.cc + COMPILE_DEFINITIONS TYPETAG=OnePTwoCNIConvectionCCMpfa + COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py + CMD_ARGS --script fuzzy + --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2cni_convection_mpfa-reference.vtu + ${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_mpfa-00009.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_mpfa params.input -Problem.Name test_1p2cni_convection_mpfa -Vtk.AddVelocity false") diff --git a/test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.cc b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/main.cc similarity index 99% rename from test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.cc rename to test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/main.cc index 5cb98b4f12..006fb5db9a 100644 --- a/test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.cc +++ b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/main.cc @@ -23,7 +23,7 @@ */ #include -#include "1p2cniconvectionproblem.hh" +#include "problem.hh" #include #include diff --git a/test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.input b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/params.input similarity index 100% rename from test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.input rename to test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/params.input diff --git a/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/problem.hh similarity index 99% rename from test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh rename to test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/problem.hh index cbc8923486..31fed542e6 100644 --- a/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh +++ b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/convection/problem.hh @@ -40,7 +40,7 @@ #include #include #include -#include "1pnctestspatialparams.hh" +#include "../../spatialparams.hh" namespace Dumux { diff --git a/test/porousmediumflow/1pnc/implicit/1pnctestspatialparams.hh b/test/porousmediumflow/1pnc/implicit/1p2c/spatialparams.hh similarity index 100% rename from test/porousmediumflow/1pnc/implicit/1pnctestspatialparams.hh rename to test/porousmediumflow/1pnc/implicit/1p2c/spatialparams.hh diff --git a/test/porousmediumflow/1pnc/implicit/CMakeLists.txt b/test/porousmediumflow/1pnc/implicit/CMakeLists.txt index b7b381b6e8..ec7ae9628b 100644 --- a/test/porousmediumflow/1pnc/implicit/CMakeLists.txt +++ b/test/porousmediumflow/1pnc/implicit/CMakeLists.txt @@ -1,107 +1 @@ -add_input_file_links() - -dune_add_test(NAME test_1p2c_box - SOURCES test_1p2c_fv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTwoCTestBox - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/outflowbox-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pnctestbox-00009.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2c_box test_1p2c_fv.input -Problem.Name 1pnctestbox" - --zeroThreshold {"velocity_liq \(m/s\)_1":1e-15}) - -dune_add_test(NAME test_1p2c_tpfa - SOURCES test_1p2c_fv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTwoCTestCCTpfa - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1p2ctestcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pnctest_tpfa-00009.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2c_tpfa test_1p2c_fv.input -Problem.Name 1pnctest_tpfa" - --zeroThreshold {"velocity_liq \(m/s\)_1":1e-15}) - -#Note: The mpfa model does not support velocity output yet. We therefore deactivate it for the test and use a copy of the tpfa reference -# solution where the velocities have been removed. -dune_add_test(NAME test_1p2c_mpfa - SOURCES test_1p2c_fv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTwoCTestCCMpfa - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1p2ctestmpfa-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1pnctest_mpfa-00009.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2c_mpfa test_1p2c_fv.input -Problem.Name 1pnctest_mpfa -Vtk.AddVelocity false") - -# salt-water intrusion test using the box model -dune_add_test(NAME test_saltwaterintrusion_box - SOURCES test_1p2c_fv.cc - COMPILE_DEFINITIONS TYPETAG=SaltWaterIntrusionTest - COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - CMD_ARGS --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/saltwaterintrusion-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/saltwaterintrusion-00035.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_saltwaterintrusion_box saltwaterintrusion.input") - -# non-isothermal tests -# conduction -dune_add_test(NAME test_1p2cni_conduction_box - SOURCES test_1p2cni_conduction_fv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTwoCNIConductionBox - 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-00005.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_box test_1p2cni_conduction_fv.input -Problem.Name 1p2cni_conductiontest_box" - --zeroThreshold {"velocity_liq \(m/s\)":1e-9}) - -dune_add_test(NAME test_1p2cni_conduction_tpfa - SOURCES test_1p2cni_conduction_fv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTwoCNIConductionCCTpfa - 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-00005.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_tpfa test_1p2cni_conduction_fv.input -Problem.Name 1p2cni_conductiontest_tpfa" - --zeroThreshold {"velocity_liq \(m/s\)_0":1e-9}) - -#Note: The mpfa model does not support velocity output yet. We therefore deactivate it for the test and use a copy of the tpfa reference -# solution where the velocities have been removed. -dune_add_test(NAME test_1p2cni_conduction_mpfa - SOURCES test_1p2cni_conduction_fv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTwoCNIConductionCCMpfa - 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-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 -dune_add_test(NAME test_1p2cni_convection_box - SOURCES test_1p2cni_convection_fv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTwoCNIConvectionBox - 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-00009.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_box test_1p2cni_convection_fv.input -Problem.Name 1p2cni_convectiontest_box" - --zeroThreshold {"velocity_liq \(m/s\)":1e-9}) - -dune_add_test(NAME test_1p2cni_convection_tpfa - SOURCES test_1p2cni_convection_fv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTwoCNIConvectionCCTpfa - 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-00009.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_tpfa test_1p2cni_convection_fv.input -Problem.Name 1p2cni_convectiontest_tpfa" - --zeroThreshold {"velocity_liq \(m/s\)_0":1e-9}) - -#Note: The mpfa model does not support velocity output yet. We therefore deactivate it for the test and use a copy of the tpfa reference -# solution where the velocities have been removed. -dune_add_test(NAME test_1p2cni_convection_mpfa - SOURCES test_1p2cni_convection_fv.cc - COMPILE_DEFINITIONS TYPETAG=OnePTwoCNIConvectionCCMpfa - 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-00009.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_mpfa test_1p2cni_convection_fv.input -Problem.Name 1p2cni_convectiontest_mpfa -Vtk.AddVelocity false") +add_subdirectory(1p2c) diff --git a/test/references/saltwaterintrusion-reference.vtu b/test/references/test_1p2c_saltwaterintrusion_box-reference.vtu similarity index 100% rename from test/references/saltwaterintrusion-reference.vtu rename to test/references/test_1p2c_saltwaterintrusion_box-reference.vtu diff --git a/test/references/outflowbox-reference.vtu b/test/references/test_1p2c_transport_box-reference.vtu similarity index 100% rename from test/references/outflowbox-reference.vtu rename to test/references/test_1p2c_transport_box-reference.vtu diff --git a/test/references/1p2ctestmpfa-reference.vtu b/test/references/test_1p2c_transport_mpfa-reference.vtu similarity index 100% rename from test/references/1p2ctestmpfa-reference.vtu rename to test/references/test_1p2c_transport_mpfa-reference.vtu diff --git a/test/references/1p2ctestcc-reference.vtu b/test/references/test_1p2c_transport_tpfa-reference.vtu similarity index 100% rename from test/references/1p2ctestcc-reference.vtu rename to test/references/test_1p2c_transport_tpfa-reference.vtu diff --git a/test/references/1p2cniboxconduction-reference.vtu b/test/references/test_1p2cni_conduction_box-reference.vtu similarity index 100% rename from test/references/1p2cniboxconduction-reference.vtu rename to test/references/test_1p2cni_conduction_box-reference.vtu diff --git a/test/references/1p2cniccmpfaconduction-reference.vtu b/test/references/test_1p2cni_conduction_mpfa-reference.vtu similarity index 100% rename from test/references/1p2cniccmpfaconduction-reference.vtu rename to test/references/test_1p2cni_conduction_mpfa-reference.vtu diff --git a/test/references/1p2cniccconduction-reference.vtu b/test/references/test_1p2cni_conduction_tpfa-reference.vtu similarity index 100% rename from test/references/1p2cniccconduction-reference.vtu rename to test/references/test_1p2cni_conduction_tpfa-reference.vtu diff --git a/test/references/1p2cniboxconvection-reference.vtu b/test/references/test_1p2cni_convection_box-reference.vtu similarity index 100% rename from test/references/1p2cniboxconvection-reference.vtu rename to test/references/test_1p2cni_convection_box-reference.vtu diff --git a/test/references/1p2cniccmpfaconvection-reference.vtu b/test/references/test_1p2cni_convection_mpfa-reference.vtu similarity index 100% rename from test/references/1p2cniccmpfaconvection-reference.vtu rename to test/references/test_1p2cni_convection_mpfa-reference.vtu diff --git a/test/references/1p2cniccconvection-reference.vtu b/test/references/test_1p2cni_convection_tpfa-reference.vtu similarity index 100% rename from test/references/1p2cniccconvection-reference.vtu rename to test/references/test_1p2cni_convection_tpfa-reference.vtu diff --git a/test/references/1ptestbox-reference.vtu b/test/references/test_1p_box-reference.vtu similarity index 100% rename from test/references/1ptestbox-reference.vtu rename to test/references/test_1p_box-reference.vtu diff --git a/test/references/test-1p-box-periodic-reference.vtu b/test/references/test_1p_box_periodic-reference.vtu similarity index 100% rename from test/references/test-1p-box-periodic-reference.vtu rename to test/references/test_1p_box_periodic-reference.vtu diff --git a/test/references/1ptestcc-reference.vtu b/test/references/test_1p_cc-reference.vtu similarity index 100% rename from test/references/1ptestcc-reference.vtu rename to test/references/test_1p_cc-reference.vtu diff --git a/test/references/1pforchheimercctpfa.vtu b/test/references/test_1p_forchheimer_tpfa-reference.vtu similarity index 100% rename from test/references/1pforchheimercctpfa.vtu rename to test/references/test_1p_forchheimer_tpfa-reference.vtu diff --git a/test/references/1pboxfracture2d3d-reference.vtu b/test/references/test_1p_fracture2d3d_box-reference.vtu similarity index 100% rename from test/references/1pboxfracture2d3d-reference.vtu rename to test/references/test_1p_fracture2d3d_box-reference.vtu diff --git a/test/references/1pccfracture2d3d-reference.vtu b/test/references/test_1p_fracture2d3d_cc-reference.vtu similarity index 100% rename from test/references/1pccfracture2d3d-reference.vtu rename to test/references/test_1p_fracture2d3d_cc-reference.vtu diff --git a/test/references/1psingularitycctimedependent-reference.vtu b/test/references/test_1p_pointsources_timedependent_tpfa-reference.vtu similarity index 100% rename from test/references/1psingularitycctimedependent-reference.vtu rename to test/references/test_1p_pointsources_timedependent_tpfa-reference.vtu diff --git a/test/references/1psingularitybox-reference.vtu b/test/references/test_1p_pointsources_timeindependent_box-reference.vtu similarity index 100% rename from test/references/1psingularitybox-reference.vtu rename to test/references/test_1p_pointsources_timeindependent_box-reference.vtu diff --git a/test/references/1psingularitycc-reference.vtu b/test/references/test_1p_pointsources_timeindependent_cc-reference.vtu similarity index 100% rename from test/references/1psingularitycc-reference.vtu rename to test/references/test_1p_pointsources_timeindependent_cc-reference.vtu diff --git a/test/references/test-1p-tpfa-periodic-reference.vtu b/test/references/test_1p_tpfa_periodic-reference.vtu similarity index 100% rename from test/references/test-1p-tpfa-periodic-reference.vtu rename to test/references/test_1p_tpfa_periodic-reference.vtu diff --git a/test/references/1pniboxconduction-reference.vtu b/test/references/test_1pni_conduction_box-reference.vtu similarity index 100% rename from test/references/1pniboxconduction-reference.vtu rename to test/references/test_1pni_conduction_box-reference.vtu diff --git a/test/references/1pniccconduction-reference.vtu b/test/references/test_1pni_conduction_cc-reference.vtu similarity index 100% rename from test/references/1pniccconduction-reference.vtu rename to test/references/test_1pni_conduction_cc-reference.vtu diff --git a/test/references/ccmpfa1pniconduction-reference.vtu b/test/references/test_1pni_conduction_mpfa-reference.vtu similarity index 100% rename from test/references/ccmpfa1pniconduction-reference.vtu rename to test/references/test_1pni_conduction_mpfa-reference.vtu diff --git a/test/references/1pniboxconvection-reference.vtp b/test/references/test_1pni_convection_box-reference.vtp similarity index 100% rename from test/references/1pniboxconvection-reference.vtp rename to test/references/test_1pni_convection_box-reference.vtp diff --git a/test/references/1pniccconvection-reference.vtp b/test/references/test_1pni_convection_cc-reference.vtp similarity index 100% rename from test/references/1pniccconvection-reference.vtp rename to test/references/test_1pni_convection_cc-reference.vtp -- GitLab From 3aa915a8b4ea60b8857ee14632097a83a44b8107 Mon Sep 17 00:00:00 2001 From: Ned Coltman Date: Mon, 12 Nov 2018 18:48:56 +0100 Subject: [PATCH 2/2] [Cleanup][PorousMediaFlow][1p] Gstat test CMake adjustments --- test/porousmediumflow/1p/implicit/isothermal/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/porousmediumflow/1p/implicit/isothermal/CMakeLists.txt b/test/porousmediumflow/1p/implicit/isothermal/CMakeLists.txt index e77e5f3a5e..5ca26d62a3 100644 --- a/test/porousmediumflow/1p/implicit/isothermal/CMakeLists.txt +++ b/test/porousmediumflow/1p/implicit/isothermal/CMakeLists.txt @@ -44,7 +44,9 @@ dune_add_test(NAME test_1p_forchheimer_tpfa dune_add_test(NAME test_1p_gstat SOURCES main.cc COMPILE_DEFINITIONS TYPETAG=OnePTestCCTpfa - CMAKE_GUARD HAVE_GSTAT) + CMAKE_GUARD HAVE_GSTAT + COMMAND ./test_1p_gstat + CMD_ARGS params_gstat.input) #install sources install(FILES -- GitLab