← Back to team overview

ufl team mailing list archive

Re: UFL suggestions

 



Martin Sandve Alnæs wrote:
On Fri, Jan 2, 2009 at 11:56 AM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:

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!
Looks good to me too.

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.
Agree.

Garth

Ok. What is the natural behaviour of this case then?

myform.ufl:
...
a = u*v*dx(0) + f*v*dx(1, 3)

sfc -isymbolic myform.ufl

I guess the compiler here can apply commandline integration options to
dx(0) which is unspecified, and apply 3rd order quadrature to dx(1)?


That would be good.

I have some forms for which I always want to use quadrature, so it would be useful if this can be specified in the input rather than always on the command line.

Garth

Martin




References