← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Use symmetric gradient in variational form in elasticity demo

 



Anders Logg wrote:
On Mon, Sep 15, 2008 at 02:45:58PM +0100, Garth N. Wells wrote:

Anders Logg wrote:
On Mon, Sep 15, 2008 at 11:21:59AM +0100, Garth N. Wells wrote:
DOLFIN wrote:
One or more new changesets pushed to the primary dolfin repository.
A short summary of the last three changesets is included below.

changeset:   4754:23602808c60413cb8faffca818e7a8c04527d3ec
tag:         tip
user:        Anders Logg <logg@xxxxxxxxx>
date:        Sun Sep 14 19:46:40 2008 +0200
files:       demo/pde/elasticity/python/demo.py
description:
Use symmetric gradient in variational form in elasticity demo

In particular reason for this? It is simpler (and still correct) to use the gradient.

Garth
To make the form and the matrix symmetric. I showed the demo to a
friend (in computational mechanics) and he insisted that we replace
grad(v) by epsilon(v).

He's wrong :). When you take the inner product A : B, where B is symmetric, the inner product only 'sees' the symmetric part of A. It's a classic exercise and you can prove it by writing out the indices.

Garth

I don't understand how that makes it wrong. My point (and maybe his)
is that since B is symmetric, we may replace A by its symmetric part
(as you say easy to see by writing out the indices). So, both
epsilon(v) and grad(v) are correct.


They are both correct (I never said they they aren't). Quoting your earlier email

"I showed the demo to a friend (in computational mechanics) and he insisted that we replace grad(v) by epsilon(v)."

which is not correct. We can use grad(v) *or* epsilon(v). Either way, the matrix will be symmetric. grad(v) leads to a slightly small .h file and I would expect is easier for FFC.

Garth





------------------------------------------------------------------------

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev




Follow ups

References