[FLASH-USERS] problems getting coordinates for face variables

Klaus Weide klaus at flash.uchicago.edu
Mon Jan 25 17:37:21 EST 2010


On Mon, 25 Jan 2010, Ken Dere wrote:

> I am trying to use the unsplit mesh mhd solver in a 2D geometry with
> constant gravity in FLASH 3.2.  I am using
> 
> call  gr_extendedGetCellCoords(IAXIS, blockHandle, gr_myPE, FACES,
> .true., xCoord,  sizesGC(IAXIS))
> 
> from  Grid_bcApplyToRegionSpecialized and get the following error
> message when trying to get FACEX coordinates:
> 
>  pe,block,accblk,axis,j           0           1           1          
> 2          13 coords differ!!! T
>   18000000000.000000000000000     .NE.  
> 17000000000.000000000000000       2000000000.0000000000000000     
> 3.81469726562500000000000000E-06
> 
>  Driver_abort called. See log file for details.
>  Error message is [gr_extendedGetCellCoords] Two ways to calculate cell
> coordinates give significantly different answers!

Hi Ken,

I strongly suspect that the code is failing this way, rather obscurely, 
because the sizing of the output array xCoords is not right.
When you call gr_extendedGetCellCoords (or Grid_getCellCoords) with
edge=FACES, you are supposed to provide an array of size one more
than what you would use for edge=CENTER or edge=LEFT_EDGE or 
edge=RIGHT_EDGE. You are also supposed to provide the correct
size in the last argument (size).

You can check my suspicion by compiling gr_extendedGetCellCoords.F90
(or Grid_getCellCoords.F90) with DEBUG defined.  (Edit the file, or
add something like -DDEBUG to the compilation command line.)

Please let us know whether this resolves the issue or if there are
additional problems.

Klaus



More information about the flash-users mailing list