<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Thank you for your answeres.<br></div><div><br data-mce-bogus="1"></div><div>The solution was the combination of both of your replies.<br data-mce-bogus="1"></div><div>I just launched a low resolution calculation to make a quick test and it seems to work nicely. <br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thank you so much.<br data-mce-bogus="1"></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>De: </b>"Ernesto Zurbriggen" <ernesto.zurbriggen@gmail.com><br><b>À: </b>"flash-users" <flash-users@flash.uchicago.edu><br><b>Envoyé: </b>Mardi 8 Septembre 2020 15:38:24<br><b>Objet: </b>Re: [FLASH-USERS] How to get the physical coordinates of the mesh        in simulation_adjustEvolution.F90<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><div dir="ltr">Hi Victorien!<div>Another contribution to Eddie's one.<div style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif"><br></div><div style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif">Look here </div><div style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif"><span style="font-size:16px">>>call Grid_getBlkIndexLimits(blklst(</span><span style="font-size:16px">lb),blkLimits,blkLimitsGC)</span><br style="font-size:16px"><span style="font-size:16px">>>        call Grid_getBlkPtr(blklst(lb), blkPtr)</span><br></div><div style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif">you are using the argument blklst(lb), but there </div><div style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif"><span style="font-size:16px">>>call Grid_getCellCoords(JAXIS, blockID,CENTER,gcell,yCoord, blkLimitsGC(HIGH,JAXIS))</span><br></div><div style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif">you are using blockID. That could be a mistake if you aren't defining right blockID. </div><div style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif"><br></div><div style="color:rgb(0,0,0)"><span style="font-family:arial,helvetica,sans-serif">Another thing, don't forget to call the API interface, something like: </span><font face="monospace">use Grid_interface,ONLY: Grid_getCellCoords</font></div><div style="color:rgb(0,0,0)"><font face="monospace"><br></font></div><div style="color:rgb(0,0,0)"><font face="arial, sans-serif">Good luck! </font></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mar., 8 sept. 2020 a las 8:45, Victorien Bouffetier (<<a href="mailto:victorien.bouffetier@u-bordeaux.fr" target="_blank">victorien.bouffetier@u-bordeaux.fr</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div>Hi everyone!<br></div><br><div>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.<br></div><br><div>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.<br></div><br><br><div>do lb = 1, blkcnt<br>        call Grid_getBlkIndexLimits(blklst(lb),blkLimits,blkLimitsGC)<br>        call Grid_getBlkPtr(blklst(lb), blkPtr)<br><br>           do j = blkLimits(LOW,JAXIS), blkLimits(HIGH,JAXIS)<br></div><br><div>               allocate(yCoord(blkLimitsGC(HIGH,JAXIS)))</div><div>               call Grid_getCellCoords(JAXIS, blockID,CENTER,gcell,yCoord, blkLimitsGC(HIGH,JAXIS))<br></div><br><div>                     if (yCoord(j)<=y_threshold) then<br></div><br><div>                              ...<br></div><br><div>                    end if<br></div><div>          end do <br></div><div>end do<br></div><br><br><br><div>When the code crashes it returns this error pointing at the line where I have the Grid_getCellCoords(...).<br></div><br><br><div>Program received signal SIGSEGV: Segmentation fault - invalid memory reference.<br></div><br><br><div>So my questions are: <br></div><div>_ Am I using the right subroutine to get the physical coordinates?<br></div><div>_ Do you have any idea of why it says me 'invalid memory reference' while my variables and subroutine are declared?<br></div><br><br><div>Thank you so much for your patience and attention,</div><br><div>Best regards,<br></div><br><br>----------------------------------------------------<br><div>Victorien Bouffetier<br></div><div>phd student<br></div><div>Centre Lasers Intenses et Applications<br></div><div>Bordeaux University</div></div><br></div></div></div></blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div dir="ltr" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:inherit"><font style="background-color:rgb(234,209,220)" face="monospace, monospace"><font color="#000000"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;margin:0px;padding:0px;border:0px;vertical-align:baseline;color:inherit"><div style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;margin:0px;padding:0px;border:0px;vertical-align:baseline;color:inherit"><i style="font-family:"Courier New",monospace;background-color:rgb(255,255,255);color:rgb(68,68,68);line-height:normal">Dr. Ernesto Zurbriggen, FAPESP posdoctoral fellow</i><i style="color:rgb(68,68,68)"><br></i></div></span></font></font><font style="background-color:rgb(234,209,220)" face="monospace, monospace"><font color="#000000"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;margin:0px;padding:0px;border:0px;vertical-align:baseline;color:inherit"><div style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;margin:0px;padding:0px;border:0px;vertical-align:baseline;color:inherit"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:inherit;background-color:rgb(255,255,255)"><i style="color:rgb(68,68,68)">​</i></span></div></span></font></font></div><div dir="ltr" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:inherit"><div style="margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-family:Calibri,Arial,Helvetica,sans-serif;vertical-align:baseline;color:rgb(0,0,0)"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;font-family:"Courier New",monospace;vertical-align:baseline;color:inherit"><i style="color:rgb(68,68,68);line-height:normal"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:inherit"><i style="font-family:monospace,monospace;background-color:rgb(234,209,220)"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:inherit"><div style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:inherit"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;font-family:"Courier New",monospace;vertical-align:baseline;color:inherit;background-color:rgb(255,255,255)"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;font-family:inherit;vertical-align:baseline;color:inherit">Email</span></span><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;font-family:"Courier New",monospace;vertical-align:baseline;color:inherit;background-color:rgb(255,255,255)">:</span><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;font-family:inherit;vertical-align:baseline;color:inherit;background-color:rgb(255,255,255)"><i style="line-height:normal"> <a href="mailto:ernesto.zurbriggen@craam.mackenzie.br" target="_blank">ernesto.zurbriggen@craam.mackenzie.br</a></i></span><i><br></i></div><div style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:inherit"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;font-family:inherit;vertical-align:baseline;color:inherit;background-color:rgb(255,255,255)"><i style="line-height:normal">​Phone: +55 11-2114-8783</i></span><i><br></i></div></span></i></span><br></i></span></div><div style="margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-family:Calibri,Arial,Helvetica,sans-serif;vertical-align:baseline;color:rgb(0,0,0)"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;font-family:"Courier New",monospace;vertical-align:baseline;color:inherit"><i style="color:rgb(68,68,68);line-height:normal">Universidade Presbiteriana Mackenzie, </i></span><i style="color:rgb(68,68,68);font-family:monospace,monospace;background-color:rgb(234,209,220)"><br></i></div><div style="margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-family:Calibri,Arial,Helvetica,sans-serif;vertical-align:baseline;color:rgb(0,0,0)"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;font-family:"Courier New",monospace;vertical-align:baseline;color:inherit"><i style="color:rgb(68,68,68);line-height:normal">Escola de Engenharia, </i></span><i style="color:rgb(68,68,68);font-family:monospace,monospace;background-color:rgb(234,209,220)"><br></i></div><div style="margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-family:Calibri,Arial,Helvetica,sans-serif;vertical-align:baseline;color:rgb(0,0,0)"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;font-family:"Courier New",monospace;vertical-align:baseline;color:inherit"><i style="color:rgb(68,68,68);line-height:normal">Centro de Rádio Astronomia e Astrofísica Mackenzie (CRAAM),</i></span><i style="color:rgb(68,68,68);font-family:monospace,monospace;background-color:rgb(234,209,220)"><br></i></div><div style="margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-family:Calibri,Arial,Helvetica,sans-serif;vertical-align:baseline;color:rgb(0,0,0)"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;font-family:"Courier New",monospace;vertical-align:baseline;color:inherit"><i style="color:rgb(68,68,68);line-height:normal">Rua da Consolação 896, 01302-907, SP, São Paulo, Brasil.</i></span></div></div></div></div><br></div></div></body></html>