]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Removed trailing whitespace.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Sep 2009 09:22:09 +0000 (09:22 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Sep 2009 09:22:09 +0000 (09:22 +0000)
git-svn-id: https://svn.dealii.org/trunk@19486 0785d39b-7218-0410-832d-ea1e28bc413d

15 files changed:
deal.II/deal.II/include/dofs/dof_accessor.templates.h
deal.II/examples/step-37/step-37.cc
deal.II/examples/step-38/step-38.cc
deal.II/examples/step-5/step-5.cc
deal.II/lac/include/lac/constraint_matrix.h
deal.II/lac/include/lac/petsc_solver.h
deal.II/lac/include/lac/trilinos_vector.h
deal.II/lac/include/lac/trilinos_vector_base.h
deal.II/lac/source/constraint_matrix.cc
deal.II/lac/source/petsc_matrix_base.cc
deal.II/lac/source/petsc_parallel_sparse_matrix.cc
deal.II/lac/source/petsc_sparse_matrix.cc
deal.II/lac/source/petsc_vector_base.cc
deal.II/lac/source/slepc_solver.cc
deal.II/lac/source/trilinos_vector_base.cc

index 17ea766c9781b45e72c54e112cf6b05601f02e4b..3597fc3af992ad00faa7f05f5b78b494a835d417 100644 (file)
@@ -153,12 +153,12 @@ DoFAccessor<structdim,DH>::child (const unsigned int i) const
     next_level = this->level()+1;
   else
     next_level = 0;
-  
+
   TriaIterator<DoFAccessor<structdim,DH> > q (this->tria,
                                              next_level,
                                              this->child_index (i),
                                              this->dof_handler);
-  
+
                                   // make sure that we either created
                                   // a past-the-end iterator or one
                                   // pointing to a used cell
@@ -223,7 +223,7 @@ namespace internal
                             local_index,
                             global_index);
          }
-    
+
 
        template <int spacedim>
        static
@@ -265,8 +265,8 @@ namespace internal
                             local_index,
                             global_index);
          }
-    
-    
+
+
        template <int spacedim>
        static
        unsigned int
@@ -405,7 +405,7 @@ namespace internal
              get_dof_index (dof_handler,
                             obj_index,
                             fe_index,
-                            local_index);      
+                            local_index);
          }
 
 
@@ -505,7 +505,7 @@ namespace internal
                             fe_index,
                             local_index,
                             global_index,
-                            obj_level);  
+                            obj_level);
          }
 
 
@@ -585,7 +585,7 @@ namespace internal
                             fe_index,
                             local_index,
                             global_index,
-                            obj_level);  
+                            obj_level);
          }
 
 
@@ -665,7 +665,7 @@ namespace internal
                             fe_index,
                             local_index,
                             global_index,
-                            obj_level);  
+                            obj_level);
          }
 
 
@@ -778,10 +778,10 @@ namespace internal
                    ExcMessage ("This cell is not active and therefore can't be "
                                "queried for its active FE indices"));
            Assert (n == 0, ExcIndexRange (n, 0, 1));
-  
+
            return dealii::DoFHandler<dim,spacedim>::default_fe_index;
          }
-       
+
 
        template <int spacedim>
        static
@@ -873,7 +873,7 @@ namespace internal
                                                                 n);
          }
 
-  
+
 
        template <int spacedim>
        static
@@ -1133,7 +1133,7 @@ namespace internal
                Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
                const unsigned int this_fe_index = *pointer;
-       
+
                Assert (this_fe_index != numbers::invalid_unsigned_int,
                        ExcInternalError());
                Assert (this_fe_index < dof_handler.finite_elements->size(),
@@ -1148,8 +1148,8 @@ namespace internal
                  pointer += (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1;
              }
          }
