"Vectorial" jumps and averages - Discontinuous Galerkin

Greetings fellow members,

If i’m correct, jump() and average() functions give the jump and mean value of a given function at an edge for discontinuous Galerkin schemes. But how to retrieve these fundamental quantities when working with a vector of functions ? I tried something like jump([u1,u2]) but this doesn’t seem to work. Any idea ?

Best regards.

Hi, you need to do

[jump(u1), jump(u2)] 

for vectorial functions. The same applies to the mean/average function.

Thank you !

So for the average of curl(u) = [average(1st component of curl u), average(2nd omponent of curl u),average(3rd component of curl u)] ?

Is it possible to access theses components with sth like curl(u)[i] where i=0,1,2 in a macro ? For example :

macro Curl(ux,uy,uz) [dy(uz)-dz(uy),…
macro avgCurl(ux,uy,uz) [average(Curl(ux,uy,uz)[0],…

Thank you, and best of luck.

Yes, for the mean value you should use

[mean(u1), mean(u2), mean(u3)]

and these functions must me in intalledges, then you can access the result through

u1[][i]

but I’m not sure if the macro will work, I never tried before.

Thank you so much, and best of luck !

1 Like