Peano
Loading...
Searching...
No Matches
analytic-residual.h
Go to the documentation of this file.
1#ifndef APPARENT_HORIZON_FINDER_ANALYTIC_RESIDUAL_H_
2#define APPARENT_HORIZON_FINDER_ANALYTIC_RESIDUAL_H_
3
4#include "ahf-data.h"
5#include "harmonics.h"
6#include "spacetimes.h"
7#include "spectral-solver.h"
8#include "surface-residual.h"
9
10#include <vector>
11
12namespace exahype2::ccz4::ahf {
13
23
25 template <class Spacetime>
27 const SpectralBasis& basis,
28 const std::vector<double>& coefficients,
29 const Spacetime& spacetime,
30 const ReferencePoint& referencePoint
31 ) {
32 return BuildSurface(
33 basis,
34 coefficients,
35 [spacetime](const Vector3& X) { return MetricData(spacetime, X); },
36 referencePoint
37 );
38 }
39
41 template <class Spacetime>
43 const SpectralBasis& basis,
44 const Spacetime& spacetime,
45 const ReferencePoint& referencePoint
46 ) {
47 return MakeResidual(
48 basis,
49 [spacetime](const Vector3& X) { return MetricData(spacetime, X); },
50 referencePoint
51 );
52 }
53
54} // namespace exahype2::ccz4::ahf
55
56#endif // APPARENT_HORIZON_FINDER_ANALYTIC_RESIDUAL_H_
SpectralResidual MakeResidual(const SpectralBasis &basis, const GeometrySource &geometryAt, const ReferencePoint &referencePoint)
Return the spectral residual.
InterpolatedGeometryData MetricData(const Spacetime &spacetime, const Vector3 &X)
Geometry derived from an analytic spacetime at the Cartesian point X, packed into the same Interpolat...
std::array< double, 3 > Vector3
Definition ahf-data.h:518
std::function< std::vector< double >(const std::vector< double > &)> SpectralResidual
Residual R(a): the spherical-harmonic coefficients of the expansion Theta for a given coefficient vec...
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...
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...
SpectralResidual MakeAnalyticResidual(const SpectralBasis &basis, const Spacetime &spacetime, const ReferencePoint &referencePoint)
MakeResidual using MetricData(spacetime, .) as the geometry source.
Interpolated data on the current AH surface r = h(rho, sigma).
Definition ahf-data.h:750
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