<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 15 Oct 2019, at 22:05, Haas, Roland <<a href="mailto:rhaas@illinois.edu" class="">rhaas@illinois.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hello Severin,<br class="">
<br class="">
<blockquote type="cite" class="">However if I want to choose a point inside the spherical part<br class="">
(outside of the cartesian grid) I can not gather any data.<br class="">
<br class="">
I assume that the output thorn is only aware of the cartesian<br class="">
coordinates? Do you (or anyone else) know if there is a way to bypass<br class="">
this issue?<br class="">
</blockquote>
The output thorn is CarpetIOASCII, though I am not familiar enough with<br class="">
it to know exactly how it finds out which point to output. It may well<br class="">
not be aware of Llama (it would then use the "local" coordinates<br class="">
instead of the "global", Cartesian ones).<br class="">
<br class="">
You could write some C code to use Cactus's interpolator to get<br class="">
interpolate the data. If the coordinate given is the location of an<br class="">
actual grid point then there is (effectively) no interpolation. For an<br class="">
example on how to use it, please see the Cactus docs:<br class="">
<br class="">
<a href="https://www.einsteintoolkit.org/referencemanual/ReferenceManualch2.html#x4-110000A2" class="">https://www.einsteintoolkit.org/referencemanual/ReferenceManualch2.html#x4-110000A2</a><br class="">
<br class="">
You could (ab)use CactusNumerical's InterpToArray thorn which lets you<br class="">
do the same without writing code. For an example use, please see its<br class="">
tests though for your use you will want to use the "scalar_vars" etc<br class="">
parameters instead of "array1d_vars".<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>Hi,</div>
<div><br class="">
</div>
<div>You can use CarpetIOASCII and CarpetIOHDF5 to do what you want, more or less.</div>
<div><br class="">
</div>
<div>Each of the 6 angular patches will be output in separate files. Each one has a mapping x,y,z->rho,sigma,r, where rho and sigma are two of the angular coordinates (different for each patch), and r is *always* the radial coordinate. So, if you want to
output a line in the radial direction, you need to use</div>
<div><br class="">
</div>
<div>CarpetIOASCII::out1d_vars = "myvar"</div>
<div>
<div>CarpetIOASCII::out1d_z = yes</div>
<div><br class="">
</div>
<div class="">I believe this is enough. You will get the angular coordinates (0,0) for each patch, corresponding to the +x, -x, +y, -y and +z, -z axes, and the "z" coordinate in the 1D output file will be the radial direction. This *might* depend on the value
of n_angular; the angular coordinates chosen will come from out1D_zline_x and out1D_zline_y, which default to 0. If the coordinates are such that 0 is between two grid points, then you might not get any data. This will depend on whether n_angular is even
or odd, but I don't remember the details from memory. It's also possible that CarpetIOASCII will give you the nearest point in that case; I'm not sure.</div>
<div class=""><br class="">
</div>
<div class="">You can do the same trick for output at a constant radius, either 1D or 2D, BUT you have to watch out for the fact that the radius will be chosen as, eg. for 2D output, the value of CarpetIOASCII::out2D_xyplane_z, which defaults to 0, where there
is no data since the angular patches start at a finite radius r > 0. So if you want a 2D surface at r = 100, you need to set CarpetIOASCII::out2D_xyplane_z = 100.</div>
</div>
<div><br class="">
</div>
<div>I believe the same works with HDF5. It should also work for a single point; 0d output; see the parameters in CarpetIOASCII/param.ccl. Just remember that the radial coordinate will be called "z"!</div>
</div>
<br class="">
<div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
-- <br class="">
Ian<b class=""><span class="Apple-converted-space"> </span></b>Hinder<br class="">
Research Software Engineer<br class="">
University of Manchester, UK</div>
</div>
</div>
<br class="">
</body>
</html>