Subject: [FFC-dev] [HG FFC] Fixed computation of direction for facet normals

From: [email-masked] (FFC)
Date: Mon, 14 Sep 2009 18:33:07 +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:   1651:09868489fc408b1b0024bbd43e901112076d1e46
tag:         tip
user:        Peter Brune <[email-masked]>
date:        Mon Sep 14 11:08:25 2009 -0500
files:       ffc/compiler/codesnippets.py
description:
Fixed computation of direction for facet normals

changeset:   1650:aa7511f9cd9c4784418e76ad7b027b8bc1d30b39
user:        Anders Logg <[email-masked]>
date:        Mon Sep 14 17:20:00 2009 +0200
files:       demo/Biharmonic.ufl ffc/compiler/codesnippets.py ffc/compiler/removeunused.py test/regression/reference/quadrature/Biharmonic.h test/regression/reference/quadrature/Constant.h test/regression/reference/quadrature/Elasticity.h test/regression/reference/quadrature/ElementRestriction.h test/regression/reference/quadrature/EnergyNorm.h test/regression/reference/quadrature/Equation.h test/regression/reference/quadrature/FacetIntegrals.h test/regression/reference/quadrature/FunctionOperators.h test/regression/reference/quadrature/Heat.h test/regression/reference/quadrature/Mass.h test/regression/reference/quadrature/MetaData.h test/regression/reference/quadrature/MixedMixedElement.h test/regression/reference/quadrature/MixedPoisson.h test/regression/reference/quadrature/NavierStokes.h test/regression/reference/quadrature/NeumannProblem.h test/regression/reference/quadrature/Normals.h test/regression/reference/quadrature/Optimization.h test/regression/reference/quadrature/P5tet.h test/regression/reference/quadrature/P5tri.h test/regression/reference/quadrature/Poisson.h test/regression/reference/quadrature/PoissonDG.h test/regression/reference/quadrature/PoissonSystem.h test/regression/reference/quadrature/QuadratureElement.h test/regression/reference/quadrature/ReactionDiffusion.h test/regression/reference/quadrature/StabilisedStokes.h test/regression/reference/quadrature/Stokes.h test/regression/reference/quadrature/SubDomain.h test/regression/reference/quadrature/SubDomains.h test/regression/reference/quadrature/TensorWeightedPoisson.h test/regression/reference/quadrature/VectorLaplaceGradCurl.h test/regression/reference/tensor/Constant.h test/regression/reference/tensor/Elasticity.h test/regression/reference/tensor/ElementRestriction.h test/regression/reference/tensor/EnergyNorm.h test/regression/reference/tensor/Equation.h test/regression/reference/tensor/FacetIntegrals.h test/regression/reference/tensor/Heat.h test/regression/reference/tensor/Mass.h test/regression/reference/tensor/MetaData.h test/regression/reference/tensor/MixedMixedElement.h test/regression/reference/tensor/MixedPoisson.h test/regression/reference/tensor/NavierStokes.h test/regression/reference/tensor/NeumannProblem.h test/regression/reference/tensor/Normals.h test/regression/reference/tensor/Optimization.h test/regression/reference/tensor/P5tet.h test/regression/reference/tensor/P5tri.h test/regression/reference/tensor/Poisson.h test/regression/reference/tensor/PoissonSystem.h test/regression/reference/tensor/ReactionDiffusion.h test/regression/reference/tensor/StabilisedStokes.h test/regression/reference/tensor/Stokes.h test/regression/reference/tensor/SubDomain.h test/regression/reference/tensor/SubDomains.h test/regression/reference/tensor/VectorLaplaceGradCurl.h test/regression/test.py test/regression/update-references.sh
description:
Merge Peter's patch, add suppot for bool in remove_unused and update references.

changeset:   1649:2ef63eb5e7e7d0d24e81dee86eecb983ff044389
user:        Peter Brune <[email-masked]>
date:        Fri Sep 11 12:21:19 2009 -0500
files:       demo/Normals.ufl
description:
Added a demo for the normals

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

---

From: "Garth N. Wells" <[email-masked]>
Date: Mon, 14 Sep 2009 19:28:15 +0200

The new facet normal computation seems to give some seriously wrong 
results for the Poisson DG demo. Take a looks at the DOLFIN demo

     demo/pde/dg/poisson/python

