<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body 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 test.cc, 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::debug.cc</p>
<p>ADMDerivatives::calc_derivs.cc</p>
<p>Coordinates::cylinderinbox.cc</p>
<p>However I am not having any luck reverse-engineering these.<br>
</p>
<p>Any ideas would be appreciated.</p>
<p>Chris<br>
</p>
<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>