Debian Codegraph @

demo/undocumented/multimesh-3d/cpp/MultiMeshH10Norm.ufl

raw
1 #from L2Norm import *
2
3 #M = l2norm(triangle)
4
5 from ufl_legacy import *
6
7 ORDER = 1
8
9 domain = triangle
10
11 # Define element and FE solution
12 P1 = FiniteElement("Lagrange", domain, ORDER)
13 uh = Coefficient(P1)
14
15 # Exact solution
16 P3 = FiniteElement("Lagrange", domain, ORDER + 2)
17 u = Coefficient(P3)
18
19 # Squared L2 norm of error
20 M = inner(grad(u - uh), grad(u - uh))*dX