Newer
Older
cell = triangle
x = SpatialCoordinate(cell)
I = Identity(2)
A = as_matrix([[x[i]*x[j] + I[i,j] for j in range(2)] for i in range(2)])
g = x[0]**2 + x[1]**2
c = 8.
f = -4.
u = TrialFunction(V)
v = TestFunction(V)
# Test metadata setting of options
dx = dx(metadata={"quadrature_order": 27})
r= (inner(A*grad(u), grad(v)) + c*u*v -f*v)*dx
exact_solution = g
is_dirichlet = 1
interpolate_expression = g