mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-07-07 04:53:03 -05:00
testing removing fucntion invertMatrix
This commit is contained in:
parent
8705cd16ad
commit
01f87304e5
|
@ -161,7 +161,7 @@ void StandardWellEquations<Scalar,numEq>::invert()
|
|||
{
|
||||
try {
|
||||
invDuneD_ = duneD_; // Not strictly need if not cpr with well contributions is used
|
||||
detail::invertMatrix(invDuneD_[0][0]);
|
||||
invDuneD_[0][0].invert();
|
||||
} catch (NumericalProblem&) {
|
||||
// for singular matrices, use identity as the inverse
|
||||
invDuneD_[0][0] = 0.0;
|
||||
|
|
|
@ -55,13 +55,17 @@ BOOST_AUTO_TEST_CASE(Invert4x4)
|
|||
matrix[3][0] = 5;
|
||||
matrix[0][3] = 14;
|
||||
|
||||
double det = Opm::detail::invertMatrix4<Opm::detail::FMat4>(matrix, inverse);
|
||||
const double det = matrix.determinant();
|
||||
BOOST_CHECK_CLOSE(4, det, 1e-14);
|
||||
|
||||
inverse = matrix;
|
||||
inverse.invert();
|
||||
// check matrix * inverse close to identiy
|
||||
checkIdentity(matrix.rightmultiply(inverse));
|
||||
|
||||
// check singular matrix
|
||||
BOOST_CHECK_THROW(Opm::detail::invertMatrix4<Opm::detail::FMat4>(matrix_sing, inverse),
|
||||
Opm::NumericalProblem);
|
||||
// BOOST_CHECK_THROW(Opm::detail::invertMatrix4<Opm::detail::FMat4>(matrix_sing, inverse),
|
||||
// Opm::NumericalProblem);
|
||||
//
|
||||
BOOST_CHECK_THROW(matrix_sing.invert(), Dune::FMatrixError);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user