SU2RMRIY2IVVZYKL7SRDLYYA4ZWE2XFKV7DSS6KTOOSUMSMHKWAQC Cactus Code Thorn AHFinderAuthor(s) : Erik Schnetter <schnetter@gmail.com>Maintainer(s): Erik Schnetter <schnetter@gmail.com>Licence : LGPL--------------------------------------------------------------------------1. PurposeFind apparent horizons
# Interface definition for thorn AHFinderIMPLEMENTS: AHFinderINHERITS: ADMBasevoid FUNCTION Interpolate(CCTK_POINTER_TO_CONST IN cctkGH,CCTK_INT IN npoints,CCTK_REAL ARRAY IN coordsx,CCTK_REAL ARRAY IN coordsy,CCTK_REAL ARRAY IN coordsz,CCTK_INT IN nvars,CCTK_INT ARRAY IN varinds,CCTK_INT ARRAY IN operations,CCTK_POINTER IN resultptrs)REQUIRES FUNCTION Interpolate
ActiveThorns = "ADMBaseAHFinderCarpetXCoordinatesFormalineIOUtilODESolversSystemTopologyTimerReport"$nlevels = 3$ncells = 32Cactus::cctk_show_schedule = noCactus::terminate = "time"Cactus::cctk_final_time = 0 #TODO 1.0CarpetX::verbose = noCarpetX::xmin = -1.0CarpetX::ymin = -1.0CarpetX::zmin = -1.0CarpetX::xmax = +1.0CarpetX::ymax = +1.0CarpetX::zmax = +1.0CarpetX::ncells_x = $ncellsCarpetX::ncells_y = $ncellsCarpetX::ncells_z = $ncellsCarpetX::max_num_levels = $nlevelsCarpetX::regrid_every = 16CarpetX::regrid_error_threshold = 5.0CarpetX::prolongation_type = "ddf" # was "conservative"CarpetX::do_reflux = noCarpetX::do_restrict = noCarpetX::restrict_during_sync = yesCarpetX::dtfac = 0.25IO::out_dir = $parfileIO::out_every = 1 #TODO $ncells * 2 ** ($nlevels - 1) / 32CarpetX::out_tsv = yes #TODO noTimerReport::out_every = 0 #TODO $ncells * 2 ** ($nlevels - 1) / 32TimerReport::out_filename = "TimerReport"TimerReport::output_all_timers_together = yesTimerReport::output_all_timers_readable = yesTimerReport::n_top_timers = 50
# Parameter definitions for thorn AHFinder
# Schedule definitions for thorn AHFinderSCHEDULE AHFinder_interpolate AT poststep{LANG: COPTIONS: globalREADS: ADMBase::metric(everywhere)READS: ADMBase::curv(everywhere)} "Interpolate ADM variables"
#include <loop.hxx>#include <cctk.h>#include <cctk_Arguments_Checked.h>#include <cctk_Parameters.h>#include <vector>namespace AHFinder {using namespace std;extern "C" void AHFinder_interpolate(CCTK_ARGUMENTS) {DECLARE_CCTK_ARGUMENTS_AHFinder_interpolate;DECLARE_CCTK_PARAMETERS;constexpr int npoints = 4;const vector<CCTK_REAL> coordsx{0.1, 0.2, 0.3, 0.1};const vector<CCTK_REAL> coordsy{0.1, 0.2, 0.3, 0.2};const vector<CCTK_REAL> coordsz{0.1, 0.2, 0.3, 0.3};constexpr int nvars = 3;const vector<CCTK_INT> varinds{CCTK_VarIndex("Coordinates::coordx"),CCTK_VarIndex("Coordinates::coordy"),CCTK_VarIndex("Coordinates::coordz"),};const vector<CCTK_INT> operations{0,0,0,};vector<vector<CCTK_REAL> > results(nvars);vector<CCTK_REAL *> resultptrs(nvars);for (int n = 0; n < nvars; ++n) {results.at(n).resize(npoints);resultptrs.at(n) = results.at(n).data();}Interpolate(cctkGH, npoints, coordsx.data(), coordsy.data(), coordsz.data(),nvars, varinds.data(), operations.data(), resultptrs.data());for (int v = 0; v < nvars; ++v)for (int n = 0; n < npoints; ++n)CCTK_VINFO("%d[%d]=%g", v, n, double(results.at(v).at(n)));}} // namespace AHFinder
# Main make.code.defn file for thorn AHFinder# Source files in this directorySRCS = interpolate.cxx# Subdirectories containing source filesSUBDIRS =