[FLASH-USERS] [EXT] How to get the physical coordinates of the mesh in simulation_adjustEvolution.F90

Eddie Hansen ehansen at pas.rochester.edu
Tue Sep 8 09:33:20 EDT 2020


Hi Victorien,

You just need to put the allocate and
getCellCoords call outside of the j loop. And in between the 'end do's, put
a deallocate(yCoord).


On Tue, Sep 8, 2020, 6:45 AM Victorien Bouffetier <
victorien.bouffetier at u-bordeaux.fr> wrote:

> Hi everyone!
>
> I would need to have acces to the physical coordinates of the mesh in the
> file Simulation_adjustEvolution.F90, but I don't  know how to do so. I have
> been trying to get the physical coodinates using Grid_getCellCoords(...),
> but it keeps crashing.
>
> here is the piece of codes which fails. It shows no problem at the
> compilation but  crashes while executing the code when entering the do
> procedure.
>
>
> do lb = 1, blkcnt
>         call Grid_getBlkIndexLimits(blklst(lb),blkLimits,blkLimitsGC)
>         call Grid_getBlkPtr(blklst(lb), blkPtr)
>
>            do j = blkLimits(LOW,JAXIS), blkLimits(HIGH,JAXIS)
>
>                allocate(yCoord(blkLimitsGC(HIGH,JAXIS)))
>                call Grid_getCellCoords(JAXIS, blockID,CENTER,gcell,yCoord,
> blkLimitsGC(HIGH,JAXIS))
>
>                      if (yCoord(j)<=y_threshold) then
>
>                               ...
>
>                     end if
>           end do
> end do
>
>
>
> When the code crashes it returns this error pointing at the line where I
> have the Grid_getCellCoords(...).
>
>
> Program received signal SIGSEGV: Segmentation fault - invalid memory
> reference.
>
>
> So my questions are:
> _ Am I using the right subroutine to get the physical coordinates?
> _ Do you have any idea of why it says me 'invalid memory reference' while
> my variables and subroutine are declared?
>
>
> Thank you so much for your patience and attention,
>
> Best regards,
>
>
> ----------------------------------------------------
> Victorien Bouffetier
> phd student
> Centre Lasers Intenses et Applications
> Bordeaux University
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20200908/a4ba50e8/attachment-0001.htm>


More information about the flash-users mailing list