# Copyright (c) 2005 Johan Jansson (johanjan@math.chalmers.se) # Licensed under the GNU LGPL Version 2.1 # # Modified by Anders Logg 2006-2007 # Modified by Garth N. Wells 2008 # # First added: 2005 # Last changed: 2008-09-12 # # The bilinear form for classical linear elasticity (Navier). # Compile this form with FFC: ffc -l dolfin Elasticity.form. element = VectorElement("Lagrange", "tetrahedron", 1) v = TestFunction(element) u = TrialFunction(element) f = Coefficient(element) mu = Constant("tetrahedron") lmbda = Constant("tetrahedron") def epsilon(v): return 0.5*(grad(v) + grad(v).T) def sigma(v): return 2.0*mu*epsilon(v) + lmbda*tr(epsilon(v))*Identity(v.cell().d) a = inner(epsilon(v), sigma(u))*dx L = inner(v, f)*dx