Shape gradients of (f(x)*\phi_i)

62 views
Skip to first unread message

Abbas Ballout

unread,
Jan 23, 2024, 2:37:43 PM1/23/24
to deal.II User Group
I know I can query the standard shape gradient at a quadrature point with  fe_values.shape_grad(i, q).
Is it possible to query for something like the gradient of the shape function multiplied by another function? I need \dfrac{\partial f(x) \phi_i}{\partial x} but I don't want to integrate by parts.

Abbas 

Daniel Arndt

unread,
Jan 23, 2024, 2:47:14 PM1/23/24
to dea...@googlegroups.com
Abbas,

\dfrac{\partial f(x) \phi_i}{\partial x} is just \dfrac{\partial f(x)}{\partial x} \phi_i+f(x)\dfrac{f(x)}{\partial x} which I would use.
There is no need to integrate by parts.

Best,
Daniel

--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/64e24fc5-9876-4e34-97c4-ba6bc77d22a4n%40googlegroups.com.

Abbas Ballout

unread,
Jan 23, 2024, 3:09:10 PM1/23/24
to deal.II User Group
Daniel, 
Sorry I meant to say I don't want to use that chain rule.
It's because I am looking at papers that compare integrating both versions of the weak form:
post and prior using the chain rule.   
Abbas 

Wolfgang Bangerth

unread,
Jan 23, 2024, 4:24:55 PM1/23/24
to dea...@googlegroups.com
On 1/23/24 13:09, Abbas Ballout wrote:
>
> Sorry I meant to say I don't want to use that chain rule.

You mean the product rule? Either way, why is it that you don't want to use
it? The formula Daniel shows is an *identity*, not some approximation. This is
how the derivative of a product is defined.

Best
W.

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


Abbas Ballout

unread,
Jan 24, 2024, 7:11:36 AM1/24/24
to deal.II User Group
Yes product rule (so broke can't even pay attention D:)

This is a "In order for me to explain this I have to test it, but in order to test this I have to explain it" situation
so to answer the why but extremely poorly: 
It is common in the spectral element community to use Gauss-Lobatto quadrature and shape functions defined 
at the same Guass-Lobatto points (no more). Since the integration is going to be inexact, aliasing errors are introduced 
and the descrte integral evaluations for the product rule are no longer equivalent (I guess?). 
The split form for advection is used to remove aliasing errors in such a scenario. 
It is also the defacto to write discrete derivatives as matrix operators there.   

You can see: Split form nodal discontinuous Galerkin schemes with summation-by-parts property for the compressible Euler equations
Or remark 3.7 in: Analysis of the SBP-SAT Stabilization for Finite Element Methods Part I: Linear Problems. 
  
I am probably missing something here so I'll be back if I figure this out. 
Asking if I can query for shape_grad(f*phi, point) was more of a shot in the dark. 
Thanks for the input as well
Abbas

Reply all
Reply to author
Forward
0 new messages