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

Enhance testing suite

parent b657096f
No related branches found
No related tags found
No related merge requests found
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());", on_intersection=True)
j = Expression("Dune::FieldVector<double,2> c(0.5); c-= x; double s; if (x[1]>0.5) s=1.; else s=-1.; return -2.*s*(x[1]-0.5)*std::exp(-1.*c.two_norm2());", on_intersection=True)
bctype = Expression("if ((x[1]<1e-8) || (x[1]>1.-1e-8)) return 0; else return 1;", on_intersection=True)
cell = triangle
V = FiniteElement("DG", cell, 1)
u = TrialFunction(V)
v = TestFunction(V)
n = FacetNormal(cell)('+')
ds = ds(subdomain_data=bctype)
gamma = 1.0
theta = 1.0
r = inner(grad(u), grad(v))*dx \
+ inner(n, avg(grad(u)))*jump(v)*dS \
+ gamma*jump(u)*jump(v)*dS \
+ theta*jump(u)*inner(avg(grad(v)), n)*dS \
- inner(n, grad(u))*v*ds(1) \
+ gamma*u*v*ds(1) \
- theta*u*inner(grad(v), n)*ds(1) \
- f*v*dx \
+ theta*g*inner(grad(v), n)*ds(1) \
- gamma*g*v*ds(1) \
- j*v*ds(0)
forms = [r]
__name = poisson_dg_neumann_numdiff
lowerleft = 0.0 0.0
upperright = 1.0 1.0
elements = 32 32
elementType = simplical
[wrapper.vtkcompare]
name = {__name}
reference = poisson_dg_ref
extension = vtu
__name = poisson_dg_neumann_symdiff
lowerleft = 0.0 0.0
upperright = 1.0 1.0
elements = 32 32
elementType = simplical
[wrapper.vtkcompare]
name = {__name}
reference = poisson_dg_ref
extension = vtu
__name = poisson_dg_symdiff
lowerleft = 0.0 0.0
upperright = 1.0 1.0
elements = 32 32
elementType = simplical
[wrapper.vtkcompare]
name = {__name}
reference = poisson_dg_ref
extension = vtu
......@@ -2,3 +2,7 @@ add_generated_executable(UFLFILE stokes.ufl
TARGET stokes_numdiff
FORM_COMPILER_ARGS --numerical-jacobian
)
dune_add_system_test(TARGET stokes_numdiff
INIFILE stokes_numdiff.mini
)
__name = stokes_numdiff
lowerleft = 0.0 0.0
upperright = 1.0 1.0
elements = 4 4
elementType = simplical
printmatrix = true
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