On 05/06/2018 09:05 AM, Zhao Yidong wrote:
Indeed, my problem is this:
1. I have fe which is a FiniteElement class, and I have fe_values which is a
FEValues class. I also have QGauss<dim> quadrature to create fe_values.
2. I iterate on every quadrature point in a iteration on every cell, store the
quadrature points.
3. Use fe_values.value(i, q) to calculate shape functions, and
fe.shape_value(i, point) to calculate another shape function, but find they
are different.
So I want to know what's the difference between this two methods? Because I
want to separate the fe and quadrature points, so can I use fe.shape_value to
calculate the shape functions?
FiniteElement defines shape functions on the reference element. FEValues
describes these shape functions on the real cell. For many elements, you get
the same result whether you
* evaluate the shape function on the reference cell at a quadrature point
also defined on the reference cell (via FiniteElement::shape_value and
Quadrature::point)
* evaluate the shape function on the real cell at a quadrature point
also defined on the real cell (via FEValues::shape_value, with quadrature
point locations also available from FEValues).
But there are also elements for which this is not true. It's not clear to me
what exactly you do in your comparison -- can you show a piece of code?
(You will have to use FEValues anyway at one point if you also want the
*gradients* of the shape functions -- these are never the same on reference
and real cell.)
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.colostate.edu/~bangerth/
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.