dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #16914
[Bug 492208] Re: Symmetric TensorFunctionSpace
Tensor support is more or less untested and requires thorough
examination of UFL, FFC and DOLFIN. See
https://blueprints.launchpad.net/ffc/+spec/tensor-functions
It's unlikely that we'll accept a patch at this stage without unit tests
and demos since a thorough code review is necessary.
It would be helpful if you could supply a simple test program. We can
add it to the sandbox as a test case which can be targeted.
--
Symmetric TensorFunctionSpace
https://bugs.launchpad.net/bugs/492208
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
Status in DOLFIN: Won't Fix
Bug description:
Dolfin ver. 0.9.2:
Creating of a function space with symmetric tensor fails.
Minimal example:
====
from dolfin import *
mesh = UnitSquare(3,3)
S = TensorFunctionSpace(mesh, "CG", 1, symmetry=True)
====
Workaround:
====
from dolfin import *
mesh = UnitSquare(3,3)
dim = 2
symmetry = dict( ((i,j), (j,i)) for i in range(dim) for j in range(dim) if i > j )
S = TensorFunctionSpace(mesh, "CG", 1, symmetry=symmetry)
====
The reason is that in dolfin/functionspace.py:297, TensorFunctionSpace.__init__ already sets the shape and then ufl/finiteelement.py, TensorElement.__init__ doesn't know how to handle the symmetry=Yes
Fix:
Deleting lines 296-299 in dolfin/functionspace.py:
====
# Create subspaces
if shape == None:
dim = mesh.topology().dim()
shape = (dim,dim)
====
Another (additional) possibilty is, if TensorElement.__init__ would also handle symmetry=Yes for arbitrary quadratic shapes.
References