#ifndef FESA_ASSEMBLY_SPARSE_ASSEMBLER_H_ #define FESA_ASSEMBLY_SPARSE_ASSEMBLER_H_ #include "fesa/core/status.h" #include "fesa/math/sparse_matrix.h" namespace fesa { class AnalysisModel; class DofManager; class ParallelFor; /// @brief Owns deterministic element-contribution reduction into global CSR. class SparseAssembler { public: /// @brief Assembles stiffness in stable source-element and local-entry order. /// @return A validated full-DOF CSR matrix or structured model failure. /// @note Parallel workers produce index-owned local buffers; serial reduction /// remains the sole global CSR writer. static Result AssembleStiffness( const AnalysisModel& model, const DofManager& dofs, const ParallelFor& parallel_for); }; } // namespace fesa #endif // FESA_ASSEMBLY_SPARSE_ASSEMBLER_H_