SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::geometry::deformation::detail Namespace Reference

Classes

struct  ActionInput
 Pair each action input with the dimension of its mathematical space. More...
 

Typedefs

using DeterminantPolynomial = std::array<double, 4>
 
using JacobianEntries = std::array<std::array<double, 3>, 3>
 

Functions

DeformationStatus validate_disjoint_output (std::span< double > output, std::initializer_list< std::span< const double > > inputs)
 Preserve every action input until the last use, including nonlinear transpose derivatives. The list contains only the fixed number of mathematical arguments to an action; checking address intervals requires no allocation and never scans numerical coefficients.
 
DeformationStatus validate_action_arguments (std::span< double > output, std::size_t output_size, std::initializer_list< ActionInput > inputs)
 Validate caller buffers uniformly, retaining disjoint inputs until an action has finished.
 
DeterminantPolynomial determinant_polynomial (const JacobianEntries &base, const JacobianEntries &direction, int dimension, double maximum_step, double determinant_floor) noexcept
 Expand det(base + t maximum_step direction) minus the floor for dimensions one through three.
 
double evaluate_polynomial (const DeterminantPolynomial &coefficients, double parameter) noexcept
 Evaluate the cubic with fused operations, retaining small values near repeated roots.
 
double first_boundary_parameter (const DeterminantPolynomial &coefficients) noexcept
 Find the first loss of strict positivity in (0, 1], including a tangent zero.
 
std::expected< std::vector< SphericalHarmonicMode >, DeformationFailure > make_harmonic_modes (const SphericalHarmonicSurface &model, std::size_t node_count)
 Validate harmonic cutoffs before allocating a basis or enumerating modes.
 
std::expected< std::vector< double >, DeformationFailure > sample_harmonic_basis (const SphericalHarmonicSurface &model, std::span< const SphericalHarmonicMode > modes, std::span< const std::array< double, 3 > > directions)
 Use normalized Legendre recurrence to avoid factorial growth while preserving the Condon–Shortley phase.
 
DeformationStatus check_independent_harmonics (std::span< const double > basis, std::size_t node_count, std::size_t mode_count)
 Check sampled rank on a private copy, leaving physical coefficients and basis normalization unchanged.
 

Typedef Documentation

◆ DeterminantPolynomial

◆ JacobianEntries

using serif::geometry::deformation::detail::JacobianEntries = std::array<std::array<double, 3>, 3>

Function Documentation

◆ check_independent_harmonics()

DeformationStatus serif::geometry::deformation::detail::check_independent_harmonics ( std::span< const double > basis,
std::size_t node_count,
std::size_t mode_count )
nodiscard

Check sampled rank on a private copy, leaving physical coefficients and basis normalization unchanged.

◆ determinant_polynomial()

DeterminantPolynomial serif::geometry::deformation::detail::determinant_polynomial ( const JacobianEntries & base,
const JacobianEntries & direction,
int dimension,
double maximum_step,
double determinant_floor )
nodiscardnoexcept

Expand det(base + t maximum_step direction) minus the floor for dimensions one through three.

◆ evaluate_polynomial()

double serif::geometry::deformation::detail::evaluate_polynomial ( const DeterminantPolynomial & coefficients,
double parameter )
nodiscardnoexcept

Evaluate the cubic with fused operations, retaining small values near repeated roots.

◆ first_boundary_parameter()

double serif::geometry::deformation::detail::first_boundary_parameter ( const DeterminantPolynomial & coefficients)
nodiscardnoexcept

Find the first loss of strict positivity in (0, 1], including a tangent zero.

Precondition
Coefficients are finite and the constant coefficient is strictly positive.
Returns
The boundary parameter, or infinity when the entire interval remains admissible.

◆ make_harmonic_modes()

std::expected< std::vector< SphericalHarmonicMode >, DeformationFailure > serif::geometry::deformation::detail::make_harmonic_modes ( const SphericalHarmonicSurface & model,
std::size_t node_count )
nodiscard

Validate harmonic cutoffs before allocating a basis or enumerating modes.

◆ sample_harmonic_basis()

std::expected< std::vector< double >, DeformationFailure > serif::geometry::deformation::detail::sample_harmonic_basis ( const SphericalHarmonicSurface & model,
std::span< const SphericalHarmonicMode > modes,
std::span< const std::array< double, 3 > > directions )
nodiscard

Use normalized Legendre recurrence to avoid factorial growth while preserving the Condon–Shortley phase.

◆ validate_action_arguments()

DeformationStatus serif::geometry::deformation::detail::validate_action_arguments ( std::span< double > output,
std::size_t output_size,
std::initializer_list< ActionInput > inputs )
inlinenodiscard

Validate caller buffers uniformly, retaining disjoint inputs until an action has finished.

◆ validate_disjoint_output()

DeformationStatus serif::geometry::deformation::detail::validate_disjoint_output ( std::span< double > output,
std::initializer_list< std::span< const double > > inputs )
inlinenodiscard

Preserve every action input until the last use, including nonlinear transpose derivatives. The list contains only the fixed number of mathematical arguments to an action; checking address intervals requires no allocation and never scans numerical coefficients.