// 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();
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());
}