MCPcopy Create free account
hub / github.com/KratosMultiphysics/Kratos / Solve

Method Solve

kratos/utilities/math_utils.cpp:28–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27template<class TDataType>
28void 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
44template class MathUtils<double>;

Calls 1

size1Method · 0.45

Tested by

no test coverage detected