FEValues and get_function_values when support points = quadrature points

34 views
Skip to first unread message

Praveen C

unread,
Sep 30, 2016, 11:00:08 PM9/30/16
to Deal.II Googlegroup
Dear all

In many cases, we use same nodes as support points for FE space and quadrature. In this case, FEValues.get_function_values can just read off the function values without performing a sum over all basis functions. Does FEValues actually recognise and make this optimization ? If not, is it possible to get this behaviour ?

In my codes, I write my own code to get function values in this case without doing a sum over all basis functions.

But it would be great if FEValues.get_function_values could automatically do this.

Best
praveen

Wolfgang Bangerth

unread,
Sep 30, 2016, 11:10:39 PM9/30/16
to dea...@googlegroups.com
On 09/30/2016 08:59 PM, Praveen C wrote:
>
> In many cases, we use same nodes as support points for FE space and
> quadrature. In this case, FEValues.get_function_values can just read off the
> function values without performing a sum over all basis functions. Does
> FEValues actually recognise and make this optimization ? If not, is it
> possible to get this behaviour ?

No.


> In my codes, I write my own code to get function values in this case without
> doing a sum over all basis functions.

Yes, this is special knowledge that is hard to figure out automatically, but
easy to do if you know that it's true. In that case, you wouldn't want to use
FEValues to evaluate your shape functions -- you *know* up front that they're
either zero or one!


> But it would be great if FEValues.get_function_values could automatically do this.

But why would you want to use FEValues in that case?

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Praveen C

unread,
Sep 30, 2016, 11:21:50 PM9/30/16
to Deal.II Googlegroup
Hello Wolfgang,

When I use a FESystem, I have to write a couple of lines of code to get function values. I thought if FEValues could figure this, it would be nice, and make my code compact.

But making this automatic inside FEValues seems difficult, since all FE in an FESystem may not even have support points.

I guess I will do this myself in my code.

But,... if FEValues constructor could take an optional boolean argument where user can say whether support points == quadrature points, or not. For FESystem, one has to pass a vector of boolean. 

Thanks
praveen

--
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 dealii+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wolfgang Bangerth

unread,
Sep 30, 2016, 11:38:39 PM9/30/16
to dea...@googlegroups.com
On 09/30/2016 09:21 PM, Praveen C wrote:
>
> But,... if FEValues constructor could take an optional boolean argument where
> user can say whether support points == quadrature points, or not. For
> FESystem, one has to pass a vector of boolean.

I think you already see all of the contortions one has to go through to make
this work in all generality :-)
Reply all
Reply to author
Forward
0 new messages