]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove a redefinition of a SuiteSparse type.
authorDavid Wells <drwells@email.unc.edu>
Fri, 30 Nov 2018 16:41:24 +0000 (11:41 -0500)
committerDavid Wells <drwells@email.unc.edu>
Fri, 30 Nov 2018 20:08:43 +0000 (15:08 -0500)
include/deal.II/lac/sparse_direct.h

index 2ceeaba60ae0f7532097dff5f476f277bf70dcd6..aa6dfc92a9574f089e0c0f04e9f228e7a9e57a81 100644 (file)
 #ifdef DEAL_II_WITH_UMFPACK
 #  include <umfpack.h>
 #endif
-#ifndef SuiteSparse_long
-#  define SuiteSparse_long long int
-#endif
 
 DEAL_II_NAMESPACE_OPEN
 
+namespace types
+{
+  /**
+   * Index type for UMFPACK. SuiteSparse_long has to be used here for the
+   * Windows 64 build.
+   */
+#ifdef SuiteSparse_long
+  using suitesparse_index = SuiteSparse_long;
+#else
+  using suitesparse_index = long int;
+#endif
+} // namespace types
+
 /**
  * This class provides an interface to the sparse direct solver UMFPACK, which
  * is part of the SuiteSparse library (see <a
@@ -353,13 +363,11 @@ private:
   sort_arrays(const BlockSparseMatrix<number> &);
 
   /**
-   * The arrays in which we store the data for the solver. SuiteSparse_long
-   * has to be used here for Windows 64 build, if we used only long int,
-   * compilation would fail.
+   * The arrays in which we store the data for the solver.
    */
-  std::vector<SuiteSparse_long> Ap;
-  std::vector<SuiteSparse_long> Ai;
-  std::vector<double>           Ax;
+  std::vector<types::suitesparse_index> Ap;
+  std::vector<types::suitesparse_index> Ai;
+  std::vector<double>                   Ax;
 
   /**
    * Control and work arrays for the solver routines.

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.