Peter: Could you please take a look?

Garth

FFC wrote:
> files:       demo/Biharmonic.ufl ffc/compiler/codesnippets.py ffc/compiler/removeunused.py test/regression/reference/quadrature/Biharmonic.h test/regression/reference/quadrature/Constant.h test/regression/reference/quadrature/Elasticity.h test/regression/reference/quadrature/ElementRestriction.h test/regression/reference/quadrature/EnergyNorm.h test/regression/reference/quadrature/Equation.h test/regression/reference/quadrature/FacetIntegrals.h test/regression/reference/quadrature/FunctionOperators.h test/regression/reference/quadrature/Heat.h test/regression/reference/quadrature/Mass.h test/regression/reference/quadrature/MetaData.h test/regression/reference/quadrature/MixedMixedElement.h test/regression/reference/quadrature/MixedPoisson.h test/regression/reference/quadrature/NavierStokes.h test/regression/reference/quadrature/NeumannProblem.h test/regression/reference/quadrature/Normals.h test/regression/reference/quadrature/Optimization.h test/regression/reference/quadra
ture/P5tet.h test/regression/reference/quadrature/P5tri.h test/regression/reference/quadrature/Poisson.h test/regression/reference/quadrature/PoissonDG.h test/regression/reference/quadrature/PoissonSystem.h test/regression/reference/quadrature/QuadratureElement.h test/regression/reference/quadrature/ReactionDiffusion.h test/regression/reference/quadrature/StabilisedStokes.h test/regression/reference/quadrature/Stokes.h test/regression/reference/quadrature/SubDomain.h test/regression/reference/quadrature/SubDomains.h test/regression/reference/quadrature/TensorWeightedPoisson.h test/regression/reference/quadrature/VectorLaplaceGradCurl.h test/regression/reference/tensor/Constant.h test/regression/reference/tensor/Elasticity.h test/regression/reference/tensor/ElementRestriction.h test/regression/reference/tensor/EnergyNorm.h test/regression/reference/tensor/Equation.h test/regression/reference/tensor/FacetIntegrals.h test/regression/reference/tensor/Heat.h test/regression/refere
nce/tensor/Mass.h test/regression/reference/tensor/MetaData.h test/regression/reference/tensor/MixedMixedElement.h test/regression/reference/tensor/MixedPoisson.h test/regression/reference/tensor/NavierStokes.h test/regression/reference/tensor/NeumannProblem.h test/regression/reference/tensor/Normals.h test/regression/reference/tensor/Optimization.h test/regression/reference/tensor/P5tet.h test/regression/reference/tensor/P5tri.h test/regression/reference/tensor/Poisson.h test/regression/reference/tensor/PoissonSystem.h test/regression/reference/tensor/ReactionDiffusion.h test/regression/reference/tensor/StabilisedStokes.h test/regression/reference/tensor/Stokes.h test/regression/reference/tensor/SubDomain.h test/regression/reference/tensor/SubDomains.h test/regression/reference/tensor/VectorLaplaceGradCurl.h test/regression/test.py test/regression/update-references.sh
> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/ffc-dev

---

From: Peter Brune <[email-masked]>
Date: Mon, 14 Sep 2009 13:11:44 -0500

I think I see what's going on from looking at the generated UFC code from
ffc/demo/PoissonDG.ufl.  It's only generating and using the normal for one
side of the interior jump terms.  This is going to cause the "first" cell
here to have the proper normal, and the other to have a flipped normal.  I
can look at what happens in the interior facet integral code and have it
generate and use the proper normals for both cells.

- Peter

On Mon, Sep 14, 2009 at 12:28 PM, Garth N. Wells <[email-masked]> wrote:

