- Thank you received: 24
Prolongation for higher order
3 years 2 weeks ago #4098
by hvwahl
Prolongation for higher order was created by hvwahl
Hi everyone,
for a mesh convergence study on a non-linear problem, I want to use the coarse mesh solution as a good initial guess for a Newton method after mesh refinement. However, for order>1, the prolongation appears to modify the solution, (so that the GridFunction on the fine space is the prolonged P1 function from the coarse mesh). I may have misunderstood something, so is this behaviour expected?
Best wishes,
Henry
for a mesh convergence study on a non-linear problem, I want to use the coarse mesh solution as a good initial guess for a Newton method after mesh refinement. However, for order>1, the prolongation appears to modify the solution, (so that the GridFunction on the fine space is the prolonged P1 function from the coarse mesh). I may have misunderstood something, so is this behaviour expected?
Best wishes,
Henry
Code:
from ngsolve import H1, Mesh, GridFunction, x
from netgen.geom2d import unit_square
from ngsolve.webgui import Draw
mesh = Mesh(unit_square.GenerateMesh(maxh=0.2))
fes = H1(mesh, order=2)
gfu = GridFunction(fes, nested=True) # nested=True to do the prolongation
gfu.Set(x * (1 - x))
Draw(gfu)
mesh.Refine()
fes.Update()
gfu.Update()
Draw(gfu)
- Guosheng Fu
- Offline
- Elite Member
Less
More
- Thank you received: 6
3 years 2 weeks ago #4099
by Guosheng Fu
Replied by Guosheng Fu on topic Prolongation for higher order
I think that's expected. The H1 prolongation operator seems to only support P1 in the current version.
Maybe you can simply implement an L2 projection, with coarse grid solution as the source.
Maybe you can simply implement an L2 projection, with coarse grid solution as the source.
- Guosheng Fu
- Offline
- Elite Member
Less
More
- Thank you received: 6
3 years 2 weeks ago #4100
by Guosheng Fu
Replied by Guosheng Fu on topic Prolongation for higher order
If you work only with degree 2, you may checkout the ngsxfem's P2Prolongation
github.com/ngsxfem/ngsxfem
There is no H1 prolongation operator for degree greater than 2. It is very cubersome to manually implement such an operator on unstrctured grids.
github.com/ngsxfem/ngsxfem
There is no H1 prolongation operator for degree greater than 2. It is very cubersome to manually implement such an operator on unstrctured grids.
Time to create page: 0.109 seconds