Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a1931d7
NewRadX: Added the ability to use CapyrX Multipatch
lucass-carneiro Sep 30, 2025
cc0df57
NewRadX: Use multipatch projections
lucass-carneiro Oct 1, 2025
dc2a421
NewRadX: Relaxed requirements of specific patch system setup
lucass-carneiro Feb 12, 2026
353ca7d
NewRadX: Added radpower correction for multipatch
lucass-carneiro Feb 12, 2026
8097aed
Add CapyrX thorns to spacetimex.th
lucass-carneiro Feb 12, 2026
c5c8c0d
Update repository paths for CapyrX thorns
lucass-carneiro Feb 12, 2026
cac008a
NewRadX: Removed explicit references to CapyrX
lucass-carneiro Feb 19, 2026
9351501
Merge remote-tracking branch 'origin' into features/NewRadX-multipatch
lucass-carneiro Feb 19, 2026
0bed759
Updated CI thornlist
lucass-carneiro Feb 19, 2026
d8e353a
NewRadX: addressed requested changes
lucass-carneiro Apr 9, 2026
699f3aa
NewRadX: Fixed typo in function interface documentation
lucass-carneiro Apr 23, 2026
f137883
NewRadX: Use amrex::Abort() instead of assert(0) to quit a kernel on …
lucass-carneiro Apr 28, 2026
ff3bdc1
Merge branch 'main' into features/NewRadX-multipatch
rhaas80 May 6, 2026
e747bfb
AHFinderDirect,PunctureTracker,SphericalSurface: Fix validity bugs an…
lucass-carneiro Sep 22, 2026
16ccc9d
Merge remote-tracking branch 'origin/main' into bug/AHFinder_validity
lucass-carneiro Sep 22, 2026
804d0b3
NewRadX: Use multipatch projections
lucass-carneiro Oct 1, 2025
ebdb52f
NewRadX: Removed explicit references to CapyrX
lucass-carneiro Feb 19, 2026
6b3e76b
AHFinderDirect: Add `ah_flags` to the `READS` where necessary. This is
lucass-carneiro Sep 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions AHFinderDirect/schedule.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,23 @@ storage: ahmask[1]
#
# setup
#
schedule AHFinderDirect_init at CCTK_WRAGH
{
lang: C
options: global
WRITES: AHFinderDirect::ah_centroid, ah_flags
WRITES: AHFinderDirect::ah_origin, ah_radius
} "initialise the horizon grid arrays"

schedule AHFinderDirect_setup at CCTK_BASEGRID \
after SpatialCoordinates
{
lang: C
options: global
READS: AHFinderDirect::ah_centroid, ah_flags
READS: AHFinderDirect::ah_origin, ah_radius
WRITES: AHFinderDirect::ah_centroid, ah_flags
WRITES: AHFinderDirect::ah_origin, ah_radius
} "setup data structures"

schedule AHFinderDirect_import_mask at CCTK_POSTREGRIDINITIAL \
Expand All @@ -38,6 +49,7 @@ schedule AHFinderDirect_recover at CCTK_POST_RECOVER_VARIABLES
{
lang: C
options: global
READS: AHFinderDirect::ah_flags, ah_origin, ah_radius
} "import horizon data from Cactus variables"

#
Expand All @@ -49,6 +61,7 @@ if (run_at_CCTK_ANALYSIS != 0)
{
lang: C
options: global
READS: AHFinderDirect::ah_centroid, ah_flags
} "find apparent horizon(s) after this time step"
}
if (run_at_CCTK_POSTSTEP != 0)
Expand All @@ -57,6 +70,7 @@ if (run_at_CCTK_POSTSTEP != 0)
{
lang: C
options: global
READS: AHFinderDirect::ah_centroid, ah_flags
} "find apparent horizon(s) after this time step"
}
if (run_at_CCTK_POSTINITIAL != 0)
Expand All @@ -65,6 +79,7 @@ if (run_at_CCTK_POSTINITIAL != 0)
{
lang: C
options: global
READS: AHFinderDirect::ah_centroid, ah_flags
} "find apparent horizon(s) after this time step"
}
if (run_at_CCTK_POSTPOSTINITIAL != 0)
Expand All @@ -73,6 +88,7 @@ if (run_at_CCTK_POSTPOSTINITIAL != 0)
{
lang: C
options: global
READS: AHFinderDirect::ah_centroid, ah_flags
} "find apparent horizon(s) after this time step"
}
if (run_at_CCTK_POST_RECOVER_VARIABLES != 0)
Expand All @@ -82,6 +98,7 @@ if (run_at_CCTK_POST_RECOVER_VARIABLES != 0)
{
lang: C
options: global
READS: AHFinderDirect::ah_centroid, ah_flags
} "find apparent horizon(s) after this time step"
}

