From d84200a2edbcb3700cc5aa576566c0485056d235 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Thu, 23 May 2013 09:36:03 +0000 Subject: [PATCH] Patch for FETools::back_interpolate for parallel::distributed::Vector by Martin Steigemann. git-svn-id: https://svn.dealii.org/trunk@29555 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/partitioner.h | 4 +- deal.II/include/deal.II/lac/parallel_vector.h | 16 + deal.II/source/fe/fe_tools.cc | 122 ++++-- tests/bits/fe_tools_06b.cc | 63 +++ tests/bits/fe_tools_06b/cmp/generic | 367 ++++++++++++++++++ tests/mpi/parallel_vector_back_interpolate.cc | 95 +++++ .../ncpu_4/cmp/generic | 1 + 7 files changed, 624 insertions(+), 44 deletions(-) create mode 100644 tests/bits/fe_tools_06b.cc create mode 100644 tests/bits/fe_tools_06b/cmp/generic create mode 100644 tests/mpi/parallel_vector_back_interpolate.cc create mode 100644 tests/mpi/parallel_vector_back_interpolate/ncpu_4/cmp/generic diff --git a/deal.II/include/deal.II/base/partitioner.h b/deal.II/include/deal.II/base/partitioner.h index fff826924b..68d4c4d720 100644 --- a/deal.II/include/deal.II/base/partitioner.h +++ b/deal.II/include/deal.II/base/partitioner.h @@ -272,7 +272,7 @@ namespace Utilities * Returns the MPI communicator underlying the * partitioner object. */ - MPI_Comm get_communicator() const; + const MPI_Comm& get_communicator() const; /** * Computes the memory consumption of this @@ -565,7 +565,7 @@ namespace Utilities inline - MPI_Comm + const MPI_Comm& Partitioner::get_communicator() const { return communicator; diff --git a/deal.II/include/deal.II/lac/parallel_vector.h b/deal.II/include/deal.II/lac/parallel_vector.h index 896f9f3bd9..0e2521acb1 100644 --- a/deal.II/include/deal.II/lac/parallel_vector.h +++ b/deal.II/include/deal.II/lac/parallel_vector.h @@ -729,6 +729,12 @@ namespace parallel * @name 4: Mixed stuff */ //@{ + /** + * Return a reference to the MPI communicator object in use with this + * vector. + */ + const MPI_Comm &get_mpi_communicator () const; + /** * Checks whether the given partitioner is compatible with the * partitioner used for this vector. Two partitioners are compatible if @@ -1932,6 +1938,16 @@ namespace parallel + template + inline + const MPI_Comm& + Vector::get_mpi_communicator() const + { + return partitioner->get_communicator(); + } + + + template inline bool diff --git a/deal.II/source/fe/fe_tools.cc b/deal.II/source/fe/fe_tools.cc index b29fd46f7d..86b48fc369 100644 --- a/deal.II/source/fe/fe_tools.cc +++ b/deal.II/source/fe/fe_tools.cc @@ -1630,6 +1630,79 @@ namespace FETools + namespace internal + { + namespace + { + template + void back_interpolate (const DoFHandler &dof1, + const ConstraintMatrix &constraints1, + const InVector &u1, + const DoFHandler &dof2, + const ConstraintMatrix &constraints2, + InVector &u1_interpolated) + { + Vector u2(dof2.n_dofs()); + interpolate(dof1, u1, dof2, constraints2, u2); + interpolate(dof2, u2, dof1, constraints1, u1_interpolated); + } + + // special version for PETSc +#ifdef DEAL_II_WITH_PETSC + template + void back_interpolate (const DoFHandler &dof1, + const ConstraintMatrix &constraints1, + const PETScWrappers::MPI::Vector &u1, + const DoFHandler &dof2, + const ConstraintMatrix &constraints2, + PETScWrappers::MPI::Vector &u1_interpolated) + { + // if u1 is a parallel distributed PETSc vector, we create a + // vector u2 with based on the sets of locally owned and relevant + // dofs of dof2 + IndexSet dof2_locally_owned_dofs = dof2.locally_owned_dofs(); + IndexSet dof2_locally_relevant_dofs; + DoFTools::extract_locally_relevant_dofs (dof2, + dof2_locally_relevant_dofs); + + PETScWrappers::MPI::Vector u2_out (&u1.get_mpi_communicator(), + dof2_locally_owned_dofs); + interpolate(dof1, u1, dof2, constraints2, u2_out); + PETScWrappers::MPI::Vector u2 (u1.get_mpi_communicator(), + dof2_locally_owned_dofs, + dof2_locally_relevant_dofs); + u2 = u2_out; + interpolate(dof2, u2, dof1, constraints1, u1_interpolated); + } +#endif + + // special version for parallel::distributed::Vector + template + void back_interpolate (const DoFHandler &dof1, + const ConstraintMatrix &constraints1, + const parallel::distributed::Vector &u1, + const DoFHandler &dof2, + const ConstraintMatrix &constraints2, + parallel::distributed::Vector &u1_interpolated) + { + IndexSet dof2_locally_owned_dofs = dof2.locally_owned_dofs(); + IndexSet dof2_locally_relevant_dofs; + DoFTools::extract_locally_relevant_dofs (dof2, + dof2_locally_relevant_dofs); + + parallel::distributed::Vector + u2 (dof2_locally_owned_dofs, + dof2_locally_relevant_dofs, + u1.get_mpi_communicator()); + + interpolate(dof1, u1, dof2, constraints2, u2); + u2.update_ghost_values (); + interpolate(dof2, u2, dof1, constraints1, u1_interpolated); + } + } + } + + template void back_interpolate(const DoFHandler &dof1, const ConstraintMatrix &constraints1, @@ -1638,10 +1711,8 @@ namespace FETools const ConstraintMatrix &constraints2, OutVector &u1_interpolated) { - // For discontinuous elements - // without constraints take the - // simpler version of the - // back_interpolate function. + // For discontinuous elements without constraints take the simpler version + // of the back_interpolate function. if (dof1.get_fe().dofs_per_vertex==0 && dof2.get_fe().dofs_per_vertex==0 && constraints1.n_constraints()==0 && constraints2.n_constraints()==0) back_interpolate(dof1, u1, dof2.get_fe(), u1_interpolated); @@ -1653,44 +1724,11 @@ namespace FETools Assert(u1_interpolated.size()==dof1.n_dofs(), ExcDimensionMismatch(u1_interpolated.size(), dof1.n_dofs())); - // For continuous elements - // first interpolate to dof2, - // taking into account - // constraints2, and then - // interpolate back to dof1 - // taking into account - // constraints1 -#ifdef DEAL_II_WITH_PETSC - if (dynamic_cast(&u1) != 0) - { - AssertThrow (dynamic_cast(&u1_interpolated) != 0, - ExcMessage("Interpolation can only be done between vectors of same type!")); - - // if u1 is a parallel distributed - // PETSc vector, we create a vector u2 - // with based on the sets of locally owned - // and relevant dofs of dof2 - IndexSet dof2_locally_owned_dofs = dof2.locally_owned_dofs(); - IndexSet dof2_locally_relevant_dofs; - DoFTools::extract_locally_relevant_dofs (dof2, - dof2_locally_relevant_dofs); - - PETScWrappers::MPI::Vector u2_out (dynamic_cast (&u1)->get_mpi_communicator(), - dof2_locally_owned_dofs); - interpolate(dof1, u1, dof2, constraints2, u2_out); - PETScWrappers::MPI::Vector u2 (dynamic_cast (&u1)->get_mpi_communicator(), - dof2_locally_owned_dofs, - dof2_locally_relevant_dofs); - u2 = u2_out; - interpolate(dof2, u2, dof1, constraints1, u1_interpolated); - } - else -#endif - { - Vector u2(dof2.n_dofs()); - interpolate(dof1, u1, dof2, constraints2, u2); - interpolate(dof2, u2, dof1, constraints1, u1_interpolated); - } + // For continuous elements first interpolate to dof2, taking into + // account constraints2, and then interpolate back to dof1 taking into + // account constraints1 + internal::back_interpolate(dof1, constraints1, u1, dof2, constraints2, + u1_interpolated); } } diff --git a/tests/bits/fe_tools_06b.cc b/tests/bits/fe_tools_06b.cc new file mode 100644 index 0000000000..d729e35a37 --- /dev/null +++ b/tests/bits/fe_tools_06b.cc @@ -0,0 +1,63 @@ +//---------------------------- fe_tools_06b.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2003, 2004, 2013 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- fe_tools_06b.cc --------------------------- + +#include "../tests.h" +#include "fe_tools_common.h" +#include +#include + +// check +// FETools::back_interpolate(6) with parallel vector + + +std::string output_file_name = "fe_tools_06b/output"; + + +template +void +check_this (const FiniteElement &fe1, + const FiniteElement &fe2) +{ + // only check if both elements have + // support points. otherwise, + // interpolation doesn't really + // work + if ((fe1.get_unit_support_points().size() == 0) || + (fe2.get_unit_support_points().size() == 0)) + return; + // likewise for non-primitive elements + if (!fe1.is_primitive() || !fe2.is_primitive()) + return; + // we need to have dof_constraints + // for this test + if (!fe1.constraints_are_implemented() || + !fe2.constraints_are_implemented()) + return; + + std::auto_ptr > tria(make_tria()); + std::auto_ptr > dof1(make_dof_handler (*tria, fe1)); + std::auto_ptr > dof2(make_dof_handler (*tria, fe2)); + ConstraintMatrix cm1, cm2; + DoFTools::make_hanging_node_constraints (*dof1, cm1); + DoFTools::make_hanging_node_constraints (*dof2, cm2); + cm1.close (); + cm2.close (); + + parallel::distributed::Vector in (dof1->n_dofs()); + for (unsigned int i=0; i out (dof1->n_dofs()); + + FETools::back_interpolate (*dof1, cm1, in, *dof2, cm2, out); + output_vector (out); +} + diff --git a/tests/bits/fe_tools_06b/cmp/generic b/tests/bits/fe_tools_06b/cmp/generic new file mode 100644 index 0000000000..757bd41296 --- /dev/null +++ b/tests/bits/fe_tools_06b/cmp/generic @@ -0,0 +1,367 @@ + +DEAL::Checking Q1 against Q1 in 1d: +DEAL::Checking Q1 against Q1 in 1d: +DEAL::Checking Q1 against Q1 in 2d: +DEAL::127.000 36.8578 16.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 0.500000 13.0000 14.0000 15.0000 16.0000 2.50000 +DEAL::Checking Q1 against Q1 in 2d: +DEAL::127.000 36.8578 16.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 0.500000 13.0000 14.0000 15.0000 16.0000 2.50000 +DEAL::Checking Q1 against Q1 in 3d: +DEAL::1136.50 186.936 52.0000 +DEAL::0 3.00000 6.00000 9.00000 12.0000 15.0000 18.0000 21.0000 24.0000 27.0000 30.0000 33.0000 0.500000 3.00000 8.50000 45.0000 48.0000 51.0000 6.00000 11.5000 +DEAL::Checking Q1 against Q1 in 3d: +DEAL::1136.50 186.936 52.0000 +DEAL::0 3.00000 6.00000 9.00000 12.0000 15.0000 18.0000 21.0000 24.0000 27.0000 30.0000 33.0000 0.500000 3.00000 8.50000 45.0000 48.0000 51.0000 6.00000 11.5000 +DEAL::Checking Q1 against Q2 in 1d: +DEAL::Checking Q2 against Q1 in 1d: +DEAL::Checking Q1 against Q2 in 2d: +DEAL::127.000 36.8578 16.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 0.500000 13.0000 14.0000 15.0000 16.0000 2.50000 +DEAL::Checking Q2 against Q1 in 2d: +DEAL::969.750 164.975 45.0000 +DEAL::0 2.00000 1.00000 0.500000 1.50000 10.0000 5.00000 5.75000 16.0000 18.0000 17.0000 17.5000 24.0000 24.5000 21.5000 0.500000 9.25000 8.87500 0.750000 38.0000 38.5000 32.0000 44.0000 44.5000 42.0000 5.00000 3.00000 27.0000 24.5000 +DEAL::Checking Q1 against Q2 in 3d: +DEAL::1136.50 186.936 52.0000 +DEAL::0 3.00000 6.00000 9.00000 12.0000 15.0000 18.0000 21.0000 24.0000 27.0000 30.0000 33.0000 0.500000 3.00000 8.50000 45.0000 48.0000 51.0000 6.00000 11.5000 +DEAL::Checking Q2 against Q1 in 3d: +DEAL::23978.0 1791.30 245.000 +DEAL::0 2.00000 14.0000 48.0000 46.5000 58.2500 36.5000 112.000 109.500 133.500 1.50000 63.1250 68.1250 14.7500 224.000 180.500 235.000 28.0000 141.750 53.1875 80.9688 +DEAL::Checking Q1 against Q3 in 1d: +DEAL::Checking Q3 against Q1 in 1d: +DEAL::Checking Q1 against Q3 in 2d: +DEAL::127.000 36.8578 16.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 0.500000 13.0000 14.0000 15.0000 16.0000 2.50000 +DEAL::Checking Q3 against Q1 in 2d: +DEAL::3695.00 446.584 88.0000 +DEAL::0 1.33333 2.33333 2.00000 6.00000 11.4444 30.0000 30.3333 29.0000 45.0000 35.6667 39.8889 10.6667 10.2222 0.833333 75.0000 64.6667 55.0000 87.6667 79.3333 53.5000 45.7778 11.0000 37.0000 +DEAL::Checking Q1 against Q3 in 3d: +DEAL::1136.50 186.936 52.0000 +DEAL::0 3.00000 6.00000 9.00000 12.0000 15.0000 18.0000 21.0000 24.0000 27.0000 30.0000 33.0000 0.500000 3.00000 8.50000 45.0000 48.0000 51.0000 6.00000 11.5000 +DEAL::Checking Q3 against Q1 in 3d: +DEAL::179341. 8024.07 668.000 +DEAL::0 5.00000 43.8889 114.333 173.667 76.3333 198.444 284.000 344.667 2.16667 231.000 157.556 224.222 71.9815 528.000 667.333 229.333 43.8889 86.9444 35.5000 319.593 +DEAL::Checking Q2 against Q2 in 1d: +DEAL::Checking Q2 against Q2 in 1d: +DEAL::Checking Q2 against Q2 in 2d: +DEAL::1387.75 221.457 56.0000 +DEAL::0 2.00000 4.00000 6.00000 8.00000 10.0000 12.0000 14.0000 16.0000 18.0000 20.0000 22.0000 24.0000 26.0000 28.0000 6.00000 32.0000 34.0000 4.87500 38.0000 40.0000 42.0000 44.0000 46.0000 48.0000 12.0000 8.25000 54.0000 56.0000 +DEAL::Checking Q2 against Q2 in 2d: +DEAL::1387.75 221.457 56.0000 +DEAL::0 2.00000 4.00000 6.00000 8.00000 10.0000 12.0000 14.0000 16.0000 18.0000 20.0000 22.0000 24.0000 26.0000 28.0000 6.00000 32.0000 34.0000 4.87500 38.0000 40.0000 42.0000 44.0000 46.0000 48.0000 12.0000 8.25000 54.0000 56.0000 +DEAL::Checking Q2 against Q2 in 3d: +DEAL::37413.6 2632.59 320.000 +DEAL::0 16.0000 32.0000 48.0000 64.0000 80.0000 96.0000 112.000 128.000 144.000 18.5000 176.000 192.000 48.1250 224.000 240.000 256.000 37.0000 288.000 85.0156 320.000 +DEAL::Checking Q2 against Q2 in 3d: +DEAL::37413.6 2632.59 320.000 +DEAL::0 16.0000 32.0000 48.0000 64.0000 80.0000 96.0000 112.000 128.000 144.000 18.5000 176.000 192.000 48.1250 224.000 240.000 256.000 37.0000 288.000 85.0156 320.000 +DEAL::Checking Q2 against Q3 in 1d: +DEAL::Checking Q3 against Q2 in 1d: +DEAL::Checking Q2 against Q3 in 2d: +DEAL::1400.77 224.200 58.6719 +DEAL::0 2.00000 4.00000 6.00000 8.00000 10.0000 12.0000 14.0000 16.0000 18.0000 20.0000 22.0000 24.0000 26.0000 28.0000 6.00000 33.5000 35.7891 4.87500 38.0000 40.0000 42.0000 44.0000 46.0000 48.0000 12.0000 8.25000 54.0000 58.6719 +DEAL::Checking Q3 against Q2 in 2d: +DEAL::5880.56 654.542 123.046 +DEAL::0 4.83333 10.3333 14.1667 18.0000 27.1944 30.0000 34.8333 40.8333 45.0000 48.1667 55.8056 53.3333 56.0278 5.83333 75.0000 84.6667 79.6667 89.6667 94.1667 105.222 116.843 23.0000 98.2130 +DEAL::Checking Q2 against Q3 in 3d: +DEAL::38201.5 2708.76 354.239 +DEAL::0 16.0000 32.0000 48.0000 64.0000 80.0000 96.0000 112.000 128.000 144.000 18.5000 185.383 199.617 48.1250 224.000 240.000 256.000 37.0000 301.125 85.0156 354.239 +DEAL::Checking Q3 against Q2 in 3d: +DEAL::314349. 12980.0 1070.03 +DEAL::0 46.5000 97.5556 134.833 179.667 190.333 276.778 315.500 360.167 37.8229 488.516 450.597 545.516 501.894 675.000 675.333 597.821 97.5556 181.049 81.6250 1040.68 +DEAL::Checking Q3 against Q3 in 1d: +DEAL::Checking Q3 against Q3 in 1d: +DEAL::Checking Q3 against Q3 in 2d: +DEAL::5959.50 663.430 115.000 +DEAL::0 5.00000 10.0000 15.0000 20.0000 25.0000 30.0000 35.0000 40.0000 45.0000 50.0000 55.0000 60.0000 65.0000 6.25000 75.0000 80.0000 85.0000 90.0000 95.0000 100.000 105.000 21.0000 115.000 +DEAL::Checking Q3 against Q3 in 2d: +DEAL::5959.50 663.430 115.000 +DEAL::0 5.00000 10.0000 15.0000 20.0000 25.0000 30.0000 35.0000 40.0000 45.0000 50.0000 55.0000 60.0000 65.0000 6.25000 75.0000 80.0000 85.0000 90.0000 95.0000 100.000 105.000 21.0000 115.000 +DEAL::Checking Q3 against Q3 in 3d: +DEAL::323341. 13366.6 907.000 +DEAL::0 45.0000 90.0000 135.000 180.000 225.000 270.000 315.000 360.000 36.9375 450.000 495.000 540.000 585.000 630.000 675.000 720.000 90.0000 173.750 81.6250 900.000 +DEAL::Checking Q3 against Q3 in 3d: +DEAL::323341. 13366.6 907.000 +DEAL::0 45.0000 90.0000 135.000 180.000 225.000 270.000 315.000 360.000 36.9375 450.000 495.000 540.000 585.000 630.000 675.000 720.000 90.0000 173.750 81.6250 900.000 +DEAL::Checking DGQ0 against DGQ0 in 1d: +DEAL::6.00000 3.74166 3.00000 +DEAL::0 1.00000 2.00000 3.00000 +DEAL::Checking DGQ0 against DGQ0 in 1d: +DEAL::6.00000 3.74166 3.00000 +DEAL::0 1.00000 2.00000 3.00000 +DEAL::Checking DGQ0 against DGQ0 in 2d: +DEAL::45.0000 16.8819 9.00000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 +DEAL::Checking DGQ0 against DGQ0 in 2d: +DEAL::45.0000 16.8819 9.00000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 +DEAL::Checking DGQ0 against DGQ0 in 3d: +DEAL::231.000 57.5413 21.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 16.0000 17.0000 18.0000 19.0000 20.0000 21.0000 +DEAL::Checking DGQ0 against DGQ0 in 3d: +DEAL::231.000 57.5413 21.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 16.0000 17.0000 18.0000 19.0000 20.0000 21.0000 +DEAL::Checking DGQ0 against DGQ1 in 1d: +DEAL::6.00000 3.74166 3.00000 +DEAL::0 1.00000 2.00000 3.00000 +DEAL::Checking DGQ1 against DGQ0 in 1d: +DEAL::28.0000 11.7473 6.50000 +DEAL::0.500000 0.500000 2.50000 2.50000 4.50000 4.50000 6.50000 6.50000 +DEAL::Checking DGQ0 against DGQ1 in 2d: +DEAL::45.0000 16.8819 9.00000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 +DEAL::Checking DGQ1 against DGQ0 in 2d: +DEAL::780.000 143.143 37.5000 +DEAL::1.50000 1.50000 5.50000 5.50000 9.50000 9.50000 13.5000 13.5000 17.5000 17.5000 21.5000 21.5000 25.5000 25.5000 29.5000 29.5000 33.5000 33.5000 37.5000 37.5000 +DEAL::Checking DGQ0 against DGQ1 in 3d: +DEAL::231.000 57.5413 21.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 16.0000 17.0000 18.0000 19.0000 20.0000 21.0000 +DEAL::Checking DGQ1 against DGQ0 in 3d: +DEAL::15400.0 1341.97 171.500 +DEAL::3.50000 11.5000 19.5000 27.5000 35.5000 43.5000 51.5000 59.5000 67.5000 75.5000 83.5000 91.5000 99.5000 107.500 115.500 123.500 131.500 139.500 147.500 155.500 163.500 171.500 +DEAL::Checking DGQ0 against DGQ2 in 1d: +DEAL::6.00000 3.74166 3.00000 +DEAL::0 1.00000 2.00000 3.00000 +DEAL::Checking DGQ2 against DGQ0 in 1d: +DEAL::66.0000 22.3159 10.0000 +DEAL::1.00000 1.00000 1.00000 4.00000 4.00000 4.00000 7.00000 7.00000 7.00000 10.0000 10.0000 10.0000 +DEAL::Checking DGQ0 against DGQ2 in 2d: +DEAL::45.0000 16.8819 9.00000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 +DEAL::Checking DGQ2 against DGQ0 in 2d: +DEAL::4005.00 488.226 85.0000 +DEAL::4.00000 4.00000 4.00000 13.0000 13.0000 22.0000 22.0000 31.0000 31.0000 40.0000 40.0000 40.0000 49.0000 49.0000 58.0000 58.0000 67.0000 67.0000 76.0000 76.0000 76.0000 85.0000 85.0000 +DEAL::Checking DGQ0 against DGQ2 in 3d: +DEAL::231.000 57.5413 21.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 16.0000 17.0000 18.0000 19.0000 20.0000 21.0000 +DEAL::Checking DGQ2 against DGQ0 in 3d: +DEAL::176121. 8345.61 580.000 +DEAL::13.0000 40.0000 67.0000 94.0000 121.000 148.000 175.000 202.000 229.000 256.000 283.000 310.000 337.000 364.000 418.000 445.000 472.000 499.000 526.000 553.000 580.000 +DEAL::Checking DGQ0 against DGQ4 in 1d: +DEAL::6.00000 3.74166 3.00000 +DEAL::0 1.00000 2.00000 3.00000 +DEAL::Checking DGQ4 against DGQ0 in 1d: +DEAL::190.000 49.2950 17.0000 +DEAL::2.00000 2.00000 2.00000 2.00000 2.00000 7.00000 7.00000 7.00000 7.00000 7.00000 12.0000 12.0000 12.0000 12.0000 12.0000 17.0000 17.0000 17.0000 17.0000 17.0000 +DEAL::Checking DGQ0 against DGQ4 in 2d: +DEAL::45.0000 16.8819 9.00000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 +DEAL::Checking DGQ4 against DGQ0 in 2d: +DEAL::31125.0 2272.47 237.000 +DEAL::12.0000 12.0000 12.0000 37.0000 37.0000 62.0000 62.0000 87.0000 87.0000 112.000 112.000 137.000 137.000 162.000 162.000 187.000 187.000 212.000 212.000 237.000 237.000 +DEAL::Checking DGQ0 against DGQ4 in 3d: +DEAL::231.000 57.5413 21.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 16.0000 17.0000 18.0000 19.0000 20.0000 21.0000 +DEAL::Checking DGQ4 against DGQ0 in 3d: +DEAL::3.77988e+06 83216.2 2687.00 +DEAL::62.0000 187.000 312.000 437.000 562.000 687.000 812.000 937.000 1062.00 1187.00 1312.00 1562.00 1687.00 1812.00 1937.00 2062.00 2187.00 2312.00 2437.00 2562.00 2687.00 +DEAL::Checking DGQ1 against DGQ1 in 1d: +DEAL::28.0000 11.8322 7.00000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 +DEAL::Checking DGQ1 against DGQ1 in 1d: +DEAL::28.0000 11.8322 7.00000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 +DEAL::Checking DGQ1 against DGQ1 in 2d: +DEAL::780.000 143.318 39.0000 +DEAL::0 2.00000 4.00000 6.00000 8.00000 10.0000 12.0000 14.0000 16.0000 18.0000 20.0000 22.0000 24.0000 26.0000 28.0000 30.0000 32.0000 34.0000 36.0000 38.0000 +DEAL::Checking DGQ1 against DGQ1 in 2d: +DEAL::780.000 143.318 39.0000 +DEAL::0 2.00000 4.00000 6.00000 8.00000 10.0000 12.0000 14.0000 16.0000 18.0000 20.0000 22.0000 24.0000 26.0000 28.0000 30.0000 32.0000 34.0000 36.0000 38.0000 +DEAL::Checking DGQ1 against DGQ1 in 3d: +DEAL::15400.0 1342.31 175.000 +DEAL::0 8.00000 16.0000 24.0000 32.0000 40.0000 48.0000 56.0000 64.0000 72.0000 80.0000 88.0000 96.0000 104.000 112.000 120.000 128.000 136.000 144.000 152.000 160.000 168.000 +DEAL::Checking DGQ1 against DGQ1 in 3d: +DEAL::15400.0 1342.31 175.000 +DEAL::0 8.00000 16.0000 24.0000 32.0000 40.0000 48.0000 56.0000 64.0000 72.0000 80.0000 88.0000 96.0000 104.000 112.000 120.000 128.000 136.000 144.000 152.000 160.000 168.000 +DEAL::Checking DGQ1 against DGQ3 in 1d: +DEAL::28.0000 11.8322 7.00000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 +DEAL::Checking DGQ3 against DGQ1 in 1d: +DEAL::120.000 35.2136 15.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 +DEAL::Checking DGQ1 against DGQ3 in 2d: +DEAL::780.000 143.318 39.0000 +DEAL::0 2.00000 4.00000 6.00000 8.00000 10.0000 12.0000 14.0000 16.0000 18.0000 20.0000 22.0000 24.0000 26.0000 28.0000 30.0000 32.0000 34.0000 36.0000 38.0000 +DEAL::Checking DGQ3 against DGQ1 in 2d: +DEAL::12720.0 1163.00 159.000 +DEAL::0 8.00000 16.0000 24.0000 32.0000 40.0000 48.0000 56.0000 64.0000 72.0000 80.0000 88.0000 96.0000 104.000 112.000 120.000 128.000 136.000 144.000 152.000 +DEAL::Checking DGQ1 against DGQ3 in 3d: +DEAL::15400.0 1342.31 175.000 +DEAL::0 8.00000 16.0000 24.0000 32.0000 40.0000 48.0000 56.0000 64.0000 72.0000 80.0000 88.0000 96.0000 104.000 112.000 120.000 128.000 136.000 144.000 152.000 160.000 168.000 +DEAL::Checking DGQ3 against DGQ1 in 3d: +DEAL::990528. 30486.8 1407.00 +DEAL::0 70.0000 140.000 210.000 280.000 350.000 420.000 490.000 560.000 630.000 700.000 770.000 840.000 910.000 980.000 1050.00 1120.00 1190.00 1260.00 1330.00 1400.00 +DEAL::Checking DGQ2 against DGQ2 in 1d: +DEAL::66.0000 22.4944 11.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 +DEAL::Checking DGQ2 against DGQ2 in 1d: +DEAL::66.0000 22.4944 11.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 +DEAL::Checking DGQ2 against DGQ2 in 2d: +DEAL::4005.00 488.840 89.0000 +DEAL::0 4.00000 8.00000 12.0000 16.0000 20.0000 24.0000 28.0000 32.0000 36.0000 40.0000 44.0000 48.0000 52.0000 56.0000 60.0000 64.0000 68.0000 72.0000 76.0000 80.0000 84.0000 88.0000 +DEAL::Checking DGQ2 against DGQ2 in 2d: +DEAL::4005.00 488.840 89.0000 +DEAL::0 4.00000 8.00000 12.0000 16.0000 20.0000 24.0000 28.0000 32.0000 36.0000 40.0000 44.0000 48.0000 52.0000 56.0000 60.0000 64.0000 68.0000 72.0000 76.0000 80.0000 84.0000 88.0000 +DEAL::Checking DGQ2 against DGQ2 in 3d: +DEAL::176121. 8347.77 593.000 +DEAL::0 29.0000 58.0000 87.0000 116.000 145.000 174.000 203.000 232.000 261.000 290.000 319.000 348.000 377.000 406.000 435.000 464.000 493.000 522.000 551.000 580.000 +DEAL::Checking DGQ2 against DGQ2 in 3d: +DEAL::176121. 8347.77 593.000 +DEAL::0 29.0000 58.0000 87.0000 116.000 145.000 174.000 203.000 232.000 261.000 290.000 319.000 348.000 377.000 406.000 435.000 464.000 493.000 522.000 551.000 580.000 +DEAL::Checking DGQ2 against DGQ2 in 1d: +DEAL::66.0000 22.4944 11.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 +DEAL::Checking DGQ2 against DGQ2 in 1d: +DEAL::66.0000 22.4944 11.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 +DEAL::Checking DGQ2 against DGQ2 in 2d: +DEAL::4005.00 488.840 89.0000 +DEAL::0 4.00000 8.00000 12.0000 16.0000 20.0000 24.0000 28.0000 32.0000 36.0000 40.0000 44.0000 48.0000 52.0000 56.0000 60.0000 64.0000 68.0000 72.0000 76.0000 80.0000 84.0000 88.0000 +DEAL::Checking DGQ2 against DGQ2 in 2d: +DEAL::4005.00 488.840 89.0000 +DEAL::0 4.00000 8.00000 12.0000 16.0000 20.0000 24.0000 28.0000 32.0000 36.0000 40.0000 44.0000 48.0000 52.0000 56.0000 60.0000 64.0000 68.0000 72.0000 76.0000 80.0000 84.0000 88.0000 +DEAL::Checking DGQ2 against DGQ2 in 3d: +DEAL::176121. 8347.77 593.000 +DEAL::0 29.0000 58.0000 87.0000 116.000 145.000 174.000 203.000 232.000 261.000 290.000 319.000 348.000 377.000 406.000 435.000 464.000 493.000 522.000 551.000 580.000 +DEAL::Checking DGQ2 against DGQ2 in 3d: +DEAL::176121. 8347.77 593.000 +DEAL::0 29.0000 58.0000 87.0000 116.000 145.000 174.000 203.000 232.000 261.000 290.000 319.000 348.000 377.000 406.000 435.000 464.000 493.000 522.000 551.000 580.000 +DEAL::Checking DGQ2 against DGQ4 in 1d: +DEAL::66.0000 22.4944 11.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 +DEAL::Checking DGQ4 against DGQ2 in 1d: +DEAL::190.000 49.6991 19.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 16.0000 17.0000 18.0000 19.0000 +DEAL::Checking DGQ2 against DGQ4 in 2d: +DEAL::4005.00 488.840 89.0000 +DEAL::0 4.00000 8.00000 12.0000 16.0000 20.0000 24.0000 28.0000 32.0000 36.0000 40.0000 44.0000 48.0000 52.0000 56.0000 60.0000 64.0000 68.0000 72.0000 76.0000 80.0000 84.0000 88.0000 +DEAL::Checking DGQ4 against DGQ2 in 2d: +DEAL::31125.0 2275.33 249.000 +DEAL::0 12.0000 24.0000 36.0000 48.0000 60.0000 72.0000 84.0000 96.0000 108.000 120.000 132.000 144.000 156.000 168.000 180.000 192.000 204.000 216.000 228.000 240.000 +DEAL::Checking DGQ2 against DGQ4 in 3d: +DEAL::176121. 8347.77 593.000 +DEAL::0 29.0000 58.0000 87.0000 116.000 145.000 174.000 203.000 232.000 261.000 290.000 319.000 348.000 377.000 406.000 435.000 464.000 493.000 522.000 551.000 580.000 +DEAL::Checking DGQ4 against DGQ2 in 3d: +DEAL::3.77988e+06 83237.7 2749.00 +DEAL::0 137.000 274.000 411.000 548.000 685.000 822.000 959.000 1096.00 1233.00 1370.00 1507.00 1644.00 1781.00 1918.00 2055.00 2192.00 2329.00 2466.00 2603.00 2740.00 +DEAL::Checking DGQ3 against DGQ3 in 1d: +DEAL::120.000 35.2136 15.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 +DEAL::Checking DGQ3 against DGQ3 in 1d: +DEAL::120.000 35.2136 15.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 +DEAL::Checking DGQ3 against DGQ3 in 2d: +DEAL::12720.0 1163.00 159.000 +DEAL::0 8.00000 16.0000 24.0000 32.0000 40.0000 48.0000 56.0000 64.0000 72.0000 80.0000 88.0000 96.0000 104.000 112.000 120.000 128.000 136.000 144.000 152.000 +DEAL::Checking DGQ3 against DGQ3 in 2d: +DEAL::12720.0 1163.00 159.000 +DEAL::0 8.00000 16.0000 24.0000 32.0000 40.0000 48.0000 56.0000 64.0000 72.0000 80.0000 88.0000 96.0000 104.000 112.000 120.000 128.000 136.000 144.000 152.000 +DEAL::Checking DGQ3 against DGQ3 in 3d: +DEAL::990528. 30486.8 1407.00 +DEAL::0 70.0000 140.000 210.000 280.000 350.000 420.000 490.000 560.000 630.000 700.000 770.000 840.000 910.000 980.000 1050.00 1120.00 1190.00 1260.00 1330.00 1400.00 +DEAL::Checking DGQ3 against DGQ3 in 3d: +DEAL::990528. 30486.8 1407.00 +DEAL::0 70.0000 140.000 210.000 280.000 350.000 420.000 490.000 560.000 630.000 700.000 770.000 840.000 910.000 980.000 1050.00 1120.00 1190.00 1260.00 1330.00 1400.00 +DEAL::Checking DGP0 against DGP0 in 1d: +DEAL::Checking DGP0 against DGP0 in 1d: +DEAL::Checking DGP0 against DGP0 in 2d: +DEAL::Checking DGP0 against DGP0 in 2d: +DEAL::Checking DGP0 against DGP0 in 3d: +DEAL::Checking DGP0 against DGP0 in 3d: +DEAL::Checking DGP0 against DGP1 in 1d: +DEAL::Checking DGP1 against DGP0 in 1d: +DEAL::Checking DGP0 against DGP1 in 2d: +DEAL::Checking DGP1 against DGP0 in 2d: +DEAL::Checking DGP0 against DGP1 in 3d: +DEAL::Checking DGP1 against DGP0 in 3d: +DEAL::Checking DGP0 against DGP2 in 1d: +DEAL::Checking DGP2 against DGP0 in 1d: +DEAL::Checking DGP0 against DGP2 in 2d: +DEAL::Checking DGP2 against DGP0 in 2d: +DEAL::Checking DGP0 against DGP2 in 3d: +DEAL::Checking DGP2 against DGP0 in 3d: +DEAL::Checking DGP0 against DGP4 in 1d: +DEAL::Checking DGP4 against DGP0 in 1d: +DEAL::Checking DGP0 against DGP4 in 2d: +DEAL::Checking DGP4 against DGP0 in 2d: +DEAL::Checking DGP0 against DGP4 in 3d: +DEAL::Checking DGP4 against DGP0 in 3d: +DEAL::Checking DGP1 against DGP1 in 1d: +DEAL::Checking DGP1 against DGP1 in 1d: +DEAL::Checking DGP1 against DGP1 in 2d: +DEAL::Checking DGP1 against DGP1 in 2d: +DEAL::Checking DGP1 against DGP1 in 3d: +DEAL::Checking DGP1 against DGP1 in 3d: +DEAL::Checking DGP1 against DGP3 in 1d: +DEAL::Checking DGP3 against DGP1 in 1d: +DEAL::Checking DGP1 against DGP3 in 2d: +DEAL::Checking DGP3 against DGP1 in 2d: +DEAL::Checking DGP1 against DGP3 in 3d: +DEAL::Checking DGP3 against DGP1 in 3d: +DEAL::Checking DGP2 against DGP2 in 1d: +DEAL::Checking DGP2 against DGP2 in 1d: +DEAL::Checking DGP2 against DGP2 in 2d: +DEAL::Checking DGP2 against DGP2 in 2d: +DEAL::Checking DGP2 against DGP2 in 3d: +DEAL::Checking DGP2 against DGP2 in 3d: +DEAL::Checking DGP2 against DGP2 in 1d: +DEAL::Checking DGP2 against DGP2 in 1d: +DEAL::Checking DGP2 against DGP2 in 2d: +DEAL::Checking DGP2 against DGP2 in 2d: +DEAL::Checking DGP2 against DGP2 in 3d: +DEAL::Checking DGP2 against DGP2 in 3d: +DEAL::Checking DGP2 against DGP4 in 1d: +DEAL::Checking DGP4 against DGP2 in 1d: +DEAL::Checking DGP2 against DGP4 in 2d: +DEAL::Checking DGP4 against DGP2 in 2d: +DEAL::Checking DGP2 against DGP4 in 3d: +DEAL::Checking DGP4 against DGP2 in 3d: +DEAL::Checking DGP3 against DGP3 in 1d: +DEAL::Checking DGP3 against DGP3 in 1d: +DEAL::Checking DGP3 against DGP3 in 2d: +DEAL::Checking DGP3 against DGP3 in 2d: +DEAL::Checking DGP3 against DGP3 in 3d: +DEAL::Checking DGP3 against DGP3 in 3d: +DEAL::Checking Nedelec0 against Nedelec0 in 2d: +DEAL::Checking Nedelec0 against Nedelec0 in 2d: +DEAL::Checking Nedelec0 against Nedelec0 in 3d: +DEAL::Checking Nedelec0 against Nedelec0 in 3d: +DEAL::Checking FE_Q<1>(1)3 against FE_Q<1>(2)3 in 1d: +DEAL::Checking FE_Q<1>(2)3 against FE_Q<1>(1)3 in 1d: +DEAL::Checking FE_DGQ<1>(2)2 against FE_DGQ<1>(3)2 in 1d: +DEAL::276.000 65.7571 23.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 16.0000 17.0000 18.0000 19.0000 20.0000 21.0000 22.0000 23.0000 +DEAL::Checking FE_DGQ<1>(3)2 against FE_DGQ<1>(2)2 in 1d: +DEAL::496.000 102.059 31.0000 +DEAL::0 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 16.0000 17.0000 18.0000 19.0000 20.0000 21.0000 22.0000 23.0000 24.0000 25.0000 26.0000 27.0000 28.0000 29.0000 30.0000 31.0000 +DEAL::Checking FE_DGP<1>(3)1 against FE_DGP<1>(1)1 in 1d: +DEAL::Checking FE_DGP<1>(1)1 against FE_DGP<1>(3)1 in 1d: +DEAL::Checking FE_Q<2>(1)3 against FE_Q<2>(2)3 in 2d: +DEAL::1197.00 197.625 50.0000 +DEAL::0 2.00000 4.00000 6.00000 8.00000 10.0000 12.0000 14.0000 16.0000 18.0000 20.0000 22.0000 24.0000 26.0000 28.0000 30.0000 32.0000 34.0000 1.50000 3.50000 40.0000 42.0000 44.0000 46.0000 48.0000 50.0000 8.50000 +DEAL::Checking FE_Q<2>(2)3 against FE_Q<2>(1)3 in 2d: +DEAL::8898.75 867.522 137.000 +DEAL::0 8.00000 7.00000 4.50000 32.0000 20.5000 48.0000 56.0000 47.5000 72.0000 75.5000 63.2500 27.7500 28.6250 34.3750 115.500 98.0000 136.000 126.000 17.0000 53.5000 73.5000 +DEAL::Checking FE_DGQ<2>(2)2 against FE_DGQ<2>(3)2 in 2d: +DEAL::16110.0 1388.46 179.000 +DEAL::0 9.00000 18.0000 27.0000 36.0000 45.0000 54.0000 63.0000 72.0000 81.0000 90.0000 99.0000 108.000 117.000 126.000 135.000 144.000 153.000 162.000 171.000 +DEAL::Checking FE_DGQ<2>(3)2 against FE_DGQ<2>(2)2 in 2d: +DEAL::51040.0 3297.20 319.000 +DEAL::0 16.0000 32.0000 48.0000 64.0000 80.0000 96.0000 112.000 128.000 144.000 160.000 176.000 192.000 208.000 224.000 240.000 256.000 272.000 288.000 304.000 +DEAL::Checking FE_DGP<2>(3)1 against FE_DGP<2>(1)1 in 2d: +DEAL::Checking FE_DGP<2>(1)1 against FE_DGP<2>(3)1 in 2d: +DEAL::Checking FE_Q<3>(1)3 against FE_Q<3>(2)3 in 3d: +DEAL::10408.5 981.977 158.000 +DEAL::0 9.00000 18.0000 27.0000 36.0000 45.0000 54.0000 63.0000 72.0000 81.0000 90.0000 99.0000 1.50000 9.00000 25.5000 135.000 144.000 153.000 18.0000 34.5000 +DEAL::Checking FE_Q<3>(2)3 against FE_Q<3>(1)3 in 3d: +DEAL::216765. 9331.10 737.000 +DEAL::0 6.00000 42.0000 144.000 139.500 174.750 109.500 336.000 328.500 400.500 4.50000 189.375 204.375 44.2500 672.000 541.500 705.000 84.0000 425.250 159.562 242.906 +DEAL::Checking FE_DGQ<3>(2)2 against FE_DGQ<3>(3)2 in 3d: +DEAL::705078. 23626.0 1187.00 +DEAL::0 59.0000 118.000 177.000 236.000 295.000 354.000 413.000 472.000 531.000 590.000 649.000 708.000 767.000 826.000 885.000 944.000 1003.00 1062.00 1121.00 1180.00 +DEAL::Checking FE_DGQ<3>(3)2 against FE_DGQ<3>(2)2 in 3d: +DEAL::3.96352e+06 86252.7 2815.00 +DEAL::0 140.000 280.000 420.000 560.000 700.000 840.000 980.000 1120.00 1260.00 1400.00 1540.00 1680.00 1820.00 1960.00 2100.00 2240.00 2380.00 2520.00 2660.00 2800.00 +DEAL::Checking FE_DGP<3>(3)1 against FE_DGP<3>(1)1 in 3d: +DEAL::Checking FE_DGP<3>(1)1 against FE_DGP<3>(3)1 in 3d: diff --git a/tests/mpi/parallel_vector_back_interpolate.cc b/tests/mpi/parallel_vector_back_interpolate.cc new file mode 100644 index 0000000000..e7457c044b --- /dev/null +++ b/tests/mpi/parallel_vector_back_interpolate.cc @@ -0,0 +1,95 @@ +//-------------------------- parallel_vector_back_interpolate.cc ----------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2011, 2013 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//-------------------------- parallel_vector_back_interpolate.cc ----------------------- + +// check FETools::back_interpolate on parallel vector + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +void test () +{ + const unsigned int dim = 2; + + parallel::distributed::Triangulation tria(MPI_COMM_WORLD); + GridGenerator::hyper_cube(tria); + tria.refine_global(3); + tria.begin_active()->set_refine_flag(); + tria.execute_coarsening_and_refinement(); + + FE_Q fe1(1), fe2(2); + DoFHandler dof1(tria), dof2(tria); + dof1.distribute_dofs(fe1); + dof2.distribute_dofs(fe2); + ConstraintMatrix c1, c2; + DoFTools::make_hanging_node_constraints(dof1, c1); + c1.close(); + DoFTools::make_hanging_node_constraints(dof2, c2); + c2.close(); + + IndexSet locally_relevant_dofs2; + DoFTools::extract_locally_relevant_dofs (dof2, + locally_relevant_dofs2); + + parallel::distributed::Vector + v2(dof2.locally_owned_dofs(), locally_relevant_dofs2, MPI_COMM_WORLD), + v2_interpolated(v2); + + // set first vector to 1 + VectorTools::interpolate(dof2, ConstantFunction(1.), v2); + for (unsigned int i=0; i