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. > Do you take into accout derivatives, e.g. for > > w*dot(grad(v), grad(u))*dx > > would w be of the same order as v and u, or one order lower? Yes, derivatives are taken into account, but that's maybe not what we want. In the above case, the results will be q = 1 for w coming from max((1, 0, 0)) The 1 comes from the default degree q = 1 used when estimating the max degree for a form with an unknown coefficient. Perhaps we should not look at derivatives at all when selecting the quadrature degree? -- Anders > Garth > > > Here are some use cases: > > > > 1. v*f*dx > > > > If v is an element of degree q, then the degree for the approximation > > of f is set to q. > > > > For quadrature elements, this means thatd we get a quadrature error in > > the integral of order q + 1 which in many cases is the same as the > > convergence of the finite element method. > > > > For Lagrange elements, we get an interpolation error when > > approximating f of degree q + 1 so the situation is the same. > > > > 2. v*f*g*dx > > > > Same as above here if f and g have unspecified degrees. But if f or g > > should happen to have a degree higher than q, than that degree will be > > used for the other coefficient if unspecified. > > > > I'll go ahead and make this change in FFC. It's rather easy to change > > the strategy and FFC is being very verbose about the choices it makes, > > at least until we have settled on an acceptable strategy. > > > >
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

