feat(equation-and-linear-solve): step 1 — essential-bc-elimination

This commit is contained in:
KOKO\Mimi
2026-07-31 16:00:45 +09:00
parent 30dcb05dd1
commit 1bf277cbf1
7 changed files with 546 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#pragma once
#include <cstddef>
#include <optional>
#include <span>
#include <vector>
#include <fesa/assembly/equation_system.hpp>
#include <fesa/core/diagnostic.hpp>
#include <fesa/fem/dof_manager.hpp>
#include <fesa/model/step_definition.hpp>
namespace fesa {
struct ReducedSystem final {
SymmetricCsr stiffness;
std::vector<double> force;
std::vector<std::size_t> free_to_full;
std::vector<double> prescribed_full;
};
struct ConstraintResult final {
std::optional<ReducedSystem> reduced_system;
std::vector<Diagnostic> diagnostics;
};
[[nodiscard]] ConstraintResult eliminate_essential_bcs(
const EquationSystem& original,
const DofManager& dofs,
std::span<const PrescribedDof> prescribed);
[[nodiscard]] std::vector<double> recover_reaction(
const EquationSystem& original,
std::span<const double> full_displacement);
} // namespace fesa