-       
-       
+
+
                                         /**
                                          * Get the @p local_index-th
                                          * degree of freedom
@@ -1182,7 +1182,7 @@ namespace internal
              dof_handler.vertex_dofs[vertex_index *
                                      dof_handler.selected_fe->dofs_per_vertex
                                      + local_index];
-         }  
+         }
 
 
        template<int dim, int spacedim>
@@ -1223,7 +1223,7 @@ namespace internal
                Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
                const unsigned int this_fe_index = *pointer;
-       
+
                Assert (this_fe_index != numbers::invalid_unsigned_int,
                        ExcInternalError());
                Assert (this_fe_index < dof_handler.finite_elements->size(),
@@ -1265,14 +1265,14 @@ namespace internal
 
            Assert (*pointer != numbers::invalid_unsigned_int,
                    ExcInternalError());
-    
+
            unsigned int counter = 0;
            while (true)
              {
                Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
                const unsigned int this_fe_index = *pointer;
-       
+
                if (this_fe_index == numbers::invalid_unsigned_int)
                  return counter;
                else
@@ -1317,14 +1317,14 @@ namespace internal
 
            Assert (*pointer != numbers::invalid_unsigned_int,
                    ExcInternalError());
-    
+
            unsigned int counter = 0;
            while (true)
              {
                Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
                const unsigned int this_fe_index = *pointer;
-       
+
                Assert (this_fe_index < dof_handler.finite_elements->size(),
                        ExcInternalError());
 
@@ -1333,12 +1333,12 @@ namespace internal
 
                Assert (this_fe_index != numbers::invalid_unsigned_int,
                        ExcInternalError());
-       
+
                pointer += (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1;
-               ++counter;      
+               ++counter;
              }
          }
-  
+
 
 
                                         /**
@@ -1377,13 +1377,13 @@ namespace internal
 
            Assert (*pointer != numbers::invalid_unsigned_int,
                    ExcInternalError());
-    
+
            while (true)
              {
                Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
                const unsigned int this_fe_index = *pointer;
-       
+
                Assert (this_fe_index < dof_handler.finite_elements->size(),
                        ExcInternalError());
 
@@ -1396,7 +1396,7 @@ namespace internal
                    pointer += (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1;
              }
          }
-  
+
     };
   }
 }
@@ -1409,7 +1409,7 @@ unsigned int
 DoFAccessor<dim,DH>::dof_index (const unsigned int i,
                                const unsigned int fe_index) const
 {
-                                  // access the respective DoF 
+                                  // access the respective DoF
   return internal::DoFAccessor::Implementation::get_dof_index (*this->dof_handler,
                                                               this->level(),
                                                               this->present_index,
@@ -1541,7 +1541,7 @@ namespace internal
     }
 
 
-  
+
     template <int dim, int spacedim>
     inline
     const FiniteElement<dim,spacedim> &
@@ -1561,7 +1561,7 @@ DoFAccessor<dim,DH>::get_fe (const unsigned int fe_index) const
 {
   Assert (fe_index_is_active (fe_index) == true,
          ExcMessage ("This function can only be called for active fe indices"));
-  
+
   return internal::DoFAccessor::get_fe (this->dof_handler->get_fe(), fe_index);
 }
 
@@ -1587,7 +1587,7 @@ namespace internal
     }
 
 
-    
+
     template <class DH>
     void get_dof_indices (const dealii::DoFAccessor<2,DH>   &accessor,
                          std::vector<unsigned int> &dof_indices,
@@ -1621,7 +1621,7 @@ namespace internal
        *next++ = accessor.dof_index(d,fe_index);
     }
 
-    
+
 
     template <class DH>
     void get_dof_indices (const dealii::DoFAccessor<3,DH>   &accessor,
@@ -1720,7 +1720,7 @@ DoFAccessor<structdim,DH>::get_dof_indices (std::vector<unsigned int> &dof_indic
       default:
            Assert (false, ExcNotImplemented());
     }
-  
+
 
                                   // this function really only makes
                                   // sense if either a) there are
@@ -1756,7 +1756,7 @@ DoFAccessor<structdim,DH>::line (const unsigned int i) const
   Assert (structdim > 1, ExcImpossibleInDim(structdim));
                                   // checking of 'i' happens in
                                   // line_index(i)
-  
+
   return typename internal::DoFHandler::Iterators<DH>::line_iterator
     (
       this->tria,
@@ -1802,7 +1802,7 @@ namespace internal
                                     // internal::DoFCellAccessor
     using dealii::DoFCellAccessor;
     using dealii::DoFHandler;
-    
+
 /**
  * A class with the same purpose as the similarly named class of the
  * Triangulation class. See there for more information.
@@ -1832,11 +1832,11 @@ namespace internal
                (accessor.get_fe().dofs_per_cell !=
                 accessor.get_fe().dofs_per_vertex * GeometryInfo<1>::vertices_per_cell))
              return;
-       
+
            const unsigned int dofs_per_vertex = accessor.get_fe().dofs_per_vertex,
                               dofs_per_line   = accessor.get_fe().dofs_per_line,
                               dofs_per_cell   = accessor.get_fe().dofs_per_cell;
-       
+
                                             // make sure the cache is at least
                                             // as big as we need it when
                                             // writing to the last element of
@@ -1846,11 +1846,11 @@ namespace internal
                    accessor.dof_handler->levels[accessor.present_level]
                    ->cell_dof_indices_cache.size(),
                    ExcInternalError());
-       
+
            std::vector<unsigned int>::iterator next
              = (accessor.dof_handler->levels[accessor.present_level]
                 ->cell_dof_indices_cache.begin() + accessor.present_index * dofs_per_cell);
-       
+
            for (unsigned int vertex=0; vertex<2; ++vertex)
              for (unsigned int d=0; d<dofs_per_vertex; ++d)
                *next++ = accessor.vertex_dof_index(vertex,d);
@@ -1877,7 +1877,7 @@ namespace internal
                (accessor.get_fe().dofs_per_cell !=
                 accessor.get_fe().dofs_per_vertex * GeometryInfo<2>::vertices_per_cell))
              return;
-  
+
            const unsigned int dofs_per_vertex = accessor.get_fe().dofs_per_vertex,
                               dofs_per_line   = accessor.get_fe().dofs_per_line,
                               dofs_per_quad   = accessor.get_fe().dofs_per_quad,
@@ -1926,7 +1926,7 @@ namespace internal
                (accessor.get_fe().dofs_per_cell !=
                 accessor.get_fe().dofs_per_vertex * GeometryInfo<3>::vertices_per_cell))
              return;
-  
+
            const unsigned int dofs_per_vertex = accessor.get_fe().dofs_per_vertex,
                               dofs_per_line   = accessor.get_fe().dofs_per_line,
                               dofs_per_quad   = accessor.get_fe().dofs_per_quad,
@@ -2001,7 +2001,7 @@ namespace internal
        update_cell_dof_indices_cache (const DoFCellAccessor<dealii::hp::DoFHandler<dim,spacedim> > &)
          {
 //TODO[WB]: should implement a dof indices cache for hp as well
-  
+
                                             // not implemented, but should also
                                             // not be called
            Assert (false, ExcNotImplemented());
@@ -2037,12 +2037,12 @@ namespace internal
                    (accessor.get_fe().dofs_per_cell ==
                     accessor.get_fe().dofs_per_vertex * GeometryInfo<dim>::vertices_per_cell),
                    ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
-  
+
            unsigned int *cache = &accessor.dof_handler->levels[accessor.level()]
-                                 ->cell_dof_indices_cache[accessor.present_index * accessor.get_fe().dofs_per_cell]; 
+                                 ->cell_dof_indices_cache[accessor.present_index * accessor.get_fe().dofs_per_cell];
            for (unsigned int i=0; i<accessor.get_fe().dofs_per_cell; ++i, ++cache)
              dof_indices[i] = *cache;
-         }      
+         }
 
                                         /**
                                          * Same function as above except
@@ -2057,7 +2057,7 @@ namespace internal
        get_dof_indices (const DoFCellAccessor<dealii::hp::DoFHandler<dim,spacedim> > &accessor,
                         std::vector<unsigned int>                            &dof_indices)
          {
-                                            // no caching for hp::DoFHandler implemented 
+                                            // no caching for hp::DoFHandler implemented
            accessor.dealii::DoFAccessor<dim,dealii::hp::DoFHandler<dim,spacedim> >::get_dof_indices (dof_indices,
                                                                                      accessor.active_fe_index());
          }
@@ -2095,12 +2095,12 @@ namespace internal
                    (accessor.get_fe().dofs_per_cell ==
                     accessor.get_fe().dofs_per_vertex * GeometryInfo<dim>::vertices_per_cell),
                    ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
-  
+
            unsigned int *cache = &accessor.dof_handler->levels[accessor.level()]
-                                 ->cell_dof_indices_cache[accessor.present_index * accessor.get_fe().dofs_per_cell]; 
+                                 ->cell_dof_indices_cache[accessor.present_index * accessor.get_fe().dofs_per_cell];
            for (unsigned int i=0; i<accessor.get_fe().dofs_per_cell; ++i, ++cache)
              local_values(i) = values(*cache);
-         }      
+         }
 
                                         /**
                                          * Same function as above except
@@ -2119,7 +2119,7 @@ namespace internal
                                             // no caching for hp::DoFHandler
                                             // implemented
            const unsigned int dofs_per_cell = accessor.get_fe().dofs_per_cell;
-  
+
            std::vector<unsigned int> local_dof_indices (dofs_per_cell);
            get_dof_indices (accessor, local_dof_indices);
 
@@ -2156,12 +2156,12 @@ namespace internal
                    (accessor.get_fe().dofs_per_cell ==
                     accessor.get_fe().dofs_per_vertex * GeometryInfo<dim>::vertices_per_cell),
                    ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
-  
+
            unsigned int *cache = &accessor.dof_handler->levels[accessor.level()]
-                                 ->cell_dof_indices_cache[accessor.present_index * accessor.get_fe().dofs_per_cell]; 
+                                 ->cell_dof_indices_cache[accessor.present_index * accessor.get_fe().dofs_per_cell];
            for (unsigned int i=0; i<accessor.get_fe().dofs_per_cell; ++i, ++cache)
              values(*cache) = local_values(i);
-         }      
+         }
 
 
 
@@ -2175,14 +2175,14 @@ namespace internal
                                             // no caching for hp::DoFHandler
                                             // implemented
            const unsigned int dofs_per_cell = accessor.get_fe().dofs_per_cell;
-  
+
            std::vector<unsigned int> local_dof_indices (dofs_per_cell);
            get_dof_indices (accessor, local_dof_indices);
 
            for (unsigned int i=0; i<dofs_per_cell; ++i)
              values(local_dof_indices[i]) = local_values(i);
          }
-       
+
 
                                         /**
                                          * Do what the active_fe_index
@@ -2301,7 +2301,7 @@ namespace internal
                                  ->cell_dof_indices_cache[accessor.present_index * n_dofs];
 
                                   // distribute cell vector
-           global_destination.add(n_dofs, dofs, 
+           global_destination.add(n_dofs, dofs,
                                   &(*const_cast<dealii::Vector<number>*>(&local_source))(0));
          }
 
@@ -2330,11 +2330,11 @@ namespace internal
            const unsigned int n_dofs = local_source.size();
 
 //TODO[WB/MK]: This function could me made more efficient because it allocates memory, which could be avoided by passing in another argument as a scratch array. This should be fixed eventually
-  
+
                                   // get indices of dofs
            std::vector<unsigned int> dofs (n_dofs);
            accessor.get_dof_indices (dofs);
-  
+
                                   // distribute cell vector
            global_destination.add (dofs, local_source);
          }
@@ -2381,7 +2381,7 @@ namespace internal
 
                                   // distribute cell matrices
            for (unsigned int i=0; i<n_dofs; ++i)
-             global_destination.add(dofs[i], n_dofs, dofs, 
+             global_destination.add(dofs[i], n_dofs, dofs,
                                     &local_source(i,0));
          }
 
@@ -2414,11 +2414,11 @@ namespace internal
            const unsigned int n_dofs = local_source.size();
 
 //TODO[WB/MK]: This function could me made more efficient because it allocates memory, which could be avoided by passing in another argument as a scratch array.
-  
+
                                   // get indices of dofs
            std::vector<unsigned int> dofs (n_dofs);
            accessor.get_dof_indices (dofs);
-  
+
                                   // distribute cell vector
            global_destination.add(dofs,local_source);
          }
@@ -2473,7 +2473,7 @@ DoFCellAccessor<DH>::neighbor (const unsigned int i) const
        this->neighbor_level (i),
        this->neighbor_index (i),
        this->dof_handler);
-  
+
 #ifdef DEBUG
   if (q.state() != IteratorState::past_the_end)
     Assert (q->used(), TriaAccessorExceptions::ExcUnusedCellAsNeighbor());
@@ -2492,7 +2492,7 @@ DoFCellAccessor<DH>::child (const unsigned int i) const
        this->level()+1,
        this->child_index (i),
        this->dof_handler);
-  
+
 #ifdef DEBUG
   if (q.state() != IteratorState::past_the_end)
     Assert (q->used(), TriaAccessorExceptions::ExcUnusedCellAsChild());
@@ -2510,7 +2510,7 @@ DoFCellAccessor<DH>::face (const unsigned int i) const
   Assert (static_cast<unsigned int>(this->level()) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  const unsigned int dim = DH::dimension;  
+  const unsigned int dim = DH::dimension;
   Assert (dim > 1, ExcImpossibleInDim(1));
 
   switch (dim)
@@ -2521,14 +2521,14 @@ DoFCellAccessor<DH>::face (const unsigned int i) const
               0,
               this->line_index (i),
               this->dof_handler);
-           
+
       case 3:
            return typename internal::DoFHandler::Iterators<DH>::face_iterator
              (this->tria,
               0,
               this->quad_index (i),
               this->dof_handler);
-           
+
       default:
            Assert (false, ExcNotImplemented());
            return typename internal::DoFHandler::Iterators<DH>::face_iterator();
index 13903fda7c8075e7952105d866c36f36799742cd..038824429967f575d68a2457860711aa9c7f1d03 100644 (file)
@@ -785,7 +785,7 @@ std::size_t MatrixFree<number,Transformation>::memory_consumption () const
   std::size_t glob_size = derivatives.memory_consumption() +
     indices_local_to_global.memory_consumption() +
     constraints.memory_consumption() +
-    small_matrix.memory_consumption() + 
+    small_matrix.memory_consumption() +
     diagonal_values.memory_consumption() + sizeof(*this);
   return glob_size;
 }
@@ -1060,7 +1060,7 @@ void LaplaceProblem<dim>::setup_system ()
   system_matrix.get_constraints().close();
   std::cout.precision(4);
   std::cout << "System matrix memory consumption: "
-           << (double)system_matrix.memory_consumption()*std::pow(2.,-20.) 
+           << (double)system_matrix.memory_consumption()*std::pow(2.,-20.)
            << " MBytes."
            << std::endl;
 
@@ -1236,7 +1236,7 @@ void LaplaceProblem<dim>::assemble_multigrid ()
                                                (transpose
                                                 (fe_values.inverse_jacobian(q)) *
                                                 fe_values.inverse_jacobian(q)) *
-                                               fe_values.JxW(q) * 
+                                               fe_values.JxW(q) *
                                                coefficient_values[q]);
 
       ++cell_no[level];
index 2e79616d83cdb26ca1d504acab0bc0dde19a6432..753f24868eac0021b8683f0cb0bd28ca173d72a1 100644 (file)
@@ -1541,7 +1541,7 @@ void DGMethod<dim>::run ()
        {
          GridGenerator::hyper_cube (triangulation);
 
-         triangulation.refine_global (3);
+         triangulation.refine_global (5);
        }
       else
        refine_grid ();
@@ -1599,7 +1599,7 @@ void DGMethod<dim>::run ()
                                       // two solutions for equality.
       solution1-=solution2;
       const double difference=solution1.linfty_norm();
-      if (difference>1e-13)
+      if (difference>1e-12)
        std::cout << "solution1 and solution2 differ!!" << std::endl;
       else
        std::cout << "solution1 and solution2 coincide." << std::endl;
index 965cc2a07218ee7022087f2bed190d5920c0050b..50ab262717bee60fb6384fbd75aa5f4a2a7cac80 100644 (file)
@@ -556,6 +556,9 @@ void LaplaceProblem<dim>::assemble_system ()
          }
 
 
+      cell->distribute_local_to_global (cell_rhs, system_rhs);
+      cell->distribute_local_to_global (cell_matrix, system_matrix);
+      /*
       cell->get_dof_indices (local_dof_indices);
       for (unsigned int i=0; i<dofs_per_cell; ++i)
        {
@@ -566,6 +569,7 @@ void LaplaceProblem<dim>::assemble_system ()
          
          system_rhs(local_dof_indices[i]) += cell_rhs(i);
        }
+      */
     }
 
                                   // With the matrix so built, we use
index fb3fc0ca686bc9ab5064f00b0685fcf15b2b8dc8..391c9bbf2aff75532a5c474f4cde8299e9057f61 100644 (file)
@@ -164,7 +164,7 @@ class BlockIndices;
  * sparsity pattern and the constraints; third, the global matrix is
  * assembled; and fourth, the matrix is finally condensed. To do these steps,
  * you have (at least) two possibilities:
- * 
+ *
  * <ul>
  * <li> Use two different sparsity patterns and two different matrices: you
  * may eliminate the lines and rows connected with a constraint and create a
@@ -228,10 +228,10 @@ class BlockIndices;
  * PETSc/Trilinos matrices, you can either copy an already condensed deal.II
  * matrix, or build the PETSc/Trilinos matrix in the already condensed form,
  * see the discussion below.
- * 
- * 
+ *
+ *
  * <h5>Condensing vectors</h5>
- * 
+ *
  * Condensing vectors works exactly as described above for matrices. Note that
  * condensation is an idempotent operation, i.e. doing it more than once on a
  * vector or matrix yields the same result as doing it only once: once an
@@ -260,14 +260,14 @@ class BlockIndices;
  * The use of ConstraintMatrix for implementing Dirichlet boundary conditions
  * is discussed in the @ref step_22 "step-22" tutorial program.
  *
- * 
+ *
  * <h3>Avoiding explicit condensation</h3>
  *
  * Sometimes, one wants to avoid explicit condensation of a linear system
  * after it has been built at all. There are two main reasons for wanting to
  * do so:
  *
- * <ul> 
+ * <ul>
  * <li>
  * Condensation is an expensive operation, in particular if there
  * are many constraints and/or if the matrix has many nonzero entries. Both
@@ -305,10 +305,10 @@ class BlockIndices;
  * matrices and right hand side vectors, whereas the distribute() function
  * discussed below is applied to the solution vector after solving the linear
  * system.
- * 
- * 
+ *
+ *
  * <h3>Distributing constraints</h3>
