ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #00334
Re: - Fix bug in dofmap() for equal order mixed elements [...]
Yes, this is correct. It should be "num alignment". Does this fix the
problem?
I'm compiling a series of test forms (everything in src/demo) and
comparing against previously compiled forms (in src/reference) using
the script scripts/verify everytime I commit, but I should add some
more test cases (in particular higher order) to catch things like
this. I can bump up the order in one of the test cases or if someone
has a .form file that I can include in src/demo send it to me and I'll
make sure that form doesn't break in future versions.
/Anders
On Tue, Sep 27, 2005 at 01:42:25PM +0200, Garth N. Wells wrote:
> In the CVS version of dofmap.py, it looks like line 81 should be
>
> data["num alignment"] += 1
>
> rather than
>
> data["alignment"] += 1
>
> Garth
>
>
>
> Quoting "Garth N. Wells" <g.n.wells@xxxxxxxxxxxxxxx>:
>
> > Quoting ffc@xxxxxxxxxx:
> >
> > > Commit from logg (2005-09-26 17:02 CEST)
> > > ----------------
> > >
> > > - Fix bug in dofmap() for equal order mixed elements
> > > - Add compiler option -d debuglevel
> > >
> >
> > The changes in dofmap.py seem to have broken elements with polynomial order >
> > 2.
> > Things seem fine in v0.2.0. Below is the Poisson.form file and the error
> > message.
> >
> > Garth
> >
> > #----------------------------------------------------
> > element = FiniteElement("Lagrange", "triangle", 3)
> >
> > v = BasisFunction(element)
> > u = BasisFunction(element)
> > f = Function(element)
> >
> > a = dot(grad(u), grad(v))*dx
> > L = f*v*dx
> > #----------------------------------------------------
> >
> > Error message:
> >
> > Traceback (most recent call last):
> > File "/usr/bin/ffc", line 107, in ?
> > main(sys.argv[1:])
> > File "/usr/bin/ffc", line 73, in main
> > execfile(outname, ns)
> > File "Poisson.py", line 29, in ?
> > element = FiniteElement("Lagrange", "triangle", 3)
> > File "/usr/lib/python2.4/site-packages/ffc/compiler/finiteelement.py",
> > line
> > 94, in __init__
> > self.dofmap = DofMap(self)
> > File "/usr/lib/python2.4/site-packages/ffc/compiler/dofmap.py", line 215,
> > in
> > __init__
> > (declarations, data) = compute_dofmap(element, data)
> > File "/usr/lib/python2.4/site-packages/ffc/compiler/dofmap.py", line 174,
> > in
> > compute_dofmap
> > declarations += [write_alignment(num_dims, dim, entity, data)]
> > File "/usr/lib/python2.4/site-packages/ffc/compiler/dofmap.py", line 81,
> > in
> > write_alignment
> > data["alignment"] += 1
> > KeyError: 'alignment'
> >
> >
> >
> >
> > _______________________________________________
> > FFC-dev mailing list
> > FFC-dev@xxxxxxxxxx
> > http://www.fenics.org/cgi-bin/mailman/listinfo/ffc-dev
> >
>
> _______________________________________________
> 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/
Follow ups
References