LDG

More
6 years 3 months ago #646 by rhebergens
LDG was created by rhebergens
Hello,

I was wondering what would be the best way to implement LDG for Stokes (see for example doi.org/10.1137/S0036142900380121 )

In LDG an auxiliary variable \sigma is introduced such that

\sigma = grad(u)

NGSolve has the VectorL2 finite element, which is good for vector unknowns, but \sigma is a matrix. Could you recommend a good way to treat matrix unknowns?

Thanks!
Sander
More
6 years 3 months ago #647 by rhebergens
Replied by rhebergens on topic LDG
Hello,

I implemented it now as follows which seems to be working and still keeps the code compact:

M = L2(mesh, order = order)
X = FESpace([M, M, M, M])
L11, L12, L21, L22 = X.TrialFunction()

L = CoefficientFunction(( (L11, L12), (L21, L22) ))
LT = CoefficientFunction(( (L11, L21), (L12, L22) ))

Thanks,
Sander
More
6 years 3 months ago #648 by schruste
Replied by schruste on topic LDG
Hi Sanders,

There is no equivalent to VectorL2 right now.
You can use the L2-space with a higher dimension:

X = L2(mesh, order=order, dim=4)

Best,
Christoph
More
6 years 3 months ago #650 by rhebergens
Replied by rhebergens on topic LDG
Hi Christoph,
Thanks - I'll give it a go.
Sander
Time to create page: 0.097 seconds