SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
harmonics.hpp File Reference
#include <array>
#include <cstddef>
#include <expected>
#include <span>
#include <vector>
#include "serif/geometry/deformation/surface_embedding.hpp"
Include dependency graph for harmonics.hpp:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  serif
 
namespace  serif::geometry
 
namespace  serif::geometry::deformation
 
namespace  serif::geometry::deformation::detail
 

Functions

std::expected< std::vector< SphericalHarmonicMode >, DeformationFailure > serif::geometry::deformation::detail::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 > serif::geometry::deformation::detail::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 serif::geometry::deformation::detail::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.