From 9838ea3d3c6f12e20595e7a508322c829b1f985c Mon Sep 17 00:00:00 2001 From: Davide Polverino Date: Tue, 20 May 2025 15:30:26 +0200 Subject: [PATCH] Avoid raw pointers in SparseDirectMUMPS --- include/deal.II/lac/sparse_direct.h | 13 +++++++++---- source/lac/sparse_direct.cc | 3 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/deal.II/lac/sparse_direct.h b/include/deal.II/lac/sparse_direct.h index 6947b234e4..2dba5af1c4 100644 --- a/include/deal.II/lac/sparse_direct.h +++ b/include/deal.II/lac/sparse_direct.h @@ -491,7 +491,6 @@ public: * algorithm, an algorithm with higher compression than the standard one. */ bool blr_ucfs; - /** * Threshold for the low-rank truncation of the blocks. */ @@ -521,13 +520,11 @@ public: * If true, the MUMPS solver will print out error statistics. */ bool error_statistics; - /* * If true, the MUMPS solver will use the symmetric factorization. This is * only possible if the matrix is symmetric. */ bool symmetric; - /* * If true, the MUMPS solver will use the positive definite factorization. * This is only possible if the matrix is symmetric and positive definite. @@ -621,12 +618,20 @@ private: /** * irn contains the row indices of the non-zero entries of the matrix. */ +<<<<<<< HEAD std::unique_ptr irn; +======= + std::unique_ptr irn; +>>>>>>> 3caf1bb907 (Avoid raw pointers in SparseDirectMUMPS) /** * jcn contains the column indices of the non-zero entries of the matrix. */ +<<<<<<< HEAD std::unique_ptr jcn; +======= + std::unique_ptr jcn; +>>>>>>> 3caf1bb907 (Avoid raw pointers in SparseDirectMUMPS) /** * The number of rows of the matrix. The matrix is square. @@ -670,4 +675,4 @@ private: DEAL_II_NAMESPACE_CLOSE -#endif // dealii_sparse_direct_h +#endif // dealii_sparse_direct_h \ No newline at end of file diff --git a/source/lac/sparse_direct.cc b/source/lac/sparse_direct.cc index ef1d41e0f4..4d4e3075fd 100644 --- a/source/lac/sparse_direct.cc +++ b/source/lac/sparse_direct.cc @@ -927,6 +927,9 @@ void SparseDirectMUMPS::initialize_matrix(const Matrix &matrix) { Assert(matrix.n() == matrix.m(), ExcMessage("Matrix needs to be square.")); + // Here we should be checking if the matrix is respecting the symmetry given + //(I.E. sym = 0 for non-symmetric matrix, sym = 1 for posdef matrix, sym = 2 + // for general symmetric). // Hand over matrix to MUMPS as centralized assembled matrix if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0) -- 2.39.5