Subject: [FFC-dev] [HG FFC] Several updates for handling subdomain integrals:

From: [email-masked] (FFC)
Date: Wed, 28 May 2008 22:44:24 +0200 (CEST)

One or more new changesets pushed to the primary ffc repository.
A short summary of the last three changesets is included below.

changeset:   1134:b63e7d27e38dd2485f4adf8a26e8e714020ffc61
tag:         tip
user:        Anders Logg <[email-masked]>
date:        Wed May 28 22:44:42 2008 +0200
files:       ChangeLog src/demo/SubDomain.form src/demo/SubDomains.form src/ffc/compiler/analysis/formdata.py src/ffc/compiler/codegeneration/tensor/tensorgenerator.py src/ffc/compiler/format/ufcformat.py src/ffc/compiler/language/integral.py src/ffc/compiler/language/reassignment.py src/test/regression/reference/SubDomain.h
description:
Several updates for handling subdomain integrals:
 - Allow simple specification of subdomain integrals.
   Now dx(0), dx(1), ds(0), ds(1) etc work which is equivalent
   to dx0 = Integral("cell", 0) etc.
 - Allow specification of integrals on subdomains without
   needing to define all integrals in the range, which makes
   the following form perfectly fine: M = f*dx(3). Integrals
   for dx(0), dx(1) and dx(2) are automatically generated but
   they are zero.

changeset:   1133:0c16c9ec2f06f7825eec02d98e7ed6fc446c09f7
user:        "Kristian Oelgaard <[email-masked]>"
date:        Wed May 28 11:53:51 2008 +0200
files:       src/ffc/fem/quadratureelement.py
description:
Print a warning instead of raising a RuntimeError when derivatives are taken of QuadratureElement.

changeset:   1132:a4df1de00392be914a3c402d83d8462d24c6b525
user:        "Kristian Oelgaard <[email-masked]>"
date:        Mon May 19 18:50:12 2008 +0200
files:       src/ffc/compiler/codegeneration/quadrature/quadraturegenerator.py src/ffc/compiler/codegeneration/quadrature/quadraturegenerator_utils.py src/ffc/compiler/codegeneration/quadrature/reduce_operations.py
description:
Further optimisations for quadrature representation. Minor bug fix for operation count.

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/ffc

---

From: Jake Ostien <[email-masked]>
Date: Thu, 29 May 2008 19:18:13 -0400

Is the update mentioned below also supposed to work for interior 
facets?  If I just specify dS(2), I get

    *** list index out of range

for the interior facet integral code generation.

FFC wrote:
> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/ffc-dev
>
>
>

---

From: Anders Logg <[email-masked]>
Date: Fri, 30 May 2008 08:09:56 +0200

> for the interior facet integral code generation.

Yes, so this is a bug. I'll look at it later.

-- 
Anders

---

From: Anders Logg <[email-masked]>
Date: Sun, 8 Jun 2008 22:45:26 +0200

>     *** list index out of range

I checked this and it works fine for me. I can do dS(2), even
dS(999999999999999).

What exact code did you try?

-- 
Anders

---

From: Jake Ostien <[email-masked]>
Date: Thu, 12 Jun 2008 12:04:35 -0600

> What exact code did you try?

Hi,

Weird.  I use the following code:

element = FiniteElement("CG", "triangle", 1)

v = TestFunction(element)
u = TrialFunction(element)

a = dot(avg(v),jump(u))*dS(3)

Then I simple call ffc as:

% ffc -l dolfin test.form

and I get the following error:

...
Compiler phase 4: Generating code
---------------------------------

  Generating code for finite elements... done
  Generating code for finite dof maps... done
  Generating code for cell integrals... done
  Generating code for exterior facet integrals... done
  Generating code for interior facet integrals... *** list index out of 
range

Something might be fishy over here, but I pulled code this morning just 
in case. 

Can you think of anything else that I might need to update?

jake

>   
> ------------------------------------------------------------------------
>

---

From: Anders Logg <[email-masked]>
Date: Thu, 12 Jun 2008 21:34:56 +0200

> Compiler phase 4: Generating code

I never tried to compile a form with dS(n). I just checked that
creating it the integral dS(n) worked. Anyway, it should be fixed now
so try again.

-- 
Anders