I would like to know how one can do a time-integration at a fixed
location on the grid, in a multi-grid situation.
For example, right now I have a piece of auxiliary code where i
compute a new field variable NEW at each time step, from which I want
its time integral W[7]. For a time integration, I simply cumulate the
updated value of NEW at that grid location, e.g.
W(7,I,J) = NEW+W(7,I,J)
How is that impacted by the fact that I have multiple grid levels and
the grid gets refined/de-refined as time advances Seems to work, but
are there any issues?
Thanks,
matei
> I would like to know how one can do a time-integration at a fixed > location on the grid, in a multi-grid situation.
> For example, right now I have a piece of auxiliary code where i > compute a new field variable NEW at each time step, from which I want > its time integral W[7]. For a time integration, I simply cumulate the > updated value of NEW at that grid location, e.g. > W(7,I,J) = NEW+W(7,I,J) > How is that impacted by the fact that I have multiple grid levels and > the grid gets refined/de-refined as time advances Seems to work, but > are there any issues?
Yes. You have to ask yourself what are AMR_SOL's prolongation and restriction operators doing to your NEW quantity. The prolongation is the interpolation done when putting down a new fine patch that can't lift its solution from a previous fine patch. The restriction is the averaging done on a fine patch when projecting its solution onto the underlying coarse patch.
The default restriction operator assumes the quantities are in conserved form and in effect computes a mass weighted average. The default prolongation operator performs a MUSCL type reconstruction. This is sympathetic to the types of shock-capturing schemes used by AMR_SOL, but it results in a stepped interpolation that might cause grief depending on what you're doing.
It is possible to overload the restriction and prolongation operators via the patch-integrator. But then you're getting down to the bowels of the machinery, with all the nitty gritty problems that entails.