- Thank you received: 0
Adaptive mesh refinement: Interpolation operator
5 years 3 weeks ago #2037
by anandes
Adaptive mesh refinement: Interpolation operator was created by anandes
Hello,
When I use adaptive mesh refinement in NGSolve and obtain a refined mesh, is it possible to access an interpolation/update operator such that the following transformation can be computed.
Let uH be a solution on the coarse grid and uh be the equivalent interpolated field on the hierarchically refined grid. uh is obtained by interpolating the values of uH on the finer grid:
uh*uH.
This is useful to compute error norms of the coarse-grid solution on the refined grid and to compare these to norms of the solution on the refined grid . Is there a way to access this operator P?
Thank you,
Anand
When I use adaptive mesh refinement in NGSolve and obtain a refined mesh, is it possible to access an interpolation/update operator such that the following transformation can be computed.
Let uH be a solution on the coarse grid and uh be the equivalent interpolated field on the hierarchically refined grid. uh is obtained by interpolating the values of uH on the finer grid:
uh*uH.
This is useful to compute error norms of the coarse-grid solution on the refined grid and to compare these to norms of the solution on the refined grid . Is there a way to access this operator P?
Thank you,
Anand
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
5 years 2 weeks ago #2041
by mneunteufel
Replied by mneunteufel on topic Adaptive mesh refinement: Interpolation operator
Hello Anand,
maybe the attached file, where a MultiGrid preconditioner is build with coarse grid correction can help you.
Especially these lines:
Best,
Michael
maybe the attached file, where a MultiGrid preconditioner is build with coarse grid correction can help you.
Especially these lines:
Code:
prol = space.Prolongation()
...
prol.Restrict(level, d)
...
prol.Prolongate(level, w)
Best,
Michael
Attachments:
5 years 2 weeks ago #2045
by anandes
Replied by anandes on topic Adaptive mesh refinement: Interpolation operator
Hello Michael,
Thank you for pointing me to the relevant operator. I'll try this and get back to you if I have more questions.
Thank you,
Anand
Thank you for pointing me to the relevant operator. I'll try this and get back to you if I have more questions.
Thank you,
Anand
5 years 3 days ago #2142
by anandes
Replied by anandes on topic Adaptive mesh refinement: Interpolation operator
Hi Michael,
I'm following up on my earlier question here. Is it possible to use the Prolongation/Restriction operator outside of the multigrid preconditioner environment?
For example, consider the Poisson example in the NGSolve documentation. Once I obtain the solution at some discretization level can I refine the mesh and use the prolongation operator to interpolate the coarse grid solution on the refined mesh? Can you please give an example of how this can be done?
Thank you,
Anand
I'm following up on my earlier question here. Is it possible to use the Prolongation/Restriction operator outside of the multigrid preconditioner environment?
For example, consider the Poisson example in the NGSolve documentation. Once I obtain the solution at some discretization level can I refine the mesh and use the prolongation operator to interpolate the coarse grid solution on the refined mesh? Can you please give an example of how this can be done?
Thank you,
Anand
5 years 3 days ago #2144
by joachim
Replied by joachim on topic Adaptive mesh refinement: Interpolation operator
Hi,
you can use the Prolongation here as well, see the attached example.
But, you have to do some data copying.
As an alternative, you define
then the prolongation is done within GridFunction.Update()
The prolongation must be provided by the FESpace, not all have it implemented.
E.g. some high order spaces use just the prolongation of the low order space..
Best, Joachim
you can use the Prolongation here as well, see the attached example.
But, you have to do some data copying.
As an alternative, you define
Code:
gfu = GridFunction(fes, nested=True)
then the prolongation is done within GridFunction.Update()
The prolongation must be provided by the FESpace, not all have it implemented.
E.g. some high order spaces use just the prolongation of the low order space..
Best, Joachim
Attachments:
5 years 2 days ago #2145
by anandes
Replied by anandes on topic Adaptive mesh refinement: Interpolation operator
Hi Joachim,
Thank you for the detailed example with the comments. This is very helpful!
The prolongation works as expected for linear H1 spaces. If I use a higher-order H1 space, the error norm of the interpolated field on the refined grid is much larger - probably because the prolongation uses linear H1 space - as you mentioned.
However, prolongation does not seem to work on HDiv spaces. The field quantity on the refined grid is just zero in the whole domain. Is prolongation not implemented for HDiv?
Thank you,
Anand
Thank you for the detailed example with the comments. This is very helpful!
The prolongation works as expected for linear H1 spaces. If I use a higher-order H1 space, the error norm of the interpolated field on the refined grid is much larger - probably because the prolongation uses linear H1 space - as you mentioned.
However, prolongation does not seem to work on HDiv spaces. The field quantity on the refined grid is just zero in the whole domain. Is prolongation not implemented for HDiv?
Thank you,
Anand
Time to create page: 0.126 seconds