Files
MeanField_SERiF/docs/latex/namespaceserif_1_1utils_1_1laneemden.tex
Emily Boudreaux 6b57738330 docs(docs): built docs
Note for now much of the docs is LLM written. This was done to save time and focus on code development. The docs have been LOOSLEY reviewed. However, the code itself has been either fully written by hand or fully reviewed. Therefore, the docs should at the moment be seen as a loose resource rather than authoratiative (and this is on top of the general ability for docs to drift)
2026-11-09 14:09:44 -05:00

94 lines
15 KiB
TeX
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
\doxysection{serif\+::utils\+::laneemden Namespace Reference}
\hypertarget{namespaceserif_1_1utils_1_1laneemden}{}\label{namespaceserif_1_1utils_1_1laneemden}\index{serif::utils::laneemden@{serif::utils::laneemden}}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_integration_options}{Integration\+Options}}
\begin{DoxyCompactList}\small\item\em Dimensionless integration controls; the surface tolerance does not bound the global integration error. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_sample}{Physical\+Sample}}
\begin{DoxyCompactList}\small\item\em Physical scalar fields; gravity is the outward potential derivative, not the inward force component. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_scales}{Physical\+Scales}}
\begin{DoxyCompactList}\small\item\em A physical conversion of one finite-\/radius dimensionless polytrope, in the caller\textquotesingle{}s consistent units. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_sample}{Sample}}
\begin{DoxyCompactList}\small\item\em The regular Lane–\+Emden solution and its first derivative at one dimensionless radius. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}}
\begin{DoxyCompactList}\small\item\em A regular profile, ending at its first zero or the requested integration radius. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_scales}{Physical\+Scales}}, std\+::string $>$ \mbox{\hyperlink{namespaceserif_1_1utils_1_1laneemden_a4c3ea7fb533fd5a9306e993593eb20fc}{scale\+\_\+from\+\_\+mass}} (const \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}} \&solution, \mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_mass}{dimensions\+::\+Mass}} $>$ mass, \mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_mass_density}{dimensions\+::\+Mass\+Density}} $>$ central\+\_\+density, \mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_gravitational_constant}{dimensions\+::\+Gravitational\+Constant}} $>$ gravitational\+\_\+constant)
\begin{DoxyCompactList}\small\item\em Fix a reference star by mass and central density; its implied K is an output, never a change to an EOS. \end{DoxyCompactList}\item
std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_scales}{Physical\+Scales}}, std\+::string $>$ \mbox{\hyperlink{namespaceserif_1_1utils_1_1laneemden_ab57cad62436b0fcf5cb9df68347b196b}{scale\+\_\+from\+\_\+enthalpy}} (const \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}} \&solution, \mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_specific_enthalpy}{dimensions\+::\+Specific\+Enthalpy}} $>$ central\+\_\+enthalpy, \mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_mass_density}{dimensions\+::\+Mass\+Density}} $>$ central\+\_\+density, \mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_gravitational_constant}{dimensions\+::\+Gravitational\+Constant}} $>$ gravitational\+\_\+constant)
\begin{DoxyCompactList}\small\item\em Fix a physical star by central enthalpy and density, including the incompressible n = 0 limit. \end{DoxyCompactList}\item
std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_scales}{Physical\+Scales}}, std\+::string $>$ \mbox{\hyperlink{namespaceserif_1_1utils_1_1laneemden_adf057a3c9420e9b4e92c20c89126d3fd}{scale\+\_\+from\+\_\+polytropic\+\_\+constant}} (const \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}} \&solution, double polytropic\+\_\+constant, \mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_mass_density}{dimensions\+::\+Mass\+Density}} $>$ central\+\_\+density, \mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_gravitational_constant}{dimensions\+::\+Gravitational\+Constant}} $>$ gravitational\+\_\+constant)
\begin{DoxyCompactList}\small\item\em Fix a polytropic EOS through its K and central density; n must be strictly positive. \end{DoxyCompactList}\item
std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_sample}{Physical\+Sample}}, std\+::string $>$ \mbox{\hyperlink{namespaceserif_1_1utils_1_1laneemden_aec2842a8929dc7a2b5dac2adf8a067b6}{evaluate\+\_\+physical}} (const \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}} \&solution, const \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_scales}{Physical\+Scales}} \&scales, \mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_length}{dimensions\+::\+Length}} $>$ radius)
\begin{DoxyCompactList}\small\item\em Evaluate physical fields, continuing into vacuum beyond the stellar surface. \end{DoxyCompactList}\item
std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}}, std\+::string $>$ \mbox{\hyperlink{namespaceserif_1_1utils_1_1laneemden_aac284388ff73263db8d245669cb8e60f}{solve}} (double n, \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_integration_options}{Integration\+Options}} options=\{\})
\begin{DoxyCompactList}\small\item\em Integrate theta\textquotesingle{}\textquotesingle{} + 2 theta\textquotesingle{}/xi + theta\texorpdfstring{$^\wedge$}{\string^}n = 0 from the regular center. \end{DoxyCompactList}\item
std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_sample}{Sample}}, std\+::string $>$ \mbox{\hyperlink{namespaceserif_1_1utils_1_1laneemden_ac58bd2b83384f8454be7fd0b11cd9332}{evaluate}} (const \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}} \&solution, double xi)
\begin{DoxyCompactList}\small\item\em Evaluate a solved dimensionless profile with cubic Hermite interpolation, without extrapolation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Function Documentation}
\Hypertarget{namespaceserif_1_1utils_1_1laneemden_ac58bd2b83384f8454be7fd0b11cd9332}\index{serif::utils::laneemden@{serif::utils::laneemden}!evaluate@{evaluate}}
\index{evaluate@{evaluate}!serif::utils::laneemden@{serif::utils::laneemden}}
\doxysubsubsection{\texorpdfstring{evaluate()}{evaluate()}}
{\footnotesize\ttfamily \label{namespaceserif_1_1utils_1_1laneemden_ac58bd2b83384f8454be7fd0b11cd9332}
std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_sample}{Sample}}, std\+::string $>$ serif\+::utils\+::laneemden\+::evaluate (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}} \&}]{solution}{, }\item[{double}]{xi}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [nodiscard]}}
Evaluate a solved dimensionless profile with cubic Hermite interpolation, without extrapolation.
\Hypertarget{namespaceserif_1_1utils_1_1laneemden_aec2842a8929dc7a2b5dac2adf8a067b6}\index{serif::utils::laneemden@{serif::utils::laneemden}!evaluate\_physical@{evaluate\_physical}}
\index{evaluate\_physical@{evaluate\_physical}!serif::utils::laneemden@{serif::utils::laneemden}}
\doxysubsubsection{\texorpdfstring{evaluate\_physical()}{evaluate\_physical()}}
{\footnotesize\ttfamily \label{namespaceserif_1_1utils_1_1laneemden_aec2842a8929dc7a2b5dac2adf8a067b6}
std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_sample}{Physical\+Sample}}, std\+::string $>$ serif\+::utils\+::laneemden\+::evaluate\+\_\+physical (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}} \&}]{solution}{, }\item[{const \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_scales}{Physical\+Scales}} \&}]{scales}{, }\item[{\mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_length}{dimensions\+::\+Length}} $>$}]{radius}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [nodiscard]}}
Evaluate physical fields, continuing into vacuum beyond the stellar surface.
The potential vanishes at infinity. Density, pressure, and enthalpy are zero at and beyond the surface, including the exterior side of the incompressible density jump. \Hypertarget{namespaceserif_1_1utils_1_1laneemden_ab57cad62436b0fcf5cb9df68347b196b}\index{serif::utils::laneemden@{serif::utils::laneemden}!scale\_from\_enthalpy@{scale\_from\_enthalpy}}
\index{scale\_from\_enthalpy@{scale\_from\_enthalpy}!serif::utils::laneemden@{serif::utils::laneemden}}
\doxysubsubsection{\texorpdfstring{scale\_from\_enthalpy()}{scale\_from\_enthalpy()}}
{\footnotesize\ttfamily \label{namespaceserif_1_1utils_1_1laneemden_ab57cad62436b0fcf5cb9df68347b196b}
std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_scales}{Physical\+Scales}}, std\+::string $>$ serif\+::utils\+::laneemden\+::scale\+\_\+from\+\_\+enthalpy (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}} \&}]{solution}{, }\item[{\mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_specific_enthalpy}{dimensions\+::\+Specific\+Enthalpy}} $>$}]{central\+\_\+enthalpy}{, }\item[{\mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_mass_density}{dimensions\+::\+Mass\+Density}} $>$}]{central\+\_\+density}{, }\item[{\mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_gravitational_constant}{dimensions\+::\+Gravitational\+Constant}} $>$}]{gravitational\+\_\+constant}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [nodiscard]}}
Fix a physical star by central enthalpy and density, including the incompressible n = 0 limit.
\Hypertarget{namespaceserif_1_1utils_1_1laneemden_a4c3ea7fb533fd5a9306e993593eb20fc}\index{serif::utils::laneemden@{serif::utils::laneemden}!scale\_from\_mass@{scale\_from\_mass}}
\index{scale\_from\_mass@{scale\_from\_mass}!serif::utils::laneemden@{serif::utils::laneemden}}
\doxysubsubsection{\texorpdfstring{scale\_from\_mass()}{scale\_from\_mass()}}
{\footnotesize\ttfamily \label{namespaceserif_1_1utils_1_1laneemden_a4c3ea7fb533fd5a9306e993593eb20fc}
std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_scales}{Physical\+Scales}}, std\+::string $>$ serif\+::utils\+::laneemden\+::scale\+\_\+from\+\_\+mass (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}} \&}]{solution}{, }\item[{\mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_mass}{dimensions\+::\+Mass}} $>$}]{mass}{, }\item[{\mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_mass_density}{dimensions\+::\+Mass\+Density}} $>$}]{central\+\_\+density}{, }\item[{\mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_gravitational_constant}{dimensions\+::\+Gravitational\+Constant}} $>$}]{gravitational\+\_\+constant}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [nodiscard]}}
Fix a reference star by mass and central density; its implied K is an output, never a change to an EOS.
\Hypertarget{namespaceserif_1_1utils_1_1laneemden_adf057a3c9420e9b4e92c20c89126d3fd}\index{serif::utils::laneemden@{serif::utils::laneemden}!scale\_from\_polytropic\_constant@{scale\_from\_polytropic\_constant}}
\index{scale\_from\_polytropic\_constant@{scale\_from\_polytropic\_constant}!serif::utils::laneemden@{serif::utils::laneemden}}
\doxysubsubsection{\texorpdfstring{scale\_from\_polytropic\_constant()}{scale\_from\_polytropic\_constant()}}
{\footnotesize\ttfamily \label{namespaceserif_1_1utils_1_1laneemden_adf057a3c9420e9b4e92c20c89126d3fd}
std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_physical_scales}{Physical\+Scales}}, std\+::string $>$ serif\+::utils\+::laneemden\+::scale\+\_\+from\+\_\+polytropic\+\_\+constant (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}} \&}]{solution}{, }\item[{double}]{polytropic\+\_\+constant}{, }\item[{\mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_mass_density}{dimensions\+::\+Mass\+Density}} $>$}]{central\+\_\+density}{, }\item[{\mbox{\hyperlink{classserif_1_1dimensions_1_1_quantity_value}{dimensions\+::\+Quantity\+Value}}$<$ \mbox{\hyperlink{structserif_1_1dimensions_1_1_gravitational_constant}{dimensions\+::\+Gravitational\+Constant}} $>$}]{gravitational\+\_\+constant}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [nodiscard]}}
Fix a polytropic EOS through its K and central density; n must be strictly positive.
\Hypertarget{namespaceserif_1_1utils_1_1laneemden_aac284388ff73263db8d245669cb8e60f}\index{serif::utils::laneemden@{serif::utils::laneemden}!solve@{solve}}
\index{solve@{solve}!serif::utils::laneemden@{serif::utils::laneemden}}
\doxysubsubsection{\texorpdfstring{solve()}{solve()}}
{\footnotesize\ttfamily \label{namespaceserif_1_1utils_1_1laneemden_aac284388ff73263db8d245669cb8e60f}
std\+::expected$<$ \mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_solution}{Solution}}, std\+::string $>$ serif\+::utils\+::laneemden\+::solve (\begin{DoxyParamCaption}\item[{double}]{n}{, }\item[{\mbox{\hyperlink{structserif_1_1utils_1_1laneemden_1_1_integration_options}{Integration\+Options}}}]{options}{ = {\ttfamily \{\}}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [nodiscard]}}
Integrate theta\textquotesingle{}\textquotesingle{} + 2 theta\textquotesingle{}/xi + theta\texorpdfstring{$^\wedge$}{\string^}n = 0 from the regular center.
The central series follows Boudreaux\textquotesingle{}s original power-\/series recurrence. Both dependent variables now advance through the same four Runge–\+Kutta stages. A missing surface is a valid finite-\/interval result, including the n \texorpdfstring{$>$}{>}= 5 solutions. Exhausting the step budget or producing an unrepresentable numerical state returns a failure instead.