Peano
Loading...
Searching...
No Matches
exahype2::ccz4::ahf Namespace Reference

Namespaces

namespace  detail
namespace  tests

Data Structures

struct  AHFinderOptions
 Compact configuration for the future user-facing apparent-horizon façade. More...
struct  AHFinderResult
 User-level result of one apparent-horizon solve. More...
struct  AHSearchAttempt
 One explicit, ordered initial-surface/reference-point pair. More...
struct  AHSearchOptions
 Shared numerical configuration and an arbitrary ordered attempt list. More...
struct  AHSearchAttemptResult
 Complete diagnostics from one executed attempt. More...
struct  AHSearchResult
 Aggregate ordered-search outcome. More...
struct  AHHorizonTarget
 One physical horizon and its ordered alternative guesses. More...
struct  AHMultiHorizonOptions
 Shared numerical configuration for any number of physical targets. More...
struct  AHHorizonTargetResult
 Ordered attempts and selected result for one physical target. More...
struct  AHMultiHorizonResult
 Aggregate result without collapsing partial success into one boolean. More...
struct  ReferencePoint
 Cartesian reference coordinate for one apparent-horizon centre point. More...
struct  AHGuessPoint
 One point on an apparent-horizon guess, expressed in spherical coordinates. More...
struct  AngularSample
 User-provided angular coordinate at which the shell should be sampled. More...
struct  AHGuess
 One apparent-horizon hypersurface guess. More...
struct  GridCoordinate
 Cartesian coordinate for one sampled grid point. More...
struct  InterpolationDiagnostics
struct  SourceVariableMapping
 Reader-side mapping from compact fields to components of a source tuple. More...
class  CompactCellView
 Read-only, zero-copy view of one fixed-layout compact cell row. More...
struct  GridData
 Pointwise Cartesian grid data. More...
struct  InterpolatedGeometryData
 Physical and geometrical quantities shared by shell and surface samples. More...
struct  InterpolatedShellPoint
 Interpolated quantities at one spherical shell sample (r, rho, sigma). More...
struct  InterpolatedShell
 Interpolated data on the shell-like subdomain around an AH guess. More...
struct  InterpolatedSurfacePoint
 Interpolated quantities at one point on the current AH surface. More...
struct  InterpolatedSurface
 Interpolated data on the current AH surface r = h(rho, sigma). More...
struct  PostprocessPuncture
 A black hole given with –puncture x,y,z:m. More...
struct  PostprocessOptions
 Command line of ahf-postprocess. More...
struct  AHPhysicalBlackHole
 User identity and retry configuration for one physical black hole. More...
struct  AHIndividualHorizonObservation
 A successfully reconstructed individual horizon associated with its ID. More...
struct  AHHorizonPairGap
 Directional separation diagnostic for one unordered pair. More...
struct  AHCommonHorizonCandidateOptions
struct  AHCommonHorizonCandidateReason
 Why a canonical group survived deterministic deduplication. More...
struct  AHCommonHorizonCandidate
 Geometry and initial spherical guess for one prospective common AH solve. More...
struct  AHCommonHorizonCandidatePlan
struct  AHCommonHorizonTargetOptions
struct  AHCommonHorizonValidationOptions
struct  AHCommonHorizonValidation
struct  AHCommonHorizonSearchOptions
struct  AHCommonHorizonCatalogueEntry
struct  AHHorizonCatalogue
struct  ModeValues
 Y_lm and its first/second rho- and sigma-derivatives at one (rho, sigma). More...
struct  SpectralBasis
 Spectral basis plus collocation grid and precomputed design matrices. More...
struct  SynthesizedField
 h and its angular derivatives at every collocation point (each (nPoints,)). More...
struct  AnalyticCoordinateGeometry
class  CartesianSpatialIndex
 Immutable k-d tree; concurrent nearest-neighbour queries are read-only. More...
struct  LinearPolynomialFit
struct  PolynomialExponent
struct  PolynomialBasis
struct  LinearReconstructionOptions
struct  CompactLinearFit
struct  CartesianToSurfaceOptions
struct  InterpolatedCartesianPoint
 Physical fields reconstructed at one arbitrary Cartesian target. More...
class  CartesianPointInterpolator
 Reusable Cartesian reconstruction context. More...
struct  AHBinaryComponent
 One known member of a binary system and its ordered individual-AH retries. More...
struct  AHBinaryMergerOptions
 Opt-in binary-merger planning plus the shared numerical search options. More...
struct  AHBinaryMergerPlan
 Documented trigger/preconditioning diagnostics and the generated plan. More...
struct  AHBinaryMergerResult
struct  AHVisualizationOptions
 Resolution of the output mesh only; it does not affect the AH solve. More...
struct  AHVisualizationSurface
 Dense closed surface reconstructed directly from the spectral coefficients. More...
struct  AHOutputOptions
 Filenames and visualisation resolution for the single-horizon façade. More...
struct  AHMultiHorizonOutputOptions
 Output configuration for a search containing several physical horizons. More...
struct  SchwarzschildIsotropic
 Schwarzschild in isotropic coordinates (time symmetric, K_ij = 0). More...
struct  SchwarzschildKerrSchild
 Schwarzschild in Kerr-Schild coordinates (K_ij != 0, horizon at r = 2M). More...
struct  KerrKerrSchild
 Kerr in Kerr-Schild Cartesian coordinates, spin a along z. More...
struct  BrillLindquist
 Brill-Lindquist multi-puncture initial data (time symmetric, K_ij = 0). More...
struct  SpectralNewtonOptions
 Parameters for the damped Newton solve. More...
struct  SpectralNewtonIterate
 One state of the Newton solver, recorded only when SpectralNewtonOptions::recordIterationHistory is set. More...
struct  SpectralNewtonResult
 Outcome of the Newton solver. More...
struct  SurfaceShapeDerivatives
 Angular derivatives of h at one surface point. More...

Typedefs

using Vector3 = std::array<double, 3>
using Tensor3 = std::array<std::array<double, 3>, 3>
using Tensor3Derivative = std::array<Tensor3, 3>
template<class T>
using FieldVector = std::array<T, 3>
 Analytic spacetimes and the geometry they induce.
template<class T>
using FieldMatrix = std::array<std::array<T, 3>, 3>
using SpectralResidual = std::function<std::vector<double>(const std::vector<double>&)>
 Residual R(a): the spherical-harmonic coefficients of the expansion Theta for a given coefficient vector a.
using GeometrySource
 Source of the physical geometry (gamma_ij, partial_k gamma_ij, K_ij, trK) at an absolute Cartesian point, packed into an InterpolatedGeometryData.

Enumerations

enum class  AHHorizonKind { Individual , Common }
 Physical role assigned by the user to one independently searched surface. More...
enum class  CartesianToSurfaceMethod {
  NearestNeighbour , UnweightedPolynomial , WeightedPolynomial , RadiusWeightedPolynomial ,
  UnweightedDegree1 = UnweightedPolynomial , WeightedDegree1 = WeightedPolynomial
}
enum class  CompactField : std::size_t {
  GammaTildeXX = 0 , GammaTildeXY = 1 , GammaTildeXZ = 2 , GammaTildeYY = 3 ,
  GammaTildeYZ = 4 , GammaTildeZZ = 5 , ATildeXX = 6 , ATildeXY = 7 ,
  ATildeXZ = 8 , ATildeYY = 9 , ATildeYZ = 10 , ATildeZZ = 11 ,
  TraceK = 12 , Phi = 13 , Count = 14
}
 Fixed column layout of every compact row stored in GridData. More...
enum class  SymmetricTensorComponent : std::size_t {
  XX = 0 , XY = 1 , XZ = 2 , YY = 3 ,
  YZ = 4 , ZZ = 5 , Count = 6
}
 Symmetric-tensor component order used by both compact tensors. More...
enum class  PostprocessMapping { Names , ExaGRyPE , LegacyCCZ4 }
 How ahf-postprocess finds the AHF fields in a snapshot. More...
enum class  AHCommonHorizonValidationStatus { FullyValidated , ProvisionallyValidated , Rejected }
enum class  AHEnclosureValidationStatus { Passed , Failed , Unavailable }
enum class  LinearReconstructionMethod { Unweighted , WeightedMovingLeastSquares , RadiusWeightedWendlandC2 }

Functions

void ValidateAHFinderOptions (const AHFinderOptions &options)
 Validate configuration that can be checked before grid data are supplied.
AHFinderResult BuildAHFinderResult (const SpectralBasis &basis, const CartesianPointInterpolator &interpolator, const ReferencePoint &referencePoint, const SpectralNewtonResult &solverResult)
 Reconstruct the final numerical surface and its diagnostics without running Newton again.
double SurfaceRadius (const AHFinderResult &result, double rho, double sigma)
 Coordinate radius of the surface in the direction (rho, sigma) about result.referencePoint, from the retained coefficients.
double SurfaceRadiusTowards (const AHFinderResult &result, const ReferencePoint &destination)
 SurfaceRadius in the direction from result.referencePoint towards destination.
bool SurfaceEncloses (const AHFinderResult &result, const ReferencePoint &point)
 True if the surface encloses point, i.e.
AHSearchAttempt MakePreviousSurfaceAttempt (const AHFinderResult &previous)
 Continue from a prior reconstructable result using its centre and surface.
void ValidateAHSearchOptions (const AHSearchOptions &options)
 Reject an empty list or any structurally invalid shared/attempt option.
AHSearchResult FindApparentHorizon (const GridData &gridData, const AHSearchOptions &options)
 Try explicit attempt pairs in vector order and stop at the first accepted horizon.
void ValidateAHMultiHorizonOptions (const AHMultiHorizonOptions &options)
AHMultiHorizonResult FindApparentHorizons (const GridData &gridData, const AHMultiHorizonOptions &options)
 Search every physical target in vector order.
AHMultiHorizonResult FindApparentHorizons (const SpectralBasis &basis, const CartesianPointInterpolator &interpolator, const AHMultiHorizonOptions &options)
 Execute a validated multi-target search using caller-owned numerical objects.
SourceVariableMapping ExaGRyPESourceMapping ()
 Mapping for output of the exagrype.api solvers, in the order of FOCCZ4Solver.Unknowns (src/exagrype/api/FOCCZ4Solver.py): G 0-5, K 6-11, traceK 23, phi 24.
SourceVariableMapping LegacyCCZ4SourceMapping ()
 Mapping for output of the legacy applications/exahype2/ccz4/ccz4.py, which stores traceK at 53 and phi at 54.
std::optional< SourceVariableMapping > SourceVariableMappingFromComponentNames (std::span< const std::string > componentNames)
 Build the mapping from the component names of a source tuple.
void ValidateSourceMappingAgainstComponentNames (const SourceVariableMapping &sourceMapping, std::span< const std::string > componentNames)
 Reject a mapping that contradicts the component names of the source tuple.
