]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
One more error identify - only dat out is masked now...
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Oct 2013 13:49:54 +0000 (13:49 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Oct 2013 13:49:54 +0000 (13:49 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@31085 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/petsc_vector_base.cc
deal.II/source/lac/slepc_solver.cc
deal.II/source/numerics/point_value_history.cc

index ae6e39c52b464a5c1ecef6322f34519eb54750d2..f3365e78a41d623f39e59163592e78f7fdc2ade1 100644 (file)
@@ -416,7 +416,6 @@ namespace PETScWrappers
   PetscScalar
   VectorBase::mean_value () const
   {
-#ifndef PETSC_USE_COMPLEX
     int ierr;
 
     // We can only use our more efficient
@@ -426,7 +425,12 @@ namespace PETScWrappers
         PetscScalar sum;
         ierr = VecSum(vector, &sum);
         AssertThrow (ierr == 0, ExcPETScError(ierr));
-        return sum/size();
+// @whattodo
+        // return sum/size();
+
+       Assert ((false),
+               ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex "
+                           "but this function is not defined for complex types."));
       }
 
     // get a representation of the vector and
@@ -468,15 +472,10 @@ namespace PETScWrappers
 
     return mean;
 
-#else // PETSC_USE_COMPLEX
+
     Assert ((false),
             ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex "
                         "but this function is not defined for complex types."));
-
-    // Prevent compiler warning about no return value
-    PetscScalar dummy;
-    return dummy;
-#endif
   }
 
 
index 4e372994d1750ada63afb4579ccbbd8274dc881d..4948083becef3c1354697de18a5401322239adc6 100644 (file)
@@ -248,6 +248,9 @@ namespace SLEPcWrappers
                              PETScWrappers::VectorBase &real_eigenvectors,
                              PETScWrappers::VectorBase &imag_eigenvectors)
   {
+    // This function makes no sense if SLEPc was compiled with
+    // --scaler-type=complex.
+
 #ifndef PETSC_USE_COMPLEX
     AssertThrow (solver_data.get() != 0, ExcSLEPcWrappersUsageError());
 
@@ -263,7 +266,6 @@ namespace SLEPcWrappers
 #endif
   }
 
-
   void
   SolverBase::reset ()
   {
index 17e4a8c3a2eedfcac3c293d96ecfcc0d8fc40af2..f4d24f5bc19d4bb188a44d4a2b2e4be070df3e47 100644 (file)
@@ -603,7 +603,13 @@ void PointValueHistory<dim>
           if (mask->second[comp])
             {
               unsigned int solution_index = point->solution_indices[comp];
-              data_store_field->second[data_store_index * n_stored + store_index].push_back (solution (solution_index));
+// @whattodo
+              // data_store_field->second[data_store_index * n_stored + store_index].push_back (solution (solution_index));
+             (void) solution_index; // stop g++ complaining: eventually remove this
+             (void) n_stored;       // stop g++ complaining: eventually remove this
+             Assert ((false),
+                     ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex "
+                                 "but this function is not defined for complex types."));
               store_index++;
             }
         }
@@ -1336,9 +1342,7 @@ void PointValueHistory<dim>
 
 
 // explicit instantiations
-#ifndef PETSC_USE_COMPLEX
-   #include "point_value_history.inst"
-#endif
+#include "point_value_history.inst"
 
 DEAL_II_NAMESPACE_CLOSE
 

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.