feat(nonlinear-static-newton-raphson): step 6 - backend-neutral-tangent-solver
This commit is contained in:
@@ -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_
|
||||
Reference in New Issue
Block a user