From 587bad7c9faba579ff8582757ffa668947f6aaf2 Mon Sep 17 00:00:00 2001 From: young Date: Mon, 10 Mar 2014 10:05:32 +0000 Subject: [PATCH] Put instances of complex or real matrices in ifdef else endif scheme. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@32630 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/lac/constraint_matrix.cc | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/deal.II/source/lac/constraint_matrix.cc b/deal.II/source/lac/constraint_matrix.cc index 9da8ec2288..a64de0f95c 100644 --- a/deal.II/source/lac/constraint_matrix.cc +++ b/deal.II/source/lac/constraint_matrix.cc @@ -1765,7 +1765,6 @@ ConstraintMatrix::resolve_indices (std::vector &indices VECTOR_FUNCTIONS(PETScWrappers::MPI::Vector); VECTOR_FUNCTIONS(PETScWrappers::MPI::BlockVector); #else -// if PETSC_COMPLEX @whattodo check this works COMPLEX_VECTOR_FUNCTIONS(PETScWrappers::MPI::Vector); COMPLEX_VECTOR_FUNCTIONS(PETScWrappers::MPI::BlockVector); #endif @@ -1876,7 +1875,16 @@ MATRIX_VECTOR_FUNCTIONS(ChunkSparseMatrix, Vector); // BLOCK_MATRIX_VECTOR_FUNCTIONS(BlockSparseMatrixEZ, Vector); #ifdef DEAL_II_WITH_PETSC -// #if PETSC_COMPLEX @whattodo: Implement this and check +#ifndef PETSC_USE_COMPLEX +MATRIX_FUNCTIONS(PETScWrappers::SparseMatrix); +BLOCK_MATRIX_FUNCTIONS(PETScWrappers::BlockSparseMatrix); +MATRIX_FUNCTIONS(PETScWrappers::MPI::SparseMatrix); +BLOCK_MATRIX_FUNCTIONS(PETScWrappers::MPI::BlockSparseMatrix); +MATRIX_VECTOR_FUNCTIONS(PETScWrappers::SparseMatrix, PETScWrappers::Vector); +BLOCK_MATRIX_VECTOR_FUNCTIONS(PETScWrappers::BlockSparseMatrix, PETScWrappers::BlockVector); +MATRIX_VECTOR_FUNCTIONS(PETScWrappers::MPI::SparseMatrix, PETScWrappers::MPI::Vector); +BLOCK_MATRIX_VECTOR_FUNCTIONS(PETScWrappers::MPI::BlockSparseMatrix ,PETScWrappers::MPI::BlockVector); +#else COMPLEX_MATRIX_FUNCTIONS(PETScWrappers::SparseMatrix); COMPLEX_BLOCK_MATRIX_FUNCTIONS(PETScWrappers::BlockSparseMatrix); COMPLEX_MATRIX_FUNCTIONS(PETScWrappers::MPI::SparseMatrix); @@ -1885,16 +1893,7 @@ COMPLEX_MATRIX_VECTOR_FUNCTIONS(PETScWrappers::SparseMatrix, PETScWrappers::Vect COMPLEX_BLOCK_MATRIX_VECTOR_FUNCTIONS(PETScWrappers::BlockSparseMatrix, PETScWrappers::BlockVector); COMPLEX_MATRIX_VECTOR_FUNCTIONS(PETScWrappers::MPI::SparseMatrix, PETScWrappers::MPI::Vector); COMPLEX_BLOCK_MATRIX_VECTOR_FUNCTIONS(PETScWrappers::MPI::BlockSparseMatrix ,PETScWrappers::MPI::BlockVector); -// #else -// MATRIX_FUNCTIONS(PETScWrappers::SparseMatrix); -// BLOCK_MATRIX_FUNCTIONS(PETScWrappers::BlockSparseMatrix); -// MATRIX_FUNCTIONS(PETScWrappers::MPI::SparseMatrix); -// BLOCK_MATRIX_FUNCTIONS(PETScWrappers::MPI::BlockSparseMatrix); -// MATRIX_VECTOR_FUNCTIONS(PETScWrappers::SparseMatrix, PETScWrappers::Vector); -// BLOCK_MATRIX_VECTOR_FUNCTIONS(PETScWrappers::BlockSparseMatrix, PETScWrappers::BlockVector); -// MATRIX_VECTOR_FUNCTIONS(PETScWrappers::MPI::SparseMatrix, PETScWrappers::MPI::Vector); -// BLOCK_MATRIX_VECTOR_FUNCTIONS(PETScWrappers::MPI::BlockSparseMatrix ,PETScWrappers::MPI::BlockVector); -// #endif +#endif #endif #ifdef DEAL_II_WITH_TRILINOS -- 2.39.5