# Interface definition for thorn AHFinderDirect # $Header$ implements: AHFinderDirect # thorns from: CactusBase CactusEinstein ................. AEIThorns inherits: Grid IO ADMBase StaticConformal SpaceMask SphericalSurface # we use an include file provided by SpaceMask USES INCLUDE: SpaceMask.h ################################################################################ # # ***** aliased functions used from other thorns ***** # # we use an aliased function maybe provided by DriftCorrect SUBROUTINE SetDriftCorrectPosition \ (CCTK_POINTER_TO_CONST IN GH, \ CCTK_REAL IN x, CCTK_REAL IN y, CCTK_REAL IN z) USES FUNCTION SetDriftCorrectPosition # # This IOUtil function is used to determine whether the diagnostics file # should be truncated or appended (as in a recovery run ) # CCTK_INT FUNCTION IO_TruncateOutputFiles(CCTK_POINTER_TO_CONST IN GH) USES FUNCTION IO_TruncateOutputFiles ################################################################################ # # ***** aliased functions provided by this thorn ***** # # # This thorn provides an aliased-function interface which other thorns # can use to find out about the horizons. Each function returns a status # code which is >= 0 for ok, or < 0 for an error. # ######################################## # # This function returns the local coordinate origin for a given horizon. # CCTK_INT FUNCTION HorizonLocalCoordinateOrigin \ (CCTK_INT IN horizon_number, \ CCTK_REAL OUT origin_x, CCTK_REAL OUT origin_y, CCTK_REAL OUT origin_z) # # The following function queries whether or not the specified horizon # was found the most recent time AHFinderDirect searched for it. # The return value is: # 1 if the horizon was found # 0 if the horizon was not found # negative for an error # CCTK_INT FUNCTION HorizonWasFound(CCTK_INT IN horizon_number) # # The following function queries whether or not the specified horizon # was found the most recent time AHFinderDirect searched for it, and # if it was, returns the horizon centroid. The returned value is the # same as that of HorizonWasFound() (above), i.e. # 1 if the horizon was found; in this case centroid_[xyz] are set # to the centroid position # 0 if the horizon was not found; in this case centroid_[xyz] are # set to zeros # negative for an error # CCTK_INT FUNCTION HorizonCentroid \ (CCTK_INT IN horizon_number, \ CCTK_REAL OUT centroid_x, CCTK_REAL OUT centroid_y, CCTK_REAL OUT centroid_z) # # The following function computes the horizon radius in the direction # of each (x,y,z) point, or -1.0 if this horizon wasn't found the most # recent time AHFinderDirect searched for it. More precisely, for each # (x,y,z), consider the ray from the local coordinate origin through # (x,y,z). This function computes the Euclidean distance between the # local coordinate origin and this ray's intersection with the horizon, # or -1.0 if this horizon wasn't found the most recent time AHFinderDirect # searched for it. # # If this function is to be used in a multiprocessor run on a horizon # which was found on some other processor, the parameter # AHFinderDirect::always_broadcast_horizon_shape # must be set to true to get the correct answer. # CCTK_INT FUNCTION HorizonRadiusInDirection \ (CCTK_INT IN horizon_number, \ CCTK_INT IN N_points, \ CCTK_REAL IN ARRAY x, CCTK_REAL IN ARRAY y, CCTK_REAL IN ARRAY z, \ CCTK_REAL OUT ARRAY radius) ######################################## # all these functions are in src/driver/aliased_functions.cc PROVIDES FUNCTION HorizonLocalCoordinateOrigin \ WITH AHFinderDirect_local_coordinate_origin \ LANGUAGE C PROVIDES FUNCTION HorizonWasFound \ WITH AHFinderDirect_horizon_was_found \ LANGUAGE C PROVIDES FUNCTION HorizonCentroid \ WITH AHFinderDirect_horizon_centroid \ LANGUAGE C PROVIDES FUNCTION HorizonRadiusInDirection \ WITH AHFinderDirect_radius_in_direction \ LANGUAGE C ################################################################################