Debian Codegraph @

demo/undocumented/meshview-3D2D/cpp/MeshView_3D2D.ufl

raw
1 from ufl_legacy import (Cell, Coefficient, dx, FiniteElement,
2 inner, grad,
3 tetrahedron, TestFunction, TrialFunction)
4
5 triangleIn3D = Cell("triangle", 3)
6 V1 = FiniteElement("Lagrange", tetrahedron, 1)
7 V2 = FiniteElement("Lagrange", triangleIn3D, 1)
8
9 u1 = TrialFunction(V1)
10 v1 = TestFunction(V1)
11 f1 = Coefficient(V1)
12
13 u2 = TrialFunction(V2)
14 v2 = TestFunction(V2)
15 f2 = Coefficient(V2)
16
17 a00 = inner(grad(u1), grad(v1))*dx
18 a11 = inner(grad(u2), grad(v2))*dx
19 L0 = f1*v1*dx
20 L1 = f2*v2*dx
21
22 forms = [a00, a11, L0, L1]