// $Id$
// Version: $Name$
//
-// Copyright (C) 2009, 2010 by the deal.II authors
+// Copyright (C) 2009, 2010, 2012 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
parallel::distributed::Triangulation<dim> tr(MPI_COMM_WORLD);
-
+
GridGenerator::hyper_cube(tr);
-
+
tr.refine_global (1);
for (unsigned int step=0; step<5;++step)
{
dofh.distribute_dofs (fe);
IndexSet owned_set = dofh.locally_owned_dofs();
-
+
IndexSet dof_set;
DoFTools::extract_locally_active_dofs (dofh, dof_set);
TrilinosWrappers::MPI::Vector x_rel;
x_rel.reinit(relevant_set, MPI_COMM_WORLD);
- x_rel = 0;
x_rel.compress();
-
+
ConstraintMatrix cm(relevant_set);
DoFTools::make_hanging_node_constraints (dofh, cm);
std::vector<bool> velocity_mask (dim+1, true);
-
+
velocity_mask[dim] = false;
VectorTools::interpolate_boundary_values (dofh,
ZeroFunction<dim>(dim+1),
cm,
velocity_mask);
-
+
cm.close ();
TrilinosWrappers::MPI::Vector x_test;
x_test.reinit(x_rel);
-
+
x_test=x;
bool throwing=false;
try
- {
+ {
cm.distribute(x_test);
}
catch (ExcMessage e)
//l2_norm() not possible for ghosted vectors...
//double a=0;//x_test.l2_norm();
//double b=0;//x_rel.l2_norm();
-
+
/* if (myid==0)
deallog << a << " vs " << b << std::endl;
*/
// $Id$
// Version: $Name$
//
-// Copyright (C) 2009, 2010 by the deal.II authors
+// Copyright (C) 2009, 2010, 2012 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
TrilinosWrappers::MPI::Vector x_rel;
x_rel.reinit(relevant_set, MPI_COMM_WORLD);
- x_rel = 0;
x_rel.compress();
ConstraintMatrix cm(relevant_set);
// $Id$
// Version: $Name$
//
-// Copyright (C) 2009, 2010 by the deal.II authors
+// Copyright (C) 2009, 2010, 2012 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
trans.interpolate(x);
x_rel.reinit(relevant_set, MPI_COMM_WORLD);
- x_rel = 0;
x_rel.compress();
ConstraintMatrix cm(relevant_set);
// $Id$
// Version: $Name$
//
-// Copyright (C) 2009, 2010, 2011 by the deal.II authors
+// Copyright (C) 2009, 2010, 2011, 2012 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
tr.execute_coarsening_and_refinement ();
}
-
+
DoFHandler<dim> dofh(tr);
static const FE_Q<dim> fe(1);
dofh.distribute_dofs (fe);
IndexSet owned_set = dofh.locally_owned_dofs();
-
+
IndexSet dof_set;
DoFTools::extract_locally_active_dofs (dofh, dof_set);
TrilinosWrappers::MPI::Vector x_rel;
x_rel.reinit(relevant_set, MPI_COMM_WORLD);
- x_rel = 0;
x_rel.compress();
-
+
ConstraintMatrix cm(relevant_set);
DoFTools::make_hanging_node_constraints (dofh, cm);
cm.close ();
-
+
cm.distribute(x);
x_rel = x;
//x.print(std::cout);
-
+
// x_rel.print(std::cout);
TrilinosWrappers::Vector x_dub;
x_dub.reinit(dof_set.size());
-
+
x_dub = x_rel;
{
std::stringstream out;
out << "**** proc " << myid << std::endl;
x_dub.print (out);
-
+
if (myid==0)
deallog << out.str() << std::endl;
else
MPI_Send((void*)out.str().c_str(),out.str().size()+1, MPI_CHAR, 0, 1, MPI_COMM_WORLD);
}
-
+
if (myid == 0)
- {
+ {
for (unsigned int i = 1;i < numproc;++i)
{
MPI_Status status;
// $Id$
// Version: $Name$
//
-// Copyright (C) 2009, 2010, 2011 by the deal.II authors
+// Copyright (C) 2009, 2010, 2011, 2012 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
trans.interpolate(x);
x_rel.reinit(relevant_set, MPI_COMM_WORLD);
- x_rel = 0;
x_rel.compress();
ConstraintMatrix cm(relevant_set);