#include <linearSystemHandler.hpp>
Public Types | |
using | LinearSystem = T_LinearSystem |
See LinearSystemSolverHandler. | |
using | Matrix = typename LinearSystem::Matrix |
See LinearSystemInterfaceTypes. | |
using | MatrixIdentifier = typename LinearSystem::MatrixIdentifier |
See LinearSystemInterfaceTypes. | |
using | MatrixReal = typename LinearSystem::MatrixReal |
See LinearSystemInterfaceTypes. | |
using | Type = typename LinearSystem::Type |
See LinearSystemInterfaceTypes. | |
using | Vector = typename LinearSystem::Vector |
See LinearSystemInterfaceTypes. | |
using | VectorIdentifier = typename LinearSystem::VectorIdentifier |
See LinearSystemInterfaceTypes. | |
using | VectorReal = typename LinearSystem::VectorReal |
See LinearSystemInterfaceTypes. | |
Public Member Functions | |
void | solve (LinearSystem lsi, Matrix *A, Vector *b, Vector *x, LinearSystemSolverHints hints) |
Solves Ax=b and registers an external function on the tape which solves the specific AD mode equations.
Forward mode: x_d = A_v^-1 * (b_d - A_d * x_v)
Reverse mode:
s = A_v^T^-1 * x_b
A_b += -x_v * s^T
b_b += s
x_b = 0
The hints steer the algorithm, see LinearSystemInterface for details.
See Example 21 - Special handling of linear system solvers for an example use of this class.
T_LinearSystem | Implementation of LinearSystemInterface. |
|
inline |
Solves the linear system Ax=b and adds an external function to the tape.
The hints steer the memory management and computations of the algorithm.