On Fri, Jan 29, 2010 at 09:22:51PM +0100, Kristian Oelgaard wrote: > > > On 29 January 2010 21:12, Anders Logg <[email protected]> wrote: > >On Fri, Jan 29, 2010 at 09:08:44PM +0100, Kristian Oelgaard wrote: > >> > >> > >>On 29 January 2010 20:21, Anders Logg <[email protected]> wrote: > >>>On Fri, Jan 29, 2010 at 04:13:13PM +0100, Kristian Oelgaard wrote: > >>>>I think it is almost there, but we need to rethink the way we > >>>>manipulate the degrees of finite elements and forms, I think we have > >>>>discussed this before but I don't recall if we ever reached a > >>>>conclusion. Try running the QuadratureElement.ufl demo. > >>> > >>>I don't see exactly what the problem is. Is it the automatic degree > >>>selection? > >>> > >>>I've added some more debug output and the following is now printed for > >>>the QuadratureElement demo: > >>> > >>> Found quadrature element(s) with the following degree(s): [3] > >>> Selecting quadrature degree based on quadrature element: 3 > >>> quadrature_degree: auto --> 3 > >>> > >>>That looks correct to me. Shouldn't this result in the same points > >>>being chosen for both the QuadratureElement and the quadrature loop? > >> > >>I see now that it is only a problem for tensor representation. For > >>the linear form the first term v*u*dx makes it a form of degree 4, > >>and tensor representation will use that degree for the entire form > >>if I remember correctly? > > > >Yes, and that's not much of a problem since it happens at compile > >time. > > It is a problem if you try to tabulate a QuadratureElement with the wrong > number of points :) > > >But for the FFC demo the representation is chosen as quadrature since > >it involves quadrature elements, so if it fails it shouldn't be > >related to tensor representation? > > Yes, for the bilinear form, for the linear form tensor is chosen, the degree > is set to 4 and the problems begin. > > File > "/home/oelgaard/software/fenics_branches/dev/ffc/tensor/monomialintegration.py", > line 101, in _init_table > table[(ufl_element, None)] = fiat_element.tabulate(order, points) > File "/home/oelgaard/software/fenics_branches/dev/ffc/mixedelement.py", line > 77, in tabulate > table = element.tabulate(order, points) > File "/home/oelgaard/software/fenics_branches/dev/ffc/quadratureelement.py", > line 104, in tabulate > error("Points must be equal to coordinates of quadrature points") > File "<string>", line 1, in <lambda> > File "/home/oelgaard/software/fenics/ufl/ufl/log.py", line 124, in error > raise UFLException(self._format_raw(*message)) > ufl.log.UFLException: Points must be equal to coordinates of quadrature points > > Kristian
ok, I missed that! The automatic selection of representation should check for quadrature elements and in that case use quadrature. I'll fix it. -- Anders
signature.asc
Description: Digital signature
_______________________________________________ Mailing list: https://launchpad.net/~ffc Post to : [email protected] Unsubscribe : https://launchpad.net/~ffc More help : https://help.launchpad.net/ListHelp

