Looks like a bug in FIAT in DiscontinuousVectorLagrange with q = 0.
This is entity_ids for q = 0:
{0: {0: {}, 1: {}, 2: {}, 3: {}}, 1: {0: {}, 1: {}, 2: {}, 3: {}, 4:
{}, 5: {}}, 2: {0: {}, 1: {}, 2: {}, 3: {}}, 3: {0: [0, 1, 2]}}
This is entity_ids for q = 1:
{0: {0: {}, 1: {}, 2: {}, 3: {}}, 1: {0: {}, 1: {}, 2: {}, 3: {}, 4:
{}, 5: {}}, 2: {0: {}, 1: {}, 2: {}, 3: {}}, 3: {0: [0, 1, 2, 3]}}
Shouldn't the last dictionary should be {0: [0]} for q = 0?
The number of nodes should be 0, not 3. Right?
/Anders
On Sat, Jun 04, 2005 at 11:01:20AM -0500, Anders Logg wrote:
Yes, this seems to be a bug. I will take a look.
/Anders
On Sat, Jun 04, 2005 at 03:54:31PM +0200, Johan Jansson wrote:
Hi!
There seems to be a bug in the dofmap generation for discontinuous
Lagrange elements. What happens is that dofmap() seems to think there
are more dofs than there really are. Consider this form:
# Test form for updated elasticity
name = "ElasticityUpdatedSigma0"
element1 = FiniteElement("Vector Lagrange", "tetrahedron", 1)
element2 = FiniteElement("Discontinuous vector Lagrange",
"tetrahedron", 0)
c1 = Constant() # Lame coefficient
c2 = Constant() # Lame coefficient
q = BasisFunction(element2)
v = Function(element1)
L = ((2 * c1 * v[i].dx(i) * q[0]) +
(c2 * (v[i].dx(0) + v[0].dx(i))) * q[i]) * dx
The generated code looks like this:
...
inline unsigned int spacedim() const
{
return 3;
}
...
void dofmap(int dofs[], const Cell& cell, const Mesh& mesh) const
{
dofs[0] = 3*cell.id() + 0;
dofs[1] = 3*cell.id() + 1;
dofs[2] = 3*cell.id() + 2;
int offset = 3*mesh.noCells();
dofs[3] = offset + 3*cell.id() + 0;
dofs[4] = offset + 3*cell.id() + 1;
dofs[5] = offset + 3*cell.id() + 2;
offset = offset + 3*mesh.noCells();
dofs[6] = offset + 3*cell.id() + 0;
dofs[7] = offset + 3*cell.id() + 1;
dofs[8] = offset + 3*cell.id() + 2;
}
...
For some reason dofmap() seems to think there are 9 dofs on the
element. If I just remove the extra lines, then it works ok.
Johan
_______________________________________________
FFC-dev mailing list
FFC-dev@xxxxxxxxxx
http://www.fenics.org/cgi-bin/mailman/listinfo/ffc-dev
--
Anders Logg
Research Assistant Professor
Toyota Technological Institute at Chicago
http://www.tti-c.org/logg/
_______________________________________________
FIAT-dev mailing list
FIAT-dev@xxxxxxxxxx
http://www.fenics.org/cgi-bin/mailman/listinfo/fiat-dev