[FLASH-USERS] Guard cell filling only one variable

Seyit Hocuk seyit at astro.rug.nl
Wed Jul 18 10:57:52 EDT 2012


Hi Klaus,

Thanks for your swift reply. Your answer was certainly helpful.


>> To gain speed, I've already changed my line from
>> call Grid_fillGuardCells(CENTER, ALLDIR)
>> to
>> call Grid_fillGuardCells(CENTER, ALLDIR, minLayers=1, selectBlockType=LEAF)
> I am curious whether you noticed any speedup from this.

Yes, it seems so. I haven't tested it rigorously, but for a few trials, 
I seem to gain a slight speed boost. More precisely, my specific 
subroutine took 5.13 sec instead of 5.43 sec (an average of 4 tries). Of 
course, this coud be just my machine randomness since other programs are 
also open.


> A simple example use of guard cell masking:
>
>     logical, dimension(NUNK_VARS) :: gcMask
>     ...
>     gcMask(:) = .FALSE.
>     gcMask(DENS_VAR) = .TRUE.   ! Only DENS_VAR should be turned on
>     call Grid_fillGuardCells(CENTER,ALLDIR,maskSize=NUNK_VARS, mask=gcMask)

Thanks for the example. The speed boost is now significant. It took only 
1.40 sec now. Great!
It takes 0.9 sec when I also include "minLayers=1, selectBlockType=LEAF".



> **NOTE**
>
> For masking to take any effect, the runtime parameter enableMaskedGCFill
> needs to be TRUE. Otherwise, Grid_fillGuardCells will act as if you had
> not specified any mask, i.e., guard cells for all variables will still be
> exchanged.
>
> I believe this RP is off by default in the released code. So you should put
>    enableMaskedGCFill = .TRUE.
> in your parfile.

I'm glad you told me this, as I did not know this fact.


Best,
Seyit






More information about the flash-users mailing list