Re: [deal.II] Shape gradients of (f(x)*\phi_i)

2024-01-24 Thread Abbas Ballout
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

On Tuesday, January 23, 2024 at 10:24:55 PM UTC+1 Wolfgang Bangerth wrote:

> 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/
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/823febdb-9b58-4257-92de-7b195807376an%40googlegroups.com.


Re: [deal.II] Shape gradients of (f(x)*\phi_i)

2024-01-23 Thread Wolfgang Bangerth

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: bange...@colostate.edu
   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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/825f38d5-0ee1-43da-a283-5efbf5a98bee%40colostate.edu.


Re: [deal.II] Shape gradients of (f(x)*\phi_i)

2024-01-23 Thread Abbas Ballout
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 

On Tuesday, January 23, 2024 at 7:47:14 PM UTC d.arnd...@gmail.com wrote:

> 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
>
> On Tue, Jan 23, 2024 at 2:37 PM Abbas Ballout  
> wrote:
>
>> 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 
>>
>> -- 
>> 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
>>  
>> 
>> .
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/2d8de9d1-23f2-45a6-83ac-6311a779fa01n%40googlegroups.com.


Re: [deal.II] Shape gradients of (f(x)*\phi_i)

2024-01-23 Thread Daniel Arndt
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

On Tue, Jan 23, 2024 at 2:37 PM Abbas Ballout 
wrote:

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

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWb%2BpXJ3F%2Bs7MS7vEpoka4mcPscAPxpkRM_yrpQz6QU%3DXHw%40mail.gmail.com.


[deal.II] Shape gradients of (f(x)*\phi_i)

2024-01-23 Thread Abbas Ballout
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 

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