SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::utils::projection::backend::mfem Namespace Reference

Namespaces

namespace  detail
 

Classes

struct  RadialProjectionOptions
 Sample physical radii about a center, optionally through SERiF's existing geometry mapping. The mapping must use the projection space's mesh and must be refreshed after its input fields change. More...
 

Typedefs

using ProjectionResult = std::expected<::mfem::GridFunction, std::string>
 

Functions

template<RadialFunction Function>
ProjectionResult project_scalar (::mfem::FiniteElementSpace &space, const Function &profile, const RadialProjectionOptions &options={})
 Project a radial scalar with the finite element's native coefficient projection.
 
template<RadialFunction Function>
ProjectionResult project_vector (::mfem::FiniteElementSpace &space, const Function &radial_amplitude, const RadialProjectionOptions &options={})
 Project amplitude(r) times the outward radial unit vector into a vector H1/L2 space.
 

Typedef Documentation

◆ ProjectionResult

using serif::utils::projection::backend::mfem::ProjectionResult = std::expected<::mfem::GridFunction, std::string>

Function Documentation

◆ project_scalar()

template<RadialFunction Function>
ProjectionResult serif::utils::projection::backend::mfem::project_scalar ( ::mfem::FiniteElementSpace & space,
const Function & profile,
const RadialProjectionOptions & options = {} )
nodiscard

Project a radial scalar with the finite element's native coefficient projection.

This uses native interpolation and conforming restriction, not a global L2 fit. Hanging-node constraints are enforced before publishing the field. The returned field owns its coefficients and borrows the supplied space. The profile controls exterior values; no radius clamping or mass adjustment is applied. A rejected sample discards the entire unpublished field. At compactified infinity an explicit scalar_at_infinity callback may supply the limiting value in mesh coordinates, before the finite element's native mapping. Without that prescription infinity is rejected. Meshes and spaces must remain alive for the returned field.

◆ project_vector()

template<RadialFunction Function>
ProjectionResult serif::utils::projection::backend::mfem::project_vector ( ::mfem::FiniteElementSpace & space,
const Function & radial_amplitude,
const RadialProjectionOptions & options = {} )
nodiscard

Project amplitude(r) times the outward radial unit vector into a vector H1/L2 space.

Smooth radial vectors must have zero amplitude at the center. Conforming restriction enforces hanging-node constraints before publishing the field; this is not a global L2 fit. The profile remains in physical coordinates. At compactified infinity, vector_at_infinity must supply the limit in mesh coordinates. The callback receives the original mesh position, without subtraction of the configured physical center.