32 lines
1012 B
C++
32 lines
1012 B
C++
#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_
|