]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Workaround by Wolfgang to get PetscScalar is complex working, plus release VECTOR_FUN...
authorToby D. Young <tyoung@ippt.pan.pl>
Thu, 26 Aug 2010 21:03:30 +0000 (21:03 +0000)
committerToby D. Young <tyoung@ippt.pan.pl>
Thu, 26 Aug 2010 21:03:30 +0000 (21:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@21740 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/constraint_matrix.cc

index e0d0d0d1335e31b33c9c2b4a4abc5aca1a6ef6f0..0d77310409e64d50250e229e88cc865ca75d06e7 100644 (file)
@@ -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; i<it->entries.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<float>);
 // 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);

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.