std::array< double, NumberOfCompactFields > CompactSourceTuple (std::span< const double > sourceTuple, const SourceVariableMapping &sourceMapping)
 Apply the sole source-index to compact-index transformation.
Tensor3 UnpackSymmetricTensor (std::span< const double, NumberOfSymmetricTensorComponents > components)
 Expand symmetric components ordered xx, xy, xz, yy, yz, zz into a 3x3 tensor.
void ValidatePhysicalPhi (double phi)
Tensor3 ComputePhysicalSpatialMetric (const Tensor3 &gammaTilde, double phi)
 Compute gamma_ij = gammaTilde_ij / phi^2 for direct (not logarithmic) phi.
Tensor3 ComputePhysicalExtrinsicCurvature (const Tensor3 &ATilde, double traceK, const Tensor3 &gammaTilde, double phi)
 Compute K_ij = (ATilde_ij + K gammaTilde_ij / 3) / phi^2 using direct phi.
Tensor3Derivative ComputePhysicalSpatialMetricDerivative (const Tensor3 &gammaTilde, const Tensor3Derivative &gammaTildeDerivative, double phi, const Vector3 &phiDerivative)
 Compute Cartesian physical-metric derivatives in [k][i][j] order: partial_k gamma_ij = partial_k gammaTilde_ij / phi^2.
PostprocessOptions ParsePostprocessArguments (const std::vector< std::string > &arguments)
 Parse the arguments that follow the program name.
std::string PostprocessUsage (const std::string &executable)
 The usage text printed by –help and after an argument error.
std::optional< SourceVariableMapping > PostprocessSourceMapping (PostprocessMapping mapping)
 The explicit source mapping selected by mapping; nothing for Names.
double FinestGridSpacing (const GridData &gridData)
 The smallest distance between neighbouring cell centres along a coordinate axis.
AHSearchOptions MakePostprocessSearchOptions (const PostprocessOptions &options, double supportRadius)
 The search configuration: one attempt per initial radius around the centre, radius-weighted cubic interpolation within supportRadius, and the given lMax and tolerance.
AHCommonHorizonSearchOptions MakePostprocessCatalogueOptions (const PostprocessOptions &options, double supportRadius)
 The catalogue configuration for punctures: black holes bh0, bh1, ... at the punctures, each searched from radiiPerMass times its mass, with the interpolation, lMax and tolerance of MakePostprocessSearchOptions and the default candidate planning and validation.
template<class Spacetime>
InterpolatedSurface BuildAnalyticSurface (const SpectralBasis &basis, const std::vector< double > &coefficients, const Spacetime &spacetime, const ReferencePoint &referencePoint)
 Wrappers for the general residual assembly (surface-residual.h) to work with an analytic spacetime as the geometry source.
template<class Spacetime>
SpectralResidual MakeAnalyticResidual (const SpectralBasis &basis, const Spacetime &spacetime, const ReferencePoint &referencePoint)
 MakeResidual using MetricData(spacetime, .) as the geometry source.
void AssembleGlobalMatrix (const InterpolatedSurface &interpolatedSurface, const AHGuess &ahGuess, std::vector< std::vector< double > > &matrixCoefficients, std::vector< double > &residuals)
 Assemble the global system matrix and residuals from the interpolated surface data.
