ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #00591
Re: UFL suggestions
On Fri, Jan 02, 2009 at 11:35:39AM +0100, Kent Andre wrote:
> On fr., 2009-01-02 at 09:42 +0100, Martin Sandve Alnæs wrote:
> > On Thu, Jan 1, 2009 at 11:30 PM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
> > >
> > >
> > > Martin Sandve Alnæs wrote:
> > >>
> > >> The wiki isn't quite updated, but go ahead. Or you can just send them
> > >> here.
> > >>
> > >
> > > It would be useful an integration scheme could be attached to integrals
> > > (dx0, dx1, etc). This would make selective integration schemes simple to
> > > implement.
> > >
> > > Garth
> >
> > Ok, adding any kind of metadata to Integral poses no problems.
> > How should it look? How general can we make it?
> >
> > Currently you can do:
> > dx0 = dx(0)
> >
> > We could add something like:
> > quad_order = 3
> > quad_rule = [
> > (1.0/3.0, (0.0, 0.0)),
> > (1.0/3.0, (1.0, 0.0))
> > (1.0/3.0, (0.0, 1.0))
> > ]
> > integration_scheme1 = IntegrationScheme(quad_order)
> > integration_scheme2 = IntegrationScheme(quad_rule)
> >
> > dx0 = dx(0, integration_scheme1)
> > dx1 = dx(1, integration_scheme2)
> >
> > a = u*v*dx0 + f*v*dx1
> >
> > where quad_order is the minimum order of the quadrature
> > scheme wanted. The default integration scheme is
> > undefined (None) in which case the form compiler decides.
> > IntegrationScheme can in principle be arbitrarily complex,
> > even containing known quadrature rules.
> >
> > Alternatively, we can skip the IntegrationScheme class:
> > dx0 = dx(0, 3)
> > dx1 = dx(0, quad_rule)
>
> Very good!
>
> >
> > In the case of facet integrals, the points are defined
> > on a single reference polygon.
> >
> > How should we handle non-quadrature integration options?
> >
>
> Don't bother. The compiler should bail out. It should
> correspond to a projection, but I think implementing
> it would smell more than it tastes.
Why shouldn't non-quadrature options be handled?
The main question is how detailed control of the form compiler one
should have from the form language. Some options make sense only for
some compilers. For example, FIAT uses a special kind of quadrature
that might not make sense to other compilers, and FFC could have
something like
dx = dx(0, tensor, quad_rule)
meaning use tensor representation but precompute integrals using the
specified quadrature rule.
--
Anders
Attachment:
signature.asc
Description: Digital signature
References