[FLASH-USERS] Prolonging/restricting values

Klaus Weide klaus at flash.uchicago.edu
Tue Feb 19 13:17:22 EST 2013


On Wed, 13 Feb 2013, Seyit Hocuk wrote:

> Dear users,
> 
> I have made a column density calculation routine that sort of does not require
> to calculate the complete column density at every timestep, but needs a small
> update on the differences between current and last timestep. This works fine,
> 99.5% accurate, but everytime there is a refinement step, my column densities
> are messed-up and I need to do the full column density calculation. This is
> expensive and slow. I suspect that this problem arises from the prolongation
> (or restriction). I am currently doing hydro (amr) simulations with
> self-gravity (multigrid) and I remember that you could make your own simple
> prolongation for MHD simulations.

Seyit,

What you seem to have in mind is Simulation_customizeProlong, which his 
indeed used with MHD simulations to modify the interpolation method for
prolongation into newly created leaf blocks.  In the MHD simulation it is
only affecting the prolongation of face variables, but in principle you 
could also modify the interpolation method for cell-centered variables 
here.

Unfortunately, FLASH does not provide a ready-made way to change 
interpolation order for just one variable.

With the default interpolation method used with PARAMESH setups,
-gridinterpolation=monotonic, you can use interpol_order to lower
the interpolation order to 1 or 0 from the default 2.

You could use -gridinterpolation=native instead, and then 'interpol_order'
will be ignored and you should be able to set the interpolation order on
a variable-by-variable basis, by initializing the interp_mask_unk(:) array
appropriately (whose default initialization appears in 
gr_initParameshArrays.F90).

In both cases, code changes would be required if you want this to apply 
only during prolongation; at a minimum, you have to write an appropriate 
Simulation_customizeProlong.


Klaus



More information about the flash-users mailing list