[FLASH-USERS] How to get the physical coordinates of the mesh in simulation_adjustEvolution.F90
Victorien Bouffetier
victorien.bouffetier at u-bordeaux.fr
Tue Sep 8 10:42:48 EDT 2020
Thank you for your answeres.
The solution was the combination of both of your replies.
I just launched a low resolution calculation to make a quick test and it seems to work nicely.
Thank you so much.
De: "Ernesto Zurbriggen" <ernesto.zurbriggen at gmail.com>
À: "flash-users" <flash-users at flash.uchicago.edu>
Envoyé: Mardi 8 Septembre 2020 15:38:24
Objet: Re: [FLASH-USERS] How to get the physical coordinates of the mesh in simulation_adjustEvolution.F90
Hi Victorien!
Another contribution to Eddie's one.
Look here
>>call Grid_getBlkIndexLimits(blklst( lb),blkLimits,blkLimitsGC)
>> call Grid_getBlkPtr(blklst(lb), blkPtr)
you are using the argument blklst(lb), but there
>>call Grid_getCellCoords(JAXIS, blockID,CENTER,gcell,yCoord, blkLimitsGC(HIGH,JAXIS))
you are using blockID. That could be a mistake if you aren't defining right blockID.
Another thing, don't forget to call the API interface, something like: use Grid_interface,ONLY: Grid_getCellCoords
Good luck!
El mar., 8 sept. 2020 a las 8:45, Victorien Bouffetier (< [ mailto:victorien.bouffetier at u-bordeaux.fr | victorien.bouffetier at u-bordeaux.fr ] >) escribió:
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
--
Dr. Ernesto Zurbriggen, FAPESP posdoctoral fellow
Email : [ mailto:ernesto.zurbriggen at craam.mackenzie.br | ernesto.zurbriggen at craam.mackenzie.br ]
Phone: +55 11-2114-8783
Universidade Presbiteriana Mackenzie,
Escola de Engenharia,
Centro de Rádio Astronomia e Astrofísica Mackenzie (CRAAM),
Rua da Consolação 896, 01302-907, SP, São Paulo, Brasil.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20200908/7ab5450f/attachment-0001.htm>
More information about the flash-users
mailing list