surface_embedding.hpp array cstddef expected span vector serif/geometry/deformation/failure.hpp serif/geometry/deformation/models.hpp serif/geometry/deformation/spaces.hpp serif/geometry/deformation/workspace.hpp src/compile_time_checks/serif/geometry/deformation.cpp src/include/serif/backend/mfem/geometry/deformation/computations.hpp src/include/serif/backend/mfem/geometry/deformation/reference_geometry.hpp src/include/serif/backend/mfem/geometry/deformation/surface_metric.hpp src/include/serif/backend/mfem/model/surface_potential.hpp src/include/serif/geometry/deformation/deformation.hpp src/include/serif/geometry/deformation/detail/harmonics.hpp src/lib/serif/geometry/deformation/surface_embedding.cpp serif::geometry::deformation::SphericalHarmonicMode serif::geometry::deformation::SurfaceEmbedding serif serif::geometry serif::geometry::deformation #pragmaonce #include<array> #include<cstddef> #include<expected> #include<span> #include<vector> #include"serif/geometry/deformation/failure.hpp" #include"serif/geometry/deformation/models.hpp" #include"serif/geometry/deformation/spaces.hpp" #include"serif/geometry/deformation/workspace.hpp" namespaceserif::geometry::deformation { structSphericalHarmonicMode { intdegree; intorder; [[nodiscard]]booloperator==(constSphericalHarmonicMode&)const=default; }; classSurfaceEmbedding { public: usingWorkspace=EmptyDeformationWorkspace; usingInputSpace=spaces::ShapeParameters; usingOutputSpace=spaces::SurfaceDisplacement; staticconstexprboolis_linear=true; [[nodiscard]]std::size_tinput_size()constnoexcept; [[nodiscard]]std::size_toutput_size()constnoexcept; [[nodiscard]]std::size_tsurface_node_count()constnoexcept; [[nodiscard]]boolhas_nodal_parameters()constnoexcept; [[nodiscard]]std::span<conststd::array<double,3>>radial_directions()constnoexcept; [[nodiscard]]std::span<constdouble>reference_radii()constnoexcept; [[nodiscard]]std::span<conststd::array<double,3>>reference_positions()constnoexcept; [[nodiscard]]std::span<constSphericalHarmonicMode>modes()constnoexcept; [[nodiscard]]std::span<constdouble>nodal_basis()constnoexcept; [[nodiscard]]DeformationStatusapply(std::span<constdouble>parameters,std::span<double>surface_displacement,Workspace={})const; [[nodiscard]]DeformationStatusapply_transpose(std::span<constdouble>surface_force,std::span<double>parameter_force,Workspace={})const; private: SurfaceEmbedding()=default; friendstd::expected<SurfaceEmbedding,DeformationFailure>build_surface_embedding(constNodalRadialSurface&,std::span<conststd::array<double,3>>); friendstd::expected<SurfaceEmbedding,DeformationFailure>build_surface_embedding(constSphericalHarmonicSurface&,std::span<conststd::array<double,3>>); std::vector<std::array<double,3>>radial_directions_; std::vector<double>reference_radii_; std::vector<std::array<double,3>>reference_positions_; std::vector<SphericalHarmonicMode>modes_; std::vector<double>nodal_basis_; }; [[nodiscard]]std::expected<SurfaceEmbedding,DeformationFailure>build_surface_embedding(constNodalRadialSurface&model,std::span<conststd::array<double,3>>positions); [[nodiscard]]std::expected<SurfaceEmbedding,DeformationFailure>build_surface_embedding(constSphericalHarmonicSurface&model,std::span<conststd::array<double,3>>positions); }//namespaceserif::geometry::deformation