- * 
+ *
  * After solving the condensed system of equations, the solution vector has
  * to be redistributed. This is done by the two distribute() functions, one
  * working with two vectors, one working in-place. The operation of
@@ -524,7 +524,7 @@ class ConstraintMatrix : public Subscriptor
                                      * again.
                                      */
     void shift (const unsigned int offset);
-    
+
                                     /**
                                      * Clear all entries of this
                                      * matrix. Reset the flag determining
@@ -546,7 +546,7 @@ class ConstraintMatrix : public Subscriptor
                                      * @name Querying constraints
                                      * @{
                                      */
-    
+
                                     /**
                                      * Return number of constraints stored in
                                      * this matrix.
@@ -589,7 +589,7 @@ class ConstraintMatrix : public Subscriptor
                                      * from one.
                                      */
     bool is_identity_constrained (const unsigned int index) const;
-    
+
                                     /**
                                      * Return the maximum number of other
                                      * dofs that one dof is constrained
@@ -671,7 +671,7 @@ class ConstraintMatrix : public Subscriptor
                                     /**
                                      * @}
                                      */
-    
+
                                     /**
                                      * @name Eliminating constraints from linear systems after their creation
                                      * @{
@@ -810,7 +810,7 @@ class ConstraintMatrix : public Subscriptor
                                      * patterns.
                                      */
     void condense (BlockCompressedSimpleSparsityPattern &sparsity) const;
-    
+
 
                                     /**
                                      * Condense a given matrix. The
@@ -844,7 +844,7 @@ class ConstraintMatrix : public Subscriptor
                                      */
     template <typename number>
     void condense (BlockSparseMatrix<number> &matrix) const;
-    
+
                                     /**
                                      * Condense the given vector @p
                                      * uncondensed into @p condensed. It is
@@ -936,7 +936,7 @@ class ConstraintMatrix : public Subscriptor
                                      * @name Eliminating constraints from linear systems during their creation
                                      * @{
                                      */
-    
+
                                      /**
                                       * This function takes a vector of
                                       * local contributions (@p
@@ -1217,7 +1217,7 @@ class ConstraintMatrix : public Subscriptor
     template <class VectorType>
     void set_zero (VectorType &vec) const;
 
-    
+
                                     /**
                                      * @}
                                      */
@@ -1226,7 +1226,7 @@ class ConstraintMatrix : public Subscriptor
                                      * @name Dealing with constraints after solving a linear system
                                      * @{
                                      */
-    
+
                                     /**
                                      * Re-distribute the elements of the
                                      * vector @p condensed to @p
@@ -1329,7 +1329,7 @@ class ConstraintMatrix : public Subscriptor
                    << "to another DoF with number " << arg1
                    << ", which however is constrained by this object. This is not"
                    << " allowed.");
-    
+
   private:
 
                                     /**
@@ -1457,12 +1457,12 @@ class ConstraintMatrix : public Subscriptor
                                      * misses. This should also be fixed by
                                      * using the O(1) algorithm to access
                                      * the fields of this array.
-                                     * 
+                                     *
                                      * The field is useful in a number of
                                      * other contexts as well, though.
                                      */
     std::vector<bool> constraint_line_exists;
-       
+
                                     /**
                                      * Store whether the arrays are sorted.
                                      * If so, no new entries can be added.
@@ -1558,9 +1558,9 @@ class ConstraintMatrix : public Subscriptor
                                     */
     std::vector<ConstraintLine>::iterator
     find_constraint (const unsigned int line);
-    
+
 #ifdef DEAL_II_USE_TRILINOS
-//TODO: Make use of the following member thread safe    
+//TODO: Make use of the following member thread safe
                                      /**
                                       * This vector is used to import data
                                       * within the distribute function.
@@ -1601,8 +1601,8 @@ ConstraintMatrix::add_line (const unsigned int line)
 {
   Assert (sorted==false, ExcMatrixIsClosed());
 
-  
-  
+
+
                                   // check whether line already exists; it
                                   // may, in which case we can just quit
   if ((line < constraint_line_exists.size())
@@ -1615,7 +1615,7 @@ ConstraintMatrix::add_line (const unsigned int line)
   if (line >= constraint_line_exists.size())
     constraint_line_exists.resize (line+1, false);
   constraint_line_exists[line] = true;
-  
+
                                   // push a new line to the end of the
                                   // list
   lines.push_back (ConstraintLine());
@@ -1654,7 +1654,7 @@ ConstraintMatrix::add_entry (const unsigned int line,
                ExcEntryAlreadyExists(line, column, p->second, value));
        return;
       }
-  
+
   line_ptr->entries.push_back (std::make_pair(column,value));
 }
 
@@ -1672,7 +1672,7 @@ ConstraintMatrix::set_inhomogeneity (const unsigned int line,
 
 inline
 bool
-ConstraintMatrix::is_constrained (const unsigned int index) const 
+ConstraintMatrix::is_constrained (const unsigned int index) const
 {
   return ((index < constraint_line_exists.size())
           &&
@@ -1683,9 +1683,9 @@ ConstraintMatrix::is_constrained (const unsigned int index) const
 
 inline
 bool
-ConstraintMatrix::is_inhomogeneously_constrained (const unsigned int index) const 
+ConstraintMatrix::is_inhomogeneously_constrained (const unsigned int index) const
 {
-  const std::vector<ConstraintLine>::const_iterator position 
+  const std::vector<ConstraintLine>::const_iterator position
     = find_constraint(index);
   return position!=lines.end() ? position->inhomogeneity != 0 : false;
 }
@@ -1693,7 +1693,7 @@ ConstraintMatrix::is_inhomogeneously_constrained (const unsigned int index) cons
 
 
 inline
-std::vector<ConstraintMatrix::ConstraintLine>::const_iterator 
+std::vector<ConstraintMatrix::ConstraintLine>::const_iterator
 ConstraintMatrix::find_constraint (const unsigned int line) const
 {
   if (is_constrained(line) == false)
@@ -1720,7 +1720,7 @@ ConstraintMatrix::find_constraint (const unsigned int line) const
 
 
 inline
-std::vector<ConstraintMatrix::ConstraintLine>::iterator 
+std::vector<ConstraintMatrix::ConstraintLine>::iterator
 ConstraintMatrix::find_constraint (const unsigned int line)
 {
   Assert (sorted==false, ExcMatrixIsClosed());
index b552fd6670d74925c47ac85aec287b8f83c5d39e..85bce7a21cb1a8774711e4436c157dff34608dd5 100644 (file)
@@ -163,9 +163,9 @@ namespace PETScWrappers
                                         */
       static
 #ifdef PETSC_USE_64BIT_INDICES
-      PetscErrorCode 
+      PetscErrorCode
 #else
-      int 
+      int
 #endif
       convergence_test (KSP                 ksp,
 #ifdef PETSC_USE_64BIT_INDICES
index 7588fc86915aac2535db5658a3d9d4bcc0360b88..ba27a9bf4e5606c56a944c7812fee99a730b50db 100755 (executable)
@@ -50,7 +50,7 @@ namespace TrilinosWrappers
   namespace MPI
   {
 
-/** 
+/**
  * This class implements a wrapper to use the Trilinos distributed
  * vector class Epetra_FEVector. This class is derived from the
  * TrilinosWrappers::VectorBase class and provides all functionality
@@ -120,11 +120,11 @@ namespace TrilinosWrappers
  * writes. If it encounters an operation of the opposite kind, it calls
  * compress() and flips the state. This can sometimes lead to very
  * confusing behavior, in code that may for example look like this:
- * 
- * @verbatim 
+ *
+ * @verbatim
  * TrilinosWrappers::Vector vector;
- * // do some write operations on the vector 
- * for (unsigned int i=0; i<vector->size(); ++i) 
+ * // do some write operations on the vector
+ * for (unsigned int i=0; i<vector->size(); ++i)
  *   vector(i) = i;
  *
  *                   // do some additions to vector elements, but
@@ -223,7 +223,7 @@ namespace TrilinosWrappers
                                          * Destructor.
                                          */
        ~Vector ();
-       
+
                                       /**
                                        * Reinit functionality. This
                                        * function destroys the old
@@ -330,7 +330,7 @@ namespace TrilinosWrappers
                                        * &input_map) function.
                                        */
        template <typename Number>
-       Vector & 
+       Vector &
        operator = (const ::dealii::Vector<Number> &v);
 
                                       /**
@@ -373,7 +373,7 @@ namespace TrilinosWrappers
                                        * for example done during the
                                        * solution of linear systems.
                                        */
-       void import_nonlocal_data_for_fe 
+       void import_nonlocal_data_for_fe
          (const dealii::TrilinosWrappers::SparseMatrix &matrix,
           const Vector                                 &vector);
 
@@ -422,7 +422,7 @@ namespace TrilinosWrappers
     {
       u.swap (v);
     }
-  
+
 
 #ifndef DOXYGEN
 
@@ -433,7 +433,7 @@ namespace TrilinosWrappers
                     map (InputMap)
     {
       vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
-      
+
       const int min_my_id = map.MinMyGID();
       const int size = map.NumMyElements();
 
@@ -441,7 +441,7 @@ namespace TrilinosWrappers
              ExcDimensionMismatch(map.MaxLID(), size-1));
 
                                   // Need to copy out values, since the
-                                  // deal.II might not use doubles, so 
+                                  // deal.II might not use doubles, so
                                   // that a direct access is not possible.
       std::vector<int> indices (size);
       std::vector<double> values (size);
@@ -451,14 +451,14 @@ namespace TrilinosWrappers
          values[i] = v(i);
        }
 
-      const int ierr = vector->ReplaceGlobalValues (size, &indices[0], 
+      const int ierr = vector->ReplaceGlobalValues (size, &indices[0],
                                                    &values[0]);
 
       AssertThrow (ierr == 0, VectorBase::ExcTrilinosError(ierr));
     }
 
-  
-  
+
+
     inline
     Vector &
     Vector::operator = (const TrilinosScalar s)
@@ -470,7 +470,7 @@ namespace TrilinosWrappers
 
 
     template <typename Number>
-    Vector & 
+    Vector &
     Vector::operator = (const ::dealii::Vector<Number> &v)
     {
       if (size() != v.size())
@@ -481,13 +481,13 @@ namespace TrilinosWrappers
          map = Epetra_Map (v.size(), 0, Epetra_SerialComm());
 #endif
        }
-      
+
       *this = Vector(map, v);
 
       return *this;
     }
-    
-    
+
+
 #endif
 
   } /* end of namespace MPI */
@@ -626,7 +626,7 @@ namespace TrilinosWrappers
                                        * the right hand argument.
                                        */
       Vector &
