\doxysection{serif\+::solver\+::seed Namespace Reference} \hypertarget{namespaceserif_1_1solver_1_1seed}{}\label{namespaceserif_1_1solver_1_1seed}\index{serif::solver::seed@{serif::solver::seed}} \doxysubsubsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \mbox{\hyperlink{namespaceserif_1_1solver_1_1seed_1_1backend}{backend}} \item namespace \mbox{\hyperlink{namespaceserif_1_1solver_1_1seed_1_1detail}{detail}} \end{DoxyCompactItemize} \doxysubsubsection*{Classes} \begin{DoxyCompactItemize} \item struct \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_fitted_radial_seed}{Fitted\+Radial\+Seed}} \begin{DoxyCompactList}\small\item\em An explicitly stretched initial guess, distinct from an equilibrium Lane–\+Emden scaling. \end{DoxyCompactList}\item struct \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_polytrope_options}{Polytrope\+Options}} \begin{DoxyCompactList}\small\item\em Numerical choices for an EOS-\/consistent spherical starting guess, separate from solver normalization. \end{DoxyCompactList}\item struct \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}} \begin{DoxyCompactList}\small\item\em Own a spherical physical profile and its first rotation estimate without changing the stellar model. \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsubsection*{Functions} \begin{DoxyCompactItemize} \item auto \mbox{\hyperlink{namespaceserif_1_1solver_1_1seed_adf615d5f18c4ef4a615db8a060cac38d}{evaluate\+\_\+radial\+\_\+seed}} (const \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}} \&seed, \mbox{\hyperlink{namespaceserif_1_1dimensions_ade7050a33c76500637710591c3b03246}{dimensions\+::\+Length\+Value}} radius) \begin{DoxyCompactList}\small\item\em Evaluate the original equilibrium profile without changing its physical scaling. \end{DoxyCompactList}\item std\+::expected$<$ \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_fitted_radial_seed}{Fitted\+Radial\+Seed}}, std\+::string $>$ \mbox{\hyperlink{namespaceserif_1_1solver_1_1seed_a9d1acd1f3a21506a31ab9540cbfec102}{fit\+\_\+radial\+\_\+seed}} (const \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}} \&seed, \mbox{\hyperlink{namespaceserif_1_1dimensions_ade7050a33c76500637710591c3b03246}{dimensions\+::\+Length\+Value}} radius) \begin{DoxyCompactList}\small\item\em Copy a radial seed onto another radius without changing its material thermodynamics. \end{DoxyCompactList}\item std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_sample}{utils\+::laneemden\+::\+Physical\+Sample}}, std\+::string $>$ \mbox{\hyperlink{namespaceserif_1_1solver_1_1seed_a233ccba97a82cdac7f8e113bedddb76d}{evaluate\+\_\+radial\+\_\+seed}} (const \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_fitted_radial_seed}{Fitted\+Radial\+Seed}} \&seed, \mbox{\hyperlink{namespaceserif_1_1dimensions_ade7050a33c76500637710591c3b03246}{dimensions\+::\+Length\+Value}} radius) \begin{DoxyCompactList}\small\item\em Evaluate the fitted density and its consistent spherical gravity, retaining the source enthalpy. \end{DoxyCompactList}\item std\+::expected$<$ \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}}, std\+::string $>$ \mbox{\hyperlink{namespaceserif_1_1solver_1_1seed_aac706265925348f5dcfa0d202a4d86bd}{make\+\_\+polytropic\+\_\+seed}} (const \mbox{\hyperlink{classserif_1_1eos_1_1models_1_1_polytrope}{eos\+::models\+::\+Polytrope}} \&equation\+\_\+of\+\_\+state, \mbox{\hyperlink{namespaceserif_1_1dimensions_a66499323cee57a1033e7b203a9198c24}{dimensions\+::\+Mass\+Value}} mass, \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_polytrope_options}{Polytrope\+Options}} options=\{\}) \begin{DoxyCompactList}\small\item\em Fix the EOS K and requested mass, solving for central density when n differs from three. \end{DoxyCompactList}\item {\footnotesize template$<$model\+::\+Stellar\+Model\+Type Model$>$ \newline requires Model\+::template}\\contains\+\_\+specification$<$ \mbox{\hyperlink{classserif_1_1model_1_1_fixed_total_mass}{model\+::\+Fixed\+Total\+Mass}} $>$ std\+::expected$<$ \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}}, std\+::string $>$ \mbox{\hyperlink{namespaceserif_1_1solver_1_1seed_afc8ecb12cb1fecdfff282c3f32f319ba}{make\+\_\+polytropic\+\_\+seed}} (const Model \&model, \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_polytrope_options}{Polytrope\+Options}} options=\{\}) \begin{DoxyCompactList}\small\item\em Read the authoritative EOS, mass and optional rotation prescription from a model. \end{DoxyCompactList}\item {\footnotesize template$<$model\+::\+Stellar\+Model\+Type Model, typename Discretization, typename Profile$>$ \newline requires (std\+::same\+\_\+as$<$Profile, \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}}$>$ \texorpdfstring{$\vert$}{|}\texorpdfstring{$\vert$}{|} std\+::same\+\_\+as$<$Profile, \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_fitted_radial_seed}{Fitted\+Radial\+Seed}}$>$) \&\& requires(const Model\& model, const Discretization\& discretization) \{ requires (!std\+::same\+\_\+as$<$typename std\+::remove\+\_\+cvref\+\_\+t$<$decltype(\mbox{\hyperlink{namespaceserif_1_1model_aa55d6cc09e69d07412896dedcb71c5a5}{model\+::resolve\+\_\+equilibrium\+\_\+equations}}(model))$>$\+::\+Shape\+Force, \mbox{\hyperlink{structserif_1_1model_1_1_no_shape_force}{model\+::\+No\+Shape\+Force}}$>$); discretization.\+deformation.\+model.\+surface; discretization.\+deformation.\+reference; \}}\\auto \mbox{\hyperlink{namespaceserif_1_1solver_1_1seed_ace50a90a69f7c31c7af73939977821b6}{make\+\_\+polytropic\+\_\+state}} (const Model \&model, const Discretization \&discretization, const Profile \&seed, const Projection\+Options options=\{\}) \begin{DoxyCompactList}\small\item\em Project a spherical guess into a moving model\textquotesingle{}s named physical coordinates on its undeformed reference mesh. \end{DoxyCompactList}\item {\footnotesize template$<$typename Discretization$>$ }\\std\+::expected$<$ \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_fitted_radial_seed}{Fitted\+Radial\+Seed}}, std\+::string $>$ \mbox{\hyperlink{namespaceserif_1_1solver_1_1seed_a440ac630a394e31f451886dbfc61e46e}{fit\+\_\+radial\+\_\+seed}} (const Discretization \&discretization, const \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}} \&seed, double spherical\+\_\+relative\+\_\+tolerance=5.\+0e-\/4) \begin{DoxyCompactList}\small\item\em Fit only an initial radial guess to the selected spherical reference surface. \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection{Function Documentation} \Hypertarget{namespaceserif_1_1solver_1_1seed_a233ccba97a82cdac7f8e113bedddb76d}\index{serif::solver::seed@{serif::solver::seed}!evaluate\_radial\_seed@{evaluate\_radial\_seed}} \index{evaluate\_radial\_seed@{evaluate\_radial\_seed}!serif::solver::seed@{serif::solver::seed}} \doxysubsubsection{\texorpdfstring{evaluate\_radial\_seed()}{evaluate\_radial\_seed()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily \label{namespaceserif_1_1solver_1_1seed_a233ccba97a82cdac7f8e113bedddb76d} std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_sample}{utils\+::laneemden\+::\+Physical\+Sample}}, std\+::string $>$ serif\+::solver\+::seed\+::evaluate\+\_\+radial\+\_\+seed (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_fitted_radial_seed}{Fitted\+Radial\+Seed}} \&}]{seed}{, }\item[{\mbox{\hyperlink{namespaceserif_1_1dimensions_ade7050a33c76500637710591c3b03246}{dimensions\+::\+Length\+Value}}}]{radius}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [nodiscard]}} Evaluate the fitted density and its consistent spherical gravity, retaining the source enthalpy. Evaluate unchanged material fields with the gravity generated by their stretched density. \Hypertarget{namespaceserif_1_1solver_1_1seed_adf615d5f18c4ef4a615db8a060cac38d}\index{serif::solver::seed@{serif::solver::seed}!evaluate\_radial\_seed@{evaluate\_radial\_seed}} \index{evaluate\_radial\_seed@{evaluate\_radial\_seed}!serif::solver::seed@{serif::solver::seed}} \doxysubsubsection{\texorpdfstring{evaluate\_radial\_seed()}{evaluate\_radial\_seed()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily \label{namespaceserif_1_1solver_1_1seed_adf615d5f18c4ef4a615db8a060cac38d} auto serif\+::solver\+::seed\+::evaluate\+\_\+radial\+\_\+seed (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}} \&}]{seed}{, }\item[{\mbox{\hyperlink{namespaceserif_1_1dimensions_ade7050a33c76500637710591c3b03246}{dimensions\+::\+Length\+Value}}}]{radius}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [nodiscard]}} Evaluate the original equilibrium profile without changing its physical scaling. \Hypertarget{namespaceserif_1_1solver_1_1seed_a440ac630a394e31f451886dbfc61e46e}\index{serif::solver::seed@{serif::solver::seed}!fit\_radial\_seed@{fit\_radial\_seed}} \index{fit\_radial\_seed@{fit\_radial\_seed}!serif::solver::seed@{serif::solver::seed}} \doxysubsubsection{\texorpdfstring{fit\_radial\_seed()}{fit\_radial\_seed()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily \label{namespaceserif_1_1solver_1_1seed_a440ac630a394e31f451886dbfc61e46e} template$<$typename Discretization$>$ \\ std\+::expected$<$ \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_fitted_radial_seed}{Fitted\+Radial\+Seed}}, std\+::string $>$ serif\+::solver\+::seed\+::backend\+::mfem\+::fit\+\_\+radial\+\_\+seed (\begin{DoxyParamCaption}\item[{const Discretization \&}]{discretization}{, }\item[{const \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}} \&}]{seed}{, }\item[{double}]{spherical\+\_\+relative\+\_\+tolerance}{ = {\ttfamily 5.0e-\/4}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [nodiscard]}} Fit only an initial radial guess to the selected spherical reference surface. \begin{DoxyNote}{Note} Surface radius is the midpoint of its selected FE-\/coordinate extrema, as in Mean\+Field. The original seed, reference mesh, EOS and target constraints are never modified. \end{DoxyNote} \Hypertarget{namespaceserif_1_1solver_1_1seed_a9d1acd1f3a21506a31ab9540cbfec102}\index{serif::solver::seed@{serif::solver::seed}!fit\_radial\_seed@{fit\_radial\_seed}} \index{fit\_radial\_seed@{fit\_radial\_seed}!serif::solver::seed@{serif::solver::seed}} \doxysubsubsection{\texorpdfstring{fit\_radial\_seed()}{fit\_radial\_seed()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily \label{namespaceserif_1_1solver_1_1seed_a9d1acd1f3a21506a31ab9540cbfec102} std\+::expected$<$ \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_fitted_radial_seed}{Fitted\+Radial\+Seed}}, std\+::string $>$ serif\+::solver\+::seed\+::fit\+\_\+radial\+\_\+seed (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}} \&}]{seed}{, }\item[{\mbox{\hyperlink{namespaceserif_1_1dimensions_ade7050a33c76500637710591c3b03246}{dimensions\+::\+Length\+Value}}}]{radius}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [nodiscard]}} Copy a radial seed onto another radius without changing its material thermodynamics. Validate a regular source and own its explicit, thermodynamically unchanged radial stretch. \begin{DoxyNote}{Note} For stretch s, enclosed mass scales as s\texorpdfstring{$^\wedge$}{\string^}3, potential as s\texorpdfstring{$^\wedge$}{\string^}2, gravity as s and inertia as s\texorpdfstring{$^\wedge$}{\string^}5. Omega becomes Omega\+\_\+source/s\texorpdfstring{$^\wedge$}{\string^}5, preserving the angular momentum inferred from the source guess. The original Physical\+Scales remain intact; no equilibrium or target-\/constraint satisfaction is implied. \end{DoxyNote} \Hypertarget{namespaceserif_1_1solver_1_1seed_aac706265925348f5dcfa0d202a4d86bd}\index{serif::solver::seed@{serif::solver::seed}!make\_polytropic\_seed@{make\_polytropic\_seed}} \index{make\_polytropic\_seed@{make\_polytropic\_seed}!serif::solver::seed@{serif::solver::seed}} \doxysubsubsection{\texorpdfstring{make\_polytropic\_seed()}{make\_polytropic\_seed()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily \label{namespaceserif_1_1solver_1_1seed_aac706265925348f5dcfa0d202a4d86bd} std\+::expected$<$ \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}}, std\+::string $>$ serif\+::solver\+::seed\+::make\+\_\+polytropic\+\_\+seed (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classserif_1_1eos_1_1models_1_1_polytrope}{eos\+::models\+::\+Polytrope}} \&}]{equation\+\_\+of\+\_\+state}{, }\item[{\mbox{\hyperlink{namespaceserif_1_1dimensions_a66499323cee57a1033e7b203a9198c24}{dimensions\+::\+Mass\+Value}}}]{mass}{, }\item[{\mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_polytrope_options}{Polytrope\+Options}}}]{options}{ = {\ttfamily \{\}}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [nodiscard]}} Fix the EOS K and requested mass, solving for central density when n differs from three. \begin{DoxyNote}{Note} At n=3 mass does not determine central density\+: supply that homology scale explicitly. An explicit density specifies the initial guess only; its mass need not satisfy the final constraint. \end{DoxyNote} \Hypertarget{namespaceserif_1_1solver_1_1seed_afc8ecb12cb1fecdfff282c3f32f319ba}\index{serif::solver::seed@{serif::solver::seed}!make\_polytropic\_seed@{make\_polytropic\_seed}} \index{make\_polytropic\_seed@{make\_polytropic\_seed}!serif::solver::seed@{serif::solver::seed}} \doxysubsubsection{\texorpdfstring{make\_polytropic\_seed()}{make\_polytropic\_seed()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily \label{namespaceserif_1_1solver_1_1seed_afc8ecb12cb1fecdfff282c3f32f319ba} template$<$model\+::\+Stellar\+Model\+Type Model$>$ \newline requires Model\+::template\\ contains\+\_\+specification$<$ \mbox{\hyperlink{classserif_1_1model_1_1_fixed_total_mass}{model\+::\+Fixed\+Total\+Mass}} $>$ std\+::expected$<$ \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}}, std\+::string $>$ serif\+::solver\+::seed\+::make\+\_\+polytropic\+\_\+seed (\begin{DoxyParamCaption}\item[{const Model \&}]{model}{, }\item[{\mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_polytrope_options}{Polytrope\+Options}}}]{options}{ = {\ttfamily \{\}}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [nodiscard]}} Read the authoritative EOS, mass and optional rotation prescription from a model. \Hypertarget{namespaceserif_1_1solver_1_1seed_ace50a90a69f7c31c7af73939977821b6}\index{serif::solver::seed@{serif::solver::seed}!make\_polytropic\_state@{make\_polytropic\_state}} \index{make\_polytropic\_state@{make\_polytropic\_state}!serif::solver::seed@{serif::solver::seed}} \doxysubsubsection{\texorpdfstring{make\_polytropic\_state()}{make\_polytropic\_state()}} {\footnotesize\ttfamily \label{namespaceserif_1_1solver_1_1seed_ace50a90a69f7c31c7af73939977821b6} template$<$model\+::\+Stellar\+Model\+Type Model, typename Discretization, typename Profile$>$ \newline requires (std\+::same\+\_\+as$<$Profile, \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_radial_seed}{Radial\+Seed}}$>$ \texorpdfstring{$\vert$}{|}\texorpdfstring{$\vert$}{|} std\+::same\+\_\+as$<$Profile, \mbox{\hyperlink{structserif_1_1solver_1_1seed_1_1_fitted_radial_seed}{Fitted\+Radial\+Seed}}$>$) \&\& requires(const Model\& model, const Discretization\& discretization) \{ requires (!std\+::same\+\_\+as$<$typename std\+::remove\+\_\+cvref\+\_\+t$<$decltype(\mbox{\hyperlink{namespaceserif_1_1model_aa55d6cc09e69d07412896dedcb71c5a5}{model\+::resolve\+\_\+equilibrium\+\_\+equations}}(model))$>$\+::\+Shape\+Force, \mbox{\hyperlink{structserif_1_1model_1_1_no_shape_force}{model\+::\+No\+Shape\+Force}}$>$); discretization.\+deformation.\+model.\+surface; discretization.\+deformation.\+reference; \}\\ auto serif\+::solver\+::seed\+::backend\+::mfem\+::make\+\_\+polytropic\+\_\+state (\begin{DoxyParamCaption}\item[{const Model \&}]{model}{, }\item[{const Discretization \&}]{discretization}{, }\item[{const Profile \&}]{seed}{, }\item[{const Projection\+Options}]{options}{ = {\ttfamily \{\}}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [nodiscard]}} Project a spherical guess into a moving model\textquotesingle{}s named physical coordinates on its undeformed reference mesh. \begin{DoxyNote}{Note} Choose a spherical reference mesh close to the seed radius, or explicitly fit the initial guess first. Shape starts at zero; the scalar formulation\textquotesingle{}s surface level starts at -\/GM/R. The selected zero-\/pressure polytropic field trace is enforced exactly. It does not change the EOS, fit the mesh, or certify a discrete equilibrium. The vacuum limits assume radial compactification, as used by the stellar Kelvin map. \end{DoxyNote}