#ifndef FESA_LOADS_LOAD_H_ #define FESA_LOADS_LOAD_H_ #include #include #include #include "fesa/core/status.h" namespace fesa { class DofManager; class Domain; class SourceTargetResolver; /// @brief Describes one ordered contribution to the full load vector. struct LoadContribution { std::size_t source_order; std::size_t full_dof_index; double value; }; /// @brief Provides immutable semantic and equation context to a Load. /// @note Every referenced object must outlive a contribution request. struct LoadContext { const Domain& domain; const DofManager& dof_manager; const SourceTargetResolver& target_resolver; }; /// @brief Produces local ordered load contributions without global mutation. class Load { public: virtual ~Load() = default; /// @brief Computes finite full-DOF contributions in stable target order. /// @param context Non-owning semantic and equation context for this call. /// @return Ordered contributions or a structured model failure. virtual Result> ComputeContributions( const LoadContext& context) const = 0; }; /// @brief Holds non-owning loads in an explicitly supplied source order. using LoadView = std::vector>; } // namespace fesa #endif // FESA_LOADS_LOAD_H_