[FLASH-USERS] force a derefinement?

Dean Townsley townsley at as.arizona.edu
Wed Dec 2 01:37:50 EST 2009


Hi Andrew,

Just lowering lrefine_max across a restart doesn't quite work, as you
have discovered.  Paramesh data with maxrefine of n > m can't be read
into structures with a maxrefine of m without some non-trivial
conversion.

There is a slightly clunky way to handle this, besides just defining
your own "highest used refinement" independently from lrefine_max, as
Samuel suggests by using a custom refinement marking routine.

There is another parameter, called "lrefine_del" which will decrease
the maximum refinement level across a restart during the grid
initialization.

So if you had a run that had gone a while with lrefine_max=10, for
example, and you wanted to restart it to lrefine_max=9, you would
actually put
  lrefine_max=10
  lrefine_del=1
in your flash.par for the restart.

But...
The tricky part is that none of the refinement-marking routines know
about this, so the levels will just be re-populated on the next
refinement.  So what you should do is put a ".dump_restart" file in
the directory before you restart the run.  Then it will restart,
decrease the refinement during initialization, take one step, and then
write out a checkpoint and exit before changing refinement.  This
assumes your "nrefs" parameter is set to the default of 2 so that a
refinement evaluation occurs every other step, and that the checkpoint
from which you are restarting was dumped after an even-numbered step.
If not, I believe you could just bump up "nrefs" to something which
your step number is not evenly divisible by so that it will skip the
refinement.

Now you can take this new checkpoint file and restart from it with
lrefinem_max=9.  Since it doesn't have any blocks at level 10, it will
read into the paramesh structures without an issue.


I know this process worked in version 3.1 and earlier, and I would
expect it to still work.  I have actually used this process recently,
but not with an up-to-date tree.


Sorry that is a little convoluted, but maybe it will help.

Cheers,
Dean



On Tue, 01 Dec 2009 17:14:42 -0500 Andrew Szymkowiak wrote:
>    I would like the later parts of a simulation to run at a lower 
> resolution.  I first thought I might just lower lrefine_max during a 
> restart, but got errors (with FLASH version 3.2) like
> 
>  ERROR in mpi_amr_1blk_guardcell : pe            2  working on 
> lb            1
>   neigh            3           1           3  cannot find 
> surrblk            3, etc
> 
> Is there a way to get this to work?  Or a standalone utility, that would 
> read in a checkpoint file, and rebin to a coarser mesh? I can imagine 
> writing such a thing, but am hoping not to have to re-invent a wheel...
> 
> Thanks,
>     Andy S.
> 
> 



More information about the flash-users mailing list