-       operator = (const Vector &V); 
+       operator = (const Vector &V);
 
     private:
                                       /**
@@ -672,8 +672,8 @@ namespace TrilinosWrappers
     *this = v;
   }
 
-  
-  
+
+
   inline
   Vector &
   Vector::operator = (const TrilinosScalar s)
@@ -684,7 +684,7 @@ namespace TrilinosWrappers
   }
 
   template <typename Number>
-  Vector & 
+  Vector &
   Vector::operator = (const ::dealii::Vector<Number> &v)
   {
     if (size() != v.size())
@@ -706,7 +706,7 @@ namespace TrilinosWrappers
            ExcDimensionMismatch(map.MaxLID(), size-1));
 
                                   // Need to copy out values, since the
-                                  // deal.II might not use doubles, so 
+                                  // deal.II might not use doubles, so
                                   // that a direct access is not possible.
     std::vector<int> indices (size);
     std::vector<double> values (size);
@@ -716,13 +716,13 @@ namespace TrilinosWrappers
        values[i] = v(i);
       }
 
-    const int ierr = vector->ReplaceGlobalValues (size, &indices[0], 
+    const int ierr = vector->ReplaceGlobalValues (size, &indices[0],
                                                  &values[0]);
     AssertThrow (ierr == 0, VectorBase::ExcTrilinosError(ierr));
 
     return *this;
   }
-  
+
 #endif
 
 
index 923e32657bcd3ac87b62988ed5e70ef0f66b4d11..04a35a43ffba61101a87b3e130d0702298bdb62b 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2008 by the deal.II authors
+//    Copyright (C) 2008, 2009 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -58,7 +58,7 @@ namespace TrilinosWrappers
 /**
  * A namespace for internal implementation details of the
  * TrilinosWrapper members.
- *  
+ *
  * @ingroup TrilinosWrappers
  */
   namespace internal
@@ -116,14 +116,14 @@ namespace TrilinosWrappers
                                        * this allows us to make the
                                        * assignment operator const.
                                        */
-       const VectorReference & 
+       const VectorReference &
          operator = (const VectorReference &r) const;
 
                                        /**
                                        * Set the referenced element of the
                                        * vector to <tt>s</tt>.
                                        */
-       const VectorReference & 
+       const VectorReference &
          operator = (const TrilinosScalar &s) const;
 
                                        /**
@@ -131,7 +131,7 @@ namespace TrilinosWrappers
                                        * referenced element of the
                                        * vector->
                                        */
-       const VectorReference & 
+       const VectorReference &
          operator += (const TrilinosScalar &s) const;
 
                                        /**
@@ -139,7 +139,7 @@ namespace TrilinosWrappers
                                        * referenced element of the
                                        * vector->
                                        */
-       const VectorReference & 
+       const VectorReference &
          operator -= (const TrilinosScalar &s) const;
 
                                       /**
@@ -147,7 +147,7 @@ namespace TrilinosWrappers
                                        * element of the vector by
                                        * <tt>s</tt>.
                                        */
-       const VectorReference & 
+       const VectorReference &
          operator *= (const TrilinosScalar &s) const;
 
                                        /**
@@ -155,7 +155,7 @@ namespace TrilinosWrappers
                                        * element of the vector by
                                        * <tt>s</tt>.
                                        */
-       const VectorReference & 
+       const VectorReference &
          operator /= (const TrilinosScalar &s) const;
 
                                        /**
@@ -262,7 +262,7 @@ namespace TrilinosWrappers
       typedef const internal::VectorReference const_reference;
 
                                       /**
-                                       * @name 1: Basic Object-handling 
+                                       * @name 1: Basic Object-handling
                                        */
                                       //@{
 
@@ -365,7 +365,7 @@ namespace TrilinosWrappers
                                        * distribution as the calling
                                        * vector.
                                        */
-      VectorBase & 
+      VectorBase &
        operator = (const VectorBase &v);
 
                                        /**
@@ -386,7 +386,7 @@ namespace TrilinosWrappers
                                        * &input_map) function.
                                        */
       template <typename Number>
-      VectorBase & 
+      VectorBase &
        operator = (const ::dealii::Vector<Number> &v);
 
                                        /**
@@ -677,7 +677,7 @@ namespace TrilinosWrappers
                                        /**
                                         * Simple vector addition, equal
                                         * to the <tt>operator
-                                        * +=</tt>. 
+                                        * +=</tt>.
                                        *
                                        * Though, if the second argument
                                         * <tt>allow_different_maps</tt>
@@ -692,7 +692,7 @@ namespace TrilinosWrappers
                                         * of a vector, i.e. <tt>*this =
                                         * a*V</tt>.
                                         */
