← Back to team overview

dolfin team mailing list archive

Re: 2d quadrature

 

So garbage in, garbage out :)
It should be possible and is probably helpful to have the rules natively in
C++.  The only issue
is that I need zeros of Jacobi polynomials for somewhat different weights
than the Gaussian quadrature
in DOLFIN.  It is not hard to extend what's there.



On Sun, Apr 19, 2009 at 1:39 PM, Anders Logg <logg@xxxxxxxxx> wrote:

> On Fri, Apr 17, 2009 at 03:40:37PM -0500, Robert Kirby wrote:
> > Are there any 2d quadrature rules built into dolfin?  All I can seem to
> find
> > are 1d rules.
> > Even the dumb collapsed-coordinate ones are fine.
>
> We had this a *long* time ago, see for example
>
>
> http://www.fenics.org/hg/dolfin?f=e26c8159ce5e;file=src/kernel/quadrature/dolfin/TriangleMidpointQuadrature.h
>
> But we removed this when FIAT was introduced. :-)
>
> The 1D rules are used by the ODE solvers.
>
> If you want quadrature rules on a triangle or tetrahedron, you can
> generate code for a single finite element. Put something like this
> in a .ufl file:
>
>  element = FiniteElement("Quadrature", "triangle", 5)
>
> Then compile and include the generated code. You can call this function
> from the generated ufc::dof_map:
>
>  void tabulate_coordinates(double** coordinates,
>                            const cell& c) const = 0;
>
> You'll get out the quadrature points you've put into FIAT. :-)
>
> --
> Anders
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAknrb/EACgkQTuwUCDsYZdHd6gCfeoYKlW9h1uX1DmgEYuYPGvDf
> SWkAnjEDvpgAQmux7/Wvh7dzPCoJBvxx
> =mgC9
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>
>

Follow ups

References