PR4NEEWZRNGIX2S6WB3GPMYLBVLEFQDI76KOOYMMKZTRVFHBHMAQC
Cactus Code Thorn Coordinates
Author(s) : Erik Schnetter <schnetter@gmail.com>
Maintainer(s): Erik Schnetter <schnetter@gmail.com>
Licence : LGPL
--------------------------------------------------------------------------
1. Purpose
Provide coordinate grid function
# Interface definition for thorn Coordinates
IMPLEMENTS: Coordinates
USES INCLUDE HEADER: loop.hxx
CCTK_REAL coords TYPE=gf TAGS='index={0 0 0}' { coordx coordy coordz } "Coordinates"
# Parameter definitions for thorn Coordinates
# Schedule definitions for thorn Coordinates
SCHEDULE Coordinates_Setup AT basegrid
{
LANG: C
WRITES: coords(everywhere)
} "Set coordinate grid functions"
#include <loop.hxx>
#include <cctk.h>
#include <cctk_Arguments_Checked.h>
#include <cctk_Parameters.h>
namespace Coordinates {
extern "C" void Coordinates_Setup(CCTK_ARGUMENTS) {
DECLARE_CCTK_ARGUMENTS_Coordinates_Setup;
DECLARE_CCTK_PARAMETERS;
const Loop::GF3D<CCTK_REAL, 0, 0, 0> coordx_(cctkGH, coordx);
const Loop::GF3D<CCTK_REAL, 0, 0, 0> coordy_(cctkGH, coordy);
const Loop::GF3D<CCTK_REAL, 0, 0, 0> coordz_(cctkGH, coordz);
Loop::loop_all<0, 0, 0>(
cctkGH, [&](const Loop::PointDesc &p) { coordx_(p.I) = p.x; });
Loop::loop_all<0, 0, 0>(
cctkGH, [&](const Loop::PointDesc &p) { coordy_(p.I) = p.y; });
Loop::loop_all<0, 0, 0>(
cctkGH, [&](const Loop::PointDesc &p) { coordz_(p.I) = p.z; });
}
} // namespace Coordinates
# Main make.code.defn file for thorn Coordinates
# Source files in this directory
SRCS = coordinates.cxx
# Subdirectories containing source files
SUBDIRS =