From 5c5ee465ecfce34b453b61cb664dd8e88e2ff97a Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Wed, 2 Aug 2017 16:53:11 +0200 Subject: [PATCH] Port all scalar non-sumfact tests --- test/heatequation/heatequation.mini | 1 - test/heatequation/heatequation.ufl | 7 +++++-- test/heatequation/heatequation_dg.mini | 1 - test/heatequation/heatequation_dg.ufl | 3 +++ test/nonlinear/nonlinear.mini | 1 - test/nonlinear/nonlinear.ufl | 5 ++++- test/nonlinear/nonlinear_dg.mini | 2 -- test/nonlinear/nonlinear_dg.ufl | 1 + test/nonlinear/nonlinear_dg_matrix_free.mini | 1 - test/nonlinear/nonlinear_matrix_free.mini | 1 - 10 files changed, 13 insertions(+), 10 deletions(-) diff --git a/test/heatequation/heatequation.mini b/test/heatequation/heatequation.mini index b5897d25..6059854e 100644 --- a/test/heatequation/heatequation.mini +++ b/test/heatequation/heatequation.mini @@ -13,7 +13,6 @@ extension = vtu [formcompiler] explicit_time_stepping = 0, 1 | expand scheme -exact_solution_expression = g compare_l2errorsquared = 1e-7 # Disable explicit tests for now diff --git a/test/heatequation/heatequation.ufl b/test/heatequation/heatequation.ufl index b6d3f65c..de1b61ec 100644 --- a/test/heatequation/heatequation.ufl +++ b/test/heatequation/heatequation.ufl @@ -1,11 +1,14 @@ f = Expression("Dune::FieldVector<double,2> c(0.5); c-= x; return 4.*(1.-c.two_norm2())*std::exp(-1.*c.two_norm2());") g = Expression("Dune::FieldVector<double,2> c(0.5); c-= x; return std::exp(-1.*c.two_norm2());") -V = FiniteElement("CG", "triangle", 1, dirichlet_expression=g) +V = FiniteElement("CG", "triangle", 1) u = TrialFunction(V) v = TestFunction(V) mass = (u*v)*dx poisson = (inner(grad(u), grad(v)) - f*v)*dx -forms = [mass, poisson] \ No newline at end of file +forms = [mass, poisson] +dirichlet_expression = g +is_dirichlet = 1 +exact_solution = g \ No newline at end of file diff --git a/test/heatequation/heatequation_dg.mini b/test/heatequation/heatequation_dg.mini index cb5b3ccb..3c21abe6 100644 --- a/test/heatequation/heatequation_dg.mini +++ b/test/heatequation/heatequation_dg.mini @@ -13,7 +13,6 @@ extension = vtu [formcompiler] explicit_time_stepping = 0, 1 | expand scheme -exact_solution_expression = g compare_l2errorsquared = 1e-7 # Disable explicit tests for now diff --git a/test/heatequation/heatequation_dg.ufl b/test/heatequation/heatequation_dg.ufl index 7a558b20..649c4db4 100644 --- a/test/heatequation/heatequation_dg.ufl +++ b/test/heatequation/heatequation_dg.ufl @@ -29,3 +29,6 @@ poisson = inner(grad(u), grad(v))*dx \ mass = (u*v)*dx forms = [mass, poisson] +dirichlet_expression = g +is_dirichlet = 1 +exact_solution = g \ No newline at end of file diff --git a/test/nonlinear/nonlinear.mini b/test/nonlinear/nonlinear.mini index 09c87b1b..26a1231e 100644 --- a/test/nonlinear/nonlinear.mini +++ b/test/nonlinear/nonlinear.mini @@ -11,5 +11,4 @@ reference = nonlinear_ref extension = vtu [formcompiler] -exact_solution_expression = g compare_l2errorsquared = 6e-4 \ No newline at end of file diff --git a/test/nonlinear/nonlinear.ufl b/test/nonlinear/nonlinear.ufl index 06026698..b71ed1da 100644 --- a/test/nonlinear/nonlinear.ufl +++ b/test/nonlinear/nonlinear.ufl @@ -1,10 +1,13 @@ f = Expression("return -4;") g = Expression("return x.two_norm2();") -V = FiniteElement("CG", "triangle", 1, dirichlet_expression=g) +V = FiniteElement("CG", "triangle", 1) u = TrialFunction(V) v = TestFunction(V) r = (inner(grad(u), grad(v)) + u*u*v - f*v)*dx forms = [r] +exact_solution = g +dirichlet_expression = g +is_dirichlet = 1 \ No newline at end of file diff --git a/test/nonlinear/nonlinear_dg.mini b/test/nonlinear/nonlinear_dg.mini index c4b9f2d1..c720dbf5 100644 --- a/test/nonlinear/nonlinear_dg.mini +++ b/test/nonlinear/nonlinear_dg.mini @@ -11,6 +11,4 @@ reference = nonlinear_dg extension = vtu [formcompiler] -exact_solution_expression = g -compare_dofs = 1e-1 compare_l2errorsquared = 6e-4 diff --git a/test/nonlinear/nonlinear_dg.ufl b/test/nonlinear/nonlinear_dg.ufl index 28d9990f..95b1f4f4 100644 --- a/test/nonlinear/nonlinear_dg.ufl +++ b/test/nonlinear/nonlinear_dg.ufl @@ -31,3 +31,4 @@ r = inner(grad(u), grad(v))*dx \ - gamma*g*v*ds forms = [r] +exact_solution = g diff --git a/test/nonlinear/nonlinear_dg_matrix_free.mini b/test/nonlinear/nonlinear_dg_matrix_free.mini index 1c7ea5ed..8a1de684 100644 --- a/test/nonlinear/nonlinear_dg_matrix_free.mini +++ b/test/nonlinear/nonlinear_dg_matrix_free.mini @@ -13,7 +13,6 @@ extension = vtu [formcompiler] numerical_jacobian = 1, 0 | expand num matrix_free = 1 -exact_solution_expression = g compare_l2errorsquared = 5e-3 # Disable numerical methods (not working in PDELab?) diff --git a/test/nonlinear/nonlinear_matrix_free.mini b/test/nonlinear/nonlinear_matrix_free.mini index d7afd07f..644297ab 100644 --- a/test/nonlinear/nonlinear_matrix_free.mini +++ b/test/nonlinear/nonlinear_matrix_free.mini @@ -13,5 +13,4 @@ extension = vtu [formcompiler] numerical_jacobian = 1, 0 | expand num matrix_free = 1 -exact_solution_expression = g compare_l2errorsquared = 6e-4 -- GitLab