feat(nonlinear-static-newton-raphson): step 6 - backend-neutral-tangent-solver

This commit is contained in:
KOKO\Mimi
2026-08-24 14:25:05 +09:00
parent 162f84e71b
commit 6c995e0ec8
7 changed files with 500 additions and 0 deletions
@@ -0,0 +1,31 @@
#ifndef FESA_SOLVERS_LINEAR_TANGENT_SOLVER_H_
#define FESA_SOLVERS_LINEAR_TANGENT_SOLVER_H_
#include "fesa/core/status.h"
namespace fesa {
class SparseMatrix;
class Vector;
/// @brief Factorizes one nonlinear tangent and solves its correction.
class TangentSolver {
public:
/// @brief Destroys a backend-neutral nonlinear tangent solver.
virtual ~TangentSolver() = default;
/// @brief Replaces any retained state with a fresh tangent factorization.
/// @return Success or a structured solver failure.
virtual Status FactorizeFresh(const SparseMatrix& matrix) = 0;
/// @brief Solves one correction using the current tangent factorization.
/// @param rhs Immutable free-DOF residual right-hand side.
/// @param correction Updated only after successful finite substitution.
/// @return Success or a structured solver failure.
virtual Status SolveCorrection(const Vector& rhs, Vector& correction) const =
0;
};
} // namespace fesa
#endif // FESA_SOLVERS_LINEAR_TANGENT_SOLVER_H_