From b0931cb148a39c06b1f974ea35e3b41b2de8d3b2 Mon Sep 17 00:00:00 2001 From: Sebastien Gilles Date: Thu, 25 Jun 2020 11:29:09 +0200 Subject: [PATCH] #1536 Remove MatrixOperations that were half baked and not used (to my knowledge). --- .../Petsc/Matrix/MatrixOperations.hpp | 102 +----------------- .../Petsc/Matrix/MatrixOperations.hxx | 80 +------------- 2 files changed, 2 insertions(+), 180 deletions(-) diff --git a/Sources/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hpp b/Sources/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hpp index ad7bb8296..27f7e0d81 100644 --- a/Sources/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hpp +++ b/Sources/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hpp @@ -475,107 +475,7 @@ namespace MoReFEM DoReuseMatrix do_reuse_matrix = DoReuseMatrix::no); - - /*! - * \brief Wrapper over MatGetOrdering, gets a reordering for a matrix to reduce fill or to improve numerical stability of LU factorization. - * - * \see http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/MatOrderings/MatGetOrdering.html#MatGetOrdering - * for more details. - * - * \param[in] A Matrix to get the ordering. - * \param[in] type Type of the ordering. - * \param[in] rperm Row permutation for the ordering. - * \param[in] cperm Column permutation for the ordering. - * \copydetails doxygen_hide_invoking_file_and_line - * - */ - template - std::enable_if_t::value, void> - GetOrdering(MatrixT& A, - MatOrderingType type, - IS *rperm, - IS *cperm, - const char* invoking_file, int invoking_line); - - - /*! - * \brief Wrapper over MatLUFactor, that performs in-place LU factorization of matrix. - * - * \see http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatLUFactor.html#MatLUFactor - * for more details. - * - * \param[in] A Matrix to factor. - * \param[in] row Result of the GetOrdering. - * \param[in] col Result of the GetOrdering. - * \param[in] info Info of LUFactor. - * \copydetails doxygen_hide_invoking_file_and_line - * - */ - template - std::enable_if_t::value, void> - LUFactor(MatrixT& A, - IS row, IS col, - const MatFactorInfo *info, - const char* invoking_file, int invoking_line); - - - /*! - * \brief Wrapper over MatMatSolve, solves A X = B, given a factored matrix. - * - * \see http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMatSolve.html - * for more details. - * - * \param[in] A See formula above. - * \param[in] B See formula above. - * \param[in] X See formula above. - * \copydetails doxygen_hide_invoking_file_and_line - * - */ - template - < - class MatrixT, - class MatrixU, - class MatrixV - > - std::enable_if_t - < - std::is_base_of::value - && std::is_base_of::value - && std::is_base_of::value, - void - > - MatMatSolve(const MatrixT& A, - const MatrixU& B, - MatrixV& X, - const char* invoking_file, int invoking_line); - - - /*! - * \brief Wrapper over MatCholeskyFactor, that performs in-place Cholesky factorization of a symmetric matrix. - * - * \see http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCholeskyFactor.html - * for more details. - * - * \attention Not used yet, but might be useful in midterm developments. If finally too unwieldy for our - * purposes it will be removed. - * - * \param[in] mat Matrix to factor. - * \param[in] perm Result of the GetOrdering, row and column permutations. - * \param[in] info Info of CholeskyFactor. - * \copydetails doxygen_hide_invoking_file_and_line - * - */ - template - std::enable_if_t::value, void> - CholeskyFactor(MatrixT& mat, - IS perm, - const MatFactorInfo *info, - const char* invoking_file, int invoking_line); - - - - - } //namespace Petsc + } // namespace Petsc } // namespace Wrappers diff --git a/Sources/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hxx b/Sources/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hxx index 1ecfa61b1..e6d68017e 100644 --- a/Sources/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hxx +++ b/Sources/ThirdParty/Wrappers/Petsc/Matrix/MatrixOperations.hxx @@ -528,85 +528,7 @@ namespace MoReFEM } - template - std::enable_if_t::value, void> - GetOrdering(MatrixT& A, - MatOrderingType type, - IS *rperm, - IS *cperm, - const char* invoking_file, int invoking_line) - { - int error_code = ::MatGetOrdering(A.InternalForReadOnly(), - type, - rperm, - cperm); - - if (error_code) - throw ExceptionNS::Exception(error_code, "MatGetOrdering", invoking_file, invoking_line); - } - - - template - std::enable_if_t::value, void> - LUFactor(MatrixT& A, - IS row, IS col, - const MatFactorInfo *info, - const char* invoking_file, int invoking_line) - { - int error_code = ::MatLUFactor(A.Internal(), - row, - col, - info); - - if (error_code) - throw ExceptionNS::Exception(error_code, "MatLUFactor", invoking_file, invoking_line); - } - - - template - < - class MatrixT, - class MatrixU, - class MatrixV - > - std::enable_if_t - < - std::is_base_of::value - && std::is_base_of::value - && std::is_base_of::value, - void - > - MatMatSolve(const MatrixT& A, - const MatrixU& B, - MatrixV& X, - const char* invoking_file, int invoking_line) - { - int error_code = ::MatMatSolve(A.InternalForReadOnly(), - B.InternalForReadOnly(), - X.Internal()); - - if (error_code) - throw ExceptionNS::Exception(error_code, "MatMatSolve", invoking_file, invoking_line); - } - - - template - std::enable_if_t::value, void> - CholeskyFactor(MatrixT& mat, - IS perm, - const MatFactorInfo *info, - const char* invoking_file, int invoking_line) - { - int error_code = ::MatCholeskyFactor(mat.Internal(), - perm, - info); - - if (error_code) - throw ExceptionNS::Exception(error_code, "MatCholeskyFactor", invoking_file, invoking_line); - } - - - } //namespace Petsc + } // namespace Petsc } // namespace Wrappers -- GitLab