From: Matthias Maier Date: Wed, 10 Oct 2012 08:17:13 +0000 (+0000) Subject: Actually instantiate SparseDirectMumps::initialize to make gcc-4.7 happy X-Git-Tag: v8.0.0~1967 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f955031658f10a4739c2aef82a8d2e0ec0f6847e;p=dealii.git Actually instantiate SparseDirectMumps::initialize to make gcc-4.7 happy Also fixup some unsigned int* -> int* type conversions gcc-4.7 barks about very loudly because they are not permitted by ISO C++ (ISO C++ 11) git-svn-id: https://svn.dealii.org/trunk@27044 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/lac/sparse_direct.h b/deal.II/include/deal.II/lac/sparse_direct.h index e63a1190df..df517a69a9 100644 --- a/deal.II/include/deal.II/lac/sparse_direct.h +++ b/deal.II/include/deal.II/lac/sparse_direct.h @@ -1305,8 +1305,8 @@ class SparseDirectMUMPS double *a; double *rhs; - unsigned int *irn; - unsigned int *jcn; + int *irn; + int *jcn; unsigned int n; unsigned int nz; diff --git a/deal.II/source/lac/sparse_direct.cc b/deal.II/source/lac/sparse_direct.cc index 243e0966a2..157ca2c383 100644 --- a/deal.II/source/lac/sparse_direct.cc +++ b/deal.II/source/lac/sparse_direct.cc @@ -1994,12 +1994,12 @@ void SparseDirectMUMPS::initialize (const Matrix& matrix, // column dimensions respectively of the // matrix representation above (a): ie. a[k] // is the matrix element (irn[k], jcn[k]) - irn = new unsigned int[nz]; - jcn = new unsigned int[nz]; + irn = new int[nz]; + jcn = new int[nz]; unsigned int index = 0; - for (SparseMatrix::const_iterator ptr = matrix.begin (); + for (typename Matrix::const_iterator ptr = matrix.begin (); ptr != matrix.end (); ++ptr) if (std::abs (ptr->value ()) > 0.0) { @@ -2087,22 +2087,27 @@ void SparseDirectMA27::solve (const SparseMatrix &matrix, Vector &); \ template \ void SparseDirectUMFPACK::initialize (const MATRIX &, \ - const AdditionalData) + const AdditionalData); -InstantiateUMFPACK(SparseMatrix); -InstantiateUMFPACK(SparseMatrix); -InstantiateUMFPACK(SparseMatrixEZ); -InstantiateUMFPACK(SparseMatrixEZ); -InstantiateUMFPACK(BlockSparseMatrix); -InstantiateUMFPACK(BlockSparseMatrix); +InstantiateUMFPACK(SparseMatrix) +InstantiateUMFPACK(SparseMatrix) +InstantiateUMFPACK(SparseMatrixEZ) +InstantiateUMFPACK(SparseMatrixEZ) +InstantiateUMFPACK(BlockSparseMatrix) +InstantiateUMFPACK(BlockSparseMatrix) // explicit instantiations for SparseDirectMUMPS #ifdef DEAL_II_USE_MUMPS -template -void SparseDirectMUMPS::initialize (const Matrix& matrix, - const Vector & vector); - -void SparseDirectMUMPS::solve (Vector& vector); +#define InstantiateMUMPS(MATRIX) \ + template \ + void SparseDirectMUMPS::initialize (const MATRIX &, const Vector &); + +InstantiateMUMPS(SparseMatrix) +InstantiateMUMPS(SparseMatrix) +// InstantiateMUMPS(SparseMatrixEZ) +// InstantiateMUMPS(SparseMatrixEZ) +InstantiateMUMPS(BlockSparseMatrix) +InstantiateMUMPS(BlockSparseMatrix) #endif DEAL_II_NAMESPACE_CLOSE