On Thu, Nov 26, 2009 at 11:07:20PM +0000, Garth N. Wells wrote: > > > Anders Logg wrote: > > On Thu, Nov 26, 2009 at 10:55:14PM +0000, Garth N. Wells wrote: > >> > >> [email protected] wrote: > >>> ------------------------------------------------------------ > >>> revno: 4323 > >>> committer: Anders Logg <[email protected]> > >>> branch nick: dolfin-dev > >>> timestamp: Thu 2009-11-26 11:15:01 +0100 > >>> message: > >>> Use Lagrange as default element instead of quadrature for expressions. > >> > >> I thought that we agreed that this is a bad idea. > >> > >> Garth > > > > I don't see why it is such a bad idea. Either we approximate a > > coefficient by interpolating it into a finite element space or we > > evaluate it at quadrature points. Just two different approaches to > > approximation. > > > > We discussed this a few days ago and agreed that it's not good.
I don't remember why I agreed really. I keep getting back to thinking it's not that bad. :-) > How should the order be chosen? The order can be chosen to preserve the order of approximation, for which it is enough to take the degree to be the same as that for the test and trial functions. This is what we do in bench/fem/convergence which shows the expected convergence rates for degree 1-5 (but I haven't checked in a while). > All the finite element codes that > I'm aware of would evaluate an Expression at quadrature points, so > that's what most users would expect. DOLFIN has been interpolating to a FEM space for the last 5 years and that has worked fine... :-) > > Besides, it's the only thing that currently works because of the bug > > in the quadrature code generation that I wasn't able to fix. > > > > That's a different motivation ;). Yes, this is why I changed. > > The choice of element is controlled by the variable named "Family" in > > the function _auto_select_element_from_shape in expression.py. > > > > We can make this a global parameter and set the default tor > > "Quadrature" once it works, > > I'm happy is "Quadrature" is the default, but if it's not the default > will we ever get around to fixing it? I think Kristian is looking into it. In the meantime, we can go ahead and update all the demos and prepare for a release. This is a bug in FFC, not DOLFIN, and it doesn't change the interface. We might also want to make some cleanups in expression.py. There are still a bunch of references to function spaces which should not be there anymore. -- Anders
signature.asc
Description: Digital signature
_______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

