- Thank you received: 0
If I want use function space of tensor?
4 years 1 month ago #3207
by yhhan
If I want use function space of tensor? was created 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
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
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
4 years 1 month ago #3208
by mneunteufel
Replied by mneunteufel on topic If I want use function space of tensor?
Hi yhhan,
there is currently no MatrixL2 space direktly available. However, you can "construct" it by
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
as regularization.
Best
Michael
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)
Code:
a += -1e-9*p*q
Best
Michael
4 years 1 month ago #3209
by joachim
Replied by joachim on topic If I want use function space of tensor?
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
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
4 years 1 month ago #3210
by yhhan
Replied by yhhan on topic If I want use function space of tensor?
Hi Michael,
Thank you so much, I will try it.
best,
Yihui
Thank you so much, I will try it.
best,
Yihui
4 years 1 month ago #3211
by yhhan
Replied by yhhan on topic If I want use function space of tensor?
Hi Joachim,
I will check it later, thank you for your help.
best,
Yihui
I will check it later, thank you for your help.
best,
Yihui
4 years 1 month ago #3212
by yhhan
Replied by yhhan on topic If I want use function space of tensor?
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
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.106 seconds