[FLASH-USERS] Grid_putPointData vs. Grid_getBlkPtr
Slavin, Jonathan
jslavin at cfa.harvard.edu
Wed Dec 14 14:37:13 EST 2016
Thanks for your response Klaus. That clears up a lot.
Jon
On Wed, Dec 14, 2016 at 2:07 PM, Klaus Weide <klaus at flash.uchicago.edu>
wrote:
> On Wed, 14 Dec 2016, Slavin, Jonathan wrote:
>
> > Hi all,
> >
> > I'm wondering what the effective difference is for initiating a
> simulation
> > between 1) using Grid_putPointData and 2) using assignment to the
> elements
> > of solnData (where solnData is returned by Grid_getBlkPtr). In the
> default
> > supplied Simulation_initBlock for the Sedov simulation, the latter is
> used
> > if FL_NON_PERMANENT_GUARDCELLS is defined and the former is used
> > otherwise. In the Simulation_initBlock for the BlastBS simulation, there
> > is no test whether FL_NON_PERMANENT_GUARDCELLS is defined and method 2 is
> > used, despite the fact that (as far as I can tell) that symbol is not
> > defined. Any help on this would be appreciated. Also it'd be helpful if
> > someone could tell me under what circumstances
> FL_NON_PERMANENT_GUARDCELLS
> > gets defined.
>
> Jon,
>
> The symbol FL_NON_PERMANENT_GUARDCELLS should only be defined if FLASH is
> set up to use the no_permanent_guardcells mode of PARAMESH 4.0 or
> PARAMESH4dev. You should be able to find more information on this mode in
> the PARAMESH documentation.
>
> We have experimented with this mode years ago, as a way to lower memory
> requirements for large simulations. There is some supporting code still
> in the FLASH distribution - including support for optionally running some
> of the tests in no_permanent_guardcells mode, as you have found - but to
> my knowledge this has not been exercised in several years.
>
> About the question which routine should be called for UNK variable
> initialization - both Grid_putPointData and
> Grid_getBlkPtr/Grid_releaseBlockPtr work and can be used (as well
> as the further alternatives Grid_put{Blk,Plane,Row}Data).
> I consider this matter of personal preference and convenience.
>
> There are probably differences in performance (I would expect the
> variant that works with pointers to be the fastest), but this should not
> matter much for Simulation_initBlock which is only called at
> initialization.
>
> Klaus
>
--
________________________________________________________
Jonathan D. Slavin Harvard-Smithsonian CfA
jslavin at cfa.harvard.edu 60 Garden Street, MS 83
phone: (617) 496-7981 Cambridge, MA 02138-1516
cell: (781) 363-0035 USA
________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20161214/30f778b3/attachment-0001.htm>
More information about the flash-users
mailing list