void AssembleGlobalMatrix (const InterpolatedSurface &interpolatedSurface, const SpectralBasis &basis, std::vector< std::vector< double > > &matrixCoefficients, std::vector< double > &residuals)
 Spectral form: the residual is the harmonic projection of the expansion, R = project(Theta) = Y^T (weight .
void ValidateAHPhysicalBlackHoles (const std::vector< AHPhysicalBlackHole > &blackHoles)
std::vector< AHHorizonTarget > MakeIndividualHorizonTargets (const std::vector< AHPhysicalBlackHole > &blackHoles, bool excludeOtherBlackHoles=true)
 Convert user identities into the existing individual-target representation.
void ValidateAHCommonHorizonCandidateOptions (const AHCommonHorizonCandidateOptions &options)
AHCommonHorizonCandidatePlan PlanCommonHorizonCandidates (const std::vector< AHIndividualHorizonObservation > &observations, const AHCommonHorizonCandidateOptions &options={})
 Plan prospective common searches from already successful individual AHs.
std::string MakeCommonHorizonId (const std::vector< std::string > &memberIds)
AHHorizonTarget MakeCommonHorizonTarget (const AHCommonHorizonCandidate &candidate, const AHCommonHorizonTargetOptions &options={})
AHCommonHorizonValidation ValidateCommonHorizon (const AHFinderResult &common, const std::vector< AHIndividualHorizonObservation > &members, const AHCommonHorizonValidationOptions &options={})
 Numerical/geometric checks only; this is not proof of outermost status.
AHCommonHorizonValidation ValidateCommonHorizon (const AHFinderResult &common, const std::vector< AHIndividualHorizonObservation > &reconstructedMembers, const std::vector< ReferencePoint > &physicalPositions, std::size_t expectedMemberCount, const AHCommonHorizonValidationOptions &options={})
 Validate with potentially incomplete member surfaces and independently available physical positions.
AHHorizonCatalogue FindApparentHorizons (const GridData &gridData, const AHCommonHorizonSearchOptions &options)
 Unified N>=1 workflow.
AHHorizonCatalogue FindCommonApparentHorizons (const GridData &gridData, const AHCommonHorizonSearchOptions &options)
 Backward-compatible name for the unified N>=1 workflow.
std::vector< double > SolveLinearSystem (std::vector< std::vector< double > > A, std::vector< double > b)
 Solve the dense square system A x = b by Gaussian elimination with partial pivoting.
double HorizonArea (const SpectralBasis &basis, const std::vector< double > &coefficients, std::span< const Tensor3 > spatialMetric)
 Post-solve horizon diagnostics.
template<class Spacetime>
double HorizonArea (const SpectralBasis &basis, const std::vector< double > &coefficients, const Spacetime &spacetime, const ReferencePoint &referencePoint)
 The area on an analytic spacetime, whose metric is evaluated on the surface.
double ArealRadius (double area)
 Areal radius sqrt(area / 4 pi).
double IrreducibleMass (double area)
 Irreducible mass sqrt(area / 16 pi).
double MeanCoordinateRadius (const std::vector< double > &coefficients)
 Mean coordinate radius a_00 / sqrt(4 pi).
std::vector< double > PowerSpectrum (const SpectralBasis &basis, const std::vector< double > &coefficients)
 Per-degree coefficient power sum_m a_lm^2 (a spectral-convergence / non-sphericity indicator).
double computeExpansion (const Vector3 &surfaceNormal, const Tensor3 &surfaceNormalDerivative, const Tensor3 &spatialMetric, const std::array< Tensor3, 3 > &spatialMetricDerivative, const Tensor3 &extrinsicCurvature, double traceK)
 Local assembly of the outgoing null expansion Theta at one surface point.
double computeExpansion (const InterpolatedSurfacePoint &point)
 Convenience overload taking a fully populated InterpolatedSurfacePoint.
void ReadGridFromFile (const std::string &inputFile, GridData &gridData, const SourceVariableMapping &sourceMapping)
 Load a grid dataset from VTK XML unstructured-grid data, keeping only the variables selected by sourceMapping.
void ReadGridFromFile (const std::string &inputFile, GridData &gridData)
 Load a grid dataset as above, selecting the fourteen AHF fields by the names of the cell-data components (CCZ4SourceComponentNames), so no mapping is needed.
std::vector< std::pair< int, int > > EnumerateModes (int lmax)
 Ordered list of (l, m) modes, l = 0..lmax, m = -l..l.
std::pair< std::vector< double >, std::vector< double > > GaussLegendre (int n)
 Gauss-Legendre nodes and weights on [-1, 1] (integrates d mu).
ModeValues EvalMode (int l, int m, double rho, double sigma)
 Evaluate the real Y_lm and its rho/sigma derivatives at (rho, sigma).
double EvalModeValue (int l, int m, double rho, double sigma)
 The real Y_lm at (rho, sigma), without any derivatives.
SpectralBasis BuildSpectralBasis (int lmax, int nSigma=-1, int nRho=-1)
 Construct a SpectralBasis for the given lmax.
SynthesizedField Synthesize (const SpectralBasis &basis, const std::vector< double > &coefficients)
 Synthesis (coefficients -> point values): h = Y a, hRho = Yrho a, etc.
std::vector< double > Project (const SpectralBasis &basis, const std::vector< double > &field)
 Analysis (point values -> coefficients): a = Y^T (weight .
std::vector< double > SphereCoefficients (const SpectralBasis &basis, double radius)
 Coefficient vector for a coordinate sphere h = radius (only a_00 != 0, since Y_00 = 1/sqrt(4 pi) so a_00 = radius sqrt(4 pi)).
std::vector< double > MakeSphericalInitialCoefficients (const SpectralBasis &basis, double radius)
 Construct spectral coefficients for a constant-radius spherical initial guess by projecting h(p) = radius on the basis collocation grid.
std::vector< double > MakeDistortedInitialCoefficients (const SpectralBasis &basis, const std::vector< double > &radii)
 Project positive radii in canonical SpectralBasis collocation order into an arbitrary star-shaped spectral initial surface.
InterpolatedSurface BuildInterpolatedSurface (const SpectralBasis &basis, const std::vector< double > &coefficients, const CartesianPointInterpolator &interpolator, const ReferencePoint &referencePoint)
 Build a fully populated surface for one spectral coefficient vector using a persistent Cartesian interpolation context.
GridCoordinate SurfacePointToCartesian (const AHGuessPoint &surfacePoint, const ReferencePoint &referencePoint)
 Convert one AH point (r, longitude rho, latitude sigma) into its global Cartesian target coordinate relative to referencePoint.
Tensor3 ComputeRadialProjectionTensor (const GridCoordinate &relativeCoordinate)
 Compute T_ij = r^2 delta_ij - x_i x_j from relative coordinates.
AnalyticCoordinateGeometry ComputeAnalyticCoordinateGeometry (const GridCoordinate &globalCoordinate, const ReferencePoint &referencePoint)
 Compute the appendix's analytic rho/sigma coordinate geometry.
std::vector< std::size_t > FindNearestGridCellsBruteForce (const GridData &gridData, const GridCoordinate &target, std::size_t neighbourCount)
 Return the indices of the neighbourCount nearest Cartesian cell centres.
std::vector< std::size_t > FindNearestGridCells (const CartesianSpatialIndex &spatialIndex, const GridCoordinate &target, std::size_t neighbourCount)
 Query a previously built index without rebuilding it.
std::vector< std::size_t > FindGridCellsWithinRadius (const CartesianSpatialIndex &spatialIndex, const GridCoordinate &target, double radius)
 Query every indexed cell strictly inside radius, sorted by distance/index.
std::vector< std::size_t > FindNearestGridCells (const GridData &gridData, const GridCoordinate &target, std::size_t neighbourCount)
 Compatibility interface for one-off queries.
std::size_t PolynomialBasisSize (std::size_t degree)
PolynomialBasis GeneratePolynomialBasis (std::size_t degree)
double LinearReconstructionWeight (double distance, double lengthScale, const LinearReconstructionOptions &options)
 Evaluate the configured unweighted, Gaussian, or compact-support row weight.
double WendlandC2Weight (double q)
 Wendland C2 compact kernel: (1-q)^4(4q+1) for 0<=q<1, else zero.
LinearPolynomialFit FitLinearPolynomial (std::span< const GridCoordinate > sampleCoordinates, std::span< const double > sampleValues, const GridCoordinate &target, const LinearReconstructionOptions &options={})
 Scalar total-degree polynomial least-squares reconstruction using a column-pivoted QR solve.
CompactLinearFit FitCompactLinearPolynomial (const GridData &gridData, std::span< const std::size_t > neighbourIndices, const GridCoordinate &target, const LinearReconstructionOptions &options={})
 Reconstruct all fourteen compact fields with one shared polynomial design matrix and one column-pivoted QR factorisation.
void InterpolateCartesianToSurface (const CartesianPointInterpolator &interpolator, const AHGuess &ahGuess, const ReferencePoint &referencePoint, InterpolatedSurface &interpolatedSurface)
 Surface adapter using an already-built, persistent Cartesian interpolator.
void InterpolateCartesianToSurface (const GridData &gridData, const AHGuess &ahGuess, const ReferencePoint &referencePoint, InterpolatedSurface &interpolatedSurface, const CartesianToSurfaceOptions &options={})
 Interpolate compact Cartesian fields directly to every AH surface point.
void InterpolateToSurfaceNearestNeighbour (const GridData &gridData, const AHGuess &ahGuess, const ReferencePoint &referencePoint, InterpolatedSurface &interpolatedSurface)
 Sample each AH surface point from its nearest Cartesian cell centre and reconstruct the physical spatial metric and extrinsic curvature.
void InterpolateFromCartesianToShell (const GridData &gridData, const AHGuess &ahGuess, const ReferencePoint &referencePoint, InterpolatedShell &interpolatedShell, std::span< const AngularSample > angularSamples={})
 Interpolate the Cartesian grid data to a shell-like subdomain around the current AH guess.
void InterpolateFromShellToSurface (const InterpolatedShell &interpolatedShell, const AHGuess &ahGuess, const ReferencePoint &referencePoint, InterpolatedSurface &interpolatedSurface)
 Interpolate the shell data to the apparent-horizon surface defined by the current AH guess.
SpectralNewtonResult SolvePDEforAH (const SpectralBasis &basis, const CartesianPointInterpolator &interpolator, const ReferencePoint &referencePoint, double initialRadius, const SpectralNewtonOptions &options={})
 Solve one interpolation-backed apparent-horizon PDE from a spherical initial guess.
SpectralNewtonResult SolvePDEforAH (const SpectralBasis &basis, const CartesianPointInterpolator &interpolator, const ReferencePoint &referencePoint, const std::vector< double > &initialCoefficients, const SpectralNewtonOptions &options={})
 Solve from an explicit star-shaped spectral surface (e.g.
void CheckCommonHorizonOfBBH (const AHGuess &initialAHGuess, const ReferencePoint &referencePoint, const std::vector< double > &masses, bool &enableCommonHorizon, ReferencePoint &commonReferencePoint, double &commonMass, AHGuess &commonAHGuesses)
 Determine whether a common-horizon search should be triggered for a binary-black-hole setup.
void ValidateAHBinaryMergerOptions (const AHBinaryMergerOptions &options)
AHBinaryMergerPlan BuildBinaryMergerPlan (const AHBinaryMergerOptions &options)
 Build the deterministic common-first search plan without accessing grid data.
AHBinaryMergerPlan CheckCommonHorizonOfBBH (const AHBinaryMergerOptions &options)
 Project-consistent name for the documented binary common-horizon check.
std::optional< AHCommonHorizonValidation > ValidateBinaryMergerCommonHorizon (const AHBinaryMergerOptions &options, const AHBinaryMergerPlan &plan, const AHMultiHorizonResult &horizons)
 Validate the common result of an executed plan as the catalogue does: the reconstructed components are the members and their first attempts' reference points the physical positions.
AHBinaryMergerResult FindBinaryMergerHorizons (const GridData &gridData, const AHBinaryMergerOptions &options)
 Build the plan, execute it with the ordinary multi-horizon machinery and validate the common result.
void ValidateAHOutputOptions (const AHOutputOptions &options)
 Validate output filenames and visualisation resolution before solving.
void WriteAHSummary (const AHFinderResult &result, const std::string &filename)
 Write all solver and reconstructed-surface diagnostics as deterministic text.
AHVisualizationSurface BuildAHVisualizationSurface (const AHFinderResult &result, const AHVisualizationOptions &options={})
 Evaluate the retained spectral representation on an independent dense grid.
void WriteAHSurfaceToVTP (const AHFinderResult &result, const std::string &filename, const AHVisualizationOptions &options={})
 Write a converged dense horizon surface as VTK XML PolyData (.vtp).
AHFinderResult WriteAHToFile (const GridData &gridData, const AHFinderOptions &finderOptions, const AHOutputOptions &outputOptions={})
 Complete single-horizon user workflow.
void WriteAHSearchSummary (const AHSearchResult &result, const std::string &filename)
 Write ordered diagnostics for every executed attempt and, on success, the selected horizon diagnostics.
void WriteAHMultiHorizonSummary (const AHMultiHorizonResult &result, const std::string &filename)
 Write every executed target/attempt and any selected horizon diagnostics.
AHSearchResult WriteAHToFile (const GridData &gridData, const AHSearchOptions &searchOptions, const AHOutputOptions &outputOptions={})
 Multi-attempt user workflow.
AHMultiHorizonResult WriteAHToFile (const GridData &gridData, const AHMultiHorizonOptions &searchOptions, const AHMultiHorizonOutputOptions &outputOptions={})
 Complete multi-horizon workflow.
AHBinaryMergerResult WriteAHToFile (const GridData &gridData, const AHBinaryMergerOptions &mergerOptions, const AHMultiHorizonOutputOptions &outputOptions={})
 Merger-aware binary workflow with the same per-target output convention.
std::string AHCatalogueFilename (const AHMultiHorizonOutputOptions &options, const char *kind, std::size_t index, const std::string &id, const char *extension)
 The per-horizon file the catalogue workflow writes for entry index of kind ("individual" or "common"):
void WriteAHHorizonCatalogueSummary (const AHHorizonCatalogue &result, const std::string &filename)
 Catalogue summary retaining individual failures and common validation.
AHHorizonCatalogue WriteAHToFile (const GridData &gridData, const AHCommonHorizonSearchOptions &searchOptions, const AHMultiHorizonOutputOptions &outputOptions={})
 N-black-hole individual/common workflow and validated output façade.
void WriteAHToVTK (const std::string &inputFile, const std::string &outputFile)
 Convert the ASCII apparent-horizon hypersurface output into a VTK file.
void ReadGridFromPeano (const PeanoGridData &peanoGridData)
 Load grid dataset from the Peano simulation on-the-fly.
template<class Spacetime>
InterpolatedGeometryData MetricData (const Spacetime &spacetime, const Vector3 &X)
 Geometry derived from an analytic spacetime at the Cartesian point X, packed into the same InterpolatedGeometryData that the grid-interpolation path uses.
SpectralNewtonResult SolveSpectralNewton (const SpectralBasis &basis, const SpectralResidual &residual, const std::vector< double > &initialCoefficients, const SpectralNewtonOptions &options={})
 Damped Newton-Raphson solve of the spectral apparent-horizon equations R(a) = 0.
void PopulateSurfaceShapeGeometry (InterpolatedSurfacePoint &point, const SurfaceShapeDerivatives &derivatives)
 Populate the non-unit normal covector s_i and partial_i s_j.
void PopulateSurfaceShapeGeometry (InterpolatedSurface &surface, const SynthesizedField &field)
 Populate every surface point from the corresponding SynthesizedField row.
InterpolatedSurface BuildSurface (const SpectralBasis &basis, const std::vector< double > &coefficients, const GeometrySource &geometryAt, const ReferencePoint &referencePoint)
 Assemble the interpolated surface r = h(rho, sigma) for a coefficient vector on the basis collocation grid, taking the physical geometry from geometryAt.
SpectralResidual MakeResidual (const SpectralBasis &basis, const GeometrySource &geometryAt, const ReferencePoint &referencePoint)
 Return the spectral residual.
double determinant (const Tensor3 &m)
 Determinant of a 3x3 matrix (general; used for the metric determinant).
Tensor3 inverse (const Tensor3 &m)
 Inverse of a 3x3 matrix via the closed-form adjugate / determinant.

Variables

constexpr std::size_t NumberOfCompactFields
constexpr std::array< const char *, NumberOfCompactFields > CompactFieldNames
constexpr std::size_t NumberOfSymmetricTensorComponents
constexpr std::array< CompactField, NumberOfSymmetricTensorComponents > ConformalMetricCompactFields
constexpr std::array< CompactField, NumberOfSymmetricTensorComponents > ConformalExtrinsicCurvatureCompactFields
constexpr std::array< const char *, NumberOfCompactFields > CCZ4SourceComponentNames
 Names the CCZ4 solvers give the AHF fields, in CompactField order.
constexpr double MinimumPhysicalPhi = 1.0e-2
 Active kernels use 1e-2 as the safe lower bound for direct phi.

Typedef Documentation

◆ FieldMatrix

template<class T>
using exahype2::ccz4::ahf::FieldMatrix = std::array<std::array<T, 3>, 3>

Definition at line 38 of file spacetimes.h.

◆ FieldVector

template<class T>
using exahype2::ccz4::ahf::FieldVector = std::array<T, 3>

Analytic spacetimes and the geometry they induce.

Useful for testing.

Each spacetime exposes three exact field functions on a Cartesian point X (a three-vector), templated on the scalar type so they can be evaluated at real (double) or complex (std::complex<double>) argument:

gamma(X) -> gamma_ij spatial 3-metric beta(X) -> beta_i shift (lower index) alpha(X) -> alpha lapse

From these, MetricData() derives everything the expansion needs (gamma^{ij}, partial_k gamma_ij, K_ij, trK) using complex-step differentiation, which is exact to machine precision for these holomorphic functions. The extrinsic curvature uses the stationary ADM relation K_ij = (D_i beta_j + D_j beta_i) / (2 alpha), valid because partial_t gamma_ij = 0 on these slices. Small vector/matrix aliases templated on the scalar type (real or complex).

Definition at line 37 of file spacetimes.h.

◆ GeometrySource

Initial value:
std::function<
std::array< double, 3 > Vector3
Definition ahf-data.h:518
Physical and geometrical quantities shared by shell and surface samples.
Definition ahf-data.h:627

Source of the physical geometry (gamma_ij, partial_k gamma_ij, K_ij, trK) at an absolute Cartesian point, packed into an InterpolatedGeometryData.

This is the one step of the residual assembly that depends on where the geometry comes from. Notably,

  • analytic spacetimes supply MetricData (see analytic-residual.h),

while the real grid solver will supply an interpolation-backed source. Only the physical-geometry fields of the returned struct are read. The coordinate-transform fields (T, coordinateGradient, coordinateHessian) are filled by BuildSurface itself.

Definition at line 26 of file surface-residual.h.

◆ SpectralResidual

using exahype2::ccz4::ahf::SpectralResidual = std::function<std::vector<double>(const std::vector<double>&)>

Residual R(a): the spherical-harmonic coefficients of the expansion Theta for a given coefficient vector a.

Injected into the Newton solve so the same solver serves grid-backed residuals (synthesize -> interpolate -> AssembleGlobalMatrix) and analytic residuals used in tests.

Definition at line 18 of file spectral-solver.h.

◆ Tensor3

using exahype2::ccz4::ahf::Tensor3 = std::array<std::array<double, 3>, 3>

Definition at line 519 of file ahf-data.h.

◆ Tensor3Derivative

Definition at line 520 of file ahf-data.h.

◆ Vector3

using exahype2::ccz4::ahf::Vector3 = std::array<double, 3>

Definition at line 518 of file ahf-data.h.

Enumeration Type Documentation

◆ AHCommonHorizonValidationStatus

Enumerator
FullyValidated 
ProvisionallyValidated 
Rejected 

Definition at line 47 of file common-horizon-search.h.

◆ AHEnclosureValidationStatus

Enumerator
Passed 
Failed 
Unavailable 

Definition at line 53 of file common-horizon-search.h.

◆ AHHorizonKind

Physical role assigned by the user to one independently searched surface.

Enumerator
Individual 
Common 

Definition at line 103 of file ah-search.h.

◆ CartesianToSurfaceMethod

Enumerator
NearestNeighbour 
UnweightedPolynomial 
WeightedPolynomial 
RadiusWeightedPolynomial 

All cells inside supportRadius, using compact Wendland-C2 weights.

UnweightedDegree1 

Backward-compatible names retained for callers of the original degree-1 API.

WeightedDegree1 

Definition at line 61 of file ahf-data.h.

◆ CompactField

enum class exahype2::ccz4::ahf::CompactField : std::size_t
strong

Fixed column layout of every compact row stored in GridData.

This enum is the only field-index contract used after file input. Its values are independent of the component numbers in a source VTU tuple.

Enumerator
GammaTildeXX 
GammaTildeXY 
GammaTildeXZ 
GammaTildeYY 
GammaTildeYZ 
GammaTildeZZ 
ATildeXX 
ATildeXY 
ATildeXZ 
ATildeYY 
ATildeYZ 
ATildeZZ 
TraceK 
Phi 
Count 

Definition at line 89 of file ahf-data.h.

◆ LinearReconstructionMethod

Enumerator
Unweighted 
WeightedMovingLeastSquares 
RadiusWeightedWendlandC2 

Definition at line 131 of file interpolation.h.

◆ PostprocessMapping

How ahf-postprocess finds the AHF fields in a snapshot.

Enumerator
Names 

By the component names of the cell data (ReadGridFromFile without a mapping).

ExaGRyPE 

ExaGRyPESourceMapping().

LegacyCCZ4 

LegacyCCZ4SourceMapping().

Definition at line 15 of file ahf-postprocess-options.h.

◆ SymmetricTensorComponent

enum class exahype2::ccz4::ahf::SymmetricTensorComponent : std::size_t
strong

Symmetric-tensor component order used by both compact tensors.

Enumerator
XX 
XY 
XZ 
YY 
YZ 
ZZ 
Count 

Definition at line 119 of file ahf-data.h.

Function Documentation

◆ AHCatalogueFilename()

std::string exahype2::ccz4::ahf::AHCatalogueFilename ( const AHMultiHorizonOutputOptions & options,
const char * kind,
std::size_t index,
const std::string & id,
const char * extension )

The per-horizon file the catalogue workflow writes for entry index of kind ("individual" or "common"):

horizonFilenamePrefix + "-" + kind + "-" + index + "-" + id + extension,

with the characters of id that are unsafe in a filename replaced by '_'.

◆ ArealRadius()

double exahype2::ccz4::ahf::ArealRadius ( double area)

Areal radius sqrt(area / 4 pi).

◆ AssembleGlobalMatrix() [1/2]

void exahype2::ccz4::ahf::AssembleGlobalMatrix ( const InterpolatedSurface & interpolatedSurface,
const AHGuess & ahGuess,
std::vector< std::vector< double > > & matrixCoefficients,
std::vector< double > & residuals )

Assemble the global system matrix and residuals from the interpolated surface data.

Real-space (finite-difference) form: the residual is the expansion Theta_I at each surface point, so residuals has one entry per surface point.

◆ AssembleGlobalMatrix() [2/2]

void exahype2::ccz4::ahf::AssembleGlobalMatrix ( const InterpolatedSurface & interpolatedSurface,
const SpectralBasis & basis,
std::vector< std::vector< double > > & matrixCoefficients,
std::vector< double > & residuals )

Spectral form: the residual is the harmonic projection of the expansion, R = project(Theta) = Y^T (weight .

  • Theta), so residuals has one entry per spectral mode (basis.nModes). Surface point p must correspond to basis collocation point p (same (rho, sigma) grid); throws std::invalid_argument otherwise.

◆ BuildAHFinderResult()

AHFinderResult exahype2::ccz4::ahf::BuildAHFinderResult ( const SpectralBasis & basis,
const CartesianPointInterpolator & interpolator,
const ReferencePoint & referencePoint,
const SpectralNewtonResult & solverResult )

Reconstruct the final numerical surface and its diagnostics without running Newton again.

Reconstruction failure is represented by surfaceAvailable == false; the complete solver result and reference point are still preserved.

◆ BuildAHVisualizationSurface()

AHVisualizationSurface exahype2::ccz4::ahf::BuildAHVisualizationSurface ( const AHFinderResult & result,
const AHVisualizationOptions & options = {} )

Evaluate the retained spectral representation on an independent dense grid.

The grid has one vertex at each pole and periodic azimuthal rings between.

◆ BuildAnalyticSurface()

template<class Spacetime>
InterpolatedSurface exahype2::ccz4::ahf::BuildAnalyticSurface ( const SpectralBasis & basis,
const std::vector< double > & coefficients,
const Spacetime & spacetime,
const ReferencePoint & referencePoint )

Wrappers for the general residual assembly (surface-residual.h) to work with an analytic spacetime as the geometry source.

The only spacetime-specific step is the physical geometry, supplied here by MetricData; everything else (synthesis, coordinate transform, surface-shape geometry, spectral projection, Newton) is shared with the grid-backed path. These wrappers exist so the analytic tests exercise the exact same BuildSurface / MakeResidual pipeline the production solver uses. BuildSurface using MetricData(spacetime, .) as the geometry source.

Definition at line 26 of file analytic-residual.h.

References BuildSurface(), and MetricData().

Here is the call graph for this function:

◆ BuildBinaryMergerPlan()

AHBinaryMergerPlan exahype2::ccz4::ahf::BuildBinaryMergerPlan ( const AHBinaryMergerOptions & options)

Build the deterministic common-first search plan without accessing grid data.

◆ BuildInterpolatedSurface()

InterpolatedSurface exahype2::ccz4::ahf::BuildInterpolatedSurface ( const SpectralBasis & basis,
const std::vector< double > & coefficients,
const CartesianPointInterpolator & interpolator,
const ReferencePoint & referencePoint )

Build a fully populated surface for one spectral coefficient vector using a persistent Cartesian interpolation context.

Point p retains the SpectralBasis ordering throughout synthesis, Cartesian interpolation, and surface-shape geometry construction.

◆ BuildSpectralBasis()

SpectralBasis exahype2::ccz4::ahf::BuildSpectralBasis ( int lmax,
int nSigma = -1,
int nRho = -1 )

Construct a SpectralBasis for the given lmax.

With the default node counts (nSigma = lmax+1, nRho = 2 lmax+1) the discrete transform is exact for the l, m <= lmax band. Pass nSigma/nRho <= 0 to use the defaults.

◆ BuildSurface()

InterpolatedSurface exahype2::ccz4::ahf::BuildSurface ( const SpectralBasis & basis,
const std::vector< double > & coefficients,
const GeometrySource & geometryAt,
const ReferencePoint & referencePoint )

Assemble the interpolated surface r = h(rho, sigma) for a coefficient vector on the basis collocation grid, taking the physical geometry from geometryAt.

For each collocation point this runs the shared pipeline:

  • Synthesise (harmonics) for h and its angular derivatives,
  • ComputeAnalyticCoordinateGeometry (interpolation) for T, X^u_i, X^u_ij,
  • geometryAt for gamma_ij, partial_k gamma_ij, K_ij, trK,
  • PopulateSurfaceShapeGeometry (surface-geometry) for s_i and partial_i s_j.

The returned surface has one point per basis collocation point, in basis order, compatible with the spectral AssembleGlobalMatrix conventions.

Referenced by BuildAnalyticSurface().

Here is the caller graph for this function:

◆ CheckCommonHorizonOfBBH() [1/2]

AHBinaryMergerPlan exahype2::ccz4::ahf::CheckCommonHorizonOfBBH ( const AHBinaryMergerOptions & options)

Project-consistent name for the documented binary common-horizon check.

◆ CheckCommonHorizonOfBBH() [2/2]

void exahype2::ccz4::ahf::CheckCommonHorizonOfBBH ( const AHGuess & initialAHGuess,
const ReferencePoint & referencePoint,
const std::vector< double > & masses,
bool & enableCommonHorizon,
ReferencePoint & commonReferencePoint,
double & commonMass,
AHGuess & commonAHGuesses )

Determine whether a common-horizon search should be triggered for a binary-black-hole setup.

◆ CompactSourceTuple()

std::array< double, NumberOfCompactFields > exahype2::ccz4::ahf::CompactSourceTuple ( std::span< const double > sourceTuple,
const SourceVariableMapping & sourceMapping )

Apply the sole source-index to compact-index transformation.

Both symmetric tensors use xx, xy, xz, yy, yz, zz order; K and direct phi occupy columns 12 and 13 respectively.

Definition at line 345 of file ahf-data.h.

References exahype2::ccz4::ahf::SourceVariableMapping::componentsInCompactOrder(), and exahype2::ccz4::ahf::SourceVariableMapping::validateAgainstSourceTuple().

Here is the call graph for this function:

◆ ComputeAnalyticCoordinateGeometry()

AnalyticCoordinateGeometry exahype2::ccz4::ahf::ComputeAnalyticCoordinateGeometry ( const GridCoordinate & globalCoordinate,
const ReferencePoint & referencePoint )

Compute the appendix's analytic rho/sigma coordinate geometry.

Global input is translated by referencePoint before evaluating every formula. Longitude is undefined near |cos(sigma)|=0, so poles are rejected rather than assigned an artificial treatment.

◆ computeExpansion() [1/2]

double exahype2::ccz4::ahf::computeExpansion ( const InterpolatedSurfacePoint & point)

Convenience overload taking a fully populated InterpolatedSurfacePoint.

◆ computeExpansion() [2/2]

double exahype2::ccz4::ahf::computeExpansion ( const Vector3 & surfaceNormal,
const Tensor3 & surfaceNormalDerivative,
const Tensor3 & spatialMetric,
const std::array< Tensor3, 3 > & spatialMetricDerivative,
const Tensor3 & extrinsicCurvature,
double traceK )

Local assembly of the outgoing null expansion Theta at one surface point.

This should vanish for an apparent horizon.

This will be invoked by the AssembleGlobalMatrix kernel

This kernel is discretisation-agnostic: given the (non-unit) surface normal s_i and its gradient partial_i s_j, together with the local ADM geometry, it returns

Theta = A / D^{3/2} + B / D^{1/2} + C / D - trK,

with A, B, C, D given by the appendix expressions

A = -gamma^{ik} gamma^{jl} s_k s_l (partial_i s_j)

  • 1/2 gamma^{ij} s_j s_k s_l (partial_i gamma^{kl}), B = s_j (partial_i gamma^{ij}) + gamma^{ij} (partial_i s_j)
  • (partial_i ln sqrt(gamma)) gamma^{ij} s_j, C = K^{ij} s_i s_j. D = gamma^{ij} s_i s_j,

s_i and partial_i s_j are supplied by the shell-to-surface step (they are pure functions of the guess geometry), so this kernel starts from s_i, partial_i s_j, gamma_ij, partial_k gamma_ij, K_ij, trK already present at the point.

Parameters
surfaceNormals_i.
surfaceNormalDerivativepartial_i s_j, indexed [i][j].
spatialMetricgamma_ij.
spatialMetricDerivativepartial_k gamma_ij, indexed [k][i][j].
extrinsicCurvatureK_ij.
traceKtrK = gamma^{ij} K_ij.
Returns
the expansion Theta at the point.

◆ ComputePhysicalExtrinsicCurvature()

Tensor3 exahype2::ccz4::ahf::ComputePhysicalExtrinsicCurvature ( const Tensor3 & ATilde,
double traceK,
const Tensor3 & gammaTilde,
double phi )

Compute K_ij = (ATilde_ij + K gammaTilde_ij / 3) / phi^2 using direct phi.

Definition at line 572 of file ahf-data.h.

References ValidatePhysicalPhi().

Here is the call graph for this function:

◆ ComputePhysicalSpatialMetric()

Tensor3 exahype2::ccz4::ahf::ComputePhysicalSpatialMetric ( const Tensor3 & gammaTilde,
double phi )

Compute gamma_ij = gammaTilde_ij / phi^2 for direct (not logarithmic) phi.

Definition at line 555 of file ahf-data.h.

References ValidatePhysicalPhi().

Here is the call graph for this function:

◆ ComputePhysicalSpatialMetricDerivative()

Tensor3Derivative exahype2::ccz4::ahf::ComputePhysicalSpatialMetricDerivative ( const Tensor3 & gammaTilde,
const Tensor3Derivative & gammaTildeDerivative,
double phi,
const Vector3 & phiDerivative )

Compute Cartesian physical-metric derivatives in [k][i][j] order: partial_k gamma_ij = partial_k gammaTilde_ij / phi^2.

  • 2 gammaTilde_ij partial_k phi / phi^3.

Definition at line 597 of file ahf-data.h.

References ValidatePhysicalPhi().

Here is the call graph for this function:

◆ ComputeRadialProjectionTensor()

Tensor3 exahype2::ccz4::ahf::ComputeRadialProjectionTensor ( const GridCoordinate & relativeCoordinate)

Compute T_ij = r^2 delta_ij - x_i x_j from relative coordinates.

◆ determinant()

double exahype2::ccz4::ahf::determinant ( const Tensor3 & m)

Determinant of a 3x3 matrix (general; used for the metric determinant).

Definition at line 19 of file tensor-algebra.h.

Referenced by inverse().

Here is the caller graph for this function:

◆ EnumerateModes()

std::vector< std::pair< int, int > > exahype2::ccz4::ahf::EnumerateModes ( int lmax)

Ordered list of (l, m) modes, l = 0..lmax, m = -l..l.

◆ EvalMode()

ModeValues exahype2::ccz4::ahf::EvalMode ( int l,
int m,
double rho,
double sigma )

Evaluate the real Y_lm and its rho/sigma derivatives at (rho, sigma).

Uses mu = sin(sigma); the associated-Legendre part is differentiated by recurrence and the sigma-derivatives obtained by the chain rule

d/dsigma = cos(sigma) d/dmu, d^2/dsigma^2 = -sin(sigma) d/dmu + cos^2(sigma) d^2/dmu^2.

The derivative recurrences divide by cos^2(sigma), so this is finite only for sigma strictly inside (-pi/2, pi/2) (the Gauss-Legendre nodes never touch the poles).

◆ EvalModeValue()

double exahype2::ccz4::ahf::EvalModeValue ( int l,
int m,
double rho,
double sigma )

The real Y_lm at (rho, sigma), without any derivatives.

Introduced for plots, but keeping it as might me useful in the future.

Same normalisation, Condon-Shortley phase and cos/sin(m rho) convention as EvalMode, so EvalModeValue(l, m, rho, sigma) == EvalMode(l, m, rho, sigma).Y wherever the latter is finite.

This is not a second copy of that formula: EvalMode calls this function for its own Y field, so the value is defined in exactly one place and the two cannot drift apart. What the separate entry point buys is the ability to ask for the value without paying for the derivatives – and at the poles that is not merely an optimisation but the only way to get an answer at all, because EvalMode's derivative recurrences divide by cos^2(sigma) and return non-finite Yrho/Ysigma/... at sigma = +/- pi/2. Reading .

The core never needs it: the Gauss-Legendre collocation nodes are open in mu = sin(sigma) and so never land on a pole, which is why EvalMode alone sufficed until something had to evaluate h off that grid. Anything that closes the surface does need it – synthesising h on a plotting or output mesh spanning the full sigma range, for instance.

Parameters
ldegree, l >= 0.
morder, -l <= m <= l; m > 0 selects cos(|m| rho), m < 0 sin(|m| rho).
rhoazimuth.
sigmaelevation in [-pi/2, pi/2] (not colatitude); the poles are safe here.

◆ ExaGRyPESourceMapping()

SourceVariableMapping exahype2::ccz4::ahf::ExaGRyPESourceMapping ( )

Mapping for output of the exagrype.api solvers, in the order of FOCCZ4Solver.Unknowns (src/exagrype/api/FOCCZ4Solver.py): G 0-5, K 6-11, traceK 23, phi 24.

FOSOCCZ4Solver stores the same first 25 unknowns.

Definition at line 238 of file ahf-data.h.

◆ FindApparentHorizon()

AHSearchResult exahype2::ccz4::ahf::FindApparentHorizon ( const GridData & gridData,
const AHSearchOptions & options )

Try explicit attempt pairs in vector order and stop at the first accepted horizon.

One persistent Cartesian interpolator is reused.

Newton zeroes only the projection of Theta at the collocation points, so a converged, reconstructable surface is accepted only if its AHFinderResult::relativeExpansionError (Theta on a grid twice as fine) is within SpectralNewtonOptions::maxRelativeExpansionError. From a starting sphere that is too large, Newton can converge to a surface that aliasing makes look like a horizon, and the next attempt may still find the real one, so a rejection does not end the search.

dot_inline_dotgraph_7.png

◆ FindApparentHorizons() [1/3]

AHHorizonCatalogue exahype2::ccz4::ahf::FindApparentHorizons ( const GridData & gridData,
const AHCommonHorizonSearchOptions & options )

Unified N>=1 workflow.

For N=1 only the individual multi-attempt search is executed; for N>=2 common candidates are additionally planned and solved. One basis and one Cartesian interpolator are shared by all phases.

◆ FindApparentHorizons() [2/3]

AHMultiHorizonResult exahype2::ccz4::ahf::FindApparentHorizons ( const GridData & gridData,
const AHMultiHorizonOptions & options )

Search every physical target in vector order.

The first successful attempt stops retries for that target only; remaining targets are still searched. One spectral basis and one persistent Cartesian interpolator are shared.

◆ FindApparentHorizons() [3/3]

AHMultiHorizonResult exahype2::ccz4::ahf::FindApparentHorizons ( const SpectralBasis & basis,
const CartesianPointInterpolator & interpolator,
const AHMultiHorizonOptions & options )

Execute a validated multi-target search using caller-owned numerical objects.

This is the orchestration primitive used when several search phases must share one persistent Cartesian spatial index.

◆ FindBinaryMergerHorizons()

AHBinaryMergerResult exahype2::ccz4::ahf::FindBinaryMergerHorizons ( const GridData & gridData,
const AHBinaryMergerOptions & options )

Build the plan, execute it with the ordinary multi-horizon machinery and validate the common result.

◆ FindCommonApparentHorizons()

AHHorizonCatalogue exahype2::ccz4::ahf::FindCommonApparentHorizons ( const GridData & gridData,
const AHCommonHorizonSearchOptions & options )

Backward-compatible name for the unified N>=1 workflow.

◆ FindGridCellsWithinRadius()

std::vector< std::size_t > exahype2::ccz4::ahf::FindGridCellsWithinRadius ( const CartesianSpatialIndex & spatialIndex,
const GridCoordinate & target,
double radius )

Query every indexed cell strictly inside radius, sorted by distance/index.

◆ FindNearestGridCells() [1/2]

std::vector< std::size_t > exahype2::ccz4::ahf::FindNearestGridCells ( const CartesianSpatialIndex & spatialIndex,
const GridCoordinate & target,
std::size_t neighbourCount )

Query a previously built index without rebuilding it.

◆ FindNearestGridCells() [2/2]

std::vector< std::size_t > exahype2::ccz4::ahf::FindNearestGridCells ( const GridData & gridData,
const GridCoordinate & target,
std::size_t neighbourCount )

Compatibility interface for one-off queries.

Repeated queries should build CartesianSpatialIndex once and use the overload above.

◆ FindNearestGridCellsBruteForce()

std::vector< std::size_t > exahype2::ccz4::ahf::FindNearestGridCellsBruteForce ( const GridData & gridData,
const GridCoordinate & target,
std::size_t neighbourCount )

Return the indices of the neighbourCount nearest Cartesian cell centres.

Results are ordered by increasing squared Euclidean distance, with cell index as the deterministic tie-breaker. This brute-force baseline is deliberately isolated behind this API so its implementation can later use a spatial index.

Exceptions
std::invalid_argumentfor an empty grid, an invalid neighbour count, or a non-finite target coordinate.

◆ FinestGridSpacing()

double exahype2::ccz4::ahf::FinestGridSpacing ( const GridData & gridData)

The smallest distance between neighbouring cell centres along a coordinate axis.

On a Peano grid this is the cell size of the finest level present.

Exceptions
std::invalid_argumentif no axis has two distinct coordinates.

◆ FitCompactLinearPolynomial()

CompactLinearFit exahype2::ccz4::ahf::FitCompactLinearPolynomial ( const GridData & gridData,
std::span< const std::size_t > neighbourIndices,
const GridCoordinate & target,
const LinearReconstructionOptions & options = {} )

Reconstruct all fourteen compact fields with one shared polynomial design matrix and one column-pivoted QR factorisation.

Result fields retain compact order, including K at 12 and direct phi at 13.

◆ FitLinearPolynomial()

LinearPolynomialFit exahype2::ccz4::ahf::FitLinearPolynomial ( std::span< const GridCoordinate > sampleCoordinates,
std::span< const double > sampleValues,
const GridCoordinate & target,
const LinearReconstructionOptions & options = {} )

Scalar total-degree polynomial least-squares reconstruction using a column-pivoted QR solve.

The length scale ell is the maximum Euclidean distance of any sample from the target, except for RadiusWeightedWendlandC2 where ell is the configured support radius. This bounds every scaled sample radius by one and is insensitive to sample ordering.

The configured degree p requires at least (p+1)(p+2)(p+3)/6 samples; using more gives the intended overdetermined fit. Degrees 0 through 3 are currently supported by the reconstruction kernel.

Exceptions
std::invalid_argumentfor malformed/non-finite input, too few samples, an unsupported degree, or a rank-deficient sample distribution.

◆ GaussLegendre()

std::pair< std::vector< double >, std::vector< double > > exahype2::ccz4::ahf::GaussLegendre ( int n)

Gauss-Legendre nodes and weights on [-1, 1] (integrates d mu).

Returns a pair {nodes, weights}, each of length n, nodes in ascending order.

◆ GeneratePolynomialBasis()

PolynomialBasis exahype2::ccz4::ahf::GeneratePolynomialBasis ( std::size_t degree)

◆ HorizonArea() [1/2]

template<class Spacetime>
double exahype2::ccz4::ahf::HorizonArea ( const SpectralBasis & basis,
const std::vector< double > & coefficients,
const Spacetime & spacetime,
const ReferencePoint & referencePoint )

The area on an analytic spacetime, whose metric is evaluated on the surface.

◆ HorizonArea() [2/2]

double exahype2::ccz4::ahf::HorizonArea ( const SpectralBasis & basis,
const std::vector< double > & coefficients,
std::span< const Tensor3 > spatialMetric )

Post-solve horizon diagnostics.

The horizon area uses the metric induced on the surface

x^i(rho, sigma) = s0^i + h n^i: q_AB = gamma_ij d_A x^i d_B x^j,

where A, B in {rho, sigma}. The area is given by

Area = integral sqrt(det q) drho dsigma.

The collocation weights integrate dmu drho (mu = sin sigma), so the sum carries an extra 1/cos(sigma) Jacobian to convert to dsigma drho.

spatialMetric[p] is the physical metric gamma_ij at collocation point p of the surface, in basis order, wherever it came from (an analytic spacetime or the interpolated grid data).

◆ InterpolateCartesianToSurface() [1/2]

void exahype2::ccz4::ahf::InterpolateCartesianToSurface ( const CartesianPointInterpolator & interpolator,
const AHGuess & ahGuess,
const ReferencePoint & referencePoint,
InterpolatedSurface & interpolatedSurface )

Surface adapter using an already-built, persistent Cartesian interpolator.

◆ InterpolateCartesianToSurface() [2/2]

void exahype2::ccz4::ahf::InterpolateCartesianToSurface ( const GridData & gridData,
const AHGuess & ahGuess,
const ReferencePoint & referencePoint,
InterpolatedSurface & interpolatedSurface,
const CartesianToSurfaceOptions & options = {} )

Interpolate compact Cartesian fields directly to every AH surface point.

Polynomial modes populate physical metric derivatives in [k][i][j] order, where k is the Cartesian differentiation direction. Surface-shape and angular derivatives are intentionally not computed. This compatibility overload builds a temporary CartesianPointInterpolator; iterative callers should use the overload above to retain its spatial index.

◆ InterpolateFromCartesianToShell()

void exahype2::ccz4::ahf::InterpolateFromCartesianToShell ( const GridData & gridData,
const AHGuess & ahGuess,
const ReferencePoint & referencePoint,
InterpolatedShell & interpolatedShell,
std::span< const AngularSample > angularSamples = {} )

Interpolate the Cartesian grid data to a shell-like subdomain around the current AH guess.

◆ InterpolateFromShellToSurface()

void exahype2::ccz4::ahf::InterpolateFromShellToSurface ( const InterpolatedShell & interpolatedShell,
const AHGuess & ahGuess,
const ReferencePoint & referencePoint,
InterpolatedSurface & interpolatedSurface )

Interpolate the shell data to the apparent-horizon surface defined by the current AH guess.

◆ InterpolateToSurfaceNearestNeighbour()

void exahype2::ccz4::ahf::InterpolateToSurfaceNearestNeighbour ( const GridData & gridData,
const AHGuess & ahGuess,
const ReferencePoint & referencePoint,
InterpolatedSurface & interpolatedSurface )

Sample each AH surface point from its nearest Cartesian cell centre and reconstruct the physical spatial metric and extrinsic curvature.

This low-order baseline does not compute metric derivatives, coordinate derivatives, or surface normals. Their storage is zero-initialised and spatialMetricDerivativeAvailable is false for every output point.

◆ inverse()

Tensor3 exahype2::ccz4::ahf::inverse ( const Tensor3 & m)

Inverse of a 3x3 matrix via the closed-form adjugate / determinant.

For a symmetric input (as gamma_ij always is here) the result is symmetric. This is the same expression the CCZ4 PDE kernels use for the (inverse) spatial metric.

The determinant is assumed non-zero (a valid spatial metric is positive definite).

Definition at line 32 of file tensor-algebra.h.

References determinant().

Here is the call graph for this function:

◆ IrreducibleMass()

double exahype2::ccz4::ahf::IrreducibleMass ( double area)

Irreducible mass sqrt(area / 16 pi).

◆ LegacyCCZ4SourceMapping()

SourceVariableMapping exahype2::ccz4::ahf::LegacyCCZ4SourceMapping ( )

Mapping for output of the legacy applications/exahype2/ccz4/ccz4.py, which stores traceK at 53 and phi at 54.

The GitLab-era snapshots used by the integration tests have this layout.

Definition at line 252 of file ahf-data.h.

◆ LinearReconstructionWeight()

double exahype2::ccz4::ahf::LinearReconstructionWeight ( double distance,
double lengthScale,
const LinearReconstructionOptions & options )

Evaluate the configured unweighted, Gaussian, or compact-support row weight.

◆ MakeAnalyticResidual()

template<class Spacetime>
SpectralResidual exahype2::ccz4::ahf::MakeAnalyticResidual ( const SpectralBasis & basis,
const Spacetime & spacetime,
const ReferencePoint & referencePoint )

MakeResidual using MetricData(spacetime, .) as the geometry source.

Definition at line 42 of file analytic-residual.h.

References MakeResidual(), and MetricData().

Here is the call graph for this function:

◆ MakeCommonHorizonId()

std::string exahype2::ccz4::ahf::MakeCommonHorizonId ( const std::vector< std::string > & memberIds)

◆ MakeCommonHorizonTarget()

AHHorizonTarget exahype2::ccz4::ahf::MakeCommonHorizonTarget ( const AHCommonHorizonCandidate & candidate,
const AHCommonHorizonTargetOptions & options = {} )

◆ MakeDistortedInitialCoefficients()

std::vector< double > exahype2::ccz4::ahf::MakeDistortedInitialCoefficients ( const SpectralBasis & basis,
const std::vector< double > & radii )

Project positive radii in canonical SpectralBasis collocation order into an arbitrary star-shaped spectral initial surface.

◆ MakeIndividualHorizonTargets()

std::vector< AHHorizonTarget > exahype2::ccz4::ahf::MakeIndividualHorizonTargets ( const std::vector< AHPhysicalBlackHole > & blackHoles,
bool excludeOtherBlackHoles = true )

Convert user identities into the existing individual-target representation.

With excludeOtherBlackHoles, each target excludes the other black holes' physical positions, so that an individual search cannot settle on a surface around another black hole, such as the common horizon.

◆ MakePostprocessCatalogueOptions()

AHCommonHorizonSearchOptions exahype2::ccz4::ahf::MakePostprocessCatalogueOptions ( const PostprocessOptions & options,
double supportRadius )

The catalogue configuration for punctures: black holes bh0, bh1, ... at the punctures, each searched from radiiPerMass times its mass, with the interpolation, lMax and tolerance of MakePostprocessSearchOptions and the default candidate planning and validation.

The solver stops at tolerance / massScale, and a common search has the members' total mass as its massScale, while the validation compares the residual with an absolute bound. That bound is therefore tolerance divided by the smallest mass, which no common horizon's total mass can be below, so that a converged common solve is never rejected for its residual.

◆ MakePostprocessSearchOptions()

AHSearchOptions exahype2::ccz4::ahf::MakePostprocessSearchOptions ( const PostprocessOptions & options,
double supportRadius )

The search configuration: one attempt per initial radius around the centre, radius-weighted cubic interpolation within supportRadius, and the given lMax and tolerance.

◆ MakePreviousSurfaceAttempt()

AHSearchAttempt exahype2::ccz4::ahf::MakePreviousSurfaceAttempt ( const AHFinderResult & previous)

Continue from a prior reconstructable result using its centre and surface.

◆ MakeResidual()

SpectralResidual exahype2::ccz4::ahf::MakeResidual ( const SpectralBasis & basis,
const GeometrySource & geometryAt,
const ReferencePoint & referencePoint )

Return the spectral residual.

R(a) = project(Theta)

for a geometry source ready to hand to SolveSpectralNewton (BuildSurface followed by spectral AssembleGlobalMatrix). The basis is captured by reference and must outlive the returned residual; the geometry source and reference point are captured by value.

Referenced by MakeAnalyticResidual().

Here is the caller graph for this function:

◆ MakeSphericalInitialCoefficients()

std::vector< double > exahype2::ccz4::ahf::MakeSphericalInitialCoefficients ( const SpectralBasis & basis,
double radius )

Construct spectral coefficients for a constant-radius spherical initial guess by projecting h(p) = radius on the basis collocation grid.

Exceptions
std::invalid_argumentif radius is non-finite or not strictly positive, or if projection does not return one coefficient per mode.

◆ MeanCoordinateRadius()

double exahype2::ccz4::ahf::MeanCoordinateRadius ( const std::vector< double > & coefficients)

Mean coordinate radius a_00 / sqrt(4 pi).

◆ MetricData()

template<class Spacetime>
InterpolatedGeometryData exahype2::ccz4::ahf::MetricData ( const Spacetime & spacetime,
const Vector3 & X )

Geometry derived from an analytic spacetime at the Cartesian point X, packed into the same InterpolatedGeometryData that the grid-interpolation path uses.

Fills spatialMetric gamma_ij, spatialMetricDerivative partial_k gamma_ij, extrinsicCurvature K_ij and traceK; the coordinate-transform fields (T, coordinateGradient, coordinateHessian) are left untouched (populated separately). partial_k gamma_ij and K_ij are computed by complex-step differentiation of the spacetime field functions.

Referenced by BuildAnalyticSurface(), and MakeAnalyticResidual().

Here is the caller graph for this function:

◆ ParsePostprocessArguments()

PostprocessOptions exahype2::ccz4::ahf::ParsePostprocessArguments ( const std::vector< std::string > & arguments)

Parse the arguments that follow the program name.

Exceptions
std::invalid_argumentfor an unknown option, a missing or malformed value, a missing –input, neither –radius nor –puncture, or –puncture together with –radius or –centre (unless –help is given).

◆ PlanCommonHorizonCandidates()

AHCommonHorizonCandidatePlan exahype2::ccz4::ahf::PlanCommonHorizonCandidates ( const std::vector< AHIndividualHorizonObservation > & observations,
const AHCommonHorizonCandidateOptions & options = {} )

Plan prospective common searches from already successful individual AHs.

Proximity only creates a candidate; it is not evidence that a common AH exists, and this function deliberately performs no Newton solve.

◆ PolynomialBasisSize()

std::size_t exahype2::ccz4::ahf::PolynomialBasisSize ( std::size_t degree)

◆ PopulateSurfaceShapeGeometry() [1/2]

void exahype2::ccz4::ahf::PopulateSurfaceShapeGeometry ( InterpolatedSurface & surface,
const SynthesizedField & field )

Populate every surface point from the corresponding SynthesizedField row.

◆ PopulateSurfaceShapeGeometry() [2/2]

void exahype2::ccz4::ahf::PopulateSurfaceShapeGeometry ( InterpolatedSurfacePoint & point,
const SurfaceShapeDerivatives & derivatives )

Populate the non-unit normal covector s_i and partial_i s_j.

Cartesian indices i,j use x,y,z order. geometry.T is T[i][j]. The coordinate arrays are [u][i] and [u][i][j], where u=0 is rho and u=1 is sigma. surfaceNormalDerivative is stored as [i][j] = partial_i s_j. Existing Cartesian interpolation data are read but never recomputed.

Exceptions
std::invalid_argumentif radius, derivatives, or analytic coordinate geometry are invalid, or if the resulting surface geometry is non-finite.

◆ PostprocessSourceMapping()

std::optional< SourceVariableMapping > exahype2::ccz4::ahf::PostprocessSourceMapping ( PostprocessMapping mapping)

The explicit source mapping selected by mapping; nothing for Names.

◆ PostprocessUsage()

std::string exahype2::ccz4::ahf::PostprocessUsage ( const std::string & executable)

The usage text printed by –help and after an argument error.

◆ PowerSpectrum()

std::vector< double > exahype2::ccz4::ahf::PowerSpectrum ( const SpectralBasis & basis,
const std::vector< double > & coefficients )

Per-degree coefficient power sum_m a_lm^2 (a spectral-convergence / non-sphericity indicator).

Returns a vector of length lmax + 1 indexed by l.

◆ Project()

std::vector< double > exahype2::ccz4::ahf::Project ( const SpectralBasis & basis,
const std::vector< double > & field )

Analysis (point values -> coefficients): a = Y^T (weight .

  • field), the discrete spherical-harmonic transform.
    Parameters
    field(nPoints,) sampled at the collocation points.

◆ ReadGridFromFile() [1/2]

void exahype2::ccz4::ahf::ReadGridFromFile ( const std::string & inputFile,
GridData & gridData )

Load a grid dataset as above, selecting the fourteen AHF fields by the names of the cell-data components (CCZ4SourceComponentNames), so no mapping is needed.

Exceptions
std::runtime_errorif the file cannot be read, holds no cell data, or does not name each of the fourteen components exactly once.

◆ ReadGridFromFile() [2/2]

void exahype2::ccz4::ahf::ReadGridFromFile ( const std::string & inputFile,
GridData & gridData,
const SourceVariableMapping & sourceMapping )

Load a grid dataset from VTK XML unstructured-grid data, keeping only the variables selected by sourceMapping.

The input may be either a single-piece .vtu (read in one shot) or a multi-piece .pvtu series (dispatched by the .pvtu extension). The .pvtu path is streamed one piece at a time with a fresh reader per piece, so peak memory is bounded by one piece plus the accumulating GridData rather than by the whole grid. Use repartition_vtu.py to turn a single-piece snapshot into a .pvtu series for low-memory reads.

The CCZ4 finite-volume output stores its unknowns as a single multi-component cell-data array (one finite volume per cell). Rather than copying all components, this reader stores only the source components referenced by the source mapping. The reader requires all fourteen AHF fields and translates them into the fixed CompactField layout. Source component numbers do not survive this boundary and must never be used by interpolation.

Output layout. GridData::coordinates[i] is the centre of cell i. GridData is compact: every row has exactly fourteen columns in this fixed order: conformalMetric xx, xy, xz, yy, yz, zz (columns 0..5) conformalExtrinsicCurvature xx, xy, xz, yy, yz, zz (columns 6..11) traceK (column 12) conformalFactor (column 13) CompactField names these columns. SourceVariableMapping names components of the input tuple only.

If the cell-data array names its components, as snapshots converted with src/tarch/plotter/api/render.py do, the mapping must agree with the names (see ValidateSourceMappingAgainstComponentNames).

Parameters
inputFilepath to a .vtu file.
gridDataoutput; any previous content is overwritten.
sourceMappingidentifies all fourteen source tuple components, for example ExaGRyPESourceMapping() or LegacyCCZ4SourceMapping().
Exceptions
std::runtime_errorif the file cannot be read, holds no cell data, or a selected index is out of range.
std::invalid_argumentif the mapping is incomplete or contradicts the component names.

◆ ReadGridFromPeano()

void exahype2::ccz4::ahf::ReadGridFromPeano ( const PeanoGridData & peanoGridData)

Load grid dataset from the Peano simulation on-the-fly.

◆ SolveLinearSystem()

std::vector< double > exahype2::ccz4::ahf::SolveLinearSystem ( std::vector< std::vector< double > > A,
std::vector< double > b )

Solve the dense square system A x = b by Gaussian elimination with partial pivoting.

A is passed by value (elimination happens on the copy); rows of A are length b.size(). Throws std::invalid_argument on a shape mismatch and std::runtime_error if the matrix is (numerically) singular.

Definition at line 23 of file dense-linear-algebra.h.

◆ SolvePDEforAH() [1/2]

SpectralNewtonResult exahype2::ccz4::ahf::SolvePDEforAH ( const SpectralBasis & basis,
const CartesianPointInterpolator & interpolator,
const ReferencePoint & referencePoint,
const std::vector< double > & initialCoefficients,
const SpectralNewtonOptions & options = {} )

Solve from an explicit star-shaped spectral surface (e.g.

a prior result).

◆ SolvePDEforAH() [2/2]

SpectralNewtonResult exahype2::ccz4::ahf::SolvePDEforAH ( const SpectralBasis & basis,
const CartesianPointInterpolator & interpolator,
const ReferencePoint & referencePoint,
double initialRadius,
const SpectralNewtonOptions & options = {} )

Solve one interpolation-backed apparent-horizon PDE from a spherical initial guess.

This is the public orchestration entry point for the currently implemented direct Cartesian-to-surface backend. The supplied interpolator and its spatial index remain alive and are reused throughout the Newton solve.

◆ SolveSpectralNewton()

SpectralNewtonResult exahype2::ccz4::ahf::SolveSpectralNewton ( const SpectralBasis & basis,
const SpectralResidual & residual,
const std::vector< double > & initialCoefficients,
const SpectralNewtonOptions & options = {} )

Damped Newton-Raphson solve of the spectral apparent-horizon equations R(a) = 0.

Each step builds a dense Jacobian J_pq = dR_p/da_q by central finite differences over the coefficients, solves J delta a = -R by LU, and applies a backtracking line search on ||R||_2. A physical guard rejects any step whose synthesised h leaves the valid star-shaped range (h > 0 everywhere, max h below a cap set from the initial guess), which catches the spurious large-radius root where Theta -> 0 as the surface grows without bound.

Parameters
basisthe spectral basis (used by the guard to synthesise h).
residualR(a); must return a vector of length initialCoefficients.size().
initialCoefficientsthe starting coefficient vector (e.g. a coordinate sphere).

◆ SourceVariableMappingFromComponentNames()

std::optional< SourceVariableMapping > exahype2::ccz4::ahf::SourceVariableMappingFromComponentNames ( std::span< const std::string > componentNames)

◆ SphereCoefficients()

std::vector< double > exahype2::ccz4::ahf::SphereCoefficients ( const SpectralBasis & basis,
double radius )

Coefficient vector for a coordinate sphere h = radius (only a_00 != 0, since Y_00 = 1/sqrt(4 pi) so a_00 = radius sqrt(4 pi)).

◆ SurfaceEncloses()

bool exahype2::ccz4::ahf::SurfaceEncloses ( const AHFinderResult & result,
const ReferencePoint & point )

True if the surface encloses point, i.e.

point is closer to result.referencePoint than the surface is in that direction. The reference point itself is always enclosed.

◆ SurfacePointToCartesian()

GridCoordinate exahype2::ccz4::ahf::SurfacePointToCartesian ( const AHGuessPoint & surfacePoint,
const ReferencePoint & referencePoint )

Convert one AH point (r, longitude rho, latitude sigma) into its global Cartesian target coordinate relative to referencePoint.

Exceptions
std::invalid_argumentfor non-finite inputs or non-positive radius.

◆ SurfaceRadius()

double exahype2::ccz4::ahf::SurfaceRadius ( const AHFinderResult & result,
double rho,
double sigma )

Coordinate radius of the surface in the direction (rho, sigma) about result.referencePoint, from the retained coefficients.

Throws std::invalid_argument if their count does not match result.lMax.

◆ SurfaceRadiusTowards()

double exahype2::ccz4::ahf::SurfaceRadiusTowards ( const AHFinderResult & result,
const ReferencePoint & destination )

SurfaceRadius in the direction from result.referencePoint towards destination.

Throws std::invalid_argument if the two points coincide.

◆ Synthesize()

SynthesizedField exahype2::ccz4::ahf::Synthesize ( const SpectralBasis & basis,
const std::vector< double > & coefficients )

Synthesis (coefficients -> point values): h = Y a, hRho = Yrho a, etc.

Parameters
coefficients(nModes,) spherical-harmonic coefficient vector.

◆ UnpackSymmetricTensor()

Tensor3 exahype2::ccz4::ahf::UnpackSymmetricTensor ( std::span< const double, NumberOfSymmetricTensorComponents > components)

Expand symmetric components ordered xx, xy, xz, yy, yz, zz into a 3x3 tensor.

Off-diagonal entries are assigned explicitly to preserve symmetry.

Definition at line 526 of file ahf-data.h.

◆ ValidateAHBinaryMergerOptions()

void exahype2::ccz4::ahf::ValidateAHBinaryMergerOptions ( const AHBinaryMergerOptions & options)

◆ ValidateAHCommonHorizonCandidateOptions()

void exahype2::ccz4::ahf::ValidateAHCommonHorizonCandidateOptions ( const AHCommonHorizonCandidateOptions & options)

◆ ValidateAHFinderOptions()

void exahype2::ccz4::ahf::ValidateAHFinderOptions ( const AHFinderOptions & options)

Validate configuration that can be checked before grid data are supplied.

◆ ValidateAHMultiHorizonOptions()

void exahype2::ccz4::ahf::ValidateAHMultiHorizonOptions ( const AHMultiHorizonOptions & options)

◆ ValidateAHOutputOptions()

void exahype2::ccz4::ahf::ValidateAHOutputOptions ( const AHOutputOptions & options)

Validate output filenames and visualisation resolution before solving.

◆ ValidateAHPhysicalBlackHoles()

void exahype2::ccz4::ahf::ValidateAHPhysicalBlackHoles ( const std::vector< AHPhysicalBlackHole > & blackHoles)

◆ ValidateAHSearchOptions()

void exahype2::ccz4::ahf::ValidateAHSearchOptions ( const AHSearchOptions & options)

Reject an empty list or any structurally invalid shared/attempt option.

◆ ValidateBinaryMergerCommonHorizon()

std::optional< AHCommonHorizonValidation > exahype2::ccz4::ahf::ValidateBinaryMergerCommonHorizon ( const AHBinaryMergerOptions & options,
const AHBinaryMergerPlan & plan,
const AHMultiHorizonResult & horizons )

Validate the common result of an executed plan as the catalogue does: the reconstructed components are the members and their first attempts' reference points the physical positions.

Empty when no common search ran.

◆ ValidateCommonHorizon() [1/2]

AHCommonHorizonValidation exahype2::ccz4::ahf::ValidateCommonHorizon ( const AHFinderResult & common,
const std::vector< AHIndividualHorizonObservation > & members,
const AHCommonHorizonValidationOptions & options = {} )

Numerical/geometric checks only; this is not proof of outermost status.

◆ ValidateCommonHorizon() [2/2]

AHCommonHorizonValidation exahype2::ccz4::ahf::ValidateCommonHorizon ( const AHFinderResult & common,
const std::vector< AHIndividualHorizonObservation > & reconstructedMembers,
const std::vector< ReferencePoint > & physicalPositions,
std::size_t expectedMemberCount,
const AHCommonHorizonValidationOptions & options = {} )

Validate with potentially incomplete member surfaces and independently available physical positions.

expectedMemberCount defines completeness.

◆ ValidatePhysicalPhi()

void exahype2::ccz4::ahf::ValidatePhysicalPhi ( double phi)

Definition at line 539 of file ahf-data.h.

References MinimumPhysicalPhi.

Referenced by ComputePhysicalExtrinsicCurvature(), ComputePhysicalSpatialMetric(), and ComputePhysicalSpatialMetricDerivative().

Here is the caller graph for this function:

◆ ValidateSourceMappingAgainstComponentNames()

void exahype2::ccz4::ahf::ValidateSourceMappingAgainstComponentNames ( const SourceVariableMapping & sourceMapping,
std::span< const std::string > componentNames )

Reject a mapping that contradicts the component names of the source tuple.

Names that do not identify every field (see SourceVariableMappingFromComponentNames) are not checked, so data without names, or with names from another convention, is accepted as before.

Definition at line 313 of file ahf-data.h.

References CCZ4SourceComponentNames, CompactFieldNames, exahype2::ccz4::ahf::SourceVariableMapping::componentsInCompactOrder(), and SourceVariableMappingFromComponentNames().

Here is the call graph for this function:

◆ WendlandC2Weight()

double exahype2::ccz4::ahf::WendlandC2Weight ( double q)

Wendland C2 compact kernel: (1-q)^4(4q+1) for 0<=q<1, else zero.

◆ WriteAHHorizonCatalogueSummary()

void exahype2::ccz4::ahf::WriteAHHorizonCatalogueSummary ( const AHHorizonCatalogue & result,
const std::string & filename )

Catalogue summary retaining individual failures and common validation.

◆ WriteAHMultiHorizonSummary()

void exahype2::ccz4::ahf::WriteAHMultiHorizonSummary ( const AHMultiHorizonResult & result,
const std::string & filename )

Write every executed target/attempt and any selected horizon diagnostics.

◆ WriteAHSearchSummary()

void exahype2::ccz4::ahf::WriteAHSearchSummary ( const AHSearchResult & result,
const std::string & filename )

Write ordered diagnostics for every executed attempt and, on success, the selected horizon diagnostics.

◆ WriteAHSummary()

void exahype2::ccz4::ahf::WriteAHSummary ( const AHFinderResult & result,
const std::string & filename )

Write all solver and reconstructed-surface diagnostics as deterministic text.

◆ WriteAHSurfaceToVTP()

void exahype2::ccz4::ahf::WriteAHSurfaceToVTP ( const AHFinderResult & result,
const std::string & filename,
const AHVisualizationOptions & options = {} )

Write a converged dense horizon surface as VTK XML PolyData (.vtp).

◆ WriteAHToFile() [1/5]

AHBinaryMergerResult exahype2::ccz4::ahf::WriteAHToFile ( const GridData & gridData,
const AHBinaryMergerOptions & mergerOptions,
const AHMultiHorizonOutputOptions & outputOptions = {} )

Merger-aware binary workflow with the same per-target output convention.

◆ WriteAHToFile() [2/5]

AHHorizonCatalogue exahype2::ccz4::ahf::WriteAHToFile ( const GridData & gridData,
const AHCommonHorizonSearchOptions & searchOptions,
const AHMultiHorizonOutputOptions & outputOptions = {} )

N-black-hole individual/common workflow and validated output façade.

◆ WriteAHToFile() [3/5]

AHFinderResult exahype2::ccz4::ahf::WriteAHToFile ( const GridData & gridData,
const AHFinderOptions & finderOptions,
const AHOutputOptions & outputOptions = {} )

Complete single-horizon user workflow.

The grid is referenced by one persistent CartesianPointInterpolator for the solve and final reconstruction. A summary is always written after a solver result is obtained. The normal VTP horizon is written only for a converged, reconstructable surface.

◆ WriteAHToFile() [4/5]

AHMultiHorizonResult exahype2::ccz4::ahf::WriteAHToFile ( const GridData & gridData,
const AHMultiHorizonOptions & searchOptions,
const AHMultiHorizonOutputOptions & outputOptions = {} )

Complete multi-horizon workflow.

All targets are searched. The aggregate summary is always written after the searches complete; each converged, reconstructable target receives its own numerical summary and VTP surface.

◆ WriteAHToFile() [5/5]

AHSearchResult exahype2::ccz4::ahf::WriteAHToFile ( const GridData & gridData,
const AHSearchOptions & searchOptions,
const AHOutputOptions & outputOptions = {} )

Multi-attempt user workflow.

Attempts are paired entries tried in vector order; the first converged, reconstructable horizon stops the search.

◆ WriteAHToVTK()

void exahype2::ccz4::ahf::WriteAHToVTK ( const std::string & inputFile,
const std::string & outputFile )

Convert the ASCII apparent-horizon hypersurface output into a VTK file.

Variable Documentation

◆ CCZ4SourceComponentNames

std::array<const char*, NumberOfCompactFields> exahype2::ccz4::ahf::CCZ4SourceComponentNames
constexpr
Initial value:
{
"G[0]", "G[1]", "G[2]", "G[3]", "G[4]", "G[5]",
"K[0]", "K[1]", "K[2]", "K[3]", "K[4]", "K[5]",
"traceK", "phi"
}

Names the CCZ4 solvers give the AHF fields, in CompactField order.

Peano's patch-file converter (src/tarch/plotter/api/render.py) labels each component of the unknowns array with the solver's names, so a converted snapshot says where each field is, whatever the layout.

Definition at line 267 of file ahf-data.h.

Referenced by SourceVariableMappingFromComponentNames(), and ValidateSourceMappingAgainstComponentNames().

◆ CompactFieldNames

std::array<const char*, NumberOfCompactFields> exahype2::ccz4::ahf::CompactFieldNames
constexpr
Initial value:
{
"gammaTilde_xx", "gammaTilde_xy", "gammaTilde_xz",
"gammaTilde_yy", "gammaTilde_yz", "gammaTilde_zz",
"ATilde_xx", "ATilde_xy", "ATilde_xz",
"ATilde_yy", "ATilde_yz", "ATilde_zz",
"K", "phi"
}

Definition at line 110 of file ahf-data.h.

Referenced by exahype2::ccz4::ahf::SourceVariableMapping::validateAgainstSourceTuple(), exahype2::ccz4::ahf::SourceVariableMapping::validateRequiredFields(), and ValidateSourceMappingAgainstComponentNames().

◆ ConformalExtrinsicCurvatureCompactFields

◆ ConformalMetricCompactFields

◆ MinimumPhysicalPhi

double exahype2::ccz4::ahf::MinimumPhysicalPhi = 1.0e-2
constexpr

Active kernels use 1e-2 as the safe lower bound for direct phi.

Definition at line 537 of file ahf-data.h.

Referenced by ValidatePhysicalPhi().

◆ NumberOfCompactFields

std::size_t exahype2::ccz4::ahf::NumberOfCompactFields
constexpr
Initial value:

Definition at line 107 of file ahf-data.h.

Referenced by SourceVariableMappingFromComponentNames().

◆ NumberOfSymmetricTensorComponents

std::size_t exahype2::ccz4::ahf::NumberOfSymmetricTensorComponents
constexpr
Initial value:

Definition at line 129 of file ahf-data.h.

Referenced by SourceVariableMappingFromComponentNames().