Expand Down Expand Up @@ -116,13 +133,28 @@ if (run_at_CCTK_ANALYSIS != 0)
{
lang: C
options: global
READS: SphericalSurface::sf_shape_descriptors
READS: SphericalSurface::sf_coordinate_descriptors
READS: SphericalSurface::sf_active
READS: SphericalSurface::sf_valid
READS: SphericalSurface::sf_info
READS: SphericalSurface::sf_origin
READS: SphericalSurface::sf_radius
WRITES: SphericalSurface::sf_active
WRITES: SphericalSurface::sf_valid
WRITES: SphericalSurface::sf_info
WRITES: SphericalSurface::sf_origin
WRITES: SphericalSurface::sf_radius
} "store apparent horizon(s) into spherical surface(s)"

schedule AHFinderDirect_save at CCTK_ANALYSIS \
after AHFinderDirect_find_horizons \
{
lang: C
options: global
READS: AHFinderDirect::ah_centroid, ah_flags
WRITES: AHFinderDirect::ah_centroid, ah_flags
WRITES: AHFinderDirect::ah_origin, ah_radius
} "save apparent horizon(s) into Cactus variables"

if (which_horizon_to_announce_centroid != 0)
Expand Down Expand Up @@ -158,13 +190,28 @@ if (run_at_CCTK_POSTSTEP != 0)
{
lang: C
options: global
READS: SphericalSurface::sf_shape_descriptors
READS: SphericalSurface::sf_coordinate_descriptors
READS: SphericalSurface::sf_active
READS: SphericalSurface::sf_valid
READS: SphericalSurface::sf_info
READS: SphericalSurface::sf_origin
READS: SphericalSurface::sf_radius
WRITES: SphericalSurface::sf_active
WRITES: SphericalSurface::sf_valid
WRITES: SphericalSurface::sf_info
WRITES: SphericalSurface::sf_origin
WRITES: SphericalSurface::sf_radius
} "store apparent horizon(s) into spherical surface(s)"

schedule AHFinderDirect_save at CCTK_POSTSTEP \
after AHFinderDirect_find_horizons \
{
lang: C
options: global
READS: AHFinderDirect::ah_centroid, ah_flags
WRITES: AHFinderDirect::ah_centroid, ah_flags
WRITES: AHFinderDirect::ah_origin, ah_radius
} "save apparent horizon(s) into Cactus variables"

if (which_horizon_to_announce_centroid != 0)
Expand Down Expand Up @@ -200,13 +247,28 @@ if (run_at_CCTK_POSTINITIAL != 0)
{
lang: C
options: global
READS: SphericalSurface::sf_shape_descriptors
READS: SphericalSurface::sf_coordinate_descriptors
READS: SphericalSurface::sf_active
READS: SphericalSurface::sf_valid
READS: SphericalSurface::sf_info
READS: SphericalSurface::sf_origin
READS: SphericalSurface::sf_radius
WRITES: SphericalSurface::sf_active
WRITES: SphericalSurface::sf_valid
WRITES: SphericalSurface::sf_info
WRITES: SphericalSurface::sf_origin
WRITES: SphericalSurface::sf_radius
} "store apparent horizon(s) into spherical surface(s)"

schedule AHFinderDirect_save at CCTK_POSTINITIAL \
after AHFinderDirect_find_horizons \
{
lang: C
options: global
READS: AHFinderDirect::ah_centroid, ah_flags
WRITES: AHFinderDirect::ah_centroid, ah_flags
WRITES: AHFinderDirect::ah_origin, ah_radius
} "save apparent horizon(s) into Cactus variables"

if (which_horizon_to_announce_centroid != 0)
Expand Down Expand Up @@ -243,13 +305,28 @@ if (run_at_CCTK_POSTPOSTINITIAL != 0)
{
lang: C
options: global
READS: SphericalSurface::sf_shape_descriptors
READS: SphericalSurface::sf_coordinate_descriptors
READS: SphericalSurface::sf_active
READS: SphericalSurface::sf_valid
READS: SphericalSurface::sf_info
READS: SphericalSurface::sf_origin
READS: SphericalSurface::sf_radius
WRITES: SphericalSurface::sf_active
WRITES: SphericalSurface::sf_valid
WRITES: SphericalSurface::sf_info
WRITES: SphericalSurface::sf_origin
WRITES: SphericalSurface::sf_radius
} "store apparent horizon(s) into spherical surface(s)"

