Files
MeanField_SERiF/docs/latex/dir_a6addf8d2b502bb84d626acd01a49eda.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

40 lines
4.6 KiB
TeX

\doxysection{src/include/serif/backend/mfem/serialize Directory Reference}
\hypertarget{dir_a6addf8d2b502bb84d626acd01a49eda}{}\label{dir_a6addf8d2b502bb84d626acd01a49eda}\index{src/include/serif/backend/mfem/serialize Directory Reference@{src/include/serif/backend/mfem/serialize Directory Reference}}
Directory dependency graph for serialize\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dir_a6addf8d2b502bb84d626acd01a49eda_dep}
\end{center}
\end{figure}
\doxysubsubsection*{Files}
\begin{DoxyCompactItemize}
\item
file \mbox{\hyperlink{backend_2mfem_2serialize_2configuration_8hpp}{configuration.\+hpp}}
\item
file \mbox{\hyperlink{serialize_2discretization_8hpp}{discretization.\+hpp}}
\item
file \mbox{\hyperlink{backend_2mfem_2serialize_2options_8hpp}{options.\+hpp}}
\item
file \mbox{\hyperlink{serialize_2resources_8hpp}{resources.\+hpp}}
\item
file \mbox{\hyperlink{backend_2mfem_2serialize_2top_8hpp}{top.\+hpp}}
\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
{\ttfamily save\+\_\+discretization(discretization)} records the physical and logical reference meshes, finite-\/element collections and spaces, term support and reduced numbering, compactification coefficients, mapping prescription, and deformation prescription. The application\textquotesingle{}s resource owner and computational caches are not persistent data.
{\ttfamily restore\+\_\+discretization\texorpdfstring{$<$}{<}Original\texorpdfstring{$>$}{>}(node)} returns an expected owning discretization. {\ttfamily Original} supplies its compile-\/time term, domain-\/schema and deformation types. The returned object has a new resource-\/owner type; this is why ordinary {\ttfamily decode\texorpdfstring{$<$}{<}Original\texorpdfstring{$>$}{>}} cannot reconstruct an arbitrary application-\/owned discretization. Its bindings and reference spaces borrow only resources retained by that new owner.
For a complete {\ttfamily make\+\_\+discretization(...)} configuration, include {\ttfamily configuration.\+hpp} and use {\ttfamily restore\+\_\+configuration\texorpdfstring{$<$}{<}Original\+Configuration\texorpdfstring{$>$}{>}(node)}. This restores the resolved physical equations, independent FE resources, normalization choices and preconditioner recipe together. The original model\textquotesingle{}s authored callback is replaced by the saved resolved equations; executable callbacks cannot be recreated from data.
For an external mesh, call {\ttfamily save\+\_\+discretization(discretization, \{.embed\+\_\+mesh = false\})}. Supply a {\ttfamily Mesh\+Resolver} to restoration\+: it receives each requested content fingerprint and returns native MFEM mesh text. {\ttfamily mesh\+\_\+text(mesh)} produces the canonical text expected by this resolver. The same content and reconstruction checks apply to embedded and external meshes. Paths are deliberately left to the application.
Mesh text uses the classic locale and {\ttfamily max\+\_\+digits10}. Restoration disables MFEM\textquotesingle{}s refinement marking and optional element-\/orientation repair, then requires the reconstructed native mesh text to match exactly. Space reconstruction also checks the native signed element numbering; typed bindings check domain support and reduced numbering. Existing geometry validation checks paired reference meshes and shared scalar/displacement companion collections.
The current native format supports finite conforming serial 3D meshes and fixed-\/order standard H1, L2 and RT spaces. Unsupported resource kinds remain explicit {\ttfamily unsupported} nodes in the archive. Exact restoration currently requires the same MFEM version, MFEM exception support and its {\ttfamily MFEM\+\_\+\+ERROR\+\_\+\+THROW} error policy, so malformed native input can be reported instead of terminating the application. The loader does not change the application\textquotesingle{}s global MFEM error policy. Additional dependency versions and MFEM feature configuration are provenance, not reconstructed objects. MPI library information is queried only if MPI is already running.
Store physical {\ttfamily Stellar\+State} coefficients alongside the matching numerical description. The caller supplies that pairing; a bare coefficient vector cannot identify its originating mesh. State loading validates the compiled coordinate schema, backend loading validates the mesh and FE representation, and Newton resumption additionally checks the rebuilt accepted residual metric. Element samples, residuals, Jacobians and preconditioners are recomputed from the loaded inputs. A loaded candidate still requires numerical qualification before it can be reported as a converged equilibrium.