| 26 | |
| 27 | template<class TDataType> |
| 28 | void MathUtils<TDataType>::Solve( |
| 29 | MatrixType A, |
| 30 | VectorType& rX, |
| 31 | const VectorType& rB |
| 32 | ) |
| 33 | { |
| 34 | const SizeType size1 = A.size1(); |
| 35 | rX = rB; |
| 36 | typedef permutation_matrix<SizeType> pmatrix; |
| 37 | pmatrix pm(size1); |
| 38 | int singular = lu_factorize(A,pm); |
| 39 | KRATOS_DEBUG_ERROR_IF(singular == 1) << "Matrix is singular: " << A << std::endl; |
| 40 | lu_substitute(A, pm, rX); |
| 41 | } |
| 42 | |
| 43 | /// Explicit instantation |
| 44 | template class MathUtils<double>; |
no test coverage detected