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.

If I want use function space of tensor?

More
3 years 6 months ago #3207 by yhhan
If I need the function space of vector, I can use VectorL2(mesh, order). But if I need the function space of tensor, what I should use?


Another question is that when we solve saddle point problem, like Stokes problem, the matrix is indefinite, how the solve it? what command can we use?

thanks
More
3 years 6 months ago #3208 by mneunteufel
Hi yhhan,

there is currently no MatrixL2 space direktly available. However, you can "construct" it by
Code:
MatrixL2 = L2(mesh, order=order, dim=4) u,v = MatrixL2.TnT() u.dims = (2,2) v.dims = (2,2) gf = GridFunction(MatrixL2) gf.dims = (2,2)
For a saddle point problem you can use direct solvers as umfpack or also the build-in sparsecholesky solver if you regularize the problem at the lower-right zero block. E.g. for Stokes involving velocity u and pressure p you can add
Code:
a += -1e-9*p*q
as regularization.

Best
Michael
More
3 years 6 months ago #3209 by joachim
a short note on the solver for saddle point problems:

you can easily use MinRes or GMRes with block-preconditioning, see e.g.
ngsolve.org/docu/latest/i-tutorials/unit-2.6-stokes/stokes.html
as a starting point.

Joachim
More
3 years 6 months ago #3210 by yhhan
Hi Michael,

Thank you so much, I will try it.

best,

Yihui
More
3 years 6 months ago #3211 by yhhan
Hi Joachim,

I will check it later, thank you for your help.

best,

Yihui
More
3 years 6 months ago #3212 by yhhan
Hi Michael,

For vector space, I can use V=VectorL2(mesh, order = ), then in the following
MatrixL2 = L2(mesh, order=order, dim=4)
u,v = MatrixL2.TnT()
u.dims = (2,2)
v.dims = (2,2)
gf = GridFunction(MatrixL2)
gf.dims = (2,2)

which one is like the above space V written by me? It seems that MatrixL2 = L2(mesh, order=order, dim=4) is different from the space V.

Best,
Yihui
Time to create page: 0.139 seconds