Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

LDG

More
5 years 8 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
5 years 8 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
5 years 8 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
5 years 8 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.175 seconds