ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #02658
Re: [HG FFC] A first try of fixing bug for Nedelec elements and quadrature representation.
Quoting "Garth N. Wells" <gnw20@xxxxxxxxx>:
>
>
> FFC wrote:
> > One or more new changesets pushed to the primary ffc repository.
> > A short summary of the last three changesets is included below.
> >
> > changeset: 1563:83d241d069fa497d4833f449149b577b53d373f9
> > tag: tip
> > user: "Kristian Oelgaard <k.b.oelgaard@xxxxxxxxxx>"
> > date: Tue Jun 23 11:57:38 2009 +0200
> > files:
> ffc/compiler/codegeneration/quadrature/quadraturetransformer.py
> ffc/compiler/codegeneration/quadrature/quadraturetransformer2.py
> > description:
> > A first try of fixing bug for Nedelec elements and quadrature
> representation.
> >
>
> Does this mean that it's fixed?
No, it means that it's more fixed than it was before. There was an obvious
copy/paste bug for coefficients, but I still see differences between tensor and
quadrature in some cases.
It does 'work' (so it did before) for the VectorLaplaceGradCurl form in the demo
directory.
The following is where I'm stuck at the moment:
[mail to Marie]
Tensor representation seems to ignore metadata i.e.,
*dx(0,metadata={"quadrature_order":1})
does nothing. On the other hand quadrature representation lets UFL compute the
order, but this order is too low for Nedelec elements (should be k+1 right?).
Also, consider the following two cases:
# Mixed (similar to VectorLaplaceGradCurl)
element = FiniteElement("N1curl", triangle, 0)
element2 = FiniteElement("Lagrange", triangle, 1)
E = element2 + element
(tau, v) = TestFunctions(E)
(sigma, u) = TrialFunctions(E)
a = inner(v, u)*dx
# Standard
v = TestFunction(element)
u = TrialFunction(element)
a = inner(v, u)*dx
If I assemble mesh(1,1) for the mixed case I get matching global tensors when
comparing tensor and quadrature.
Note that I have to use
a = inner(v, u)*dx(0,metadata={"quadrature_order":2})
for quadrature to integrate exactly.
If I assemble mesh(1,1) for the standard case I don't get matching tensors.
(This is the same thing that causes the discrepancy for the functional I guess)
Now the funny thing is that if I compare the standard case for quadrature to the
Kuu part of the mixed case I actually DO get the same numbers (as I would
expect).
To me, this indicates that quadrature is working for both cases, and tensor
representation is only working when use in a mixed setting. OR there is
something fundamentally wrong with my understanding of these elements.
Kristian
> Garth
>
> >
> > changeset: 1562:9c3306a9272a5bb96ac09a92fa6fa47896b95eaa
> > user: "Kristian Oelgaard <k.b.oelgaard@xxxxxxxxxx>"
> > date: Tue Jun 23 11:05:22 2009 +0200
> > files: ffc/compiler/codegeneration/quadrature/quadraturegenerator.py
> test/regression/reference/Constant.h test/regression/reference/EnergyNorm.h
> test/regression/reference/Equation.h
> test/regression/reference/FacetIntegrals.h
> test/regression/reference/FunctionOperators.h
> test/regression/reference/Heat.h test/regression/reference/Mass.h
> test/regression/reference/MixedPoisson.h
> test/regression/reference/NavierStokes.h
> test/regression/reference/NeumannProblem.h
> test/regression/reference/Optimization.h test/regression/reference/Poisson.h
> test/regression/reference/PoissonDG.h
> test/regression/reference/PoissonSystem.h
> test/regression/reference/QuadratureElement.h
> test/regression/reference/ReactionDiffusion.h
> test/regression/reference/StabilisedStokes.h
> test/regression/reference/Stokes.h test/regression/reference/SubDomain.h
> test/regression/reference/SubDomains.h
> test/regression/reference/TensorWeightedPoisson.h
> test/regression/reference/VectorLaplaceGradCurl.h
> > description:
> > Use format when tabulating the coordinates of the integration points.
> >
> >
> > changeset: 1561:c5341f7db3dfccb34e254eb7925ba7e7d4a75fd4
> > user: "Kristian Oelgaard <k.b.oelgaard@xxxxxxxxxx>"
> > date: Tue Jun 23 10:28:30 2009 +0200
> > files: ffc/compiler/codegeneration/quadrature/quadraturegenerator.py
> ffc/compiler/representation/quadrature/quadraturerepresentation.py
> test/regression/reference/Constant.h test/regression/reference/Elasticity.h
> test/regression/reference/EnergyNorm.h test/regression/reference/Equation.h
> test/regression/reference/FacetIntegrals.h
> test/regression/reference/FunctionOperators.h
> test/regression/reference/Heat.h test/regression/reference/Mass.h
> test/regression/reference/MixedPoisson.h
> test/regression/reference/NavierStokes.h
> test/regression/reference/NeumannProblem.h
> test/regression/reference/Optimization.h test/regression/reference/Poisson.h
> test/regression/reference/PoissonDG.h
> test/regression/reference/PoissonSystem.h
> test/regression/reference/QuadratureElement.h
> test/regression/reference/ReactionDiffusion.h
> test/regression/reference/StabilisedStokes.h
> test/regression/reference/Stokes.h test/regression/reference/SubDomain.h
> test/regression/reference/SubDomains.h test/reg
> ression/reference/TensorWeightedPoisson.h
> test/regression/reference/VectorLaplaceGradCurl.h
> test/simple_verify_tensors/reference.pickle
> > description:
> > Tabulate the coordinates of integration points in a comment inside
> tabulate_tensor().
> >
> > ----------------------------------------------------------------------
> > For more details, visit http://www.fenics.org/hg/ffc
> > _______________________________________________
> > FFC-dev mailing list
> > FFC-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/ffc-dev
>
>
> _______________________________________________
> FFC-dev mailing list
> FFC-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/ffc-dev
>
References