[FLASH-USERS] Specialized Refinement Routine: Grid_markRefineSpecialized

Klaus Weide klaus at flash.uchicago.edu
Fri Aug 12 17:47:01 EDT 2016


On Fri, 12 Aug 2016, Djibrilla Boureima, Ismael wrote:

> Looking  into CCSN/Grid_markRefineDerefine.F90 (which is the closest to
> what I am looking for) I see that Grid_markRefineSpecialized is called
> right before Grid_markRefineDerefine returns. I made the call from the same
> location in my setup, and I still see no change. Following are the lines in
> my Grid_markRefineDerefin routine :
> 
> *spec(1:3) = 0.0   ! setting origin coordinates, and of course spec was
> initially declared as a 4 dimensional array     spec(4) = 8.0      !
> limiting radius = 8 cm     call
> Grid_markRefineSpecialized(INRADIUS,4,spec,1)  ! All blocks below r = 8cm
> should be of refinement level = 1*
> 
> Unfortunately,  I get blocks below r = 8cm with refinement level > 1. Refer
> to attached pictures in which the AMR grid is displayed on pressure field.
> I am not sure whether the grid dimension and/or geometry makes any
> difference, but It seems not to work for me.

FLASH applies a combination of refinement criteria, and how they interact 
isn't always obvious.

For the most part, the usual implementations of Grid_markRefineDerefine 
(and auxiliary routines called from there) try to act conservatively, in 
the following sense: When different criteria request different refinement 
levels at a given location, the highest level wins. This applies when
2nd-derivative criteria of several refine_var's are combined to determine 
a resulting level; and it also applies when refinement requested by other
criteria - in particular, 2nd-derivative criteria - are modified 
with Grid_markRefineSpecialized.  That means you can use 
Grid_markRefineSpecialized to request higher refinement, but not to lower 
it in some part of the domain.

It IS possibly to modify Grid_markRefineDerefine so that it lowers the 
refinement in some parts of the domain below what it otherwise would be;
you just can't do it with the existing Grid_markRefineSpecialized 
implementation.  You will probably have to force

   refine(i) = .FALSE.    

for some blocks i, which is requesting refinement more aggressively
that just setting

   derefine(i) = .TRUE.


You may want to write a modified version of 
source/Grid/GridMain/paramesh/gr_markInRadius .

The difference between 
source/Grid/GridMain/paramesh/gr_markDerefineByLogRadius.F90
and
source/Grid/GridMain/paramesh/gr_unmarkRefineByLogRadius.F90
may also be instructive.

Klaus



More information about the flash-users mailing list