]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Revert tests/mpi/compute_mean_value.cc to the correct version.
authorBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 22 Mar 2013 16:40:31 +0000 (16:40 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 22 Mar 2013 16:40:31 +0000 (16:40 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28993 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/base/index_set.cc
tests/mpi/compute_mean_value.cc

index 2e194f2a7fcd9c536f6fd9f8effb43ca635cb4e7..367966a7444c653efe2c57a480b3cec101050db7 100644 (file)
@@ -72,7 +72,7 @@ IndexSet::do_compress () const
 
   // now compute indices within set and the
   // range with most elements
-  unsigned int next_index = 0, largest_range_size = 0;
+  types::global_dof_index next_index = 0, largest_range_size = 0;
   for (std::vector<Range>::iterator
        i = ranges.begin();
        i != ranges.end();
index 7fe5620907c98cf401e3278b59a42a36e77d2fb5..dd9d65c3e87c27078ed8ff4e631eabfdb4dd3b6b 100644 (file)
@@ -64,25 +64,25 @@ void test()
   DoFHandler<dim> dofh(tr);
   dofh.distribute_dofs (fe);
 
-//  TrilinosWrappers::MPI::Vector interpolated(dofh.locally_owned_dofs(),
-//                                          MPI_COMM_WORLD);
-//  VectorTools::interpolate (dofh,
-//                         LinearFunction<dim>(),
-//                         interpolated);
-//  
-//  IndexSet relevant_set;
-//  DoFTools::extract_locally_relevant_dofs (dofh, relevant_set);
-//  TrilinosWrappers::MPI::Vector x_rel(relevant_set, MPI_COMM_WORLD);
-//  x_rel = interpolated;
-//
-//  const double mean
-//    = VectorTools::compute_mean_value (dofh, QGauss<dim>(2), x_rel, 0);
-//
-//  if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0)
-//    deallog << "mean=" << mean
-//         << std::endl;
-//  
-//  Assert (std::fabs(mean - 2) < 1e-3, ExcInternalError());
+  TrilinosWrappers::MPI::Vector interpolated(dofh.locally_owned_dofs(),
+                                            MPI_COMM_WORLD);
+  VectorTools::interpolate (dofh,
+                           LinearFunction<dim>(),
+                           interpolated);
+  
+  IndexSet relevant_set;
+  DoFTools::extract_locally_relevant_dofs (dofh, relevant_set);
+  TrilinosWrappers::MPI::Vector x_rel(relevant_set, MPI_COMM_WORLD);
+  x_rel = interpolated;
+
+  const double mean
+    = VectorTools::compute_mean_value (dofh, QGauss<dim>(2), x_rel, 0);
+
+  if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0)
+    deallog << "mean=" << mean
+           << std::endl;
+  
+  Assert (std::fabs(mean - 2) < 1e-3, ExcInternalError());
 }
 
 

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.