Skip to content
Snippets Groups Projects
Commit 4654506a authored by René Heß's avatar René Heß
Browse files

Add mini and ufl for opcount example

parent 89f04352
No related branches found
No related tags found
No related merge requests found
__name = opcount_poisson_dg_symdiff
cells = 32 32
extension = 1. 1.
[wrapper.vtkcompare]
name = {__name}
extension = vtu
[formcompiler]
exact_solution_expression = g
compare_dofs = 1e-1
compare_l2errorsquared = 1e-4
opcounter = 1
\ No newline at end of file
cell = "quadrilateral"
f = Expression("return -2.0*x.size();", cell=cell)
g = Expression("return x.two_norm2();", on_intersection=True, cell=cell)
V = FiniteElement("DG", cell, 1)
u = TrialFunction(V)
v = TestFunction(V)
n = FacetNormal(cell)('+')
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 \
+ gamma*u*v*ds \
- theta*u*inner(grad(v), n)*ds \
- f*v*dx \
+ theta*g*inner(grad(v), n)*ds \
- gamma*g*v*ds
forms = [r]
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