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)
654 lines
25 KiB
Groff
654 lines
25 KiB
Groff
.TH "serif::utils::serialize" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
serif::utils::serialize
|
|
.SH SYNOPSIS
|
|
.br
|
|
.PP
|
|
.SS "Namespaces"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "namespace \fBdetail\fP"
|
|
.br
|
|
.in -1c
|
|
.SS "Classes"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "struct \fBEntry\fP"
|
|
.br
|
|
.RI "The ledger locates each independent field without decoding the rest of the archive\&. "
|
|
.ti -1c
|
|
.RI "struct \fBEnumSerializer\fP"
|
|
.br
|
|
.RI "Encode enumerations by declared stable spellings, never compiler-dependent integers\&. "
|
|
.ti -1c
|
|
.RI "struct \fBError\fP"
|
|
.br
|
|
.RI "Identify the component or field that could not be saved or reconstructed\&. "
|
|
.ti -1c
|
|
.RI "struct \fBField\fP"
|
|
.br
|
|
.RI "Associate a field name with an already encoded child\&. "
|
|
.ti -1c
|
|
.RI "struct \fBMember\fP"
|
|
.br
|
|
.RI "Name a typed field expected by a component's loader\&. "
|
|
.ti -1c
|
|
.RI "struct \fBNamedMember\fP"
|
|
.br
|
|
.RI "Name a plain configuration member without adding persistence methods to its owner\&. "
|
|
.ti -1c
|
|
.RI "struct \fBNode\fP"
|
|
.br
|
|
.RI "A named component owns its fields, stable schema identifier, and schema version\&. "
|
|
.ti -1c
|
|
.RI "struct \fBPack\fP"
|
|
.br
|
|
.RI "A pack owns its data immediately, so subsequent model changes cannot alter a pending write\&. "
|
|
.ti -1c
|
|
.RI "class \fBReader\fP"
|
|
.br
|
|
.RI "Inspect the ledger first, then seek directly to whichever components are actually needed\&. "
|
|
.ti -1c
|
|
.RI "struct \fBReadOptions\fP"
|
|
.br
|
|
.RI "Bound resource use when inspecting an unfamiliar archive; limits may be raised explicitly\&. "
|
|
.ti -1c
|
|
.RI "struct \fBRecipeSerializer\fP"
|
|
.br
|
|
.RI "Preserve the selected equation/unknown identities in every composed inverse\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSchemaSerializer\fP"
|
|
.br
|
|
.RI "Reconstruct stateless typed numerical declarations only when all their identities match\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer\fP"
|
|
.br
|
|
.RI "Specialize this protocol beside a component without adding I/O methods to the component itself\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< char[Size]>\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< dependencies::Binding< Key, Target > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< dependencies::Bindings< Bindings\&.\&.\&. > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< dependencies::DependencyContext< Resources\&.\&.\&. > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< dependencies::DependencyContext<> >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< dependencies::KeyList< Terms\&.\&.\&. > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< dependencies::Resource< Key, Storage, Policy > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< dependencies::ValueSnapshot >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< dimensions::QuantityValue< Quantity > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< discretization::blocks::SystemLayout< Values, Residuals > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< discretization::quadrature::Policy >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< discretization::quadrature::RuleControl >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< discretization::quadrature::RuleSet >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< eos::models::Polytrope >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< equations::AngularMomentumConstraint >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< equations::BarotropicDensityBalance< EOS > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< equations::BarycenterConstraint< Axis, Row > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< equations::EquationRegistry< Equations\&.\&.\&. > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< equations::MassNormalization >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< equations::PointMassCompanion >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< equations::PrimalPoissonBalance >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< equations::SurfacePotentialBalance >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< geometry::deformation::DomainDeformation< Surface, Interior, Vacuum > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< geometry::deformation::FixedInfinityRadialExtension >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< geometry::deformation::GeometryStepLimit >\fP"
|
|
.br
|
|
.RI "Store bounded numerical history as named data, without runtime operators or graph caches\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< geometry::deformation::keys::SurfaceMetric >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< geometry::deformation::NodalRadialSurface >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< geometry::deformation::PowerLawRadialExtension >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< geometry::deformation::SphericalHarmonicSurface >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< geometry::surface::IsobaricSurface >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< laneemden::IntegrationOptions >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< model::backend::mfem::StellarDiscretization< Owner, Bindings, Deformation > >\fP"
|
|
.br
|
|
.RI "Integrate native discretizations into packs while keeping application-owner reconstruction explicit\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< model::DiscretizationOptions< Model, FiniteElements, Normalization, Preconditioner > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< model::EosReference< EOS > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< model::EquilibriumEquations< Interior, Shape, Surface > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< model::FixedAngularMomentum >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< model::FixedTotalMass >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< model::normalization::SurfaceRows >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< model::NoShapeForce >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< model::NoSurfaceCondition >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< model::preconditioning::None >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< model::StellarModel< EOS, Definition, types::TypeList< Specifications\&.\&.\&. > > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< model::StellarState< Layout > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< Node >\fP"
|
|
.br
|
|
.RI "Preserve a raw component when inspection, rather than typed reconstruction, is wanted\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< operators::backend::mfem::VolumeOptions >\fP"
|
|
.br
|
|
.RI "Preserve quadrature and contraction choices separately from physical coefficients\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::Backtracking >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::linear::Control >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::linear::FGMRES >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::linear::Report >\fP"
|
|
.br
|
|
.RI "Store bounded numerical history as named data, without runtime operators or graph caches\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::linear::Status >\fP"
|
|
.br
|
|
.RI "Preserve stable termination names independently of enum storage or declaration order\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::MetricEvaluation >\fP"
|
|
.br
|
|
.RI "Store bounded numerical history as named data, without runtime operators or graph caches\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::Newton >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::NewtonCheckpoint< State > >\fP"
|
|
.br
|
|
.RI "Save a portable accepted physical state together with its complete supported Newton history\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::NewtonProgress >\fP"
|
|
.br
|
|
.RI "Store bounded numerical history as named data, without runtime operators or graph caches\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::AutomaticPlan >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::DiagonalNormalization >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::Dimensionless >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::DimensionlessRieszCoordinate< Quantity, Metric, Geometry > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::FromModel >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::IdentityCoordinate >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::LaneEmdenApproximation< Mass, Density > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::NormalizationOptions< Scheme, Coordinates, Plan, Sources, Computations > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::NormalizationPlan< Values, Residuals > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::PhysicalRieszCoordinate< Quantity, Metric > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::ReferenceVolumeMetric< Term > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::StellarReferenceScales >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::UnitMetric >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::normalization::WithPointRows< Volume, Quantity, Selection > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::NormalizedResidualMetric >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::preconditioner::BlockPreconditioner< Row, Field, Strategy > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::preconditioner::BorderedPreconditioner< Fields, Constraints > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::preconditioner::CoupledPreconditioner< First, Second, Policy > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::preconditioner::strategies::coupling::SecondThenFirst >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::preconditioner::strategies::inverse::DenseDirect >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::preconditioner::strategies::inverse::Diagonal >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::preconditioner::strategies::inverse::FixedAMG >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::preconditioner::strategies::inverse::SparseDirect >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::SolveDiagnostics >\fP"
|
|
.br
|
|
.RI "Store bounded numerical history as named data, without runtime operators or graph caches\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::SolveResult< State, System, Model > >\fP"
|
|
.br
|
|
.RI "Export scientific results and supported restart data without pretending frozen operators are persistent\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::SolverOptions< Metric, Strategies, Linear > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::SolveStatus >\fP"
|
|
.br
|
|
.RI "Preserve stable termination names independently of enum storage or declaration order\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< solver::StandardNewton >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< std::array< T, Size > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< std::optional< T > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< std::string >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< std::string_view >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< std::tuple< T\&.\&.\&. > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< std::vector< T > >\fP"
|
|
.br
|
|
.RI "Arrays of coefficients are contiguous payloads, while compound values retain named children\&. "
|
|
.ti -1c
|
|
.RI "struct \fBSerializer< T >\fP"
|
|
.br
|
|
.RI "Store numeric values using explicit portable widths\&. "
|
|
.ti -1c
|
|
.RI "struct \fBStructSerializer\fP"
|
|
.br
|
|
.RI "Compose an explicitly listed aggregate; the field list is also its constructor order\&. "
|
|
.ti -1c
|
|
.RI "struct \fBTermIdentity\fP"
|
|
.br
|
|
.RI "Register stable coordinate identities separately from compiler-generated display names\&. "
|
|
.ti -1c
|
|
.RI "struct \fBTermIdentity< discretization::blocks::barotropic_constant::mass_normalization >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBTermIdentity< discretization::blocks::density::mass >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBTermIdentity< discretization::blocks::displacement::vector >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBTermIdentity< discretization::blocks::gravity::potential >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBTermIdentity< discretization::blocks::rotation::angular_velocity >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBTermIdentity< discretization::blocks::surface_deformation::coefficients >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBTermIdentity< discretization::blocks::surface_deformation::shape_equilibrium >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBTermIdentity< model::ConstraintOf< Specification > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBTermIdentity< model::GeneratedCoordinateOf< Specification > >\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct \fBTopExportOptions\fP"
|
|
.br
|
|
.RI "Sampling and admissibility limits for TOP's single-domain polytrope reader\&. "
|
|
.ti -1c
|
|
.RI "struct \fBTopExportReport\fP"
|
|
.br
|
|
.RI "Export scales and sampled projection defects; these do not certify oscillation accuracy\&. "
|
|
.ti -1c
|
|
.RI "struct \fBTopPolytropeSource\fP"
|
|
.br
|
|
.RI "Physical samples in a centered frame whose polar axis is the rotation axis\&. "
|
|
.ti -1c
|
|
.RI "struct \fBWriteOptions\fP"
|
|
.br
|
|
.RI "Annotations belong to the written observation, not to the stellar physics\&. "
|
|
.in -1c
|
|
.SS "Typedefs"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "template<typename OriginalModel> using \fBRestoredStellarModel\fP = \fBmodel::StellarModel\fP<typename OriginalModel::EquationOfState, \fBdetail::OwnedEquations\fP<OriginalModel>, typename OriginalModel::SpecificationTypes>"
|
|
.br
|
|
.RI "Restore current physics as an explicit composition, without pretending to regenerate a deferred program\&. "
|
|
.ti -1c
|
|
.RI "template<typename T> using \fBResult\fP = std::expected<T, \fBError\fP>"
|
|
.br
|
|
.ti -1c
|
|
.RI "using \fBValue\fP"
|
|
.br
|
|
.RI "Portable scientific data; runtime pointers and computational caches have no representation here\&. "
|
|
.in -1c
|
|
.SS "Enumerations"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "enum class \fBFormat\fP { \fBbinary\fP, \fBtext\fP }"
|
|
.br
|
|
.RI "Both encodings share the same component schemas and indexed, sectioned file layout\&. "
|
|
.ti -1c
|
|
.RI "enum class \fBVersionTolerance\fP { \fBsame_major\fP, \fBexact\fP, \fBany\fP }"
|
|
.br
|
|
.RI "Application-version compatibility is separate from file-format and component-schema compatibility\&. "
|
|
.in -1c
|
|
.SS "Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "template<model::StellarModelType Model, typename FiniteElements, typename State> \fBResult\fP< \fBTopExportReport\fP > \fBexport_top\fP (const std::filesystem::path &directory, const Model &stellar_model, const FiniteElements &finite_elements, const State &state, const \fBTopExportOptions\fP &options={})"
|
|
.br
|
|
.RI "Export the accepted density and FE surface of a uniformly rotating vacuum polytrope to TOP\&. "
|
|
.ti -1c
|
|
.RI "template<typename FiniteElements, typename Solution>
|
|
.br
|
|
requires requires(const Solution& solution) { solution\&.has_state(); solution\&.model(); solution\&.state(); }\fBResult\fP< \fBTopExportReport\fP > \fBexport_top\fP (const std::filesystem::path &directory, const FiniteElements &finite_elements, const Solution &solution, const \fBTopExportOptions\fP &options={})"
|
|
.br
|
|
.RI "Export a solver result with the separately owned FE resources that interpret its accepted state\&. "
|
|
.ti -1c
|
|
.RI "template<typename T> \fBField\fP \fBnamed\fP (std::string name, const T &value)"
|
|
.br
|
|
.RI "Assign an explicit top-level name, for example when storing two stars in the same archive\&. "
|
|
.ti -1c
|
|
.RI "void \fBadd_component\fP (\fBPack\fP &\fBpack\fP, \fBField\fP component)"
|
|
.br
|
|
.RI "Insert a component while rejecting conflicting definitions of the same named object\&. "
|
|
.ti -1c
|
|
.RI "template<typename\&.\&.\&. T> \fBPack\fP \fBpack\fP (const T &\&.\&.\&. values)"
|
|
.br
|
|
.RI "Capture every supplied component; unregistered nested types remain visible as unsupported entries\&. "
|
|
.ti -1c
|
|
.RI "\fBResult\fP< void > \fBwrite\fP (const std::filesystem::path &path, const \fBPack\fP &contents, const \fBWriteOptions\fP &options={})"
|
|
.br
|
|
.RI "Write a complete temporary file and atomically replace the destination only after it closes successfully\&. "
|
|
.ti -1c
|
|
.RI "template<typename Owner, typename \fBValue\fP> constexpr auto \fBmember_field\fP (std::string_view name, \fBValue\fP Owner::*pointer)"
|
|
.br
|
|
.RI "Deduce a member's stored type from its ordinary C++ declaration\&. "
|
|
.ti -1c
|
|
.RI "template<typename Term> \fBNode\fP \fBterm_schema\fP ()"
|
|
.br
|
|
.RI "Expose the physical meaning and FE representation of one compiled coordinate\&. "
|
|
.ti -1c
|
|
.RI "\fBResult\fP< void > \fBvalidate_schema\fP (const \fBNode\fP &saved, const \fBNode\fP &expected)"
|
|
.br
|
|
.RI "A compiled identity must match and must have an explicit persistence registration\&. "
|
|
.ti -1c
|
|
.RI "template<typename OriginalModel> \fBResult\fP< \fBRestoredStellarModel\fP< OriginalModel > > \fBrestore_stellar_model\fP (const \fBNode\fP &node)"
|
|
.br
|
|
.RI "Reconstruct resolved physics; future changes requiring the original callback remain a separate capability\&. "
|
|
.ti -1c
|
|
.RI "template<typename T> \fBNode\fP \fBencode\fP (const T &value)"
|
|
.br
|
|
.RI "Produce data when a serializer exists, otherwise record the missing capability explicitly\&. "
|
|
.ti -1c
|
|
.RI "template<typename T> \fBResult\fP< T > \fBdecode\fP (const \fBNode\fP &node)"
|
|
.br
|
|
.RI "Translate invalid saved parameters into a value error at the reconstruction boundary\&. "
|
|
.ti -1c
|
|
.RI "template<typename T> \fBField\fP \fBfield\fP (std::string name, const T &value)"
|
|
.br
|
|
.RI "Encode one named field of a component\&. "
|
|
.ti -1c
|
|
.RI "template<typename\&.\&.\&. Fields> \fBNode\fP \fBobject\fP (std::string_view type, Fields\&.\&.\&. fields)"
|
|
.br
|
|
.RI "Compose a component from its independently serialized fields\&. "
|
|
.ti -1c
|
|
.RI "template<typename T> \fBMember\fP< T > \fBmember\fP (std::string_view name)"
|
|
.br
|
|
.RI "Describe one field to read_object without a separate temporary variable\&. "
|
|
.ti -1c
|
|
.RI "template<typename T> \fBResult\fP< T > \fBread_field\fP (const \fBNode\fP &node, std::string_view name)"
|
|
.br
|
|
.RI "Read a required field and retain its full path in any diagnostic\&. "
|
|
.ti -1c
|
|
.RI "template<typename Construct, typename\&.\&.\&. Members> auto \fBread_object\fP (const \fBNode\fP &node, std::string_view type, Construct construct, Members\&.\&.\&. members) \-> \fBResult\fP< std::invoke_result_t< Construct, typename Members::Type\&.\&.\&. > >"
|
|
.br
|
|
.RI "Construct a component only after every required field has decoded successfully\&. "
|
|
.ti -1c
|
|
.RI "std::string \fBfingerprint\fP (std::string_view bytes)"
|
|
.br
|
|
.RI "Versioned content identity for accidental corruption and resource matching; not a cryptographic signature\&. "
|
|
.ti -1c
|
|
.RI "\fBResult\fP< \fBTopExportReport\fP > \fBexport_top\fP (const std::filesystem::path &path, const \fBTopPolytropeSource\fP &source, const \fBTopExportOptions\fP &options={})"
|
|
.br
|
|
.RI "Atomically publish a new TOP model directory, refusing to overwrite any destination\&. "
|
|
.in -1c
|
|
.SH "Typedef Documentation"
|
|
.PP
|
|
.SS "template<typename OriginalModel> using \fBserif::utils::serialize::RestoredStellarModel\fP = \fBmodel::StellarModel\fP<typename OriginalModel::EquationOfState, \fBdetail::OwnedEquations\fP<OriginalModel>, typename OriginalModel::SpecificationTypes>"
|
|
|
|
.PP
|
|
Restore current physics as an explicit composition, without pretending to regenerate a deferred program\&.
|
|
.SS "template<typename T> using \fBserif::utils::serialize::Result\fP = std::expected<T, \fBError\fP>"
|
|
|
|
.SS "using \fBserif::utils::serialize::Value\fP"
|
|
\fBInitial value:\fP
|
|
.nf
|
|
std::variant<std::monostate, bool, std::int64_t, std::uint64_t, double, std::string,
|
|
std::vector<double>, std::vector<std::int64_t>, std::vector<std::uint64_t>>
|
|
.PP
|
|
.fi
|
|
|
|
.PP
|
|
Portable scientific data; runtime pointers and computational caches have no representation here\&.
|
|
.SH "Enumeration Type Documentation"
|
|
.PP
|
|
.SS "enum class \fBserif::utils::serialize::Format\fP\fR [strong]\fP"
|
|
|
|
.PP
|
|
Both encodings share the same component schemas and indexed, sectioned file layout\&.
|
|
.PP
|
|
\fBEnumerator\fP
|
|
.in +1c
|
|
.TP
|
|
\f(BIbinary \fP
|
|
.TP
|
|
\f(BItext \fP
|
|
.SS "enum class \fBserif::utils::serialize::VersionTolerance\fP\fR [strong]\fP"
|
|
|
|
.PP
|
|
Application-version compatibility is separate from file-format and component-schema compatibility\&.
|
|
.PP
|
|
\fBEnumerator\fP
|
|
.in +1c
|
|
.TP
|
|
\f(BIsame_major \fP
|
|
.TP
|
|
\f(BIexact \fP
|
|
.TP
|
|
\f(BIany \fP
|
|
.SH "Function Documentation"
|
|
.PP
|
|
.SS "void serif::utils::serialize::add_component (\fBPack\fP & pack, \fBField\fP component)"
|
|
|
|
.PP
|
|
Insert a component while rejecting conflicting definitions of the same named object\&.
|
|
.SS "template<typename T> \fBResult\fP< T > serif::utils::serialize::decode (const \fBNode\fP & node)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Translate invalid saved parameters into a value error at the reconstruction boundary\&.
|
|
.SS "template<typename T> \fBNode\fP serif::utils::serialize::encode (const T & value)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Produce data when a serializer exists, otherwise record the missing capability explicitly\&.
|
|
.SS "template<typename FiniteElements, typename Solution>
|
|
.br
|
|
requires requires(const Solution& solution) { solution\&.has_state(); solution\&.model(); solution\&.state(); }\fBResult\fP< \fBTopExportReport\fP > serif::utils::serialize::export_top (const std::filesystem::path & directory, const FiniteElements & finite_elements, const Solution & solution, const \fBTopExportOptions\fP & options = \fR{}\fP)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Export a solver result with the separately owned FE resources that interpret its accepted state\&.
|
|
.SS "template<model::StellarModelType Model, typename FiniteElements, typename State> \fBResult\fP< \fBTopExportReport\fP > serif::utils::serialize::export_top (const std::filesystem::path & directory, const Model & stellar_model, const FiniteElements & finite_elements, const State & state, const \fBTopExportOptions\fP & options = \fR{}\fP)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Export the accepted density and FE surface of a uniformly rotating vacuum polytrope to TOP\&.
|
|
.PP
|
|
\fBNote\fP
|
|
.RS 4
|
|
StellarModel owns physics, while finite_elements and state supply its numerical realization\&. Enthalpy is derived only for this external file format; it is not introduced as a SERiF unknown\&. The native TOP polytrope reader does not represent general EOS or finite-pressure surfaces\&.
|
|
.RE
|
|
.PP
|
|
|
|
.SS "\fBResult\fP< \fBTopExportReport\fP > serif::utils::serialize::export_top (const std::filesystem::path & path, const \fBTopPolytropeSource\fP & source, const \fBTopExportOptions\fP & options = \fR{}\fP)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Atomically publish a new TOP model directory, refusing to overwrite any destination\&.
|
|
.PP
|
|
\fBNote\fP
|
|
.RS 4
|
|
Projects the source surface and pressure-derived enthalpy at common surface-fitted zeta coordinates\&. Only equatorially symmetric axisymmetric vacuum polytropes with n>=1 are supported\&. TOP chooses Gamma1 in its equation set, separately from these files\&.
|
|
.RE
|
|
.PP
|
|
|
|
.SS "template<typename T> \fBField\fP serif::utils::serialize::field (std::string name, const T & value)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Encode one named field of a component\&.
|
|
.SS "std::string serif::utils::serialize::fingerprint (std::string_view bytes)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Versioned content identity for accidental corruption and resource matching; not a cryptographic signature\&.
|
|
.SS "template<typename T> \fBMember\fP< T > serif::utils::serialize::member (std::string_view name)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Describe one field to read_object without a separate temporary variable\&.
|
|
.SS "template<typename Owner, typename \fBValue\fP> auto serif::utils::serialize::member_field (std::string_view name, \fBValue\fP Owner::* pointer)\fR [nodiscard]\fP, \fR [constexpr]\fP"
|
|
|
|
.PP
|
|
Deduce a member's stored type from its ordinary C++ declaration\&.
|
|
.SS "template<typename T> \fBField\fP serif::utils::serialize::named (std::string name, const T & value)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Assign an explicit top-level name, for example when storing two stars in the same archive\&.
|
|
.SS "template<typename\&.\&.\&. Fields> \fBNode\fP serif::utils::serialize::object (std::string_view type, Fields\&.\&.\&. fields)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Compose a component from its independently serialized fields\&.
|
|
.SS "template<typename\&.\&.\&. T> \fBPack\fP serif::utils::serialize::pack (const T &\&.\&.\&. values)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Capture every supplied component; unregistered nested types remain visible as unsupported entries\&.
|
|
.SS "template<typename T> \fBResult\fP< T > serif::utils::serialize::read_field (const \fBNode\fP & node, std::string_view name)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Read a required field and retain its full path in any diagnostic\&.
|
|
.SS "template<typename Construct, typename\&.\&.\&. Members> auto serif::utils::serialize::read_object (const \fBNode\fP & node, std::string_view type, Construct construct, Members\&.\&.\&. members) \-> \fBResult\fP<std::invoke_result_t<Construct, typename Members::Type\&.\&.\&.>> \fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Construct a component only after every required field has decoded successfully\&.
|
|
.SS "template<typename OriginalModel> \fBResult\fP< \fBRestoredStellarModel\fP< OriginalModel > > serif::utils::serialize::restore_stellar_model (const \fBNode\fP & node)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Reconstruct resolved physics; future changes requiring the original callback remain a separate capability\&.
|
|
.SS "template<typename Term> \fBNode\fP serif::utils::serialize::term_schema ()\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Expose the physical meaning and FE representation of one compiled coordinate\&.
|
|
.SS "\fBResult\fP< void > serif::utils::serialize::validate_schema (const \fBNode\fP & saved, const \fBNode\fP & expected)\fR [inline]\fP"
|
|
|
|
.PP
|
|
A compiled identity must match and must have an explicit persistence registration\&.
|
|
.SS "\fBResult\fP< void > serif::utils::serialize::write (const std::filesystem::path & path, const \fBPack\fP & contents, const \fBWriteOptions\fP & options = \fR{}\fP)\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Write a complete temporary file and atomically replace the destination only after it closes successfully\&.
|
|
.SH "Author"
|
|
.PP
|
|
Generated automatically by Doxygen for SERiF from the source code\&.
|