From a90d44a4e35c5b334c430111b7949771ac3fe6e7 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Tue, 24 Oct 2017 06:36:28 +0200 Subject: [PATCH] [PL/SourceTerms] Add tests for source term impl. The reference files are created with the analytical solution. For the special setup with a dirac source term at position xi, eta the following analytical solution in 2 dimensions is valid: u(x,y) = ln(sqrt((x-xi)^2+(y-eta)^2))/(2 * Pi) --- ProcessLib/GroundwaterFlow/Tests.cmake | 103 +++++++++++++++++++++++++ Tests/Data | 2 +- 2 files changed, 104 insertions(+), 1 deletion(-) diff --git a/ProcessLib/GroundwaterFlow/Tests.cmake b/ProcessLib/GroundwaterFlow/Tests.cmake index ff7582f71d5..3b06c66ad4c 100644 --- a/ProcessLib/GroundwaterFlow/Tests.cmake +++ b/ProcessLib/GroundwaterFlow/Tests.cmake @@ -597,3 +597,106 @@ AddTest( DIFF_DATA expected_dirichlet_nonuniform_pcs_0_ts_1_t_1.000000.vtu dirichlet_nonuniform_pcs_0_ts_1_t_1.000000.vtu pressure pressure ) + +# tests for nodal source term implementation +# For the special setup with a dirac source term at position (xi, eta) the +# analytical solution in 2 dimensions is valid: +# u(x,y) = ln(sqrt((x-xi)^2+(y-eta)^2))/(2 * Pi) +AddTest( + NAME GroundWaterFlowProcess_NodalSourceTerm_circle_1e1 + PATH Elliptic/circle_radius_1 + EXECUTABLE ogs + EXECUTABLE_ARGS circle_1e1_axi.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI) + ABSTOL 0.7 RELTOL 1e-16 + DIFF_DATA + line_1_lines_1e1_expected.vtu circle_1e1_axi_pcs_0_ts_1_t_1.000000.vtu analytical_solution pressure + VIS circle_1e1_axi_pcs_0_ts_1_t_1.000000.vtu +) + +AddTest( + NAME GroundWaterFlowProcess_NodalSourceTerm_circle_1e2 + PATH Elliptic/circle_radius_1 + EXECUTABLE ogs + EXECUTABLE_ARGS circle_1e2_axi.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI) + ABSTOL 1.1 RELTOL 1e-16 + DIFF_DATA + line_1_lines_1e2_expected.vtu circle_1e2_axi_pcs_0_ts_1_t_1.000000.vtu analytical_solution pressure + VIS circle_1e2_axi_pcs_0_ts_1_t_1.000000.vtu +) + +AddTest( + NAME GroundWaterFlowProcess_NodalSourceTerm_circle_1e3 + PATH Elliptic/circle_radius_1 + EXECUTABLE ogs + EXECUTABLE_ARGS circle_1e3_axi.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI) + ABSTOL 1.6 RELTOL 1e-16 + DIFF_DATA + line_1_lines_1e3_expected.vtu circle_1e3_axi_pcs_0_ts_1_t_1.000000.vtu analytical_solution pressure + VIS circle_1e3_axi_pcs_0_ts_1_t_1.000000.vtu +) + +AddTest( + NAME GroundWaterFlowProcess_NodalSourceTerm_circle_1e4 + PATH Elliptic/circle_radius_1 + EXECUTABLE ogs + EXECUTABLE_ARGS circle_1e4_axi.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI) + ABSTOL 1.8 RELTOL 1e-16 + DIFF_DATA + line_1_lines_1e4_expected.vtu circle_1e4_axi_pcs_0_ts_1_t_1.000000.vtu analytical_solution pressure + VIS circle_1e4_axi_pcs_0_ts_1_t_1.000000.vtu +) + +AddTest( + NAME LARGE_GroundWaterFlowProcess_NodalSourceTerm_circle_1e5 + PATH Elliptic/circle_radius_1 + EXECUTABLE ogs + EXECUTABLE_ARGS circle_1e5_axi.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI) + ABSTOL 2.15 RELTOL 1e-16 + DIFF_DATA + line_1_lines_1e5_expected.vtu circle_1e5_axi_pcs_0_ts_1_t_1.000000.vtu analytical_solution pressure + VIS circle_1e5_axi_pcs_0_ts_1_t_1.000000.vtu +) + +AddTest( + NAME LARGE_GroundWaterFlowProcess_NodalSourceTerm_circle_1e6 + PATH Elliptic/circle_radius_1 + EXECUTABLE ogs + EXECUTABLE_ARGS circle_1e6_axi.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI) + ABSTOL 2.52 RELTOL 1e-16 + DIFF_DATA + line_1_lines_1e6_expected.vtu circle_1e6_axi_pcs_0_ts_1_t_1.000000.vtu analytical_solution pressure + VIS circle_1e6_axi_pcs_0_ts_1_t_1.000000.vtu +) + +AddTest( + NAME LARGE_GroundWaterFlowProcess_NodalSourceTerm_square_1e6 + PATH Elliptic/square_1x1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS square_1e6_with_nodal_sources.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI) + ABSTOL 1.41 RELTOL 1e-16 + DIFF_DATA + square_1x1_quad_1e6_nodal_sources_expected.vtu square_1e6_pcs_0_ts_1_t_1.000000.vtu analytical_solution pressure + VIS square_1e6_pcs_0_ts_1_t_1.000000.vtu +) + diff --git a/Tests/Data b/Tests/Data index a9f0365e2ac..7637c697eaf 160000 --- a/Tests/Data +++ b/Tests/Data @@ -1 +1 @@ -Subproject commit a9f0365e2ac73714892c4b6c103af93b4141d8bf +Subproject commit 7637c697eaf8c3e49f43977406e041dad69854d6 -- GitLab