diff --git a/MathLib/LinAlg/Lis/LisMatrix.cpp b/MathLib/LinAlg/Lis/LisMatrix.cpp index a6e2a8a8d2270b549789e544ee1efb2326db8011..5d7788ab09b9bbfb35068f8541e99b6a3daa2a11 100644 --- a/MathLib/LinAlg/Lis/LisMatrix.cpp +++ b/MathLib/LinAlg/Lis/LisMatrix.cpp @@ -15,7 +15,9 @@ #include "LisMatrix.h" #include <cmath> -#include <cassert> +#include <cstdlib> + +#include <logog/include/logog.hpp> #include "LisVector.h" #include "LisCheck.h" @@ -79,7 +81,11 @@ int LisMatrix::add(std::size_t rowId, std::size_t colId, double v) void LisMatrix::write(const std::string &filename) const { - assert(_is_assembled); + if (!_is_assembled) + { + ERR("LisMatrix::write(): matrix not assembled."); + std::abort(); + } lis_output_matrix(_AA, LIS_FMT_MM, const_cast<char*>(filename.c_str())); } @@ -103,7 +109,11 @@ double LisMatrix::getMaxDiagCoeff() void LisMatrix::multiply(const LisVector &x, LisVector &y) const { - assert(_is_assembled); + if (!_is_assembled) + { + ERR("LisMatrix::multiply(): matrix not assembled."); + std::abort(); + } int ierr = lis_matvec(_AA, const_cast<LisVector*>(&x)->getRawVector(), y.getRawVector()); checkLisError(ierr); }