← Back to team overview

ffc team mailing list archive

Re: FFC vs. SFC

 

I implemented the Grundmann-Möller rules for some general dimensional FEM
stuff a while back.  My observations were along these lines also.  The other
issue is that they are not going to behave as nicely against some arbitrary
function; I forget exactly how the lebesgue constants work out, but it isn't
necessarily as good as the conical rules. The conical rules also tended to
win at low-order in 2D; it was 3D and above where the more elegant rules
tended to win.

My previous declaration that this should be done got stuck in an FFC/FIAT
limbo.

- Peter

On Tue, Jun 22, 2010 at 11:18 AM, Andy Ray Terrel <aterrel@xxxxxxxxxxxx>wrote:

> On Tue, Jun 22, 2010 at 10:31 AM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
> >
> >
> > On 22/06/10 07:05, Andy Ray Terrel wrote:
> >>
> >> On Tue, Jun 22, 2010 at 6:15 AM, Anders Logg<logg@xxxxxxxxx>  wrote:
> >>>
> >>> On Tue, Jun 22, 2010 at 01:04:27PM +0200, Kristian Oelgaard wrote:
> >>>>
> >>>> On 21 June 2010 23:16, Kent Andre<kent-and@xxxxxxxxx>  wrote:
> >>>>>
> >>>>> Strange. I used dorsal to compile the dev versions of the various
> >>>>> packages. Dolfin, ffc, and sfc are only a few days old.
> >>>>>
> >>>>> But do you have any suggestions for how to optimize the FFC generated
> >>>>> code ? I have used quadrature here, tensor representation is not good
> >>>>> in this application.
> >>>>
> >>>> I had a look at the generated code from FFC and SyFi
> >>>> (which by the way is a real pain when PyDOLFIN is involved)
> >>>>
> >>>> and realised that your comparison is not fair.
> >>>> FFC uses the UFL algorithm estimate_total_polynomial_degree() to
> >>>> compute the quadrature_degree.
> >>>> SFC uses (in this case) the UFL algorithm estimate_quadrature_degree()
> >>>> which is less conservative.
> >>>>
> >>>> This results in FFC using 25 integration points to compute the
> >>>> integral while SFC just uses 3.
> >>>>
> >>>> If you use the option:
> >>>>
> >>>> parameters ["form_compiler"]["quadrature_degree"] = "2"
> >>>>
> >>>> the comparison is _more_ fair and the numbers are almost the same.
> >>>> SFC still uses 3 points, while FFC now uses 4 points which leads to my
> >>>> answer to your first question:
> >>>> "How should I optimize FFC?" :)
> >>>>
> >>>> https://blueprints.launchpad.net/ffc/+spec/simplex-quadrature
> >>>
> >>> I think either Andy Terrel or Peter Brune mentioned having worked out
> >>> some code for computing more efficient quadrature on simplices. There
> >>> was some discussion on adding that either to FIAT or FFC.
> >>>
> >>> What ever happened to that?
> >>
> >> The only fast quadrature I was working on was for the BCR wavelet
> >> rules for Calderon Zygmund operators.  Rob has some recent stuff on
> >> fast quadrature using Bernstein basis.  I'm not sure what Peter might
> >> have been doing.
> >>
> >> The local expert on quadrature at TACC, tells me the fastest schemes
> >> for quadrature for simplices is Grundmann-Möller for lower orders (<
> >> 20 ish) and the standard conical product for higher orders.
> >>
> >> @article{grundmann:282,
> >> author = {Axel Grundmann and H. M. M\"{o}ller},
> >> collaboration = {},
> >> title = {Invariant Integration Formulas for the $n$-Simplex by
> >> Combinatorial Methods},
> >> publisher = {SIAM},
> >> year = {1978},
> >> journal = {SIAM Journal on Numerical Analysis},
> >> volume = {15},
> >> number = {2},
> >> pages = {282-290},
> >> url = {http://link.aip.org/link/?SNA/15/282/1},
> >> doi = {10.1137/0715019}
> >> }
> >>
> >
> > I've pasted the above into
> >
> >    https://blueprints.launchpad.net/ffc/+spec/simplex-quad
> >
> > Garth
> >
>
> I added a few more notes and links on the blueprint.
>
> -- Andy
>
> >>>
> >>> --
> >>> Anders
> >>>
> >>> -----BEGIN PGP SIGNATURE-----
> >>> Version: GnuPG v1.4.10 (GNU/Linux)
> >>>
> >>> iEYEARECAAYFAkwgmzsACgkQTuwUCDsYZdGcqwCgh1QCnNr0Jr1a2mcxDqheCpZ0
> >>> ItkAn36nLWyr2RDO6pqgF4PX753ItHaU
> >>> =HnEK
> >>> -----END PGP SIGNATURE-----
> >>>
> >>> _______________________________________________
> >>> Mailing list: https://launchpad.net/~ffc<https://launchpad.net/%7Effc>
> >>> Post to     : ffc@xxxxxxxxxxxxxxxxxxx
> >>> Unsubscribe : https://launchpad.net/~ffc<https://launchpad.net/%7Effc>
> >>> More help   : https://help.launchpad.net/ListHelp
> >>>
> >>>
> >>
> >> _______________________________________________
> >> Mailing list: https://launchpad.net/~ffc <https://launchpad.net/%7Effc>
> >> Post to     : ffc@xxxxxxxxxxxxxxxxxxx
> >> Unsubscribe : https://launchpad.net/~ffc <https://launchpad.net/%7Effc>
> >> More help   : https://help.launchpad.net/ListHelp
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~ffc <https://launchpad.net/%7Effc>
> > Post to     : ffc@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~ffc <https://launchpad.net/%7Effc>
> > More help   : https://help.launchpad.net/ListHelp
> >
>
> _______________________________________________
> Mailing list: https://launchpad.net/~ffc <https://launchpad.net/%7Effc>
> Post to     : ffc@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ffc <https://launchpad.net/%7Effc>
> More help   : https://help.launchpad.net/ListHelp
>

References