[FLASH-USERS] how to force refinement

guido granda muñoz g.granda at irya.unam.mx
Thu Apr 22 15:06:49 EDT 2021


Hi,

What I mean is that your simulation could have been running with 2 or 
more refinements criteria at the same time and one criterion could be 
de-refining what the other is refining so at the end you don't see any 
refinement.

As you said you need to have your own versions of 
Grid_markRefineDerefine.f90  and Grid_markRefineSpecialized  in your 
simulation folder and probably you have used the 
Grid_markRefineDerefine.f90 of one of the FLASH provided examples as a 
template.  This Grid_markRefineDerefine.f90  by default includes the  
PARAMESH refinement criterion on these lines:

do l = 1,gr_numRefineVars
      iref = gr_refine_var(l)
      ref_cut = gr_refine_cutoff(l)
      deref_cut = gr_derefine_cutoff(l)
      ref_filter = gr_refine_filter(l)
      call gr_markRefineDerefine(iref,ref_cut,deref_cut,ref_filter)
end do

So, if you don't provide the refine_var on your flash.par, I think that 
this part of the code doesn't work, so you can debug your code by only 
including the

Grid_markRefineSpecialized refinement criterion.

Guido,

On 22/04/21 9:52, Slavin, Jonathan wrote:
> Hi Guido,
>
> I don't understand why having no refine_var_# in my flash.par helps. 
> Could you explain?
>
> I realized after posting that the correct way to do this is to have a 
> custom version of Grid_markRefineDerefine.F90 in my simulation 
> directory and include inside of that a call to 
> Grid_markRefineSpecialized. I did that, but for some reason the grid 
> is still not refining in the way I want. Print statements inside 
> Grid_markRefineSpecialized and gr_markInRadius indicate that the 
> proper blocks are getting marked for refinement and yet no refinement 
> is being done. I put the call to Grid_markRefineSpecialized at the end 
> of Grid_markRefineDerefine so it should prevent refine and 
> derefine from getting overwritten.
>
> So I'm at a loss for why this is not working. Any help in either 
> fixing or diagnosing this problem would be appreciated.
>
> Thanks,
> Jon
>
> On Tue, Apr 20, 2021 at 1:00 PM 
> <flash-users-request at flash.uchicago.edu 
> <mailto:flash-users-request at flash.uchicago.edu>> wrote:
>
>     ---------- Forwarded message ----------
>     From: "Slavin, Jonathan" <jslavin at cfa.harvard.edu
>     <mailto:jslavin at cfa.harvard.edu>>
>     To: flash-users <flash-users at flash.uchicago.edu
>     <mailto:flash-users at flash.uchicago.edu>>
>     Cc:
>     Bcc:
>     Date: Tue, 20 Apr 2021 11:41:21 -0400
>     Subject: [FLASH-USERS] how to force refinement
>     Hi all,
>
>     I have a simulation where I'd like to, at a particular time, force
>     refinement within a given radius of the origin. I call
>     Grid_markRefineSpecialized and confirm that it works and marks the
>     relevant locations for refinement (via print statements), but it
>     seems that the refinement is not actually done.
>
>     So my question is, why isn't the refinement done? How can I force
>     the refinement to be done?
>
>     Thanks,
>     Jon
>
>     -- 
>     Jonathan D. Slavin
>     Astrophysicist - High Energy Astrophysics Division
>     Center for Astrophysics | Harvard & Smithsonian
>     Office: (617) 496-7981 | Cell: (781) 363-0035
>     60 Garden Street | MS 83 | Cambridge, MA 02138
>
>
>
>
>     ---------- Forwarded message ----------
>     From: "guido granda muñoz" <g.granda at irya.unam.mx
>     <mailto:g.granda at irya.unam.mx>>
>     To: flash-users at flash.uchicago.edu
>     <mailto:flash-users at flash.uchicago.edu>
>     Cc:
>     Bcc:
>     Date: Tue, 20 Apr 2021 11:41:04 -0500
>     Subject: Re: [FLASH-USERS] how to force refinement
>
>     Hi,
>
>     I think this might caused by another refinement criteria been
>     executed at the same time. So what your Grid_markRefineSpecilized
>     refines is being de-refined by the default (or maybe another)
>     FLASH refinement criterion. One way to check this is to run the
>     simulation without the any parameter "refine_var_#" in your flash.par.
>
>     Cheers,
>
>     On 20/04/21 10:41, Slavin, Jonathan wrote:
>>     Hi all,
>>
>>     I have a simulation where I'd like to, at a particular time,
>>     force refinement within a given radius of the origin. I call
>>     Grid_markRefineSpecialized and confirm that it works and marks
>>     the relevant locations for refinement (via print statements), but
>>     it seems that the refinement is not actually done.
>>
>>     So my question is, why isn't the refinement done? How can I force
>>     the refinement to be done?
>>
>>     Thanks,
>>     Jon
>>
>>     -- 
>>     Jonathan D. Slavin
>>     Astrophysicist - High Energy Astrophysics Division
>>     Center for Astrophysics | Harvard & Smithsonian
>>     Office: (617) 496-7981 | Cell: (781) 363-0035
>>     60 Garden Street | MS 83 | Cambridge, MA 02138
>>
>     _______________________________________________
>     flash-users mailing list
>     flash-users at flash.uchicago.edu <mailto:flash-users at flash.uchicago.edu>
>     http://flash.uchicago.edu/mailman/listinfo/flash-users
>     <http://flash.uchicago.edu/mailman/listinfo/flash-users>
>
>
>
> -- 
> Jonathan D. Slavin
> Astrophysicist - High Energy Astrophysics Division
> Center for Astrophysics | Harvard & Smithsonian
> Office: (617) 496-7981 | Cell: (781) 363-0035
> 60 Garden Street | MS 83 | Cambridge, MA 02138
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20210422/c30f5bfc/attachment-0001.htm>


More information about the flash-users mailing list