Particle methods discretize the Lagrangian form of convection diffusion equations. This means that particles positions follow the local flow map, and thus the particle positions eventually become distorted and the particle function representation ceases to be well sampled. To ascertain convergence it is then necessary to "remesh" the particles, by interpolating the properties they carry (vorticity, momentum, charge) onto a regular grid. A new set of particles is then created on those regular grid locations.
Remeshing is implemented in PPM in the two steps:
We assume that you have the following at hand:
You now have to interpolate your particle values up onto the field field_up. You do this using the following a call to ppm_interp_p2m.
Note: after this step the ghost layers do not have valid values and you need to do a ghost get to update the ghosts.