-      void add (const TrilinosScalar  a, 
+      void add (const TrilinosScalar  a,
                const VectorBase     &V);
 
                                        /**
@@ -700,9 +700,9 @@ namespace TrilinosWrappers
                                         * vectors, i.e. <tt>*this = a*V
                                         * + b*W</tt>.
                                         */
-      void add (const TrilinosScalar  a, 
+      void add (const TrilinosScalar  a,
                const VectorBase     &V,
-               const TrilinosScalar  b, 
+               const TrilinosScalar  b,
                const VectorBase     &W);
 
                                        /**
@@ -759,16 +759,16 @@ namespace TrilinosWrappers
                                         * Assignment <tt>*this =
                                         * a*V</tt>.
                                         */
-      void equ (const TrilinosScalar  a, 
+      void equ (const TrilinosScalar  a,
                const VectorBase     &V);
 
                                        /**
                                         * Assignment <tt>*this = a*V +
                                         * b*W</tt>.
                                         */
-      void equ (const TrilinosScalar  a, 
+      void equ (const TrilinosScalar  a,
                const VectorBase     &V,
-               const TrilinosScalar  b, 
+               const TrilinosScalar  b,
                const VectorBase     &W);
 
                                        /**
@@ -1028,8 +1028,8 @@ namespace TrilinosWrappers
              vector.last_action = Add;
            }
 
-         const int ierr = vector.vector->SumIntoGlobalValues (1, 
-                                                              (const int*)(&index), 
+         const int ierr = vector.vector->SumIntoGlobalValues (1,
+                                                              (const int*)(&index),
                                                               &value);
          AssertThrow (ierr == 0, ExcTrilinosError(ierr));
          vector.compressed = false;
@@ -1128,7 +1128,7 @@ namespace TrilinosWrappers
     const int ierr = vector->GlobalAssemble(last_action);
     AssertThrow (ierr == 0, ExcTrilinosError(ierr));
     last_action = Zero;
-  
+
     compressed = true;
   }
 
@@ -1196,8 +1196,8 @@ namespace TrilinosWrappers
        const int local_row = vector->Map().LID(indices[i]);
        if (local_row == -1)
          {
-           const int ierr = vector->ReplaceGlobalValues (1, 
-                                                         (const int*)(&row), 
+           const int ierr = vector->ReplaceGlobalValues (1,
+                                                         (const int*)(&row),
                                                          &values[i]);
            AssertThrow (ierr == 0, ExcTrilinosError(ierr));
            compressed = false;
@@ -1254,8 +1254,8 @@ namespace TrilinosWrappers
        const int local_row = vector->Map().LID(row);
        if (local_row == -1)
          {
-           const int ierr = vector->SumIntoGlobalValues (1, 
-                                                         (const int*)(&row), 
+           const int ierr = vector->SumIntoGlobalValues (1,
+                                                         (const int*)(&row),
                                                          &values[i]);
            AssertThrow (ierr == 0, ExcTrilinosError(ierr));
            compressed = false;
@@ -1383,7 +1383,7 @@ namespace TrilinosWrappers
 
     const TrilinosScalar * ptr  = start_ptr;
 
-                                       // add up elements 
+                                       // add up elements
                                       // TODO: This
                                       // won't work in parallel like
                                       // this. Find out a better way to
@@ -1771,7 +1771,7 @@ namespace TrilinosWrappers
     Assert (size() == w.size(),
            ExcDimensionMismatch (size(), w.size()));
 
-    const int ierr = vector->ReciprocalMultiply(1.0, *(w.vector), 
+    const int ierr = vector->ReciprocalMultiply(1.0, *(w.vector),
                                                *(v.vector), 0.0);
 
     AssertThrow (ierr == 0, ExcTrilinosError(ierr));
index 0acdfcb5cd69b576a27c9bbb34532c8fc7aaa3f4..7dafcffe43e5c82f4563e69bba9209ba5a5d060f 100644 (file)
@@ -129,7 +129,7 @@ ConstraintMatrix::add_entries (const unsigned int                        line,
     {
       Assert (line != col_val_pair->first,
              ExcMessage ("Can't constrain a degree of freedom to itself"));
-      
+
       for (std::vector<std::pair<unsigned int,double> >::const_iterator
              p=line_ptr->entries.begin();
           p != line_ptr->entries.end(); ++p)
@@ -142,7 +142,7 @@ ConstraintMatrix::add_entries (const unsigned int                        line,
                                          p->second, col_val_pair->second));
            break;
          }
-      
+
       line_ptr->entries.push_back (*col_val_pair);
     }
 }
@@ -172,7 +172,7 @@ void ConstraintMatrix::close ()
                                         line->entries.end(),
                                         &check_zero_weight),
                         line->entries.end());
-  
+
                                   // replace references to dofs that
                                   // are themselves constrained. note
                                   // that because we may replace
@@ -219,7 +219,7 @@ void ConstraintMatrix::close ()
                                                 // further
                                                 // constrained:
                chained_constraint_replaced = true;
-               
+
                                                 // look up the chain
                                                 // of constraints for
                                                 // this entry
@@ -228,7 +228,7 @@ void ConstraintMatrix::close ()
 
                Assert (dof_index != line->line,
                        ExcMessage ("Cycle in constraints detected!"));
-               
+
                                                 // find the line
                                                 // corresponding to
                                                 // this entry. note
@@ -280,7 +280,7 @@ void ConstraintMatrix::close ()
                      std::make_pair (constrained_line->entries[0].first,
                                      constrained_line->entries[0].second *
                                      weight);
-               
+
                    for (unsigned int i=1; i<constrained_line->entries.size(); ++i)
                      line->entries
                        .push_back (std::make_pair (constrained_line->entries[i].first,
@@ -307,7 +307,7 @@ void ConstraintMatrix::close ()
 
                line->inhomogeneity += constrained_line->inhomogeneity *
                                       weight;
-               
+
                                                 // now that we're here, do
                                                 // not increase index by
                                                 // one but rather make
@@ -394,7 +394,7 @@ void ConstraintMatrix::close ()
                 }
               else
                 new_entries.push_back (line->entries[j]);
-            
+
             Assert (new_entries.size() == line->entries.size() - duplicates,
                     ExcInternalError());
 
@@ -410,7 +410,7 @@ void ConstraintMatrix::close ()
                         ExcInternalError());
               }
 
-            
+
                                              // replace old list of
                                              // constraints for this
                                              // dof by the new one and
@@ -418,7 +418,7 @@ void ConstraintMatrix::close ()
             line->entries.swap (new_entries);
             break;
           }
-      
+
                                       // finally do the following
                                       // check: if the sum of
                                       // weights for the
@@ -455,7 +455,7 @@ void ConstraintMatrix::close ()
          line->inhomogeneity /= sum;
        }
     }
-  
+
 #ifdef DEBUG
                                   // if in debug mode: check that no
                                   // dof is constraint to another dof
@@ -480,7 +480,7 @@ void ConstraintMatrix::close ()
                ExcDoFConstrainedToConstrainedDoF(line->line, entry->first));
       };
 #endif
-  
+
   sorted = true;
 }
 
@@ -492,7 +492,7 @@ void ConstraintMatrix::merge (const ConstraintMatrix &other_constraints)
                                   // constraints in the two objects
                                   // are for different degrees of
                                   // freedom
-#ifdef DEBUG  
+#ifdef DEBUG
   if (true)
     {
                                       // first insert all dofs in
@@ -566,7 +566,7 @@ void ConstraintMatrix::merge (const ConstraintMatrix &other_constraints)
   std::vector<std::pair<unsigned int,double> > tmp;
   std::vector<std::vector<ConstraintLine>::const_iterator> tmp_other_lines;
   for (std::vector<ConstraintLine>::iterator line=lines.begin();
-       line!=lines.end(); ++line) 
+       line!=lines.end(); ++line)
     {
                                       // copy the line of old object
                                       // modulo dofs constrained in
@@ -586,9 +586,9 @@ void ConstraintMatrix::merge (const ConstraintMatrix &other_constraints)
       tmp_other_lines.clear ();
       tmp_other_lines.reserve (line->entries.size());
 
-      
+
       bool entries_to_resolve = false;
-      
+
       for (unsigned int i=0; i<line->entries.size(); ++i)
        {
          if (other_constraints.sorted == true)
@@ -624,7 +624,7 @@ void ConstraintMatrix::merge (const ConstraintMatrix &other_constraints)
            {
              std::vector<ConstraintLine>::const_iterator
                it = other_constraints.lines.end ();
-             
+
              for (std::vector<ConstraintLine>::const_iterator
                     p=other_constraints.lines.begin();
                   p!=other_constraints.lines.end(); ++p)
@@ -636,7 +636,7 @@ void ConstraintMatrix::merge (const ConstraintMatrix &other_constraints)
 
              tmp_other_lines.push_back (it);
            };
-         
+
          if (tmp_other_lines.back() != other_constraints.lines.end ())
            entries_to_resolve = true;
        };
@@ -683,7 +683,7 @@ void ConstraintMatrix::merge (const ConstraintMatrix &other_constraints)
                   j!=tmp_other_lines[i]->entries.end(); ++j)
                tmp.push_back (std::make_pair(j->first, j->second*weight));
 
-             line->inhomogeneity += tmp_other_lines[i]->inhomogeneity *  
+             line->inhomogeneity += tmp_other_lines[i]->inhomogeneity *
                line->entries[i].second;
            };
        };
@@ -691,9 +691,9 @@ void ConstraintMatrix::merge (const ConstraintMatrix &other_constraints)
                                       // newly resolved line
       line->entries.swap (tmp);
     };
-  
-      
-  
+
+
+
                                   // next action: append new lines at
                                   // the end
   lines.insert (lines.end(),
@@ -715,12 +715,12 @@ void ConstraintMatrix::shift (const unsigned int offset)
 {
   constraint_line_exists.insert (constraint_line_exists.begin(), offset,
                                 false);
-  
+
   for (std::vector<ConstraintLine>::iterator i = lines.begin();
        i != lines.end(); i++)
     {
       i->line += offset;
-      for (std::vector<std::pair<unsigned int,double> >::iterator 
+      for (std::vector<std::pair<unsigned int,double> >::iterator
             j = i->entries.begin();
           j != i->entries.end(); j++)
        j->first += offset;
@@ -735,7 +735,7 @@ void ConstraintMatrix::clear ()
     std::vector<ConstraintLine> tmp;
     lines.swap (tmp);
   }
-  
+
   {
     std::vector<bool> tmp;
     constraint_line_exists.swap (tmp);
@@ -747,7 +747,7 @@ void ConstraintMatrix::clear ()
     vec_distribute.reset();
   }
 #endif
-  
+
   sorted = false;
 }
 
@@ -774,17 +774,17 @@ void ConstraintMatrix::condense (const SparsityPattern &uncondensed,
   unsigned int                                shift           = 0;
   unsigned int n_rows = uncondensed.n_rows();
 
-  if (next_constraint == lines.end()) 
+  if (next_constraint == lines.end())
                                     // if no constraint is to be handled
     for (unsigned int row=0; row!=n_rows; ++row)
       new_line.push_back (row);
   else
-    for (unsigned int row=0; row!=n_rows; ++row) 
+    for (unsigned int row=0; row!=n_rows; ++row)
       if (row == next_constraint->line)
        {
                                           // this line is constrained
          new_line.push_back (-1);
-                                          // note that @p{lines} is ordered      
+                                          // note that @p{lines} is ordered
          ++shift;
          ++next_constraint;
          if (next_constraint == lines.end())
@@ -817,7 +817,7 @@ void ConstraintMatrix::condense (const SparsityPattern &uncondensed,
           j<uncondensed.get_rowstart_indices()[row+1]; ++j)
        if (new_line[uncondensed.get_column_numbers()[j]] != -1)
          condensed.add (new_line[row], new_line[uncondensed.get_column_numbers()[j]]);
-       else 
+       else
          {
                                             // let c point to the constraint
                                             // of this column
@@ -825,7 +825,7 @@ void ConstraintMatrix::condense (const SparsityPattern &uncondensed,
            while (c->line != uncondensed.get_column_numbers()[j])
              ++c;
 
-           for (unsigned int q=0; q!=c->entries.size(); ++q) 
+           for (unsigned int q=0; q!=c->entries.size(); ++q)
              condensed.add (new_line[row], new_line[c->entries[q].first]);
          }
     else
@@ -836,10 +836,10 @@ void ConstraintMatrix::condense (const SparsityPattern &uncondensed,
                                           // for each entry: distribute
          if (new_line[uncondensed.get_column_numbers()[j]] != -1)
                                             // column is not constrained
-           for (unsigned int q=0; q!=next_constraint->entries.size(); ++q) 
+           for (unsigned int q=0; q!=next_constraint->entries.size(); ++q)
              condensed.add (new_line[next_constraint->entries[q].first],
                             new_line[uncondensed.get_column_numbers()[j]]);
-       
+
          else
                                             // not only this line but
                                             // also this col is constrained
@@ -848,13 +848,13 @@ void ConstraintMatrix::condense (const SparsityPattern &uncondensed,
                                               // of this column
              std::vector<ConstraintLine>::const_iterator c = lines.begin();
              while (c->line != uncondensed.get_column_numbers()[j]) ++c;
-             
+
              for (unsigned int p=0; p!=c->entries.size(); ++p)
                for (unsigned int q=0; q!=next_constraint->entries.size(); ++q)
                  condensed.add (new_line[next_constraint->entries[q].first],
                                 new_line[c->entries[p].first]);
            };
-       
+
        ++next_constraint;
       };
 
@@ -869,7 +869,7 @@ void ConstraintMatrix::condense (SparsityPattern &sparsity) const
   Assert (sparsity.is_compressed() == false, ExcMatrixIsClosed());
   Assert (sparsity.n_rows() == sparsity.n_cols(),
          ExcNotQuadratic());
-  
+
                                   // store for each index whether it must be
                                   // distributed or not. If entry is
                                   // numbers::invalid_unsigned_int,
@@ -879,7 +879,7 @@ void ConstraintMatrix::condense (SparsityPattern &sparsity) const
                                   // index
   std::vector<unsigned int> distribute(sparsity.n_rows(),
                                        numbers::invalid_unsigned_int);
-  
+
   for (unsigned int c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = c;
 
@@ -926,7 +926,7 @@ void ConstraintMatrix::condense (SparsityPattern &sparsity) const
                                                    // sparsity.colnums[j]
                   for (unsigned int q=0;
                        q!=lines[distribute[column]].entries.size();
-                       ++q) 
+                       ++q)
                     sparsity.add (row,
                                   lines[distribute[column]].entries[q].first);
                 }
@@ -947,7 +947,7 @@ void ConstraintMatrix::condense (SparsityPattern &sparsity) const
                                                  // row @p{row} and regular column
                                                  // sparsity.colnums[j]
                 for (unsigned int q=0;
-                     q!=lines[distribute[row]].entries.size(); ++q) 
+                     q!=lines[distribute[row]].entries.size(); ++q)
                   sparsity.add (lines[distribute[row]].entries[q].first,
                                 column);
               else
@@ -962,7 +962,7 @@ void ConstraintMatrix::condense (SparsityPattern &sparsity) const
             }
        }
     }
-  
+
   sparsity.compress();
 }
 
@@ -973,7 +973,7 @@ void ConstraintMatrix::condense (CompressedSparsityPattern &sparsity) const
   Assert (sorted == true, ExcMatrixNotClosed());
   Assert (sparsity.n_rows() == sparsity.n_cols(),
          ExcNotQuadratic());
-  
+
                                   // store for each index whether it must be
                                   // distributed or not. If entry is
                                   // numbers::invalid_unsigned_int,
@@ -983,7 +983,7 @@ void ConstraintMatrix::condense (CompressedSparsityPattern &sparsity) const
                                   // index
   std::vector<unsigned int> distribute(sparsity.n_rows(),
                                        numbers::invalid_unsigned_int);
-  
+
   for (unsigned int c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = c;
 
@@ -1058,11 +1058,11 @@ void ConstraintMatrix::condense (CompressedSparsityPattern &sparsity) const
                unsigned int old_rowlength = sparsity.row_length(row);
                for (unsigned int q=0;
                     q!=lines[distribute[column]].entries.size();
-                    ++q) 
+                    ++q)
                  {
                    const unsigned int
                      new_col = lines[distribute[column]].entries[q].first;
-                   
+
                    sparsity.add (row, new_col);
 
                    const unsigned int new_rowlength = sparsity.row_length(row);
@@ -1083,7 +1083,7 @@ void ConstraintMatrix::condense (CompressedSparsityPattern &sparsity) const
                                               // row @p{row} and regular column
                                               // sparsity.colnums[j]
              for (unsigned int q=0;
-                  q!=lines[distribute[row]].entries.size(); ++q) 
+                  q!=lines[distribute[row]].entries.size(); ++q)
                sparsity.add (lines[distribute[row]].entries[q].first,
                              column);
            else
@@ -1108,7 +1108,7 @@ void ConstraintMatrix::condense (CompressedSetSparsityPattern &sparsity) const
   Assert (sorted == true, ExcMatrixNotClosed());
   Assert (sparsity.n_rows() == sparsity.n_cols(),
          ExcNotQuadratic());
-  
+
                                   // store for each index whether it must be
                                   // distributed or not. If entry is
                                   // numbers::invalid_unsigned_int,
@@ -1118,7 +1118,7 @@ void ConstraintMatrix::condense (CompressedSetSparsityPattern &sparsity) const
                                   // index
   std::vector<unsigned int> distribute(sparsity.n_rows(),
                                        numbers::invalid_unsigned_int);
-  
+
   for (unsigned int c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = c;
 
@@ -1132,24 +1132,24 @@ void ConstraintMatrix::condense (CompressedSetSparsityPattern &sparsity) const
                                           // distribute cols, the loop may
                                           // get longer
          CompressedSetSparsityPattern::row_iterator col_num = sparsity.row_begin (row);
-         
+
          for (; col_num != sparsity.row_end (row); ++col_num)
            {
              const unsigned int column = *col_num;
-             
+
              if (distribute[column] != numbers::invalid_unsigned_int)
                {
                  // row
                  unsigned int old_rowlength = sparsity.row_length(row);
                  for (unsigned int q=0;
                       q!=lines[distribute[column]].entries.size();
-                      ++q) 
+                      ++q)
                    {
                      const unsigned int
                        new_col = lines[distribute[column]].entries[q].first;
-                     
+
                      sparsity.add (row, new_col);
-                     
+
                      const unsigned int new_rowlength = sparsity.row_length(row);
                      //                      if ((new_col < column) && (old_rowlength != new_rowlength))
                      //                ++col_num;
@@ -1162,17 +1162,17 @@ void ConstraintMatrix::condense (CompressedSetSparsityPattern &sparsity) const
        // row must be distributed
        {
          CompressedSetSparsityPattern::row_iterator col_num = sparsity.row_begin (row);
-         
+
          for (; col_num != sparsity.row_end (row); ++col_num)
            {
              const unsigned int column = *col_num;
-             
+
              if (distribute[column] == numbers::invalid_unsigned_int)
                // distribute entry at irregular
                // row @p{row} and regular column
                // sparsity.colnums[j]
                for (unsigned int q=0;
-                    q!=lines[distribute[row]].entries.size(); ++q) 
+                    q!=lines[distribute[row]].entries.size(); ++q)
                  sparsity.add (lines[distribute[row]].entries[q].first,
                                column);
              else
@@ -1198,7 +1198,7 @@ void ConstraintMatrix::condense (CompressedSimpleSparsityPattern &sparsity) cons
   Assert (sorted == true, ExcMatrixNotClosed());
   Assert (sparsity.n_rows() == sparsity.n_cols(),
          ExcNotQuadratic());
-  
+
                                   // store for each index whether it must be
                                   // distributed or not. If entry is
                                   // numbers::invalid_unsigned_int,
@@ -1208,7 +1208,7 @@ void ConstraintMatrix::condense (CompressedSimpleSparsityPattern &sparsity) cons
                                   // index
   std::vector<unsigned int> distribute(sparsity.n_rows(),
                                        numbers::invalid_unsigned_int);
-  
+
   for (unsigned int c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = c;
 
@@ -1283,11 +1283,11 @@ void ConstraintMatrix::condense (CompressedSimpleSparsityPattern &sparsity) cons
                unsigned int old_rowlength = sparsity.row_length(row);
                for (unsigned int q=0;
                     q!=lines[distribute[column]].entries.size();
-                    ++q) 
+                    ++q)
                  {
                    const unsigned int
                      new_col = lines[distribute[column]].entries[q].first;
-                   
+
                    sparsity.add (row, new_col);
 
                    const unsigned int new_rowlength = sparsity.row_length(row);
@@ -1308,7 +1308,7 @@ void ConstraintMatrix::condense (CompressedSimpleSparsityPattern &sparsity) cons
                                               // row @p{row} and regular column
                                               // sparsity.colnums[j]
              for (unsigned int q=0;
-                  q!=lines[distribute[row]].entries.size(); ++q) 
+                  q!=lines[distribute[row]].entries.size(); ++q)
                sparsity.add (lines[distribute[row]].entries[q].first,
                              column);
            else
@@ -1338,12 +1338,12 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
          ExcNotQuadratic());
   Assert (sparsity.get_column_indices() == sparsity.get_row_indices(),
          ExcNotQuadratic());
-  
+
   const BlockIndices &
     index_mapping = sparsity.get_column_indices();
 
   const unsigned int n_blocks = sparsity.n_block_rows();
-  
+
                                   // store for each index whether it must be
                                   // distributed or not. If entry is
                                   // numbers::invalid_unsigned_int,
@@ -1353,7 +1353,7 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
                                   // index
   std::vector<unsigned int> distribute (sparsity.n_rows(),
                                         numbers::invalid_unsigned_int);
-  
+
   for (unsigned int c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = c;
 
@@ -1365,7 +1365,7 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
       const std::pair<unsigned int,unsigned int>
        block_index = index_mapping.global_to_local(row);
       const unsigned int block_row = block_index.first;
-      
+
       if (distribute[row] == numbers::invalid_unsigned_int)
                                         // regular line. loop over
                                         // all columns and see
@@ -1392,7 +1392,7 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
                 {
                   const unsigned int global_col
                     = index_mapping.local_to_global(block_col, entry->column());
-                  
+
                   if (distribute[global_col] != numbers::invalid_unsigned_int)
                                                      // distribute entry at regular
                                                      // row @p{row} and irregular column
@@ -1417,7 +1417,7 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
            {
              const SparsityPattern &
                block_sparsity = sparsity.block(block_row,block_col);
-             
+
               for (SparsityPattern::const_iterator
                      entry = block_sparsity.begin(block_index.second);
                    (entry != block_sparsity.end(block_index.second)) &&
@@ -1426,13 +1426,13 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
                 {
                   const unsigned int global_col
                     = index_mapping.local_to_global (block_col, entry->column());
-                  
+
                   if (distribute[global_col] == numbers::invalid_unsigned_int)
                                                      // distribute entry at irregular
                                                      // row @p{row} and regular column
                                                      // global_col.
                     {
-                      for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q) 
+                      for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q)
                         sparsity.add (lines[distribute[row]].entries[q].first, global_col);
                     }
                   else
@@ -1449,7 +1449,7 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
            }
        }
     }
-  
+
   sparsity.compress();
 }
 
@@ -1464,12 +1464,12 @@ void ConstraintMatrix::condense (BlockCompressedSparsityPattern &sparsity) const
          ExcNotQuadratic());
   Assert (sparsity.get_column_indices() == sparsity.get_row_indices(),
          ExcNotQuadratic());
-  
+
   const BlockIndices &
     index_mapping = sparsity.get_column_indices();
 
   const unsigned int n_blocks = sparsity.n_block_rows();
-  
+
                                   // store for each index whether it must be
                                   // distributed or not. If entry is
                                   // numbers::invalid_unsigned_int,
@@ -1479,7 +1479,7 @@ void ConstraintMatrix::condense (BlockCompressedSparsityPattern &sparsity) const
                                   // index
   std::vector<unsigned int> distribute (sparsity.n_rows(),
                                         numbers::invalid_unsigned_int);
-  
+
   for (unsigned int c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = static_cast<signed int>(c);
 
@@ -1492,7 +1492,7 @@ void ConstraintMatrix::condense (BlockCompressedSparsityPattern &sparsity) const
        block_index = index_mapping.global_to_local(row);
       const unsigned int block_row = block_index.first;
       const unsigned int local_row = block_index.second;
-      
+
       if (distribute[row] == numbers::invalid_unsigned_int)
                                         // regular line. loop over
                                         // all columns and see
@@ -1529,7 +1529,7 @@ void ConstraintMatrix::condense (BlockCompressedSparsityPattern &sparsity) const
                  const unsigned int global_col
                    = index_mapping.local_to_global(block_col,
                                                    block_sparsity.column_number(local_row,j));
-                   
+
                  if (distribute[global_col] != numbers::invalid_unsigned_int)
                                                     // distribute entry at regular
                                                     // row @p{row} and irregular column
@@ -1555,19 +1555,19 @@ void ConstraintMatrix::condense (BlockCompressedSparsityPattern &sparsity) const
            {
              const CompressedSparsityPattern &
                block_sparsity = sparsity.block(block_row,block_col);
-      
+
              for (unsigned int j=0; j<block_sparsity.row_length(local_row); ++j)
                {
                  const unsigned int global_col
                    = index_mapping.local_to_global (block_col,
                                                     block_sparsity.column_number(local_row,j));
-                   
+
                  if (distribute[global_col] == numbers::invalid_unsigned_int)
                                                     // distribute entry at irregular
                                                     // row @p{row} and regular column
                                                     // global_col.
                    {
-                     for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q) 
+                     for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q)
                        sparsity.add (lines[distribute[row]].entries[q].first,
                                      global_col);
                    }
@@ -1598,12 +1598,12 @@ void ConstraintMatrix::condense (BlockCompressedSetSparsityPattern &sparsity) co
          ExcNotQuadratic());
   Assert (sparsity.get_column_indices() == sparsity.get_row_indices(),
          ExcNotQuadratic());
-  
+
   const BlockIndices &
     index_mapping = sparsity.get_column_indices();
 
   const unsigned int n_blocks = sparsity.n_block_rows();
-  
+
                                   // store for each index whether it must be
                                   // distributed or not. If entry is
                                   // numbers::invalid_unsigned_int,
@@ -1613,7 +1613,7 @@ void ConstraintMatrix::condense (BlockCompressedSetSparsityPattern &sparsity) co
                                   // index
   std::vector<unsigned int> distribute (sparsity.n_rows(),
                                         numbers::invalid_unsigned_int);
-  
+
   for (unsigned int c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = static_cast<signed int>(c);
 
@@ -1626,7 +1626,7 @@ void ConstraintMatrix::condense (BlockCompressedSetSparsityPattern &sparsity) co
        block_index = index_mapping.global_to_local(row);
       const unsigned int block_row = block_index.first;
       const unsigned int local_row = block_index.second;
-      
+
       if (distribute[row] == numbers::invalid_unsigned_int)
                                         // regular line. loop over
                                         // all columns and see
@@ -1664,7 +1664,7 @@ void ConstraintMatrix::condense (BlockCompressedSetSparsityPattern &sparsity) co
                {
                  const unsigned int global_col
                    = index_mapping.local_to_global(block_col, *j);
-                   
+
                  if (distribute[global_col] != numbers::invalid_unsigned_int)
                                                     // distribute entry at regular
                                                     // row @p{row} and irregular column
@@ -1690,20 +1690,20 @@ void ConstraintMatrix::condense (BlockCompressedSetSparsityPattern &sparsity) co
            {
              const CompressedSetSparsityPattern &
                block_sparsity = sparsity.block(block_row,block_col);
-      
+
              for (CompressedSetSparsityPattern::row_iterator
                     j = block_sparsity.row_begin(local_row);
                   j != block_sparsity.row_end(local_row); ++j)
                {
                  const unsigned int global_col
                    = index_mapping.local_to_global (block_col, *j);
-                   
+
                  if (distribute[global_col] == numbers::invalid_unsigned_int)
                                                     // distribute entry at irregular
                                                     // row @p{row} and regular column
                                                     // global_col.
                    {
-                     for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q) 
+                     for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q)
                        sparsity.add (lines[distribute[row]].entries[q].first,
                                      global_col);
                    }
@@ -1734,12 +1734,12 @@ void ConstraintMatrix::condense (BlockCompressedSimpleSparsityPattern &sparsity)
          ExcNotQuadratic());
   Assert (sparsity.get_column_indices() == sparsity.get_row_indices(),
          ExcNotQuadratic());
-  
+
   const BlockIndices &
     index_mapping = sparsity.get_column_indices();
 
   const unsigned int n_blocks = sparsity.n_block_rows();
-  
+
                                   // store for each index whether it must be
                                   // distributed or not. If entry is
                                   // numbers::invalid_unsigned_int,
@@ -1749,7 +1749,7 @@ void ConstraintMatrix::condense (BlockCompressedSimpleSparsityPattern &sparsity)
                                   // index
   std::vector<unsigned int> distribute (sparsity.n_rows(),
                                         numbers::invalid_unsigned_int);
-  
+
   for (unsigned int c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = static_cast<signed int>(c);
 
@@ -1762,7 +1762,7 @@ void ConstraintMatrix::condense (BlockCompressedSimpleSparsityPattern &sparsity)
        block_index = index_mapping.global_to_local(row);
       const unsigned int block_row = block_index.first;
       const unsigned int local_row = block_index.second;
-      
+
       if (distribute[row] == numbers::invalid_unsigned_int)
                                         // regular line. loop over
                                         // all columns and see
@@ -1799,7 +1799,7 @@ void ConstraintMatrix::condense (BlockCompressedSimpleSparsityPattern &sparsity)
                  const unsigned int global_col
                    = index_mapping.local_to_global(block_col,
                                                    block_sparsity.column_number(local_row,j));
-                   
+
                  if (distribute[global_col] != numbers::invalid_unsigned_int)
                                                     // distribute entry at regular
                                                     // row @p{row} and irregular column
@@ -1825,19 +1825,19 @@ void ConstraintMatrix::condense (BlockCompressedSimpleSparsityPattern &sparsity)
            {
              const CompressedSimpleSparsityPattern &
                block_sparsity = sparsity.block(block_row,block_col);
-      
+
              for (unsigned int j=0; j<block_sparsity.row_length(local_row); ++j)
                {
                  const unsigned int global_col
                    = index_mapping.local_to_global (block_col,
                                                     block_sparsity.column_number(local_row,j));
-                   
+
                  if (distribute[global_col] == numbers::invalid_unsigned_int)
                                                     // distribute entry at irregular
                                                     // row @p{row} and regular column
                                                     // global_col.
                    {
-                     for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q) 
+                     for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q)
                        sparsity.add (lines[distribute[row]].entries[q].first,
                                      global_col);
                    }
@@ -1875,11 +1875,11 @@ ConstraintMatrix::distribute (TrilinosWrappers::MPI::Vector &vec) const
   ConstraintLine index_comparison;
   index_comparison.line = vec.local_range().first;
 
-  std::vector<ConstraintLine>::const_iterator next_constraint = 
+  std::vector<ConstraintLine>::const_iterator next_constraint =
     std::lower_bound (lines.begin(),lines.end(),index_comparison);
 
   index_comparison.line = vec.local_range().second;
-  
+
   std::vector<ConstraintLine>::const_iterator end_constraint
     = std::lower_bound(lines.begin(),lines.end(),index_comparison);
 
@@ -1897,7 +1897,7 @@ ConstraintMatrix::distribute (TrilinosWrappers::MPI::Vector &vec) const
         {
           my_indices[index2]=i;
         }
-      for (; next_constraint != end_constraint; ++next_constraint) 
+      for (; next_constraint != end_constraint; ++next_constraint)
         {
           for (unsigned int i=0; i<next_constraint->entries.size(); ++i)
             my_indices.push_back (next_constraint->entries[i].first);
@@ -1924,10 +1924,10 @@ ConstraintMatrix::distribute (TrilinosWrappers::MPI::Vector &vec) const
                                   // here we import the data
   vec_distribute->reinit(vec,false,true);
 
-  next_constraint = 
+  next_constraint =
     std::lower_bound (lines.begin(),lines.end(),index_comparison);
 
-  for (; next_constraint != end_constraint; ++next_constraint) 
+  for (; next_constraint != end_constraint; ++next_constraint)
     {
                                       // fill entry in line
                                       // next_constraint.line by adding the
@@ -1950,11 +1950,11 @@ unsigned int ConstraintMatrix::n_constraints () const
 
 
 
-bool ConstraintMatrix::is_identity_constrained (const unsigned int index) const 
+bool ConstraintMatrix::is_identity_constrained (const unsigned int index) const
 {
   if (is_constrained(index) == false)
     return false;
-  
+
   if (sorted == true)
     {
       ConstraintLine index_comparison;
@@ -1992,7 +1992,7 @@ bool ConstraintMatrix::is_identity_constrained (const unsigned int index) const
 
 
 
-unsigned int ConstraintMatrix::max_constraint_indirections () const 
+unsigned int ConstraintMatrix::max_constraint_indirections () const
 {
   unsigned int return_value = 0;
   for (std::vector<ConstraintLine>::const_iterator i=lines.begin();
@@ -2017,7 +2017,7 @@ bool ConstraintMatrix::has_inhomogeneities () const
 
   return false;
 }
-    
+
 
 void ConstraintMatrix::print (std::ostream &out) const
 {
@@ -2033,7 +2033,7 @@ void ConstraintMatrix::print (std::ostream &out) const
                << " " << lines[i].entries[j].first
                << ":  " << lines[i].entries[j].second << "\n";
 
-                                      // print out inhomogeneity. 
+                                      // print out inhomogeneity.
          if (lines[i].inhomogeneity != 0)
            out << "    " << lines[i].line
                << ": " << lines[i].inhomogeneity << "\n";
@@ -2054,7 +2054,7 @@ void ConstraintMatrix::print (std::ostream &out) const
            out << "    " << lines[i].line << " = 0\n";
        }
     }
-  
+
   AssertThrow (out, ExcIO());
 }
 
@@ -2218,7 +2218,7 @@ distribute_local_to_global<MatrixType,VectorType > (const FullMatrix<double>
 
 MATRIX_FUNCTIONS(SparseMatrix<double>, Vector<double>);
 MATRIX_FUNCTIONS(SparseMatrix<float>,  Vector<float>);
-template void ConstraintMatrix::distribute_local_to_global<SparseMatrix<float>,Vector<double> > 
+template void ConstraintMatrix::distribute_local_to_global<SparseMatrix<float>,Vector<double> >
 (const FullMatrix<double>        &,
  const Vector<double>            &,
  const std::vector<unsigned int> &,
@@ -2227,7 +2227,7 @@ template void ConstraintMatrix::distribute_local_to_global<SparseMatrix<float>,V
 
 MATRIX_FUNCTIONS(BlockSparseMatrix<double>, BlockVector<double>);
 MATRIX_FUNCTIONS(BlockSparseMatrix<float>,  BlockVector<float>);
-template void ConstraintMatrix::distribute_local_to_global<BlockSparseMatrix<float>,BlockVector<double> > 
+template void ConstraintMatrix::distribute_local_to_global<BlockSparseMatrix<float>,BlockVector<double> >
 (const FullMatrix<double>        &,
  const Vector<double>            &,
  const std::vector<unsigned int> &,
@@ -2253,18 +2253,18 @@ MATRIX_FUNCTIONS(PETScWrappers::MPI::BlockSparseMatrix ,PETScWrappers::MPI::Bloc
 MATRIX_FUNCTIONS(TrilinosWrappers::SparseMatrix, TrilinosWrappers::Vector);
 MATRIX_FUNCTIONS(TrilinosWrappers::BlockSparseMatrix, TrilinosWrappers::BlockVector);
 template void ConstraintMatrix::distribute_local_to_global
-<TrilinosWrappers::SparseMatrix,TrilinosWrappers::MPI::Vector> 
-  (const FullMatrix<double>        &, 
-   const Vector<double>            &, 
-   const std::vector<unsigned int> &, 
-   TrilinosWrappers::SparseMatrix &, 
+<TrilinosWrappers::SparseMatrix,TrilinosWrappers::MPI::Vector>
+  (const FullMatrix<double>        &,
+   const Vector<double>            &,
+   const std::vector<unsigned int> &,
+   TrilinosWrappers::SparseMatrix &,
    TrilinosWrappers::MPI::Vector  &) const;
 template void ConstraintMatrix::distribute_local_to_global
-<TrilinosWrappers::BlockSparseMatrix,TrilinosWrappers::MPI::BlockVector> 
-  (const FullMatrix<double>        &, 
-   const Vector<double>            &, 
-   const std::vector<unsigned int> &, 
-   TrilinosWrappers::BlockSparseMatrix &, 
+<TrilinosWrappers::BlockSparseMatrix,TrilinosWrappers::MPI::BlockVector>
+  (const FullMatrix<double>        &,
+   const Vector<double>            &,
+   const std::vector<unsigned int> &,
+   TrilinosWrappers::BlockSparseMatrix &,
    TrilinosWrappers::MPI::BlockVector  &) const;
 #endif
 
index 9bddf2731ce633973d66f13b1cba837529ddfc12..1589683cd996f7bd292d2b1111bc53233c3cb37e 100644 (file)
@@ -213,9 +213,9 @@ namespace PETScWrappers
                   const unsigned int j) const
   {
 #ifdef PETSC_USE_64BIT_INDICES
-    PetscInt 
+    PetscInt
 #else
-    int 
+    int
 #endif
       petsc_i = i, petsc_j = j;
     PetscScalar value;
index b3125fac3d845aef8b0c1674a3f6a0142dd3edf8..66e048299538cff32f1df493ecda8e620e7def35 100644 (file)
@@ -311,9 +311,9 @@ namespace PETScWrappers
                                        // then count the elements in- and
                                        // out-of-window for the rows we own
 #ifdef PETSC_USE_64BIT_INDICES
-      std::vector<PetscInt> 
+      std::vector<PetscInt>
 #else
-      std::vector<int> 
+      std::vector<int>
 #endif
        row_lengths_in_window (local_row_end - local_row_start),
        row_lengths_out_of_window (local_row_end - local_row_start);
@@ -376,9 +376,9 @@ namespace PETScWrappers
      ((PETSC_VERSION_MINOR == 2) && (PETSC_VERSION_SUBMINOR == 0)))
 
 #ifdef PETSC_USE_64BIT_INDICES
-          std::vector<PetscInt> 
+          std::vector<PetscInt>
 #else
-          std::vector<int> 
+          std::vector<int>
 #endif
             row_entries;
           std::vector<PetscScalar> row_values;
@@ -406,9 +406,9 @@ namespace PETScWrappers
                                            // sure petsc doesn't read past the
                                            // end
 #ifdef PETSC_USE_64BIT_INDICES
-          std::vector<PetscInt> 
+          std::vector<PetscInt>
 #else
-          std::vector<int> 
+          std::vector<int>
 #endif
            rowstart_in_window (local_row_end - local_row_start + 1, 0),
            colnums_in_window;
@@ -467,9 +467,9 @@ namespace PETScWrappers
             for (unsigned int i=local_row_start; i<local_row_end; ++i)
               {
 #ifdef PETSC_USE_64BIT_INDICES
-               PetscInt 
+               PetscInt
 #else
-               int 
+               int
 #endif
                  petsc_i = i;
                 MatSetValues (matrix, 1, &petsc_i,
index 7bee6c7f1e2e3d5d98871f2594b8c377e1ff7fca..8295faf3ea8b3c0b2b31c1037bf61f1b3746db11 100644 (file)
@@ -64,7 +64,7 @@ namespace PETScWrappers
     do_reinit (sparsity_pattern, preset_nonzero_locations);
   }
 
-  
+
 
   SparseMatrix &
   SparseMatrix::operator = (const double d)
@@ -84,8 +84,8 @@ namespace PETScWrappers
                                      // get rid of old matrix and generate a
                                      // new one
     const int ierr = MatDestroy (matrix);
-    AssertThrow (ierr == 0, ExcPETScError(ierr));    
-    
+    AssertThrow (ierr == 0, ExcPETScError(ierr));
+
     do_reinit (m, n, n_nonzero_per_row, is_symmetric);
   }
 
@@ -100,10 +100,10 @@ namespace PETScWrappers
                                      // get rid of old matrix and generate a
                                      // new one
     const int ierr = MatDestroy (matrix);
-    AssertThrow (ierr == 0, ExcPETScError(ierr));    
+    AssertThrow (ierr == 0, ExcPETScError(ierr));
 
     do_reinit (m, n, row_lengths, is_symmetric);
-  }  
+  }
 
 
 
@@ -116,13 +116,13 @@ namespace PETScWrappers
                                      // get rid of old matrix and generate a
                                      // new one
     const int ierr = MatDestroy (matrix);
-    AssertThrow (ierr == 0, ExcPETScError(ierr));    
+    AssertThrow (ierr == 0, ExcPETScError(ierr));
 
     do_reinit (sparsity_pattern, preset_nonzero_locations);
   }
 
 
-  
+
   const MPI_Comm &
   SparseMatrix::get_mpi_communicator () const
   {
@@ -149,7 +149,7 @@ namespace PETScWrappers
                                      // set symmetric flag, if so requested
     if (is_symmetric == true)
       {
-#if (PETSC_VERSION_MAJOR <= 2) 
+#if (PETSC_VERSION_MAJOR <= 2)
         const int ierr
           = MatSetOption (matrix, MAT_SYMMETRIC);
 #else
@@ -171,7 +171,7 @@ namespace PETScWrappers
   {
     Assert (row_lengths.size() == m,
             ExcDimensionMismatch (row_lengths.size(), m));
-    
+
                                      // use the call sequence indicating a
                                      // maximal number of elements for each
                                      // row individually. annoyingly, we
@@ -194,7 +194,7 @@ namespace PETScWrappers
                                      // set symmetric flag, if so requested
     if (is_symmetric == true)
       {
-#if (PETSC_VERSION_MAJOR <= 2) 
+#if (PETSC_VERSION_MAJOR <= 2)
         const int ierr
           = MatSetOption (matrix, MAT_SYMMETRIC);
 #else
@@ -203,10 +203,10 @@ namespace PETScWrappers
 #endif
 
         AssertThrow (ierr == 0, ExcPETScError(ierr));
-      }    
+      }
   }
 
-  
+
 
   template <typename SparsityType>
   void
@@ -249,7 +249,7 @@ namespace PETScWrappers
             row_values.resize (row_lengths[i], 0.0);
             for (unsigned int j=0; j<row_lengths[i]; ++j)
               row_entries[j] = sparsity_pattern.column_number (i,j);
-              
+
 #ifdef PETSC_USE_64BIT_INDICES
            const PetscInt
 #else
@@ -266,7 +266,7 @@ namespace PETScWrappers
                                        // In the end, tell the matrix that
                                        // it should not expect any new
                                        // entries.
-#if (PETSC_VERSION_MAJOR <= 2) 
+#if (PETSC_VERSION_MAJOR <= 2)
     const int ierr =
       MatSetOption (matrix, MAT_NO_NEW_NONZERO_LOCATIONS);
 #else
index 5298f4b1940af4994b3f90dccd343e76cd834f0a..5f8ef55231c04fb6192d6b31c16363a14b483979 100644 (file)
@@ -262,8 +262,8 @@ namespace PETScWrappers
   {
     Assert (indices.size() == values.size(),
             ExcMessage ("Function called with arguments of different sizes"));
-    do_set_add_operation(indices.size(), &indices[0], 
-                        &(*const_cast<dealii::Vector<PetscScalar>*>(&values))(0), 
+    do_set_add_operation(indices.size(), &indices[0],
+                        &(*const_cast<dealii::Vector<PetscScalar>*>(&values))(0),
                         true);
   }
 
index 4fcc15590365cf65aada815c6153cd7cf06ffd09..abde8c09ce462d6c3206f0be4eda2d45722aa170 100644 (file)
@@ -24,9 +24,9 @@ namespace SLEPcWrappers
   {
                                    // Destroy the solver object.
     int ierr = EPSDestroy (eps);
-    AssertThrow (ierr == 0, ExcSLEPcError(ierr)); 
+    AssertThrow (ierr == 0, ExcSLEPcError(ierr));
   }
-  
+
   SolverBase::SolverBase (SolverControl  &cn,
                           const MPI_Comm &mpi_communicator)
     :
@@ -38,7 +38,7 @@ namespace SLEPcWrappers
     transform (NULL)
   {
   }
-  
+
   SolverBase::~SolverBase ()
   {
     if( solver_data != 0 )
@@ -82,10 +82,10 @@ namespace SLEPcWrappers
   SolverBase::solve (const unsigned int n_eigenvectors, unsigned int *n_converged)
   {
     int ierr;
-    
-    AssertThrow (solver_data == 0, ExcSLEPcWrappersUsageError());    
+
+    AssertThrow (solver_data == 0, ExcSLEPcWrappersUsageError());
     solver_data.reset (new SolverData());
-    
+
                                     // create eigensolver context and
                                     // set operators.
     ierr = EPSCreate (mpi_communicator, &solver_data->eps);
@@ -97,16 +97,16 @@ namespace SLEPcWrappers
     else
       ierr = EPSSetOperators (solver_data->eps, *opA, PETSC_NULL);
     AssertThrow (ierr == 0, ExcSLEPcError(ierr));
-    
-    if (ini_vec && ini_vec->size() != 0) 
+
+    if (ini_vec && ini_vec->size() != 0)
       {
        ierr = EPSSetInitialVector(solver_data->eps, *ini_vec);
        AssertThrow (ierr == 0, ExcSLEPcError(ierr));
       }
-    
+
     if (transform)
       transform->set_context(solver_data->eps);
-    
+
                                     // set runtime options.
     set_solver_type (solver_data->eps);
 
@@ -115,7 +115,7 @@ namespace SLEPcWrappers
 
                                     // set number of eigenvectors to
                                     // compute
-    ierr = EPSSetDimensions (solver_data->eps, n_eigenvectors, 
+    ierr = EPSSetDimensions (solver_data->eps, n_eigenvectors,
                             PETSC_DECIDE, PETSC_DECIDE);
     AssertThrow (ierr == 0, ExcSLEPcError(ierr));
 
@@ -128,7 +128,7 @@ namespace SLEPcWrappers
 
                                     // get number of converged
                                     // eigenstates
-    ierr = EPSGetConverged (solver_data->eps, 
+    ierr = EPSGetConverged (solver_data->eps,
 #ifdef PETSC_USE_64BIT_INDICES
                            reinterpret_cast<PetscInt *>(n_converged));
 #else
@@ -138,14 +138,14 @@ namespace SLEPcWrappers
   }
 
   void
-  SolverBase::get_eigenpair (const unsigned int index, 
+  SolverBase::get_eigenpair (const unsigned int index,
                             double &kr,
-                            PETScWrappers::VectorBase &vr) 
+                            PETScWrappers::VectorBase &vr)
   {
-    AssertThrow (solver_data != 0, ExcSLEPcWrappersUsageError());    
+    AssertThrow (solver_data != 0, ExcSLEPcWrappersUsageError());
 
                                     // get converged eigenpair
-    int ierr = EPSGetEigenpair(solver_data->eps, index, 
+    int ierr = EPSGetEigenpair(solver_data->eps, index,
                               &kr, PETSC_NULL, vr, PETSC_NULL);
     AssertThrow (ierr == 0, ExcSLEPcError(ierr));
   }
@@ -167,7 +167,7 @@ namespace SLEPcWrappers
       return NULL;
     return &solver_data->eps;
   }
-    
+
   /* ---------------------- SolverControls ----------------------- */
   SolverControl &
   SolverBase::control () const
@@ -182,31 +182,31 @@ namespace SLEPcWrappers
                                 EPSConvergedReason *reason,
                                 void               *solver_control_x)
   {
-    SolverControl &solver_control 
+    SolverControl &solver_control
       = *reinterpret_cast<SolverControl*>(solver_control_x);
-    
+
     const SolverControl::State state
       = solver_control.check (iteration, residual_norm);
-    
+
     switch (state)
       {
       case ::dealii::SolverControl::iterate:
        *reason = EPS_CONVERGED_ITERATING;
        break;
-       
+
       case ::dealii::SolverControl::success:
        *reason = static_cast<EPSConvergedReason>(1);
        break;
-       
+
       case ::dealii::SolverControl::failure:
        if (solver_control.last_step() > solver_control.max_steps())
          *reason = EPS_DIVERGED_ITS;
        break;
-       
+
       default:
        Assert (false, ExcNotImplemented());
       }
-    
+
                                     // return without failure.
     return 0;
   }
@@ -219,7 +219,7 @@ namespace SLEPcWrappers
     SolverBase (cn, mpi_communicator),
     additional_data (data)
   {}
-    
+
   void
   SolverKrylovSchur::set_solver_type (EPS &eps) const
   {
@@ -236,7 +236,7 @@ namespace SLEPcWrappers
                            this->solver_control.max_steps());
     AssertThrow (ierr == 0, ExcSLEPcError(ierr));
   }
-  
+
   /* ---------------------- SolverArnoldi ------------------------ */
   SolverArnoldi::SolverArnoldi (SolverControl        &cn,
                                const MPI_Comm       &mpi_communicator,
@@ -245,7 +245,7 @@ namespace SLEPcWrappers
     SolverBase (cn, mpi_communicator),
     additional_data (data)
   {}
-    
+
   void
   SolverArnoldi::set_solver_type (EPS &eps) const
   {
@@ -272,7 +272,7 @@ namespace SLEPcWrappers
     SolverBase (cn, mpi_communicator),
     additional_data (data)
   {}
-    
+
   void
   SolverLanczos::set_solver_type (EPS &eps) const
   {
index 064a69e838f9d1899b7c3cb3b15994228e97d435..57014bb2f2ba9477688dbbd46426c2927b4181b0 100644 (file)
@@ -42,7 +42,7 @@ namespace TrilinosWrappers
 
       const int local_index = vector.vector->Map().LID(index);
       Assert (local_index >= 0,
-             ExcAccessToNonLocalElement (index, 
+             ExcAccessToNonLocalElement (index,
                                          vector.vector->Map().MinMyGID(),
                                          vector.vector->Map().MaxMyGID()));
 
@@ -58,27 +58,27 @@ namespace TrilinosWrappers
                         last_action (Zero),
                        compressed  (true),
 #ifdef DEAL_II_COMPILER_SUPPORTS_MPI
-                       vector(std::auto_ptr<Epetra_FEVector> 
+                       vector(std::auto_ptr<Epetra_FEVector>
                          (new Epetra_FEVector(
                                 Epetra_Map(0,0,Epetra_MpiComm(MPI_COMM_SELF)))))
 #else
-                       vector(std::auto_ptr<Epetra_FEVector> 
+                       vector(std::auto_ptr<Epetra_FEVector>
                           (new Epetra_FEVector(
                                 Epetra_Map(0,0,Epetra_SerialComm()))))
 #endif
   {}
-  
 
-  
+
+
   VectorBase::VectorBase (const VectorBase &v)
                         :
                        Subscriptor(),
                        last_action (Zero),
                        compressed (true),
-                       vector(std::auto_ptr<Epetra_FEVector> 
+                       vector(std::auto_ptr<Epetra_FEVector>
                               (new Epetra_FEVector(*v.vector)))
   {}
-  
+
 
 
   VectorBase::~VectorBase ()
@@ -145,7 +145,7 @@ namespace TrilinosWrappers
   {
     Assert (size() == v.size(),
            ExcDimensionMismatch(size(), v.size()));
-    
+
                                     // this is probably not very efficient
                                     // but works. in particular, we could do
                                     // better if we know that
@@ -249,7 +249,7 @@ namespace TrilinosWrappers
       return false;
 
     unsigned int i;
-    for (i=0; i<local_size(); i++) 
+    for (i=0; i<local_size(); i++)
       if ((*(v.vector))[0][i]!=(*vector)[0][i]) return false;
 
     return true;

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.