From bdaf859ac72dff3747596fe89daf74127dd03c2f Mon Sep 17 00:00:00 2001 From: "Toby D. Young" Date: Thu, 26 Aug 2010 21:03:30 +0000 Subject: [PATCH] Workaround by Wolfgang to get PetscScalar is complex working, plus release VECTOR_FUNCTIONS back to petsc complex git-svn-id: https://svn.dealii.org/trunk@21740 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/constraint_matrix.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/deal.II/lac/source/constraint_matrix.cc b/deal.II/lac/source/constraint_matrix.cc index e0d0d0d133..0d77310409 100644 --- a/deal.II/lac/source/constraint_matrix.cc +++ b/deal.II/lac/source/constraint_matrix.cc @@ -2157,9 +2157,9 @@ ConstraintMatrix::distribute (PETScWrappers::MPI::Vector &vec) const // create a vector and import those indices - PETScWrappers::MPI::Vector ghost_vec(vec.get_mpi_communicator(), - local_range_is, - my_indices); + PETScWrappers::MPI::Vector ghost_vec (vec.get_mpi_communicator(), + local_range_is, + my_indices); ghost_vec = vec; ghost_vec.update_ghost_values(); @@ -2171,9 +2171,9 @@ ConstraintMatrix::distribute (PETScWrappers::MPI::Vector &vec) const // fill entry in line // next_constraint.line by adding the // different contributions - double new_value = it->inhomogeneity; + PetscScalar new_value = it->inhomogeneity; for (unsigned int i=0; ientries.size(); ++i) - new_value += (ghost_vec(it->entries[i].first) * + new_value += (PetscScalar(ghost_vec(it->entries[i].first)) * it->entries[i].second); vec(it->line) = new_value; } @@ -2375,13 +2375,11 @@ VECTOR_FUNCTIONS(BlockVector); // use them. The key is to use local ranges etc., which still needs to be // implemented. #ifdef DEAL_II_USE_PETSC -#ifndef DEAL_II_USE_PETSC_COMPLEX VECTOR_FUNCTIONS(PETScWrappers::Vector); VECTOR_FUNCTIONS(PETScWrappers::BlockVector); VECTOR_FUNCTIONS(PETScWrappers::MPI::Vector); VECTOR_FUNCTIONS(PETScWrappers::MPI::BlockVector); #endif -#endif #ifdef DEAL_II_USE_TRILINOS VECTOR_FUNCTIONS(TrilinosWrappers::Vector); -- 2.39.5