From: Timo Heister Date: Mon, 27 May 2013 09:24:38 +0000 (+0000) Subject: git-svn-id: https://svn.dealii.org/trunk@29634 0785d39b-7218-0410-832d-ea1e28bc413d X-Git-Tag: v8.0.0~403 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2de40cc4d9369e793766fac057e7ea061af4882;p=dealii.git git-svn-id: https://svn.dealii.org/trunk@29634 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/mpi/trilinos_distribute_04.cc b/tests/mpi/trilinos_distribute_04.cc new file mode 100644 index 0000000000..8d8c04654c --- /dev/null +++ b/tests/mpi/trilinos_distribute_04.cc @@ -0,0 +1,123 @@ +//--------------------------------------------------------------------------- +// $Id: trilinos_distribute_02.cc 29593 2013-05-25 12:29:14Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2009, 2010, 2012, 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. +// +//--------------------------------------------------------------------------- + + +// document bug in the new ConstraintMatrix::distribute(): +/* + + */ + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + + + +template +void test() +{ + const unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); + const unsigned int n_processes = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD); + + parallel::distributed::Triangulation tr(MPI_COMM_WORLD); + + GridGenerator::hyper_cube(tr); + tr.refine_global(2); + + if (myid==0) + { + typename Triangulation::active_cell_iterator it = tr.begin_active(); + ++it;++it;++it; + for (unsigned int i=0;i<5;++i) + { + it->set_refine_flag(); + ++it; + } + } + tr.execute_coarsening_and_refinement(); + + const FE_Q fe(1); + DoFHandler dofh(tr); + dofh.distribute_dofs (fe); + + IndexSet locally_relevant_set; + DoFTools::extract_locally_relevant_dofs (dofh, + locally_relevant_set); + + ConstraintMatrix cm; + cm.reinit (locally_relevant_set); + DoFTools::make_hanging_node_constraints (dofh, cm); + + typename FunctionMap::type dirichlet_boundary; + ZeroFunction homogeneous_dirichlet_bc (1); + dirichlet_boundary[0] = &homogeneous_dirichlet_bc; + VectorTools::interpolate_boundary_values (dofh, + dirichlet_boundary, + cm); + + cm.close(); + + TrilinosWrappers::MPI::Vector vec (dofh.locally_owned_dofs(), MPI_COMM_WORLD); + for (unsigned int i=vec.local_range().first; i(); + } + else + test<2>(); + +} diff --git a/tests/mpi/trilinos_distribute_04/ncpu_1/cmp/generic b/tests/mpi/trilinos_distribute_04/ncpu_1/cmp/generic new file mode 100644 index 0000000000..be8d055f86 --- /dev/null +++ b/tests/mpi/trilinos_distribute_04/ncpu_1/cmp/generic @@ -0,0 +1,2 @@ + +DEAL:0::OK diff --git a/tests/mpi/trilinos_distribute_04/ncpu_2/cmp/generic b/tests/mpi/trilinos_distribute_04/ncpu_2/cmp/generic new file mode 100644 index 0000000000..be8d055f86 --- /dev/null +++ b/tests/mpi/trilinos_distribute_04/ncpu_2/cmp/generic @@ -0,0 +1,2 @@ + +DEAL:0::OK