1
# Copyright (C) 2005 Garth N. Wells.
2
# Licensed under the GNU LGPL Version 2.1.
4
# Modified by Harish Narayanan, 2009.
6
# The linearised bilinear form a(v, U) and linear form L(v) for
7
# the nonlinear equation - div (1+u^2) grad u = f
9
# Compile this form with FFC: ffc -l dolfin NonlinearPoisson.form.
11
element = FiniteElement("Lagrange", "triangle", 1)
13
v = TestFunction(element)
14
du = TrialFunction(element)
17
L = inner(grad(v), (1 + u**2)*grad(u))*dx - v*f*dx
18
a = derivative(L, u, du)