Efficient interpolation technique

Dear all,
I want to interpolate a function u from one finite element space Vh to another finite element space Wh. I have used the operator “=” for interpolation. But it is not providing good results. Can anyone suggest any other efficient interpolation technique?
Thanks in advance.

Please be more clear about what you mean by “not providing good results.”

The interpolate function does provide good results. My guess is that you are trying to interpolate a coarse (in an h or p sense) FEspace onto a finer mesh or higher order space, but without more information I can’t be more helpful.

I am trying to compute a solution of a nonlinear problem.
The methodology is:

  1. First I have to solve the problem on a coarse mesh (mesh size H).
  2. Then by using the coarse mesh solution, I have to solve the problem on a fine mesh (mesh size h and h<H).
    For step 2, I need to interpolate the coarse mesh solution to the fine mesh. For that, I have used “=” operator. But in this case, the accuracy of the fine mesh solution is lost and the order of convergence is also not matching with the theoretical one.
    So, is there any other interpolation technique that can interpolate the solution more accurately?

Are you confident about this approach? In most cases, I think it would be better to use a coarse mesh as a preconditioner for the system on the fine mesh rather than as an independent intermediate step. There are several built-in routines in PETSc to do this efficiently.

My guess would be that you’re using discontinuous elements or that there is some other fundamental issue that makes the interpolation unsatisfactory. The interpolation is not “inaccurate” – you are simply not providing enough information to get your desired result. Do you have a MWE?

You can try by making an interpolation matrix with interpolate(NewSpace,OldSpace):

  1. matrix Interpol = interpolate(Wh,Vh);
  2. wh[ ]=Interpol*vh[ ];

This a Hard question, there is no miracle solution for this problem, it depends deeply on your expectations.