On Tue, Dec 01, 2009 at 10:36:42AM +0000, Garth N. Wells wrote: > > > Anders Logg wrote: > > On Tue, Dec 01, 2009 at 09:41:04AM +0100, Marie Rognes wrote: > >> Anders Logg wrote: > >>> On Tue, Dec 01, 2009 at 09:15:53AM +0100, Marie Rognes wrote: > >>>> Anders Logg wrote: > >>>>> On Mon, Nov 30, 2009 at 11:01:59PM +0000, Garth N. Wells wrote: > >>>>>> Anders Logg wrote: > >>>>>>> We still haven't decided on the correct strategy for choosing the > >>>>>>> degree of an unspecified element. > >>>>>>> > >>>>>>> What we have now looks at the total degree of the form and then sets > >>>>>>> the degree accordingly. This doesn't really work weoull and the reason > >>>>>>> is quite simple: We can't figure out the total degree correctly if we > >>>>>>> don't know the degree of the coefficient. > >>>>>>> > >>>>>>> So my new suggestion is the following. We simply scan all elements in > >>>>>>> the form with specified degrees and set the degree to the maximum > >>>>>>> degree among the elements. > >>>>>>> > >>>>>> Or should it be the maximum degree of the test and trial functions? > >>>>> Yes, that's basically what happens now. It looks at everything that > >>>>> has a degree so it looks at the test and trial functions but also at > >>>>> any coefficients that may happen to have a degree. > >>>>> > >>>>> That's useful for say v*f*g*dx if one of f and g happen to have a > >>>>> degree specified. Then the degree for the other needs to be the same. > >>>>> > >>>> Why? > >>> Since that's how the generated quadrature code works. It loops over > >>> quadrature points for an integrand and then it's useful if everything > >>> in the integrand is evaluated at those points. > >>> > >> Ok. > > > > I have made a new change of the selection strategy. > > > > Does the change in UFL affect the polynomial degree of the integrand as > computed by UFL? I see that it's no longer taking into account > derivatives, so if v and u1 are P1, will UFL tell the form compiler that > > dot(grad(v), grad(u)) > > is zero-order or second-order?
It does now. For the above case, the quadrature degree is chosen to 2*(q - 1) = 2q - 2 = 0 for q = 1 There are still some problems when "Quadrature" is selected instead of "Lagrange" for coefficients, but I need Kristian's help to sort that out. I expect we will need to modify the degree selection further when people start using it. -- Anders > > For quadrature, FFC now looks at the maximum degree of anything in the > > form (including test and trial functions and coefficients). > > > > For tensor representation, FFC first looks at the maximum degree to > > select the degree but then looks at the total degree to select the > > quadrature it uses at compile time. > > > > I think this looks ok now and both FFC and UFL are ready for a new > > release. There's still the bug fix Kristian is working on for using > > quadrature elements for coefficients instead of Lagrange, but we > > don't need to wait with the release. > > > > OK. > > > FFC is still verbose about its selection of degrees so keep an eye on > > what FFC prints during compilation and report any strange behavior. > > > > Yes, good to keep it on initially. > > Garth > > >
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