> > files:       demo/Biharmonic.ufl ffc/compiler/codesnippets.py
> ffc/compiler/removeunused.py
> test/regression/reference/quadrature/Biharmonic.h
> test/regression/reference/quadrature/Constant.h
> test/regression/reference/quadrature/Elasticity.h
> test/regression/reference/quadrature/ElementRestriction.h
> test/regression/reference/quadrature/EnergyNorm.h
> test/regression/reference/quadrature/Equation.h
> test/regression/reference/quadrature/FacetIntegrals.h
> test/regression/reference/quadrature/FunctionOperators.h
> test/regression/reference/quadrature/Heat.h
> test/regression/reference/quadrature/Mass.h
> test/regression/reference/quadrature/MetaData.h
> test/regression/reference/quadrature/MixedMixedElement.h
> test/regression/reference/quadrature/MixedPoisson.h
> test/regression/reference/quadrature/NavierStokes.h
> test/regression/reference/quadrature/NeumannProblem.h
> test/regression/reference/quadrature/Normals.h
> test/regression/reference/quadrature/Optimization.h
> test/regression/reference/quadra
> ture/P5tet.h test/regression/reference/quadrature/P5tri.h
> test/regression/reference/quadrature/Poisson.h
> test/regression/reference/quadrature/PoissonDG.h
> test/regression/reference/quadrature/PoissonSystem.h
> test/regression/reference/quadrature/QuadratureElement.h
> test/regression/reference/quadrature/ReactionDiffusion.h
> test/regression/reference/quadrature/StabilisedStokes.h
> test/regression/reference/quadrature/Stokes.h
> test/regression/reference/quadrature/SubDomain.h
> test/regression/reference/quadrature/SubDomains.h
> test/regression/reference/quadrature/TensorWeightedPoisson.h
> test/regression/reference/quadrature/VectorLaplaceGradCurl.h
> test/regression/reference/tensor/Constant.h
> test/regression/reference/tensor/Elasticity.h
> test/regression/reference/tensor/ElementRestriction.h
> test/regression/reference/tensor/EnergyNorm.h
> test/regression/reference/tensor/Equation.h
> test/regression/reference/tensor/FacetIntegrals.h
> test/regression/reference/tensor/Heat.h test/regression/refere
> nce/tensor/Mass.h test/regression/reference/tensor/MetaData.h
> test/regression/reference/tensor/MixedMixedElement.h
> test/regression/reference/tensor/MixedPoisson.h
> test/regression/reference/tensor/NavierStokes.h
> test/regression/reference/tensor/NeumannProblem.h
> test/regression/reference/tensor/Normals.h
> test/regression/reference/tensor/Optimization.h
> test/regression/reference/tensor/P5tet.h
> test/regression/reference/tensor/P5tri.h
> test/regression/reference/tensor/Poisson.h
> test/regression/reference/tensor/PoissonSystem.h
> test/regression/reference/tensor/ReactionDiffusion.h
> test/regression/reference/tensor/StabilisedStokes.h
> test/regression/reference/tensor/Stokes.h
> test/regression/reference/tensor/SubDomain.h
> test/regression/reference/tensor/SubDomains.h
> test/regression/reference/tensor/VectorLaplaceGradCurl.h
> test/regression/test.py test/regression/update-references.sh
> > description:
> DOLFIN-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>

---

From: "Garth N. Wells" <[email-masked]>
Date: Mon, 14 Sep 2009 21:02:48 +0200

Peter Brune wrote:
> I think I see what's going on from looking at the generated UFC code 
> from ffc/demo/PoissonDG.ufl.  It's only generating and using the normal 
> for one side of the interior jump terms.  This is going to cause the 
> "first" cell here to have the proper normal, and the other to have a 
> flipped normal.  I can look at what happens in the interior facet 
> integral code and have it generate and use the proper normals for both 
> cells.
>

Could you register on Launchpad so the bug can be assigned to you.

Garth

> - Peter
> 
> On Mon, Sep 14, 2009 at 12:28 PM, Garth N. Wells <[email-masked] 
> <mailto:[email-masked]>> wrote:
> 
>      > user:        Peter Brune <[email-masked]
>     <mailto:[email-masked]>>
>      > user:        Anders Logg <[email-masked] <mailto:[email-masked]>>
>      > user:        Peter Brune <[email-masked]
>     <mailto:[email-masked]>>
>      > [email-masked] <mailto:[email-masked]>
>     [email-masked] <mailto:[email-masked]>

---

From: Kristian Oelgaard <[email-masked]>
Date: Tue, 15 Sep 2009 11:15:57 +0200

> generate and use the proper normals for both cells.

You need to use the information from self.restriction in the
QuadratureTransformer when generating the name for the normal.

Kristian

---

From: Peter Brune <[email-masked]>
Date: Tue, 15 Sep 2009 14:53:59 -0500

Here's the patch.

- Peter