From 2e54137a2a3c3def3b7ab5310ccaf3dc17294e09 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <dmitri.naumov@ufz.de> Date: Wed, 27 Nov 2019 14:49:57 +0100 Subject: [PATCH] [MaL] Remove unused GlobalMatrix's getMaxDiagCoeff --- MathLib/LinAlg/Eigen/EigenMatrix.h | 6 ------ MathLib/LinAlg/Lis/LisMatrix.cpp | 18 ------------------ MathLib/LinAlg/Lis/LisMatrix.h | 3 --- 3 files changed, 27 deletions(-) diff --git a/MathLib/LinAlg/Eigen/EigenMatrix.h b/MathLib/LinAlg/Eigen/EigenMatrix.h index faa4e8af93e..16478520e81 100644 --- a/MathLib/LinAlg/Eigen/EigenMatrix.h +++ b/MathLib/LinAlg/Eigen/EigenMatrix.h @@ -140,12 +140,6 @@ public: } */ - /// get a maximum value in diagonal entries - double getMaxDiagCoeff() const - { - return _mat.diagonal().maxCoeff(); - } - /// return always true, i.e. the matrix is always ready for use bool isAssembled() const { return true; } diff --git a/MathLib/LinAlg/Lis/LisMatrix.cpp b/MathLib/LinAlg/Lis/LisMatrix.cpp index 043ebf36e9c..b44d44d76a6 100644 --- a/MathLib/LinAlg/Lis/LisMatrix.cpp +++ b/MathLib/LinAlg/Lis/LisMatrix.cpp @@ -118,24 +118,6 @@ void LisMatrix::write(const std::string &filename) const lis_output_matrix(_AA, LIS_FMT_MM, const_cast<char*>(filename.c_str())); } -double LisMatrix::getMaxDiagCoeff() -{ - double abs_max_entry; - int ierr = lis_vector_get_value(_diag, 0, &abs_max_entry); - checkLisError(ierr); - abs_max_entry = std::abs(abs_max_entry); - for (std::size_t k(1); k<_n_rows; ++k) { - double tmp; - ierr = lis_vector_get_value(_diag, k, &tmp); - checkLisError(ierr); - if (abs_max_entry < std::abs(tmp)) { - abs_max_entry = std::abs(tmp); - } - } - - return abs_max_entry; -} - bool finalizeMatrixAssembly(LisMatrix &mat) { LIS_MATRIX &A = mat.getRawMatrix(); diff --git a/MathLib/LinAlg/Lis/LisMatrix.h b/MathLib/LinAlg/Lis/LisMatrix.h index a23a06404c7..163a9b714fd 100644 --- a/MathLib/LinAlg/Lis/LisMatrix.h +++ b/MathLib/LinAlg/Lis/LisMatrix.h @@ -111,9 +111,6 @@ public: /// printout this equation for debugging void write(const std::string &filename) const; - /// get a maximum value in diagonal entries - double getMaxDiagCoeff(); - /// return a raw Lis matrix object LIS_MATRIX& getRawMatrix() { return _AA; } -- GitLab