Peano
Loading...
Searching...
No Matches
ahf-data.h File Reference
#include <algorithm>
#include <array>
#include <cmath>
#include <cstddef>
#include <limits>
#include <optional>
#include <span>
#include <stdexcept>
#include <string>
#include <vector>
Include dependency graph for ahf-data.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  exahype2::ccz4::ahf::ReferencePoint
 Cartesian reference coordinate for one apparent-horizon centre point. More...
struct  exahype2::ccz4::ahf::AHGuessPoint
 One point on an apparent-horizon guess, expressed in spherical coordinates. More...
struct  exahype2::ccz4::ahf::AngularSample
 User-provided angular coordinate at which the shell should be sampled. More...
struct  exahype2::ccz4::ahf::AHGuess
 One apparent-horizon hypersurface guess. More...
struct  exahype2::ccz4::ahf::GridCoordinate
 Cartesian coordinate for one sampled grid point. More...
struct  exahype2::ccz4::ahf::InterpolationDiagnostics
struct  exahype2::ccz4::ahf::SourceVariableMapping
 Reader-side mapping from compact fields to components of a source tuple. More...
class  exahype2::ccz4::ahf::CompactCellView
 Read-only, zero-copy view of one fixed-layout compact cell row. More...
struct  exahype2::ccz4::ahf::GridData
 Pointwise Cartesian grid data. More...
struct  exahype2::ccz4::ahf::InterpolatedGeometryData
 Physical and geometrical quantities shared by shell and surface samples. More...
struct  exahype2::ccz4::ahf::InterpolatedShellPoint
 Interpolated quantities at one spherical shell sample (r, rho, sigma). More...
struct  exahype2::ccz4::ahf::InterpolatedShell
 Interpolated data on the shell-like subdomain around an AH guess. More...
struct  exahype2::ccz4::ahf::InterpolatedSurfacePoint
 Interpolated quantities at one point on the current AH surface. More...
struct  exahype2::ccz4::ahf::InterpolatedSurface
 Interpolated data on the current AH surface r = h(rho, sigma). More...

Namespaces

namespace  exahype2
 This file is part of the ExaHyPE 2 project within Peano 4.
namespace  exahype2::ccz4
namespace  exahype2::ccz4::ahf

Typedefs

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

Enumerations

enum class  exahype2::ccz4::ahf::CartesianToSurfaceMethod {
  exahype2::ccz4::ahf::NearestNeighbour , exahype2::ccz4::ahf::UnweightedPolynomial , exahype2::ccz4::ahf::WeightedPolynomial , exahype2::ccz4::ahf::RadiusWeightedPolynomial ,
  exahype2::ccz4::ahf::UnweightedDegree1 = UnweightedPolynomial , exahype2::ccz4::ahf::WeightedDegree1 = WeightedPolynomial
}
enum class  exahype2::ccz4::ahf::CompactField : std::size_t {
  exahype2::ccz4::ahf::GammaTildeXX = 0 , exahype2::ccz4::ahf::GammaTildeXY = 1 , exahype2::ccz4::ahf::GammaTildeXZ = 2 , exahype2::ccz4::ahf::GammaTildeYY = 3 ,
  exahype2::ccz4::ahf::GammaTildeYZ = 4 , exahype2::ccz4::ahf::GammaTildeZZ = 5 , exahype2::ccz4::ahf::ATildeXX = 6 , exahype2::ccz4::ahf::ATildeXY = 7 ,
  exahype2::ccz4::ahf::ATildeXZ = 8 , exahype2::ccz4::ahf::ATildeYY = 9 , exahype2::ccz4::ahf::ATildeYZ = 10 , exahype2::ccz4::ahf::ATildeZZ = 11 ,
  exahype2::ccz4::ahf::TraceK = 12 , exahype2::ccz4::ahf::Phi = 13 , exahype2::ccz4::ahf::Count = 14
}
 Fixed column layout of every compact row stored in GridData. More...
enum class  exahype2::ccz4::ahf::SymmetricTensorComponent : std::size_t {
  exahype2::ccz4::ahf::XX = 0 , exahype2::ccz4::ahf::XY = 1 , exahype2::ccz4::ahf::XZ = 2 , exahype2::ccz4::ahf::YY = 3 ,
  exahype2::ccz4::ahf::YZ = 4 , exahype2::ccz4::ahf::ZZ = 5 , exahype2::ccz4::ahf::Count = 6
}
 Symmetric-tensor component order used by both compact tensors. More...

Functions

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.
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.
std::optional< SourceVariableMapping > exahype2::ccz4::ahf::SourceVariableMappingFromComponentNames (std::span< const std::string > componentNames)
 Build the mapping from the component names of a source tuple.
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.
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.
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.
void exahype2::ccz4::ahf::ValidatePhysicalPhi (double phi)
Tensor3 exahype2::ccz4::ahf::ComputePhysicalSpatialMetric (const Tensor3 &gammaTilde, double phi)
 Compute gamma_ij = gammaTilde_ij / phi^2 for direct (not logarithmic) phi.
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.
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.

Variables

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