]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Push back original compile errors in petsc_vector_base to their instantiations. Free...
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Oct 2013 22:27:38 +0000 (22:27 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Oct 2013 22:27:38 +0000 (22:27 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@31377 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/petsc_vector_base.h
deal.II/include/deal.II/numerics/vector_tools.templates.h
deal.II/source/dofs/dof_accessor_get.cc
deal.II/source/fe/fe_tools_interpolate.cc
deal.II/source/fe/mapping_q1_eulerian.cc

index 010b35dc46fc5cdfa4d236c943324b61f9e3f092..3a8d5be85af582e7e0967dd3e1f34e35df707db2 100644 (file)
@@ -1350,9 +1350,7 @@ namespace PETScWrappers
             && index<static_cast<unsigned int>(end) )
         {
           //local entry
-         /* @whattodo Note: OutputIterator needs to be instantiated as PetscScalar (or std::complex) */
-          /* *(values_begin+i) = *(ptr+index-begin); */
-         Assert ((false), ExcMessage ("This function is corrupt: @whattodo"));
+         *(values_begin+i) = *(ptr+index-begin); 
         }
         else
         {
@@ -1361,9 +1359,7 @@ namespace PETScWrappers
           = ghost_indices.index_within_set(index);
 
           Assert(ghostidx+end-begin<(unsigned int)lsize, ExcInternalError());
-         /* @whattodo Note: OutputIterator needs to be instantiated as PetscScalar (or std::complex) */
-          /* *(values_begin+i) = *(ptr+ghostidx+end-begin); */
-         Assert ((false), ExcMessage ("This function is corrupt: @whattodo"));
+         *(values_begin+i) = *(ptr+ghostidx+end-begin); 
         }
       }
 
@@ -1395,9 +1391,7 @@ namespace PETScWrappers
         Assert(index>=static_cast<unsigned int>(begin)
             && index<static_cast<unsigned int>(end), ExcInternalError());
        
-       /* @whattodo Note: OutputIterator needs to be instantiated as PetscScalar (or std::complex) */
-       /* *(values_begin+i) = *(ptr+index-begin); */
-       Assert ((false), ExcMessage ("This function is corrupt: @whattodo"));
+       *(values_begin+i) = *(ptr+index-begin); 
       }
 
       ierr = VecRestoreArray(vector, &ptr);
index 17f54d300b0211853c40748a6401e30b149b59cf..640e7d64761d15dced2241957fe8e1f9ea8ba64f 100644 (file)
@@ -284,13 +284,13 @@ namespace VectorTools
 
   template <int dim, class InVector, class OutVector, int spacedim>
   void
