]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid raw pointers in SparseDirectMUMPS
authorDavide Polverino <davide.polverino@phd.unipi.it>
Tue, 20 May 2025 13:30:26 +0000 (15:30 +0200)
committerMarco Feder <marco.feder@sissa.it>
Thu, 5 Jun 2025 12:25:03 +0000 (14:25 +0200)
include/deal.II/lac/sparse_direct.h
source/lac/sparse_direct.cc

index 6947b234e47a3b86041185acee858ba6d3e2e282..2dba5af1c4cf098c282d6c3a6c9f11315d8f1e5b 100644 (file)
@@ -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<types::mumps_index[]> irn;
+=======
+  std::unique_ptr<int[]> irn;
+>>>>>>> 3caf1bb907 (Avoid raw pointers in SparseDirectMUMPS)
 
   /**
    * jcn contains the column indices of the non-zero entries of the matrix.
    */
+<<<<<<< HEAD
   std::unique_ptr<types::mumps_index[]> jcn;
+=======
+  std::unique_ptr<int[]> 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
index ef1d41e0f473f16e2725ea2a1f595bc8fb06bb73..4d4e3075fd7fd8a0f7e4215a02a38d1954effff3 100644 (file)
@@ -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)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.