Skip to content
Snippets Groups Projects
Commit a17a6e45 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

adapt 3D tests to at least do something

parent f7d337db
No related branches found
No related tags found
No related merge requests found
......@@ -11,5 +11,3 @@ extension = vtu
[formcompiler]
numerical_jacobian = 0, 1 | expand num
exact_solution_expression = g
compare_l2errorsquared = 5e-7
cell = hexahedron
x = SpatialCoordinate(cell)
g_v = as_vector((4*x[1]*(1.-x[1]), 0.0, 0.0))
g_p = 8*(1.-x[0])
g = (g_v, g_p)
g_v = as_vector((16.*x[1]*(1.-x[1])*x[2]*(1.-x[2]), 0.0, 0.0))
bctype = conditional(x[0] < 1. - 1e-8, 1, 0)
P2 = VectorElement("DG", cell, 2)
......
......@@ -12,5 +12,3 @@ extension = vtu
[formcompiler]
numerical_jacobian = 1, 0 | expand num
exact_solution_expression = g
compare_l2errorsquared = 1e-10
......@@ -2,11 +2,9 @@ cell = hexahedron
x = SpatialCoordinate(cell)
v_bctype = conditional(x[0] < 1. - 1e-8, 1, 0)
g_v = as_vector((4.*x[1]*(1.-x[1]), 0.0, 0.0))
g_p = 8.*(1.-x[0])
g = (g_v, g_p)
g_v = as_vector((16.*x[1]*(1.-x[1])*x[2]*(1.-x[2]), 0.0, 0.0))
P2 = VectorElement("Lagrange", cell, 2, dirichlet_constraints=v_bctype, dirichlet_expression=g_v)
P2 = VectorElement("Lagrange", cell, 2)
P1 = FiniteElement("Lagrange", cell, 1)
TH = P2 * P1
......@@ -16,3 +14,5 @@ u, p = TrialFunctions(TH)
r = (inner(grad(v), grad(u)) - div(v)*p - q*div(u))*dx
forms = [r]
is_dirichlet = v_bctype, v_bctype, v_bctype, 0
dirichlet_expression = g_v, None
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment