ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #00852
Re: inverting constants
Anders Logg wrote:
On Tue, Jan 23, 2007 at 02:25:55PM -0600, Garth N. Wells wrote:
I used to be able to invert constants in a FFC file, but this now
returns an error. Has something changed?
Probably so... could you give an example?
element = FiniteElement("Vector Lagrange", "tetrahedron", 1)
v = TestFunction(element) # test function
U = TrialFunction(element) # trial function
E = Constant()
nu = Constant()
mu = E / (2*(1 + nu))
lmbda = E*nu / ((1 + nu) * (1 - 2*nu))
def epsilon(v):
return 0.5 * (grad(v) + transp(grad(v)))
def sigma(v):
return 2*mu*epsilon(v) + lmbda*mult(trace(epsilon(v)),
Identity(len(v)))
a = dot(grad(v), sigma(U))*dx
Garth
/Anders
_______________________________________________
FFC-dev mailing list
FFC-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/ffc-dev
Follow ups
References