]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Merge from mainline.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 13 Nov 2012 22:39:28 +0000 (22:39 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 13 Nov 2012 22:39:28 +0000 (22:39 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_3@27528 0785d39b-7218-0410-832d-ea1e28bc413d

1  2 
deal.II/include/deal.II/lac/constraint_matrix.h
deal.II/source/distributed/tria.cc

index af4f3ad83dd03b50f4f512456843450b83b272bd,7b86d099fab5978ceb3b788b82ec0eef03baaf65..059e75151867f3953dd369011325af2f5556ea9c
@@@ -1983,20 -1992,26 +1992,26 @@@ ConstraintMatrix::can_store_line (types
  
  
  
- template <class InVector, class OutVector>
+ template <class VectorType>
  inline
- void
- ConstraintMatrix::
- distribute_local_to_global (const InVector                  &local_vector,
-                             const std::vector<types::global_dof_index> &local_dof_indices,
-                             OutVector                       &global_vector) const
+ void ConstraintMatrix::distribute_local_to_global (
 -  const unsigned int index,
++  const types::global_dof_index index,
+   const double       value,
+   VectorType        &global_vector) const
  {
-   Assert (local_vector.size() == local_dof_indices.size(),
-           ExcDimensionMismatch(local_vector.size(), local_dof_indices.size()));
-   distribute_local_to_global (local_vector.begin(), local_vector.end(),
-                               local_dof_indices.begin(), global_vector);
- }
+   Assert (sorted == true, ExcMatrixNotClosed());
  
+   if (is_constrained(index) == false)
+     global_vector(index) += value;
+   else
+     {
+       const ConstraintLine& position =
+       lines[lines_cache[calculate_line_index(index)]];
+       for (unsigned int j=0; j<position.entries.size(); ++j)
+       global_vector(position.entries[j].first)
+         += value * position.entries[j].second;
+     }
+ }
  
  
  template <typename ForwardIteratorVec, typename ForwardIteratorInd,
index 19a1d948a0b8fe4df1d2d64d4b31f639713bbb42,6796e1c8d7a4af5df1330276cd0ed5c8f6fc35b9..3bec8f863cb0f46c89ad0c3db494b8eabc0b0c6e
@@@ -2815,11 -2815,8 +2815,12 @@@ namespace paralle
        number_cache.n_global_active_cells
          = std::accumulate (number_cache.n_locally_owned_active_cells.begin(),
                             number_cache.n_locally_owned_active_cells.end(),
 -                           0);
 +                                                          /* ensure sum is
 +                                                             computed with
 +                                                             correct data
 +                                                             type:*/
 +                           static_cast<types::global_dof_index>(0));
+       number_cache.n_global_levels = Utilities::MPI::max(this->n_levels(), mpi_communicator);
      }
  
  

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.