SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap > Class Template Reference

Compose shape-to-surface and surface-to-volume maps with the complete derivative chain rule. More...

#include <composition.hpp>

Collaboration diagram for serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >:
[legend]

Classes

struct  CurvatureWorkspace
 Nonlinear actions retain the tangent and the two contributions to the shape-force derivative. More...
 
struct  Workspace
 

Public Types

using InputSpace = typename SurfaceMap::InputSpace
 
using OutputSpace = typename ExtensionMap::OutputSpace
 

Public Member Functions

std::size_t input_size () const noexcept
 Keep solver coordinates in the surface model's native parameter space.
 
std::size_t output_size () const noexcept
 Expose the displacement field size consumed by the existing geometry mapper.
 
Workspace make_workspace () const
 Reserve every intermediate once, outside repeated Newton and Krylov actions.
 
DeformationStatus apply (std::span< const double > input, std::span< double > output, Workspace &workspace) const
 A fixed composition uses the same primal action as its Jacobian.
 
DeformationStatus apply_transpose (std::span< const double > dual, std::span< double > output, Workspace &workspace) const
 Reverse a fixed composition using one intermediate and no artificial base state.
 
DeformationStatus build_displacement (std::span< const double > parameters, std::span< double > displacement, Workspace &workspace) const
 Move the surface first, then extend that same vector trace into the volume.
 
DeformationStatus apply_jacobian (std::span< const double > parameters, std::span< const double > direction, std::span< double > displacement_direction, Workspace &workspace) const
 Evaluate the tangent of each nonlinear factor at the accepted surface displacement.
 
DeformationStatus apply_jacobian_transpose (std::span< const double > parameters, std::span< const double > displacement_dual, std::span< double > parameter_dual, Workspace &workspace) const
 Reverse both factors in the forward composition, preserving their work pairing.
 
DeformationStatus apply_pullback_derivative (std::span< const double > parameters, std::span< const double > direction, std::span< const double > displacement_dual, std::span< double > parameter_dual, Workspace &workspace) const
 Retain both the extension curvature and the derivative of the surface transpose.
 
const SurfaceMap & surface_map () const noexcept
 Expose immutable surface mathematics for reference metrics and diagnostics.
 

Static Public Attributes

static constexpr bool is_linear = is_linear_deformation<SurfaceMap> && is_linear_deformation<ExtensionMap>
 
static constexpr bool uses_linear_actions = LinearDeformationMap<SurfaceMap> && LinearDeformationMap<ExtensionMap>
 

Private Member Functions

 ComposedDeformation (std::shared_ptr< const SurfaceMap > surface, std::shared_ptr< const ExtensionMap > extension)
 Only the checked composition factory may establish factor compatibility.
 

Private Attributes

std::shared_ptr< const SurfaceMap > m_surface
 
std::shared_ptr< const ExtensionMap > m_extension
 

Friends

template<DeformationMap First, DeformationMap Second>
requires std::same_as<typename First::OutputSpace, typename Second::InputSpace>
std::expected< ComposedDeformation< First, Second >, DeformationFailure > compose_deformation (std::shared_ptr< const First >, std::shared_ptr< const Second >)
 

Detailed Description

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
requires std::same_as<typename SurfaceMap::OutputSpace, typename ExtensionMap::InputSpace>
class serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >

Compose shape-to-surface and surface-to-volume maps with the complete derivative chain rule.

Note
Numerical factors are immutable and owned. Workspaces belong to callers and must not overlap public inputs or outputs; this class has no preparation state.

Member Typedef Documentation

◆ InputSpace

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
using serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::InputSpace = typename SurfaceMap::InputSpace

◆ OutputSpace

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
using serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::OutputSpace = typename ExtensionMap::OutputSpace

Constructor & Destructor Documentation

◆ ComposedDeformation()

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::ComposedDeformation ( std::shared_ptr< const SurfaceMap > surface,
std::shared_ptr< const ExtensionMap > extension )
inlineprivate

Only the checked composition factory may establish factor compatibility.

Member Function Documentation

◆ apply()

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
DeformationStatus serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::apply ( std::span< const double > input,
std::span< double > output,
Workspace & workspace ) const
inlinenodiscard

A fixed composition uses the same primal action as its Jacobian.

◆ apply_jacobian()

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
DeformationStatus serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::apply_jacobian ( std::span< const double > parameters,
std::span< const double > direction,
std::span< double > displacement_direction,
Workspace & workspace ) const
inlinenodiscard

Evaluate the tangent of each nonlinear factor at the accepted surface displacement.

◆ apply_jacobian_transpose()

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
DeformationStatus serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::apply_jacobian_transpose ( std::span< const double > parameters,
std::span< const double > displacement_dual,
std::span< double > parameter_dual,
Workspace & workspace ) const
inlinenodiscard

Reverse both factors in the forward composition, preserving their work pairing.

◆ apply_pullback_derivative()

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
DeformationStatus serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::apply_pullback_derivative ( std::span< const double > parameters,
std::span< const double > direction,
std::span< const double > displacement_dual,
std::span< double > parameter_dual,
Workspace & workspace ) const
inlinenodiscard

Retain both the extension curvature and the derivative of the surface transpose.

◆ apply_transpose()

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
DeformationStatus serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::apply_transpose ( std::span< const double > dual,
std::span< double > output,
Workspace & workspace ) const
inlinenodiscard

Reverse a fixed composition using one intermediate and no artificial base state.

◆ build_displacement()

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
DeformationStatus serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::build_displacement ( std::span< const double > parameters,
std::span< double > displacement,
Workspace & workspace ) const
inlinenodiscard

Move the surface first, then extend that same vector trace into the volume.

◆ input_size()

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
std::size_t serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::input_size ( ) const
inlinenodiscardnoexcept

Keep solver coordinates in the surface model's native parameter space.

◆ make_workspace()

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
Workspace serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::make_workspace ( ) const
inlinenodiscard

Reserve every intermediate once, outside repeated Newton and Krylov actions.

◆ output_size()

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
std::size_t serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::output_size ( ) const
inlinenodiscardnoexcept

Expose the displacement field size consumed by the existing geometry mapper.

◆ surface_map()

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
const SurfaceMap & serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::surface_map ( ) const
inlinenodiscardnoexcept

Expose immutable surface mathematics for reference metrics and diagnostics.

Friends And Related Symbol Documentation

◆ compose_deformation

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
template<DeformationMap First, DeformationMap Second>
requires std::same_as<typename First::OutputSpace, typename Second::InputSpace>
std::expected< ComposedDeformation< First, Second >, DeformationFailure > compose_deformation ( std::shared_ptr< const First > ,
std::shared_ptr< const Second >  )
friend

Member Data Documentation

◆ is_linear

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
bool serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::is_linear = is_linear_deformation<SurfaceMap> && is_linear_deformation<ExtensionMap>
staticconstexpr

◆ m_extension

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
std::shared_ptr<const ExtensionMap> serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::m_extension
private

◆ m_surface

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
std::shared_ptr<const SurfaceMap> serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::m_surface
private

◆ uses_linear_actions

template<DeformationMap SurfaceMap, DeformationMap ExtensionMap>
bool serif::geometry::deformation::ComposedDeformation< SurfaceMap, ExtensionMap >::uses_linear_actions = LinearDeformationMap<SurfaceMap> && LinearDeformationMap<ExtensionMap>
staticconstexpr

The documentation for this class was generated from the following file: