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

Namespaces

namespace  detail
 

Classes

struct  Resources
 Own meshes and finite-element resources in reverse dependency order, for creation and archive restoration. More...
 
class  ResourceWriter
 Collect shared meshes, collections and spaces once while recording their associations. More...
 
struct  SaveOptions
 Choose whether reference meshes travel with the archive or are resolved by their content identity. More...
 

Typedefs

template<typename Original>
using RestoredConfiguration
 Rebuild a configured model with owned equations and FE resources while retaining its numerical choices.
 
template<typename Original>
using RestoredDiscretization
 Retain all compile-time physical choices while replacing an opaque user owner with archive-owned resources.
 
using MeshResolver = std::function<utils::serialize::Result<std::string>(std::string_view)>
 Supply native MFEM mesh text for the requested content fingerprint when a mesh was omitted.
 

Functions

template<typename Original>
utils::serialize::Result< RestoredConfiguration< Original > > restore_configuration (const utils::serialize::Node &node, const MeshResolver &resolver={})
 Restore the complete model and numerical configuration with independently owned finite-element resources.
 
template<typename Owner, typename Bindings, typename Deformation>
utils::serialize::Node save_discretization (const model::backend::mfem::StellarDiscretization< Owner, Bindings, Deformation > &value, SaveOptions options={})
 Save physical FE interpretation and numerical geometry, excluding caches and the application's opaque owner.
 
template<typename Original>
utils::serialize::Result< RestoredDiscretization< Original > > restore_discretization (const utils::serialize::Node &node, const MeshResolver &resolver={})
 Recreate a typed discretization with its own meshes, spaces and mapping inputs.
 
utils::serialize::Result< Resources > restore_resources (const utils::serialize::Node &node, const MeshResolver &resolver={})
 Reconstruct all resources privately, rejecting changed mesh or coefficient interpretations.
 
utils::serialize::Result< geometry::deformation::backend::mfem::ReferenceDiscretization > restore_reference (const utils::serialize::Node &node, Resources &resources)
 Bind the saved reference roles to already restored resources.
 
utils::serialize::Node binding_coordinates (const discretization::backend::mfem::DofMap &binding)
 Capture domain support and reduced numbering without storing mutable DofMap internals.
 
std::string mesh_text (const ::mfem::Mesh &mesh)
 Emit deterministic native mesh text with enough digits to preserve binary64 coordinates.
 

Typedef Documentation

◆ MeshResolver

using serif::backend::mfem::serialize::MeshResolver = std::function<utils::serialize::Result<std::string>(std::string_view)>

Supply native MFEM mesh text for the requested content fingerprint when a mesh was omitted.

◆ RestoredConfiguration

template<typename Original>
using serif::backend::mfem::serialize::RestoredConfiguration
Initial value:
.model = std::declval<utils::serialize::RestoredStellarModel<std::remove_cvref_t<decltype(std::declval<Original>().model)>>>(),
.finite_elements = std::declval<RestoredDiscretization<std::remove_cvref_t<decltype(std::declval<Original>().finite_elements)>>>(),
.normalization = std::declval<std::remove_cvref_t<decltype(std::declval<Original>().normalization)>>(),
.preconditioner = std::declval<std::remove_cvref_t<decltype(std::declval<Original>().preconditioner)>>()
}))
auto make_discretization(DiscretizationOptions< Model, FiniteElements, Normalization, Preconditioner > options)
Resolve model defaults while preserving compile-time field, scheme, and coordinate choices.
Definition configured_discretization.hpp:28
Select a descriptive star, its existing finite-element resources, and its numerical coordinates.
Definition configured_discretization.hpp:15
FiniteElements finite_elements
Definition configured_discretization.hpp:17

Rebuild a configured model with owned equations and FE resources while retaining its numerical choices.

◆ RestoredDiscretization

Initial value:
decltype(std::declval<detail::OwnedBindings<std::remove_cvref_t<decltype(std::declval<Original>().term_bindings)>>>().context()),
std::remove_cvref_t<decltype(std::declval<Original>().deformation)>>
Bind physical terms to existing finite-element resources with one explicit lifetime owner.
Definition discretization.hpp:32

Retain all compile-time physical choices while replacing an opaque user owner with archive-owned resources.

Function Documentation

◆ binding_coordinates()

utils::serialize::Node serif::backend::mfem::serialize::binding_coordinates ( const discretization::backend::mfem::DofMap & binding)
nodiscard

Capture domain support and reduced numbering without storing mutable DofMap internals.

◆ mesh_text()

std::string serif::backend::mfem::serialize::mesh_text ( const ::mfem::Mesh & mesh)
nodiscard

Emit deterministic native mesh text with enough digits to preserve binary64 coordinates.

◆ restore_configuration()

template<typename Original>
utils::serialize::Result< RestoredConfiguration< Original > > serif::backend::mfem::serialize::restore_configuration ( const utils::serialize::Node & node,
const MeshResolver & resolver = {} )
nodiscard

Restore the complete model and numerical configuration with independently owned finite-element resources.

Note
Original supplies compile-time physics and numerical types; application callbacks and resource owners are replaced by saved values.

◆ restore_discretization()

template<typename Original>
utils::serialize::Result< RestoredDiscretization< Original > > serif::backend::mfem::serialize::restore_discretization ( const utils::serialize::Node & node,
const MeshResolver & resolver = {} )
nodiscard

Recreate a typed discretization with its own meshes, spaces and mapping inputs.

Note
Original supplies compile-time term/schema/deformation types only. Its application-specific owner is never constructed.

◆ restore_reference()

utils::serialize::Result< geometry::deformation::backend::mfem::ReferenceDiscretization > serif::backend::mfem::serialize::restore_reference ( const utils::serialize::Node & node,
Resources & resources )
nodiscard

Bind the saved reference roles to already restored resources.

◆ restore_resources()

utils::serialize::Result< Resources > serif::backend::mfem::serialize::restore_resources ( const utils::serialize::Node & node,
const MeshResolver & resolver = {} )
nodiscard

Reconstruct all resources privately, rejecting changed mesh or coefficient interpretations.

◆ save_discretization()

template<typename Owner, typename Bindings, typename Deformation>
utils::serialize::Node serif::backend::mfem::serialize::save_discretization ( const model::backend::mfem::StellarDiscretization< Owner, Bindings, Deformation > & value,
SaveOptions options = {} )
nodiscard

Save physical FE interpretation and numerical geometry, excluding caches and the application's opaque owner.