Peano
Loading...
Searching...
No Matches
ah-search.h
Go to the documentation of this file.
1#ifndef APPARENT_HORIZON_FINDER_AH_SEARCH_H_
2#define APPARENT_HORIZON_FINDER_AH_SEARCH_H_
3
4#include "ah-finder-result.h"
5#include "interpolation.h"
6#include "spectral-solver.h"
7
8#include <cstddef>
9#include <limits>
10#include <optional>
11#include <string>
12#include <vector>
13
14namespace exahype2::ccz4::ahf {
15
19 double initialRadius = 1.0;
24 std::vector<double> initialCoefficients;
25};
26
29
37
41 double initialRadius = 1.0;
42 std::vector<double> initialCoefficients;
48 bool succeeded = false;
50 std::string rejection;
51};
52
55 static constexpr std::size_t NoSuccessfulAttempt =
56 std::numeric_limits<std::size_t>::max();
57
58 bool converged = false;
60 std::optional<AHFinderResult> horizon;
61 std::vector<AHSearchAttemptResult> attempts;
62};
63
66
98 const GridData& gridData,
99 const AHSearchOptions& options
100);
101
107
114 std::string id;
116 std::vector<AHSearchAttempt> attempts;
118 std::optional<double> massScale;
126 std::vector<ReferencePoint> excludedPoints;
127};
128
136
139 std::string id;
141 bool converged = false;
143 std::optional<AHFinderResult> horizon;
144 std::vector<AHSearchAttemptResult> attempts;
145 std::optional<double> massScale;
146};
147
150 bool anyHorizonFound = false;
151 bool allTargetsFound = false;
152 std::vector<AHHorizonTargetResult> targets;
153};
154
156
163 const GridData& gridData,
164 const AHMultiHorizonOptions& options
165);
166
173 const SpectralBasis& basis,
174 const CartesianPointInterpolator& interpolator,
175 const AHMultiHorizonOptions& options
176);
177
178} // namespace exahype2::ccz4::ahf
179
180#endif // APPARENT_HORIZON_FINDER_AH_SEARCH_H_
Reusable Cartesian reconstruction context.
AHMultiHorizonResult FindApparentHorizons(const GridData &gridData, const AHMultiHorizonOptions &options)
Search every physical target in vector order.
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.
AHHorizonKind
Physical role assigned by the user to one independently searched surface.
Definition ah-search.h:103
void ValidateAHMultiHorizonOptions(const AHMultiHorizonOptions &options)
AHSearchResult FindApparentHorizon(const GridData &gridData, const AHSearchOptions &options)
Try explicit attempt pairs in vector order and stop at the first accepted horizon.
User-level result of one apparent-horizon solve.
Ordered attempts and selected result for one physical target.
Definition ah-search.h:138
std::vector< AHSearchAttemptResult > attempts
Definition ah-search.h:144
std::optional< AHFinderResult > horizon
Definition ah-search.h:143
One physical horizon and its ordered alternative guesses.
Definition ah-search.h:113
std::vector< ReferencePoint > excludedPoints
Points the surface must not enclose, typically the other black holes' positions.
Definition ah-search.h:126
std::vector< AHSearchAttempt > attempts
Definition ah-search.h:116
std::optional< double > massScale
Optional per-target override of SpectralNewtonOptions::massScale.
Definition ah-search.h:118
Shared numerical configuration for any number of physical targets.
Definition ah-search.h:130
std::vector< AHHorizonTarget > targets
Definition ah-search.h:131
CartesianToSurfaceOptions interpolation
Definition ah-search.h:133
Aggregate result without collapsing partial success into one boolean.
Definition ah-search.h:149
std::vector< AHHorizonTargetResult > targets
Definition ah-search.h:152
Complete diagnostics from one executed attempt.
Definition ah-search.h:39
std::vector< double > initialCoefficients
Definition ah-search.h:42
std::string rejection
Why a converged, reconstructed surface was not accepted; else empty.
Definition ah-search.h:50
bool succeeded
True only when Newton converged, final reconstruction succeeded and the relative expansion error is w...
Definition ah-search.h:48
One explicit, ordered initial-surface/reference-point pair.
Definition ah-search.h:17
std::vector< double > initialCoefficients
Optional explicit star-shaped spectral surface.
Definition ah-search.h:24
Shared numerical configuration and an arbitrary ordered attempt list.
Definition ah-search.h:31
CartesianToSurfaceOptions interpolation
Definition ah-search.h:34
std::vector< AHSearchAttempt > attempts
Definition ah-search.h:32
SpectralNewtonOptions solver
Definition ah-search.h:35
Aggregate ordered-search outcome.
Definition ah-search.h:54
static constexpr std::size_t NoSuccessfulAttempt
Definition ah-search.h:55
std::optional< AHFinderResult > horizon
Definition ah-search.h:60
std::vector< AHSearchAttemptResult > attempts
Definition ah-search.h:61
Pointwise Cartesian grid data.
Definition ahf-data.h:429
Cartesian reference coordinate for one apparent-horizon centre point.
Definition ahf-data.h:20
Spectral basis plus collocation grid and precomputed design matrices.
Definition harmonics.h:100
Parameters for the damped Newton solve.