Prolongation for higher order

More
2 years 11 months ago #4098 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
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)
More
2 years 11 months ago #4099 by Guosheng Fu
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.
More
2 years 11 months ago #4100 by Guosheng Fu
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.
More
2 years 11 months ago #4101 by hvwahl
Hi Guosheng,

thanks for the quick reply and the hint :) !

Best wishes,
Henry
Time to create page: 0.126 seconds