<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Ian,</p>
<p>thanks for the quick reply.</p>
<p>SCHEDULE WorldTubeExtract_TEST AT CCTK_INITIAL AFTER
WorldTubeExtract_RegisterSlices<br>
{<br>
LANG: C<br>
OPTIONS: LEVEL<br>
} "TEST"</p>
<p>Also the output of Carpet::is_global_mode() is 0 so definitely
not in global mode.<br>
</p>
<p>Cheers,</p>
<p>Chris<br>
</p>
<br>
<div class="moz-cite-prefix">On 11/03/2017 10:12 AM, Ian Hinder
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:7F9D54B8-2BD5-4CAE-A0EC-97790826BFCB@aei.mpg.de">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<br>
<div>
<div>On 3 Nov 2017, at 09:06, Chris Stevens <<a
href="mailto:c.stevens@ru.ac.za" moz-do-not-send="true">c.stevens@ru.ac.za</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi all,</p>
<p>this hopefully is a dumb question, but I cannot for the
life of me get access to the x,y,z,r coordinates defined
in CartGrid3D.</p>
<p>Suppose I have a thorn X that wants to access these
coordinates from <a href="http://test.cc"
moz-do-not-send="true">test.cc</a>, then the thorn
should inherit: grid, the .cc should #include
"cctk_Arguments.h" and the line that accesses, say x[0],
should be called after DECLARE_CCTK_ARGUMENTS.</p>
<p>Unfortunately doing this results in an error:</p>
<p>[maths02:86267] *** Process received signal ***<br>
[maths02:86267] Signal: Segmentation fault (11)<br>
[maths02:86267] Signal code: Address not mapped (1)<br>
[maths02:86267] Failing at address: (nil)<br>
</p>
<p>Which is analogous to the error message you get by
defining a grid variable in interface.ccl without the
accompanying STORAGE: in schedule.ccl, i.e. the memory is
not allocated.<br>
</p>
<p>I am using Llama as my coordinate system, but I know this
basically is a wrapper for CartGrid3D and these
coordinates are still set. I see the printout from
CartGrid3D.<br>
</p>
<p>I try to access these coordinates at, for example,
CCTK_INITIAL, when the grid structure is already setup. I
have also tried later time bins such as CCTK_POSTSTEP.</p>
<p>Example files that access these coordinates are:</p>
<p>CTGBase::<a href="http://debug.cc" moz-do-not-send="true">debug.cc</a></p>
<p>ADMDerivatives::calc_derivs.cc</p>
<p>Coordinates::<a href="http://cylinderinbox.cc"
moz-do-not-send="true">cylinderinbox.cc</a></p>
<p>However I am not having any luck reverse-engineering
these.<br>
</p>
<p>Any ideas would be appreciated.</p>
</div>
</blockquote>
<div><br>
</div>
<div>Hi,</div>
<div><br>
</div>
<div>Thanks for the detailed report!</div>
<div><br>
</div>
<div>What mode are you calling your function in? i.e. can you
show us the block in schedule.ccl that schedules your
function? If it is not local mode (the default), then you
won't be able to access any grid data, and you will get a
segfault.</div>
</div>
<br>
<div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap:
break-word; -webkit-nbsp-mode: space; -webkit-line-break:
after-white-space;">
<div style="color: rgb(0, 0, 0); letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;">
<div style="color: rgb(0, 0, 0); letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;">
<div style="color: rgb(0, 0, 0); letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;">
<div>-- </div>
<div>Ian Hinder</div>
<div><a href="http://members.aei.mpg.de/ianhin"
moz-do-not-send="true">http://members.aei.mpg.de/ianhin</a></div>
</div>
</div>
</div>
</div>
</div>
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<font size="-1" face="Cantarell" color="#666666">Dr Chris Stevens</font>
<div class="moz-signature">
<div class="moz-signature"> <font size="-1" face="Cantarell"
color="#666666"> </font>
<p><font size="-1" face="Cantarell" color="#666666">Department
of Mathematics</font></p>
<font size="-1" face="Cantarell" color="#666666"> </font>
<p><font size="-1" face="Cantarell" color="#666666">Rhodes
University</font></p>
<p><font color="#666666"><font size="-1"><font
face="Cantarell">Room 5</font></font></font></p>
<p><font color="#666666"><font size="-1"><font
face="Cantarell"> Ph: +27 46 603 8932</font></font></font></p>
<p><font color="#666666"><font size="-1"><font
face="Cantarell">Web: <a moz-do-not-send="true"
href="http://www.chrisdoesmaths.com">www.chrisdoesmaths.com</a></font></font></font></p>
</div>
</div>
</div>
</body>
</html>