schedule AHFinderDirect_save at CCTK_POSTPOSTINITIAL \
after AHFinderDirect_find_horizons \
{
lang: C
options: global
READS: AHFinderDirect::ah_centroid, ah_flags
WRITES: AHFinderDirect::ah_centroid, ah_flags
WRITES: AHFinderDirect::ah_origin, ah_radius
} "save apparent horizon(s) into Cactus variables"

if (which_horizon_to_announce_centroid != 0)
Expand Down Expand Up @@ -285,13 +362,28 @@ if (run_at_CCTK_POST_RECOVER_VARIABLES != 0)
{
lang: C
options: global
READS: SphericalSurface::sf_shape_descriptors
READS: SphericalSurface::sf_coordinate_descriptors
READS: SphericalSurface::sf_active
READS: SphericalSurface::sf_valid
READS: SphericalSurface::sf_info
READS: SphericalSurface::sf_origin
READS: SphericalSurface::sf_radius
WRITES: SphericalSurface::sf_active
WRITES: SphericalSurface::sf_valid
WRITES: SphericalSurface::sf_info
WRITES: SphericalSurface::sf_origin
WRITES: SphericalSurface::sf_radius
} "store apparent horizon(s) into spherical surface(s)"

schedule AHFinderDirect_save at CCTK_POST_RECOVER_VARIABLES \
after AHFinderDirect_find_horizons
{
lang: C
options: global
READS: AHFinderDirect::ah_centroid, ah_flags
WRITES: AHFinderDirect::ah_centroid, ah_flags
WRITES: AHFinderDirect::ah_origin, ah_radius
} "save apparent horizon(s) into Cactus variables"

if (which_horizon_to_announce_centroid != 0)
Expand Down
56 changes: 56 additions & 0 deletions AHFinderDirect/src/driver/setup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,62 @@ extern struct state state;
// This function is called by the Cactus scheduler to set up all our
// persistent data structures. (These are stored in struct state .)
//
//
// AHFinderDirect_setup() below declares ah_radius, ah_origin, ah_centroid and
// ah_flags as output, but it only fills them the first time it runs. The
// static already_ran guard makes every later call a no-op. CarpetX
// re-traverses CCTK_BASEGRID after each regrid, and it poisons a routine's
// write-only outputs immediately before calling it, so those later calls used
// to leave the whole of ah_radius (and the centroids) as nans and abort in
// valid.cxx. The BASEGRID entry is therefore declared as READS *and* WRITES,
// which is what it really does, a partial, preserving update, and CarpetX
// then leaves the arrays alone. That only works if they are already valid the
// first time AHFinderDirect_setup runs, which is what this routine is for.
//
// The values match what AHFinderDirect_setup would write for a horizon that
// has not been found yet.
//
extern "C"
void AHFinderDirect_init(CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS_AHFinderDirect_init
DECLARE_CCTK_PARAMETERS

for (int n = 0; n < N_horizons; ++n) {
ah_origin_x[n] = 0.0;
ah_origin_y[n] = 0.0;
ah_origin_z[n] = 0.0;

ah_centroid_x[n] = 0.0;
ah_centroid_y[n] = 0.0;
ah_centroid_z[n] = 0.0;
ah_centroid_t[n] = 0.0;
ah_centroid_x_p[n] = 0.0;
ah_centroid_y_p[n] = 0.0;
ah_centroid_z_p[n] = 0.0;
ah_centroid_t_p[n] = 0.0;

ah_initial_find_flag[n] = 0;
ah_really_initial_find_flag[n] = 0;
ah_search_flag[n] = 0;
ah_found_flag[n] = 0;
ah_centroid_valid[n] = 0;
ah_centroid_valid_p[n] = 0;
ah_centroid_iteration[n] = -1;
ah_centroid_iteration_p[n] = -1;

// the whole array is poisoned, so the whole array has to be set, not only
// the (N_zones_per_right_angle+1)^2 * N_patches points that are in use
const int nzones = max_N_zones_per_right_angle + 1;
for (int pn = 0; pn < 6; ++pn)
for (int j = 0; j < nzones; ++j)
for (int i = 0; i < nzones; ++i)
ah_radius[i + nzones * (j + nzones * (pn + 6 * n))] = 0.0;
}
}

//******************************************************************************

extern "C"
void AHFinderDirect_setup(CCTK_ARGUMENTS)
{
Expand Down
Loading
Loading