-  interpolate (const DoFHandler<dim,spacedim>           &dof_1,
-               const DoFHandler<dim,spacedim>           &dof_2,
+  interpolate (const DoFHandler<dim,spacedim>  &dof_1,
+               const DoFHandler<dim,spacedim>  &dof_2,
                const FullMatrix<double>        &transfer,
                const InVector                  &data_1,
                OutVector                       &data_2)
   {
-    Vector<double> cell_data_1(dof_1.get_fe().dofs_per_cell);
+    Vector<double> cell_data_1(dof_1.get_fe().dofs_per_cell); // <- Vector<std::complex>
     Vector<double> cell_data_2(dof_2.get_fe().dofs_per_cell);
 
     std::vector<short unsigned int> touch_count (dof_2.n_dofs(), 0); //TODO: check on datatype... kinda strange (UK)
@@ -302,7 +302,10 @@ namespace VectorTools
 
     for (; h != endh; ++h, ++l)
       {
-        h->get_dof_values(data_1, cell_data_1);
+       // @whattodo Some of the problems in petsc_vector_base.h are instantiated here.
+       /* h->get_dof_values(data_1, cell_data_1); // <- complaint line 655  */
+       Assert ((false), ExcMessage ("This function is corrupt: @whattodo"));
+
         transfer.vmult(cell_data_2, cell_data_1);
 
         l->get_dof_indices (local_dof_indices);
index 9b9ca8b7b8e897fe01a012741b7688ce7f9665ef..40988ac4f2bfa4286430a8aa9431246cb433990a 100644 (file)
@@ -46,7 +46,7 @@ get_interpolated_dof_values (const InputVector &values,
                              Vector<number>    &interpolated_values) const
 {
   const FiniteElement<dim,spacedim> &fe            = this->get_fe();
-  const unsigned int        dofs_per_cell = fe.dofs_per_cell;
+  const unsigned int                 dofs_per_cell = fe.dofs_per_cell;
 
   Assert (this->dof_handler != 0,
           typename BaseClass::ExcInvalidObject());
@@ -60,7 +60,11 @@ get_interpolated_dof_values (const InputVector &values,
   if (!this->has_children())
     // if this cell has no children: simply return the exact values on this
     // cell
-    this->get_dof_values (values, interpolated_values);
+    {
+      // @whattodo Another contribution to the initial problems in petcs_vector_base.h. Pandora's box!
+      // this->get_dof_values (values, interpolated_values);
+      Assert ((false), ExcMessage ("This function is corrupt: @whattodo"));
+    }
   else
     // otherwise clobber them from the children
     {
index cd69bd1a0aa6857c15f39009a4c577ad73430280..405a8682a2786c14cbab3b35875f8795349b0c81 100644 (file)
@@ -626,9 +626,9 @@ namespace FETools
 
   template <int dim, class InVector, class OutVector, int spacedim>
   void project_dg(const DoFHandler<dim,spacedim> &dof1,
-                  const InVector &u1,
+                  const InVector                 &u1,
                   const DoFHandler<dim,spacedim> &dof2,
-                  OutVector &u2)
+                  OutVector                      &u2)
   {
     Assert(&dof1.get_tria()==&dof2.get_tria(), ExcTriangulationMismatch());
     Assert(dof1.get_fe().n_components() == dof2.get_fe().n_components(),
@@ -643,18 +643,24 @@ namespace FETools
     const unsigned int n1 = dof1.get_fe().dofs_per_cell;
     const unsigned int n2 = dof2.get_fe().dofs_per_cell;
 
-    Vector<double> u1_local(n1);
-    Vector<double> u2_local(n2);
+    Vector<double> u1_local(n1); // <- Vector<std::complex>
+    Vector<double> u2_local(n2); // <- Vector<std::complex>
     std::vector<types::global_dof_index> dofs(n2);
 
-    FullMatrix<double> matrix(n2,n1);
+    FullMatrix<double> matrix(n2,n1); // ?
     get_projection_matrix(dof1.get_fe(), dof2.get_fe(), matrix);
 
+
     while (cell2 != end)
       {
-        cell1->get_dof_values(u1, u1_local);
+
+       // @whattodo Some of the problems in petsc_vector_base.h are instantiated here.
+        // cell1->get_dof_values(u1, u1_local); // <- complaint line 655
+       Assert ((false), ExcMessage ("This function is corrupt: @whattodo"));
+
         matrix.vmult(u2_local, u1_local);
         cell2->get_dof_indices(dofs);
+
         for (unsigned int i=0; i<n2; ++i)
           {
             u2(dofs[i])+=u2_local(i);
index f02797d6c5d061f004e69a52a7ef802478892cf6..49fd4d75177f8282fcc1bb33d62e9f23b9649541 100644 (file)
@@ -78,8 +78,10 @@ compute_mapping_support_points(const typename Triangulation<dim,spacedim>::cell_
   // now get the values of the shift
   // vectors at the vertices
   Vector<double> mapping_values (shiftmap_dof_handler->get_fe().dofs_per_cell);
-  dof_cell->get_dof_values (*euler_transform_vectors, mapping_values);
 
+  // @whattodo Some of the problems in petsc_vector_base.h are instantiated here.
+  // dof_cell->get_dof_values (*euler_transform_vectors, mapping_values); <- complaint line 
+  Assert ((false), ExcMessage ("This function is corrupt: @whattodo"));
 
   for (unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
     {

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.