]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Added a test for periodicity constraints on distributed meshes
authordaniel.arndt <daniel.arndt@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 6 Sep 2013 20:16:36 +0000 (20:16 +0000)
committerdaniel.arndt <daniel.arndt@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 6 Sep 2013 20:16:36 +0000 (20:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@30638 0785d39b-7218-0410-832d-ea1e28bc413d

tests/mpi/periodicity_01.cc [new file with mode: 0644]
tests/mpi/periodicity_01/ncpu_3/cmp/generic [new file with mode: 0644]
tests/mpi/periodicity_01/ncpu_5/cmp/generic [new file with mode: 0644]
tests/mpi/periodicity_01/ncpu_7/cmp/generic [new file with mode: 0644]

diff --git a/tests/mpi/periodicity_01.cc b/tests/mpi/periodicity_01.cc
new file mode 100644 (file)
index 0000000..17c57d9
--- /dev/null
@@ -0,0 +1,575 @@
+// ---------------------------------------------------------------------
+// $Id: periodicity_01.cc $
+//
+// Copyright (C) 2001 - 2013 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+//
+// check solution for periodicity. The used test case is similar to the one
+// in step-45. The right hand side is not periodic and hence the solution will
+// also be not periodic unless the periodicity constraints on distributed
+// triangulations are correctly implemented.
+// In the 2D case we require periodicity in y-direction and in 3D both in y-
+// and z-direction.
+// In both cases we refine two times adaptively using the Kelly error estimator.
+//
+
+#include "../tests.h"
+#include <deal.II/base/quadrature_lib.h>
+#include <deal.II/base/function.h>
+#include <deal.II/base/utilities.h>
+#include <deal.II/base/conditional_ostream.h>
+#include <deal.II/base/index_set.h>
+
+#include <deal.II/lac/vector.h>
+#include <deal.II/lac/full_matrix.h>
+#include <deal.II/lac/solver_cg.h>
+#include <deal.II/lac/constraint_matrix.h>
+#include <deal.II/lac/compressed_simple_sparsity_pattern.h>
+#include <deal.II/lac/petsc_parallel_sparse_matrix.h>
+#include <deal.II/lac/petsc_parallel_vector.h>
+#include <deal.II/lac/petsc_solver.h>
+#include <deal.II/lac/petsc_precondition.h>
+#include <deal.II/lac/sparsity_tools.h>
+
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/tria_accessor.h>
+#include <deal.II/grid/tria_iterator.h>
+#include <deal.II/grid/grid_tools.h>
+
+#include <deal.II/dofs/dof_handler.h>
+#include <deal.II/dofs/dof_accessor.h>
+#include <deal.II/dofs/dof_tools.h>
+#include <deal.II/fe/fe_values.h>
+#include <deal.II/fe/fe_q.h>
+
+#include <deal.II/numerics/vector_tools.h>
+#include <deal.II/numerics/data_out.h>
+#include <deal.II/numerics/error_estimator.h>
+
+#include <deal.II/distributed/tria.h>
+#include <deal.II/distributed/grid_refinement.h>
+
+#include <fstream>
+#include <iostream>
+
+namespace Step40
+{
+  using namespace dealii;
+
+  template <int dim>
+  class LaplaceProblem
+  {
+  public:
+    LaplaceProblem ();
+    ~LaplaceProblem ();
+
+    void run ();
+
+  private:
+    void setup_system ();
+    void assemble_system ();
+    void solve ();
+    void refine_grid ();
+    void get_point_value (const Point<dim> point, const int proc,
+                          Vector<double> &value) const;
+    void check_periodicity (const unsigned int cycle) const;
+    void output_results (const unsigned int cycle) const;
+
+    MPI_Comm mpi_communicator;
+
+    parallel::distributed::Triangulation<dim>   triangulation;
+
+    DoFHandler<dim>      dof_handler;
+    FE_Q<dim>            fe;
+
+    IndexSet             locally_owned_dofs;
+    IndexSet             locally_relevant_dofs;
+
+    ConstraintMatrix     constraints;
+
+    PETScWrappers::MPI::SparseMatrix system_matrix;
+    PETScWrappers::MPI::Vector locally_relevant_solution;
+    PETScWrappers::MPI::Vector system_rhs;
+
+    ConditionalOStream                pcout;
+  };
+
+  template <int dim>
+  LaplaceProblem<dim>::LaplaceProblem ()
+    :
+    mpi_communicator (MPI_COMM_WORLD),
+    triangulation (mpi_communicator),
+    dof_handler (triangulation),
+    fe (2),
+    pcout (Utilities::MPI::this_mpi_process(mpi_communicator)
+           == 0
+           ?
+           deallog.get_file_stream()
+           :
+           std::cout,
+           (Utilities::MPI::this_mpi_process(mpi_communicator)
+           == 0))
+  {}
+
+
+
+  template <int dim>
+  LaplaceProblem<dim>::~LaplaceProblem ()
+  {
+    dof_handler.clear ();
+  }
+
+  template <int dim>
+  void LaplaceProblem<dim>::setup_system ()
+  {
+    dof_handler.distribute_dofs (fe);
+
+    locally_owned_dofs = dof_handler.locally_owned_dofs ();
+    DoFTools::extract_locally_relevant_dofs (dof_handler,
+                                             locally_relevant_dofs);
+    locally_relevant_solution.reinit (locally_owned_dofs,
+                                      locally_relevant_dofs,
+                                      mpi_communicator);
+    system_rhs.reinit (mpi_communicator,
+                       dof_handler.n_dofs(),
+                       dof_handler.n_locally_owned_dofs());
+    system_rhs = 0;
+
+    //Periodic Conditions
+    constraints.clear ();
+    constraints.reinit (locally_relevant_dofs);
+    for (int i=1; i<dim; ++i)
+      DoFTools::make_periodicity_constraints(dof_handler,
+                                             /*b_id1*/ 2*i,
+                                             /*b_id2*/ 2*i+1,
+                                             /*direction*/ i,
+                                             constraints);
+
+    VectorTools::interpolate_boundary_values (dof_handler,
+                                              0,
+                                              ZeroFunction<dim>(),
+                                              constraints);
+    DoFTools::make_hanging_node_constraints (dof_handler, constraints);
+    constraints.close ();
+
+    CompressedSimpleSparsityPattern csp (dof_handler.n_dofs(),
+                                         dof_handler.n_dofs(),
+                                         locally_relevant_dofs);
+    DoFTools::make_sparsity_pattern (dof_handler,
+                                     csp,
+                                     constraints, false);
+    SparsityTools::distribute_sparsity_pattern (csp,
+                                                dof_handler.n_locally_owned_dofs_per_processor(),
+                                                mpi_communicator,
+                                                locally_relevant_dofs);
+    system_matrix.reinit (mpi_communicator,
+                          csp,
+                          dof_handler.n_locally_owned_dofs_per_processor(),
+                          dof_handler.n_locally_owned_dofs_per_processor(),
+                          Utilities::MPI::this_mpi_process(mpi_communicator));
+  }
+
+  template <int dim>
+  void LaplaceProblem<dim>::assemble_system ()
+  {
+    const QGauss<dim>  quadrature_formula(3);
+
+    FEValues<dim> fe_values (fe, quadrature_formula,
+                             update_values    |  update_gradients |
+                             update_quadrature_points |
+                             update_JxW_values);
+
+    const unsigned int   dofs_per_cell = fe.dofs_per_cell;
+    const unsigned int   n_q_points    = quadrature_formula.size();
+
+    FullMatrix<double>   cell_matrix (dofs_per_cell, dofs_per_cell);
+    Vector<double>       cell_rhs (dofs_per_cell);
+
+    std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+
+    typename DoFHandler<dim>::active_cell_iterator
+    cell = dof_handler.begin_active(),
+    endc = dof_handler.end();
+    for (; cell!=endc; ++cell)
+      if (cell->is_locally_owned())
+      {
+        cell_matrix = 0;
+        cell_rhs = 0;
+
+        fe_values.reinit (cell);
+
+        for (unsigned int q_point=0; q_point<n_q_points; ++q_point)
+        {
+          double rhs_value
+            = (std::cos(2*numbers::PI*fe_values.quadrature_point(q_point)[0]) *
+               std::exp(-1*fe_values.quadrature_point(q_point)[0]) *
+               std::cos(2*numbers::PI*fe_values.quadrature_point(q_point)[1]) *
+               std::exp(-2*fe_values.quadrature_point(q_point)[1]));
+
+          if (dim==3)
+            rhs_value*=
+              std::cos(2*numbers::PI*fe_values.quadrature_point(q_point)[2]) *
+              std::exp (- 3 * fe_values.quadrature_point(q_point)[2]);
+
+          for (unsigned int i=0; i<dofs_per_cell; ++i)
+          {
+            for (unsigned int j=0; j<dofs_per_cell; ++j)
+              cell_matrix(i,j) += (fe_values.shape_grad(i,q_point) *
+                                   fe_values.shape_grad(j,q_point) *
+                                   fe_values.JxW(q_point));
+
+            cell_rhs(i) += (rhs_value *
+                            fe_values.shape_value(i,q_point) *
+                            fe_values.JxW(q_point));
+          }
+        }
+
+        cell->get_dof_indices (local_dof_indices);
+        constraints.distribute_local_to_global (cell_matrix,
+                                                cell_rhs,
+                                                local_dof_indices,
+                                                system_matrix,
+                                                system_rhs);
+      }
+
+    system_matrix.compress (VectorOperation::add);
+    system_rhs.compress (VectorOperation::add);
+  }
+
+
+  template <int dim>
+  void LaplaceProblem<dim>::solve ()
+  {
+    PETScWrappers::MPI::Vector
+    completely_distributed_solution (mpi_communicator,
+                                     dof_handler.n_dofs(),
+                                     dof_handler.n_locally_owned_dofs());
+
+    SolverControl solver_control (dof_handler.n_dofs(), 1e-12);
+
+    PETScWrappers::SolverCG solver(solver_control, mpi_communicator);
+
+    // Ask for a symmetric preconditioner by setting the first parameter in
+    // AdditionalData to true.
+    PETScWrappers::PreconditionBoomerAMG
+    preconditioner(system_matrix,
+                   PETScWrappers::PreconditionBoomerAMG::AdditionalData(true));
+
+    solver.solve (system_matrix, completely_distributed_solution, system_rhs,
+                  preconditioner);
+
+    pcout << "   Solved in " << solver_control.last_step()
+          << " iterations." << std::endl;
+
+    constraints.distribute (completely_distributed_solution);
+
+    locally_relevant_solution = completely_distributed_solution;
+  }
+
+  template <int dim>
+  void LaplaceProblem<dim>::refine_grid ()
+  {
+    Vector<float> estimated_error_per_cell (triangulation.n_active_cells());
+    KellyErrorEstimator<dim>::estimate (dof_handler,
+                                        QGauss<dim-1>(3),
+                                        typename FunctionMap<dim>::type(),
+                                        locally_relevant_solution,
+                                        estimated_error_per_cell);
+    parallel::distributed::GridRefinement::
+      refine_and_coarsen_fixed_number (triangulation,
+                                   estimated_error_per_cell,
+                                   0.3, 0.03);
+
+    triangulation.execute_coarsening_and_refinement ();
+  }
+
+  template <int dim>
+  void LaplaceProblem<dim>::get_point_value
+    (const Point<dim> point, const int proc, Vector<double> &value) const
+  {
+    typename DoFHandler<dim>::active_cell_iterator cell
+      = GridTools::find_active_cell_around_point (dof_handler, point);
+    if (cell->is_locally_owned())
+      VectorTools::point_value (dof_handler, locally_relevant_solution,
+                                point, value);
+
+    std::vector<double> tmp (value.size());
+    for (unsigned int i=0; i<value.size(); ++i)
+      tmp[i]=value[i];
+
+    std::vector<double> tmp2 (value.size());
+    MPI_Reduce(&(tmp[0]), &(tmp2[0]), value.size(), MPI_DOUBLE,
+               MPI_SUM, proc, mpi_communicator);
+    
+    for (unsigned int i=0; i<value.size(); ++i)
+      value[i]=tmp2[i];
+  }
+
+  template <int dim>
+  void LaplaceProblem<dim>::check_periodicity
+    (const unsigned int cycle) const
+  {}
+
+  template <>
+  void LaplaceProblem<2>::check_periodicity(const unsigned int cycle) const
+  {
+    unsigned int n_points = 2;
+    for (unsigned int i = 0; i<cycle; i++)
+      n_points*=2;
+    
+    for (unsigned int i=1; i< n_points; i++)
+    {
+      Vector<double> value1(1);
+      Vector<double> value2(1);
+      
+      Point <2> point1;
+      point1(0)=1.*i/n_points;
+      point1(1)=0.;
+      Point <2> point2;
+      point2(0)=1.*i/n_points;
+      point2(1)=1.;
+      
+      get_point_value (point1, 0, value1);
+      get_point_value (point2, 0, value2);
+      
+      if (Utilities::MPI::this_mpi_process(mpi_communicator)==0)
+      {
+        pcout << point1 << "\t" << value1[0] << std::endl;
+        if (std::abs(value2[0]-value1[0])>1e-8)
+        {
+          std::cout<<point1<< "\t" << value1[0] << std::endl;
+          std::cout<<point2<< "\t" << value2[0] << std::endl;
+          ExcInternalError();
+        }
+      }
+    }
+  }
+
+  template <>
+  void LaplaceProblem<3>::check_periodicity(const unsigned int cycle) const
+  {
+    unsigned int n_points = 2;
+    for (unsigned int i = 0; i<cycle; i++)
+      n_points*=2;
+    
+    for (unsigned int i=1; i< n_points; i++)
+      for (unsigned int j=1; j< n_points; j++)
+    {
+      Vector<double> value1(1);
+      Vector<double> value2(1);
+      Vector<double> value3(1);
+      Vector<double> value4(1);
+      
+      Point <3> point1;
+      point1(0)=1.*i/n_points;
+      point1(1)=1.*j/n_points;
+      point1(2)=0.;
+      Point <3> point2;
+      point2(0)=1.*i/n_points;
+      point2(1)=1.*j/n_points;
+      point2(2)=1.;
+      Point <3> point3;
+      point3(0)=1.*i/n_points;
+      point3(1)=0.;
+      point3(2)=1.*j/n_points;;
+      Point <3> point4;
+      point4(0)=1.*i/n_points;
+      point4(1)=1.;
+      point4(2)=1.*j/n_points;;
+      
+      get_point_value (point1, 0, value1);
+      get_point_value (point2, 0, value2);
+      get_point_value (point3, 0, value3);
+      get_point_value (point4, 0, value4);
+      
+      if (Utilities::MPI::this_mpi_process(mpi_communicator)==0)
+      {
+        pcout << point1 << "\t" << value1[0] << std::endl;
+        if (std::abs(value2[0]-value1[0])>1e-8)
+        {
+          std::cout<<point1<< "\t" << value1[0] << std::endl;
+          std::cout<<point2<< "\t" << value2[0] << std::endl;
+          ExcInternalError();
+        }
+        pcout << point3 << "\t" << value3[0] << std::endl;
+        if (std::abs(value4[0]-value3[0])>1e-8)
+        {
+          std::cout<<point3<< "\t" << value3[0] << std::endl;
+          std::cout<<point4<< "\t" << value4[0] << std::endl;
+          ExcInternalError();
+        }
+      }
+    }
+  }
+      
+  //only needed for graphical output
+  template <int dim>
+  void LaplaceProblem<dim>::output_results (const unsigned int cycle) const
+  {
+    DataOut<dim> data_out;
+    data_out.attach_dof_handler (dof_handler);
+    data_out.add_data_vector (locally_relevant_solution, "u");
+
+    Vector<float> subdomain (triangulation.n_active_cells());
+    for (unsigned int i=0; i<subdomain.size(); ++i)
+      subdomain(i) = triangulation.locally_owned_subdomain();
+    data_out.add_data_vector (subdomain, "subdomain");
+
+    data_out.build_patches (3);
+
+    const std::string filename = ("solution-" +
+                                  Utilities::int_to_string (cycle, 2) +
+                                  "." +
+                                  Utilities::int_to_string
+                                  (triangulation.locally_owned_subdomain(), 4));
+    std::ofstream output ((filename + ".vtu").c_str());
+    data_out.write_vtu (output);
+
+    if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0)
+      {
+        std::vector<std::string> filenames;
+        for (unsigned int i=0;
+             i<Utilities::MPI::n_mpi_processes(mpi_communicator);
+             ++i)
+          filenames.push_back ("solution-" +
+                               Utilities::int_to_string (cycle, 2) +
+                               "." +
+                               Utilities::int_to_string (i, 4) +
+                               ".vtu");
+
+        std::ofstream master_output ((filename + ".pvtu").c_str());
+        data_out.write_pvtu_record (master_output, filenames);
+      }
+  }
+
+  template <int dim>
+  void LaplaceProblem<dim>::run ()
+  {
+    pcout << std::endl<< "Testing for dim="<<dim<<std::endl;
+    
+    const unsigned int n_cycles = 3;
+    for (unsigned int cycle=0; cycle<n_cycles; ++cycle)
+      {
+        pcout << std::endl << "Cycle " << cycle << ':' << std::endl;
+
+        if (cycle == 0)
+          {
+            std::vector<unsigned int> reps;
+            reps.push_back(2);
+            reps.push_back(2);
+            if (dim==3)
+              reps.push_back(2);
+            
+            Point<dim> p1(true);
+            Point<dim> p2(true);
+            for (unsigned int i=0;i<dim;++i)
+              p2(i)=1.0;
+
+            GridGenerator::subdivided_hyper_rectangle
+              (triangulation,reps,p1,p2,true);
+
+            std::vector
+              <std::tuple
+                <typename parallel::distributed::Triangulation<dim>::cell_iterator, unsigned int,
+                 typename parallel::distributed::Triangulation<dim>::cell_iterator, unsigned int> >
+              periodicity_vector;
+
+            for(int i=1; i<dim; ++i)
+              GridTools::identify_periodic_face_pairs
+                (triangulation,
+                 /*b_id1*/ 2*i, /*b_id2*/2*i+1, /*direction*/ i,
+                 periodicity_vector);
+            
+            triangulation.add_periodicity(periodicity_vector);
+            
+            triangulation.refine_global (1);
+          }
+        else
+        {
+          refine_grid ();
+        }
+
+        setup_system ();
+        assemble_system ();
+        solve ();
+        //output_results (cycle);
+        check_periodicity(cycle);
+      }
+  }
+}
+
+int main(int argc, char *argv[])
+{
+  try
+    {
+      using namespace dealii;
+      using namespace Step40;
+
+      Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
+      deallog.depth_console (0);
+
+      if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD)==0)
+      {
+        std::ofstream logfile(output_file_for_mpi("periodicity_01").c_str());
+        deallog.attach(logfile, false);
+        deallog.depth_console(0);
+        deallog.threshold_double(1.e-10);
+        {
+          LaplaceProblem<2> laplace_problem;
+          laplace_problem.run ();
+        }
+        {
+          LaplaceProblem<3> laplace_problem;
+          laplace_problem.run ();
+        }
+      }    
+      else
+      {
+        {
+          LaplaceProblem<2> laplace_problem;
+          laplace_problem.run ();
+        }
+        {
+          LaplaceProblem<3> laplace_problem;
+          laplace_problem.run ();
+        }
+      }
+    }
+  catch (std::exception &exc)
+    {
+      std::cerr << std::endl << std::endl
+                << "----------------------------------------------------"
+                << std::endl;
+      std::cerr << "Exception on processing: " << std::endl
+                << exc.what() << std::endl
+                << "Aborting!" << std::endl
+                << "----------------------------------------------------"
+                << std::endl;
+
+      return 1;
+    }
+  catch (...)
+    {
+      std::cerr << std::endl << std::endl
+                << "----------------------------------------------------"
+                << std::endl;
+      std::cerr << "Unknown exception!" << std::endl
+                << "Aborting!" << std::endl
+                << "----------------------------------------------------"
+                << std::endl;
+      return 1;
+    }
+
+  return 0;
+}
diff --git a/tests/mpi/periodicity_01/ncpu_3/cmp/generic b/tests/mpi/periodicity_01/ncpu_3/cmp/generic
new file mode 100644 (file)
index 0000000..6aaf52f
--- /dev/null
@@ -0,0 +1,163 @@
+
+Testing for dim=2
+
+Cycle 0:
+DEAL::Starting value 0.0139546
+DEAL::Convergence step 8 value 0
+   Solved in 8 iterations.
+0.500000 0.00000       -0.00549678
+
+Cycle 1:
+DEAL::Starting value 0.0223730
+DEAL::Convergence step 8 value 0
+   Solved in 8 iterations.
+0.250000 0.00000       -0.00130251
+0.500000 0.00000       -0.00550617
+0.750000 0.00000       -0.00183466
+
+Cycle 2:
+DEAL::Starting value 0.0270972
+DEAL::Convergence step 8 value 0
+   Solved in 8 iterations.
+0.125000 0.00000       0.00141483
+0.250000 0.00000       -0.00124254
+0.375000 0.00000       -0.00429173
+0.500000 0.00000       -0.00545458
+0.625000 0.00000       -0.00429054
+0.750000 0.00000       -0.00185255
+0.875000 0.00000       0.000356647
+
+Testing for dim=3
+
+Cycle 0:
+DEAL::Starting value 0.00635044
+DEAL::Convergence step 7 value 0
+   Solved in 7 iterations.
+0.500000 0.500000 0.00000      0.000839383
+0.500000 0.00000 0.500000      0.000542250
+
+Cycle 1:
+DEAL::Starting value 0.0136523
+DEAL::Convergence step 7 value 0
+   Solved in 7 iterations.
+0.250000 0.250000 0.00000      -7.02574e-05
+0.250000 0.00000 0.250000      -8.84955e-05
+0.250000 0.500000 0.00000      2.30224e-05
+0.250000 0.00000 0.500000      -1.58988e-05
+0.250000 0.750000 0.00000      -5.50224e-05
+0.250000 0.00000 0.750000      -6.78044e-05
+0.500000 0.250000 0.00000      -0.000245815
+0.500000 0.00000 0.250000      -0.000367442
+0.500000 0.500000 0.00000      0.000854616
+0.500000 0.00000 0.500000      0.000545283
+0.500000 0.750000 0.00000      -7.60057e-05
+0.500000 0.00000 0.750000      -0.000116497
+0.750000 0.250000 0.00000      -0.000105394
+0.750000 0.00000 0.250000      -0.000112911
+0.750000 0.500000 0.00000      -2.69468e-06
+0.750000 0.00000 0.500000      -3.29142e-05
+0.750000 0.750000 0.00000      -7.97320e-05
+0.750000 0.00000 0.750000      -8.82296e-05
+
+Cycle 2:
+DEAL::Starting value 0.0249162
+DEAL::Convergence step 7 value 0
+   Solved in 7 iterations.
+0.125000 0.125000 0.00000      0.000714896
+0.125000 0.00000 0.125000      0.000732888
+0.125000 0.250000 0.00000      4.21241e-05
+0.125000 0.00000 0.250000      6.67244e-05
+0.125000 0.375000 0.00000      -0.000451000
+0.125000 0.00000 0.375000      -0.000348082
+0.125000 0.500000 0.00000      -0.000540492
+0.125000 0.00000 0.500000      -0.000389894
+0.125000 0.625000 0.00000      -0.000333853
+0.125000 0.00000 0.625000      -0.000227459
+0.125000 0.750000 0.00000      -4.30475e-05
+0.125000 0.00000 0.750000      -3.85607e-05
+0.125000 0.875000 0.00000      0.000218364
+0.125000 0.00000 0.875000      0.000150624
+0.250000 0.125000 0.00000      -0.000102974
+0.250000 0.00000 0.125000      -0.000107813
+0.250000 0.250000 0.00000      -7.06290e-05
+0.250000 0.00000 0.250000      -8.58914e-05
+0.250000 0.375000 0.00000      -2.80802e-05
+0.250000 0.00000 0.375000      -5.09368e-05
+0.250000 0.500000 0.00000      -2.22203e-06
+0.250000 0.00000 0.500000      -2.71771e-05
+0.250000 0.625000 0.00000      -1.09299e-05
+0.250000 0.00000 0.625000      -3.17431e-05
+0.250000 0.750000 0.00000      -5.07980e-05
+0.250000 0.00000 0.750000      -6.33648e-05
+0.250000 0.875000 0.00000      -9.87957e-05
+0.250000 0.00000 0.875000      -0.000103668
+0.375000 0.125000 0.00000      -0.00101184
+0.375000 0.00000 0.125000      -0.00104895
+0.375000 0.250000 0.00000      -0.000213964
+0.375000 0.00000 0.250000      -0.000284205
+0.375000 0.375000 0.00000      0.000442810
+0.375000 0.00000 0.375000      0.000274644
+0.375000 0.500000 0.00000      0.000616793
+0.375000 0.00000 0.500000      0.000394006
+0.375000 0.625000 0.00000      0.000372231
+0.375000 0.00000 0.625000      0.000207540
+0.375000 0.750000 0.00000      -5.19075e-05
+0.375000 0.00000 0.750000      -8.76469e-05
+0.375000 0.875000 0.00000      -0.000484075
+0.375000 0.00000 0.875000      -0.000427601
+0.500000 0.125000 0.00000      -0.00131821
+0.500000 0.00000 0.125000      -0.00136606
+0.500000 0.250000 0.00000      -0.000273020
+0.500000 0.00000 0.250000      -0.000364090
+0.500000 0.375000 0.00000      0.000588192
+0.500000 0.00000 0.375000      0.000370504
+0.500000 0.500000 0.00000      0.000816320
+0.500000 0.00000 0.500000      0.000527723
+0.500000 0.625000 0.00000      0.000496202
+0.500000 0.00000 0.625000      0.000283291
+0.500000 0.750000 0.00000      -5.86240e-05
+0.500000 0.00000 0.750000      -0.000103628
+0.500000 0.875000 0.00000      -0.000627027
+0.500000 0.00000 0.875000      -0.000552959
+0.625000 0.125000 0.00000      -0.000926278
+0.625000 0.00000 0.125000      -0.000960435
+0.625000 0.250000 0.00000      -0.000220905
+0.625000 0.00000 0.250000      -0.000286844
+0.625000 0.375000 0.00000      0.000368717
+0.625000 0.00000 0.375000      0.000216623
+0.625000 0.500000 0.00000      0.000530333
+0.625000 0.00000 0.500000      0.000330746
+0.625000 0.625000 0.00000      0.000314226
+0.625000 0.00000 0.625000      0.000166179
+0.625000 0.750000 0.00000      -6.93567e-05
+0.625000 0.00000 0.750000      -0.000103178
+0.625000 0.875000 0.00000      -0.000466912
+0.625000 0.00000 0.875000      -0.000419439
+0.750000 0.125000 0.00000      -0.000179286
+0.750000 0.00000 0.125000      -0.000185378
+0.750000 0.250000 0.00000      -0.000104709
+0.750000 0.00000 0.250000      -0.000119333
+0.750000 0.375000 0.00000      -3.05754e-05
+0.750000 0.00000 0.375000      -5.60127e-05
+0.750000 0.500000 0.00000      -1.89151e-06
+0.750000 0.00000 0.500000      -2.99975e-05
+0.750000 0.625000 0.00000      -2.44780e-05
+0.750000 0.00000 0.625000      -4.77630e-05
+0.750000 0.750000 0.00000      -7.84822e-05
+0.750000 0.00000 0.750000      -9.01734e-05
+0.750000 0.875000 0.00000      -0.000142966
+0.750000 0.00000 0.875000      -0.000142512
+0.875000 0.125000 0.00000      0.000456000
+0.875000 0.00000 0.125000      0.000475880
+0.875000 0.250000 0.00000      1.30647e-06
+0.875000 0.00000 0.250000      3.27430e-05
+0.875000 0.375000 0.00000      -0.000364914
+0.875000 0.00000 0.375000      -0.000280671
+0.875000 0.500000 0.00000      -0.000453633
+0.875000 0.00000 0.500000      -0.000336703
+0.875000 0.625000 0.00000      -0.000312918
+0.875000 0.00000 0.625000      -0.000230032
+0.875000 0.750000 0.00000      -7.87644e-05
+0.875000 0.00000 0.750000      -6.52054e-05
+0.875000 0.875000 0.00000      0.000142725
+0.875000 0.00000 0.875000      0.000106650
diff --git a/tests/mpi/periodicity_01/ncpu_5/cmp/generic b/tests/mpi/periodicity_01/ncpu_5/cmp/generic
new file mode 100644 (file)
index 0000000..0f1bf9a
--- /dev/null
@@ -0,0 +1,163 @@
+
+Testing for dim=2
+
+Cycle 0:
+DEAL::Starting value 0.0140170
+DEAL::Convergence step 8 value 0
+   Solved in 8 iterations.
+0.500000 0.00000       -0.00549678
+
+Cycle 1:
+DEAL::Starting value 0.0219353
+DEAL::Convergence step 8 value 0
+   Solved in 8 iterations.
+0.250000 0.00000       -0.00130251
+0.500000 0.00000       -0.00550617
+0.750000 0.00000       -0.00183466
+
+Cycle 2:
+DEAL::Starting value 0.0268844
+DEAL::Convergence step 8 value 0
+   Solved in 8 iterations.
+0.125000 0.00000       0.00141483
+0.250000 0.00000       -0.00124254
+0.375000 0.00000       -0.00429173
+0.500000 0.00000       -0.00545458
+0.625000 0.00000       -0.00429054
+0.750000 0.00000       -0.00185255
+0.875000 0.00000       0.000356647
+
+Testing for dim=3
+
+Cycle 0:
+DEAL::Starting value 0.00632368
+DEAL::Convergence step 7 value 0
+   Solved in 7 iterations.
+0.500000 0.500000 0.00000      0.000839383
+0.500000 0.00000 0.500000      0.000542250
+
+Cycle 1:
+DEAL::Starting value 0.0136233
+DEAL::Convergence step 7 value 0
+   Solved in 7 iterations.
+0.250000 0.250000 0.00000      -7.02574e-05
+0.250000 0.00000 0.250000      -8.84955e-05
+0.250000 0.500000 0.00000      2.30224e-05
+0.250000 0.00000 0.500000      -1.58988e-05
+0.250000 0.750000 0.00000      -5.50224e-05
+0.250000 0.00000 0.750000      -6.78044e-05
+0.500000 0.250000 0.00000      -0.000245815
+0.500000 0.00000 0.250000      -0.000367442
+0.500000 0.500000 0.00000      0.000854616
+0.500000 0.00000 0.500000      0.000545283
+0.500000 0.750000 0.00000      -7.60057e-05
+0.500000 0.00000 0.750000      -0.000116497
+0.750000 0.250000 0.00000      -0.000105394
+0.750000 0.00000 0.250000      -0.000112911
+0.750000 0.500000 0.00000      -2.69468e-06
+0.750000 0.00000 0.500000      -3.29142e-05
+0.750000 0.750000 0.00000      -7.97320e-05
+0.750000 0.00000 0.750000      -8.82296e-05
+
+Cycle 2:
+DEAL::Starting value 0.0247852
+DEAL::Convergence step 8 value 0
+   Solved in 8 iterations.
+0.125000 0.125000 0.00000      0.000714896
+0.125000 0.00000 0.125000      0.000732888
+0.125000 0.250000 0.00000      4.21241e-05
+0.125000 0.00000 0.250000      6.67244e-05
+0.125000 0.375000 0.00000      -0.000451000
+0.125000 0.00000 0.375000      -0.000348082
+0.125000 0.500000 0.00000      -0.000540492
+0.125000 0.00000 0.500000      -0.000389894
+0.125000 0.625000 0.00000      -0.000333853
+0.125000 0.00000 0.625000      -0.000227459
+0.125000 0.750000 0.00000      -4.30475e-05
+0.125000 0.00000 0.750000      -3.85607e-05
+0.125000 0.875000 0.00000      0.000218364
+0.125000 0.00000 0.875000      0.000150624
+0.250000 0.125000 0.00000      -0.000102974
+0.250000 0.00000 0.125000      -0.000107813
+0.250000 0.250000 0.00000      -7.06290e-05
+0.250000 0.00000 0.250000      -8.58914e-05
+0.250000 0.375000 0.00000      -2.80802e-05
+0.250000 0.00000 0.375000      -5.09368e-05
+0.250000 0.500000 0.00000      -2.22203e-06
+0.250000 0.00000 0.500000      -2.71771e-05
+0.250000 0.625000 0.00000      -1.09299e-05
+0.250000 0.00000 0.625000      -3.17431e-05
+0.250000 0.750000 0.00000      -5.07980e-05
+0.250000 0.00000 0.750000      -6.33648e-05
+0.250000 0.875000 0.00000      -9.87957e-05
+0.250000 0.00000 0.875000      -0.000103668
+0.375000 0.125000 0.00000      -0.00101184
+0.375000 0.00000 0.125000      -0.00104895
+0.375000 0.250000 0.00000      -0.000213964
+0.375000 0.00000 0.250000      -0.000284205
+0.375000 0.375000 0.00000      0.000442810
+0.375000 0.00000 0.375000      0.000274644
+0.375000 0.500000 0.00000      0.000616793
+0.375000 0.00000 0.500000      0.000394006
+0.375000 0.625000 0.00000      0.000372231
+0.375000 0.00000 0.625000      0.000207540
+0.375000 0.750000 0.00000      -5.19075e-05
+0.375000 0.00000 0.750000      -8.76469e-05
+0.375000 0.875000 0.00000      -0.000484075
+0.375000 0.00000 0.875000      -0.000427601
+0.500000 0.125000 0.00000      -0.00131821
+0.500000 0.00000 0.125000      -0.00136606
+0.500000 0.250000 0.00000      -0.000273020
+0.500000 0.00000 0.250000      -0.000364090
+0.500000 0.375000 0.00000      0.000588192
+0.500000 0.00000 0.375000      0.000370504
+0.500000 0.500000 0.00000      0.000816320
+0.500000 0.00000 0.500000      0.000527723
+0.500000 0.625000 0.00000      0.000496202
+0.500000 0.00000 0.625000      0.000283291
+0.500000 0.750000 0.00000      -5.86240e-05
+0.500000 0.00000 0.750000      -0.000103628
+0.500000 0.875000 0.00000      -0.000627027
+0.500000 0.00000 0.875000      -0.000552959
+0.625000 0.125000 0.00000      -0.000926278
+0.625000 0.00000 0.125000      -0.000960435
+0.625000 0.250000 0.00000      -0.000220905
+0.625000 0.00000 0.250000      -0.000286844
+0.625000 0.375000 0.00000      0.000368717
+0.625000 0.00000 0.375000      0.000216623
+0.625000 0.500000 0.00000      0.000530333
+0.625000 0.00000 0.500000      0.000330746
+0.625000 0.625000 0.00000      0.000314226
+0.625000 0.00000 0.625000      0.000166179
+0.625000 0.750000 0.00000      -6.93567e-05
+0.625000 0.00000 0.750000      -0.000103178
+0.625000 0.875000 0.00000      -0.000466912
+0.625000 0.00000 0.875000      -0.000419439
+0.750000 0.125000 0.00000      -0.000179286
+0.750000 0.00000 0.125000      -0.000185378
+0.750000 0.250000 0.00000      -0.000104709
+0.750000 0.00000 0.250000      -0.000119333
+0.750000 0.375000 0.00000      -3.05754e-05
+0.750000 0.00000 0.375000      -5.60127e-05
+0.750000 0.500000 0.00000      -1.89151e-06
+0.750000 0.00000 0.500000      -2.99975e-05
+0.750000 0.625000 0.00000      -2.44780e-05
+0.750000 0.00000 0.625000      -4.77630e-05
+0.750000 0.750000 0.00000      -7.84822e-05
+0.750000 0.00000 0.750000      -9.01734e-05
+0.750000 0.875000 0.00000      -0.000142966
+0.750000 0.00000 0.875000      -0.000142512
+0.875000 0.125000 0.00000      0.000456000
+0.875000 0.00000 0.125000      0.000475880
+0.875000 0.250000 0.00000      1.30647e-06
+0.875000 0.00000 0.250000      3.27430e-05
+0.875000 0.375000 0.00000      -0.000364914
+0.875000 0.00000 0.375000      -0.000280671
+0.875000 0.500000 0.00000      -0.000453633
+0.875000 0.00000 0.500000      -0.000336703
+0.875000 0.625000 0.00000      -0.000312918
+0.875000 0.00000 0.625000      -0.000230032
+0.875000 0.750000 0.00000      -7.87644e-05
+0.875000 0.00000 0.750000      -6.52054e-05
+0.875000 0.875000 0.00000      0.000142725
+0.875000 0.00000 0.875000      0.000106650
diff --git a/tests/mpi/periodicity_01/ncpu_7/cmp/generic b/tests/mpi/periodicity_01/ncpu_7/cmp/generic
new file mode 100644 (file)
index 0000000..9684298
--- /dev/null
@@ -0,0 +1,163 @@
+
+Testing for dim=2
+
+Cycle 0:
+DEAL::Starting value 0.0139631
+DEAL::Convergence step 8 value 0
+   Solved in 8 iterations.
+0.500000 0.00000       -0.00549678
+
+Cycle 1:
+DEAL::Starting value 0.0222274
+DEAL::Convergence step 8 value 0
+   Solved in 8 iterations.
+0.250000 0.00000       -0.00130251
+0.500000 0.00000       -0.00550617
+0.750000 0.00000       -0.00183466
+
+Cycle 2:
+DEAL::Starting value 0.0268966
+DEAL::Convergence step 8 value 0
+   Solved in 8 iterations.
+0.125000 0.00000       0.00141483
+0.250000 0.00000       -0.00124254
+0.375000 0.00000       -0.00429173
+0.500000 0.00000       -0.00545458
+0.625000 0.00000       -0.00429054
+0.750000 0.00000       -0.00185255
+0.875000 0.00000       0.000356647
+
+Testing for dim=3
+
+Cycle 0:
+DEAL::Starting value 0.00630053
+DEAL::Convergence step 7 value 0
+   Solved in 7 iterations.
+0.500000 0.500000 0.00000      0.000839383
+0.500000 0.00000 0.500000      0.000542250
+
+Cycle 1:
+DEAL::Starting value 0.0136343
+DEAL::Convergence step 8 value 0
+   Solved in 8 iterations.
+0.250000 0.250000 0.00000      -7.02574e-05
+0.250000 0.00000 0.250000      -8.84955e-05
+0.250000 0.500000 0.00000      2.30224e-05
+0.250000 0.00000 0.500000      -1.58988e-05
+0.250000 0.750000 0.00000      -5.50224e-05
+0.250000 0.00000 0.750000      -6.78044e-05
+0.500000 0.250000 0.00000      -0.000245815
+0.500000 0.00000 0.250000      -0.000367442
+0.500000 0.500000 0.00000      0.000854616
+0.500000 0.00000 0.500000      0.000545283
+0.500000 0.750000 0.00000      -7.60057e-05
+0.500000 0.00000 0.750000      -0.000116497
+0.750000 0.250000 0.00000      -0.000105394
+0.750000 0.00000 0.250000      -0.000112911
+0.750000 0.500000 0.00000      -2.69468e-06
+0.750000 0.00000 0.500000      -3.29142e-05
+0.750000 0.750000 0.00000      -7.97320e-05
+0.750000 0.00000 0.750000      -8.82296e-05
+
+Cycle 2:
+DEAL::Starting value 0.0248010
+DEAL::Convergence step 8 value 0
+   Solved in 8 iterations.
+0.125000 0.125000 0.00000      0.000714896
+0.125000 0.00000 0.125000      0.000732888
+0.125000 0.250000 0.00000      4.21241e-05
+0.125000 0.00000 0.250000      6.67244e-05
+0.125000 0.375000 0.00000      -0.000451000
+0.125000 0.00000 0.375000      -0.000348082
+0.125000 0.500000 0.00000      -0.000540492
+0.125000 0.00000 0.500000      -0.000389894
+0.125000 0.625000 0.00000      -0.000333853
+0.125000 0.00000 0.625000      -0.000227459
+0.125000 0.750000 0.00000      -4.30475e-05
+0.125000 0.00000 0.750000      -3.85607e-05
+0.125000 0.875000 0.00000      0.000218364
+0.125000 0.00000 0.875000      0.000150624
+0.250000 0.125000 0.00000      -0.000102974
+0.250000 0.00000 0.125000      -0.000107813
+0.250000 0.250000 0.00000      -7.06290e-05
+0.250000 0.00000 0.250000      -8.58914e-05
+0.250000 0.375000 0.00000      -2.80802e-05
+0.250000 0.00000 0.375000      -5.09368e-05
+0.250000 0.500000 0.00000      -2.22203e-06
+0.250000 0.00000 0.500000      -2.71771e-05
+0.250000 0.625000 0.00000      -1.09299e-05
+0.250000 0.00000 0.625000      -3.17431e-05
+0.250000 0.750000 0.00000      -5.07980e-05
+0.250000 0.00000 0.750000      -6.33648e-05
+0.250000 0.875000 0.00000      -9.87957e-05
+0.250000 0.00000 0.875000      -0.000103668
+0.375000 0.125000 0.00000      -0.00101184
+0.375000 0.00000 0.125000      -0.00104895
+0.375000 0.250000 0.00000      -0.000213964
+0.375000 0.00000 0.250000      -0.000284205
+0.375000 0.375000 0.00000      0.000442810
+0.375000 0.00000 0.375000      0.000274644
+0.375000 0.500000 0.00000      0.000616793
+0.375000 0.00000 0.500000      0.000394006
+0.375000 0.625000 0.00000      0.000372231
+0.375000 0.00000 0.625000      0.000207540
+0.375000 0.750000 0.00000      -5.19075e-05
+0.375000 0.00000 0.750000      -8.76469e-05
+0.375000 0.875000 0.00000      -0.000484075
+0.375000 0.00000 0.875000      -0.000427601
+0.500000 0.125000 0.00000      -0.00131821
+0.500000 0.00000 0.125000      -0.00136606
+0.500000 0.250000 0.00000      -0.000273020
+0.500000 0.00000 0.250000      -0.000364090
+0.500000 0.375000 0.00000      0.000588192
+0.500000 0.00000 0.375000      0.000370504
+0.500000 0.500000 0.00000      0.000816320
+0.500000 0.00000 0.500000      0.000527723
+0.500000 0.625000 0.00000      0.000496202
+0.500000 0.00000 0.625000      0.000283291
+0.500000 0.750000 0.00000      -5.86240e-05
+0.500000 0.00000 0.750000      -0.000103628
+0.500000 0.875000 0.00000      -0.000627027
+0.500000 0.00000 0.875000      -0.000552959
+0.625000 0.125000 0.00000      -0.000926278
+0.625000 0.00000 0.125000      -0.000960435
+0.625000 0.250000 0.00000      -0.000220905
+0.625000 0.00000 0.250000      -0.000286844
+0.625000 0.375000 0.00000      0.000368717
+0.625000 0.00000 0.375000      0.000216623
+0.625000 0.500000 0.00000      0.000530333
+0.625000 0.00000 0.500000      0.000330746
+0.625000 0.625000 0.00000      0.000314226
+0.625000 0.00000 0.625000      0.000166179
+0.625000 0.750000 0.00000      -6.93567e-05
+0.625000 0.00000 0.750000      -0.000103178
+0.625000 0.875000 0.00000      -0.000466912
+0.625000 0.00000 0.875000      -0.000419439
+0.750000 0.125000 0.00000      -0.000179286
+0.750000 0.00000 0.125000      -0.000185378
+0.750000 0.250000 0.00000      -0.000104709
+0.750000 0.00000 0.250000      -0.000119333
+0.750000 0.375000 0.00000      -3.05754e-05
+0.750000 0.00000 0.375000      -5.60127e-05
+0.750000 0.500000 0.00000      -1.89151e-06
+0.750000 0.00000 0.500000      -2.99975e-05
+0.750000 0.625000 0.00000      -2.44780e-05
+0.750000 0.00000 0.625000      -4.77630e-05
+0.750000 0.750000 0.00000      -7.84822e-05
+0.750000 0.00000 0.750000      -9.01734e-05
+0.750000 0.875000 0.00000      -0.000142966
+0.750000 0.00000 0.875000      -0.000142512
+0.875000 0.125000 0.00000      0.000456000
+0.875000 0.00000 0.125000      0.000475880
+0.875000 0.250000 0.00000      1.30647e-06
+0.875000 0.00000 0.250000      3.27430e-05
+0.875000 0.375000 0.00000      -0.000364914
+0.875000 0.00000 0.375000      -0.000280671
+0.875000 0.500000 0.00000      -0.000453633
+0.875000 0.00000 0.500000      -0.000336703
+0.875000 0.625000 0.00000      -0.000312918
+0.875000 0.00000 0.625000      -0.000230032
+0.875000 0.750000 0.00000      -7.87644e-05
+0.875000 0.00000 0.750000      -6.52054e-05
+0.875000 0.875000 0.00000      0.000142725
+0.875000 0.00000 0.875000      0.000106650

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.