Vector functions DG

Hi,
I am trying to implement a DG version of Stokes equation. To calculate the boundary-fluxes on each face, how do I write it? I use a central flux discretization. The jump terms are easy,

jump_u = u-u.Other()
jump_v = v-v.Other()

But when it comes to the central flux my first idea is to use

flux_u = 0.5 * n * (grad(u) + grad(u.Other())

and likewise for v. This however gives me
NgException: T_MultVecVec : dimensions don’t fit

One version which does not give me an error is
flux_u = 0.5*(grad(u) + grad(u.Other()))n
flux_v = 0.5
(grad(v) + grad(v.Other()))*n

However, I tested to calculate the matrix for the bilinear form

SymbolicBFI(-flux_u*jump_v, BND, skeleton=True)

when the FE-space is a vectorH1 space with dgjumps=False. The matrix has a non-zero norm, which is odd since the functions are continuous.

Note: the main idea is to use it for H(div) conform spaces

I would be immensely grateful for any help.

Hi Bittermandeln,

With “(…,BND, skeleton=True)” you only integrate on the domain boundary. There, you don’t have an “Other” and hence you will get non-zero values also for continuous functions. Try the same for “(…,VOL,skeleton=True)” and it should be doing what you expect.

Best,
Christoph

Hi Christoph,
Thank you for your quick reply,
when doing this I get the error message

SparseMatrixTM::AddElementMatrix: illegal dnumsin Assemble BilinearForm ‘biform_from_py’

I do not understand what the reason for the error is

I managed to find the reason in this post:

I needed to include the dgjumps argument in my mixed space.

Thanks again for the help