#ifndef FESA_ELEMENTS_ELEMENT_H_ #define FESA_ELEMENTS_ELEMENT_H_ #include #include #include "fesa/core/status.h" #include "fesa/elements/element_dof_layout.h" #include "fesa/math/matrix.h" #include "fesa/math/vector.h" #include "fesa/results/result_records.h" #include "fesa/results/solid_result_records.h" namespace fesa { /// @brief Carries one element-local stiffness in its declared DOF order. struct ElementStiffnessContribution { ElementDofLayout layout; Matrix values; }; /// @brief Keeps beam recovery locations in their distinct row collections. struct BeamElementResultRows { std::vector endpoint_rows; std::vector gauss_rows; std::vector stress_rows; }; /// @brief Keeps physical shell rows separate from numerical drilling data. struct ShellElementResultRows { std::vector rows; double physical_strain_energy{0.0}; }; /// @brief Selects the physical recovery shape of one runtime element. using ElementResultPayload = std::variant; /// @brief Carries stable source identity with one typed recovery payload. struct ElementResultBundle { SourceEntityId source_id; ElementResultPayload payload; }; /// @brief Defines the numerical contract consumed by solver pipeline owners. class Element { public: virtual ~Element() = default; /// @brief Returns the stable element-local DOF ordering. virtual const ElementDofLayout& DofLayout() const noexcept = 0; /// @brief Computes the finite stiffness in the declared local ordering. virtual Result ComputeStiffness() const = 0; /// @brief Recovers typed physical rows from element-local global DOFs. virtual Result Recover( const Vector& element_displacement) const = 0; }; } // namespace fesa #endif // FESA_ELEMENTS_ELEMENT_H_