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.

Prolongation for higher order

More
2 years 4 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 4 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 4 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 4 months ago #4101 by hvwahl
Hi Guosheng,

thanks for the quick reply and the hint :) !

Best wishes,
Henry
Time to create page: 0.140 seconds