1
# Copyright (C) 2005 Garth N. Wells.
2
# Licensed under the GNU LGPL Version 2.1.
4
# The linearised bilinear form a(v, U) and linear form L(v) for
5
# the nonlinear equation - div (1+u^2) grad u = f
7
# Compile this form with FFC: ffc -l dolfin NonlinearPoisson.form.
9
element = FiniteElement("Lagrange", "triangle", 1)
11
v = TestFunction(element)
12
u = TrialFunction(element)
15
a = v.dx(i)*(1.0 + U*U)*u.dx(i)*dx + v.dx(i)*(2.0*U*u)*U.dx(i)*dx
16
L = v.dx(i)*(1.0 + U*U)*U.dx(i)*dx - v*f*dx