# cmake -DBUILD_TESTING=ON .
After you have build deal.II as usual (installation is not necessary) you
-can run the testsuite in the build directory via
+can run the testsuite in the _build directory_ via
# ctest [-j x]
Testing/Temporary/LastTest.log) specify -V, alternatively if you're just
interested in verbose output of failing test, --output-on-failure.
+Note: You can also invoke ctest under BUILD_DIR/tests or any subdirectory
+under BUILD_DIR/tests. This will only invoke the tests that are located
+under the subdirectory.
+
+Note: TODO: Get and install numdiff to minimize false positives.
+
Note: The testsuite is huge (!) and will need around 12h on current
computer running single threaded. Consider configuring only a subset of
tests as discussed below.
-Note: TODO: Get and install numdiff to minimize false positives.
+
+CMake configuration variables for the testsuite
+-----------------------------------------------
TODO: Document the following options:
# TODO: Describe and document the following:
+++ /dev/null
-// ---------------------------------------------------------------------
-// $Id: dof_tools_frame.h 30048 2013-07-18 19:42:36Z maier $
-//
-// Copyright (C) 2003 - 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.
-//
-// ---------------------------------------------------------------------
-
-
-#include "../tests.h"
-#include <deal.II/base/logstream.h>
-#include <deal.II/grid/tria.h>
-#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/grid_generator.h>
-#include <deal.II/dofs/dof_accessor.h>
-#include <deal.II/dofs/dof_handler.h>
-#include <deal.II/dofs/dof_tools.h>
-#include <deal.II/fe/fe_q.h>
-#include <deal.II/fe/fe_dgq.h>
-#include <deal.II/fe/fe_dgp.h>
-#include <deal.II/fe/fe_nedelec.h>
-#include <deal.II/fe/fe_raviart_thomas.h>
-#include <deal.II/fe/fe_system.h>
-
-#include <fstream>
-#include <iostream>
-#include <iomanip>
-#include <string>
-
-
-// forward declaration of the function that must be provided in the
-// .cc files
-template <int dim>
-void
-check_this (const DoFHandler<dim> &dof_handler);
-
-
-void
-output_vector (std::vector<bool> &v)
-{
- for (unsigned int i=0; i<v.size(); ++i)
- deallog << (v[i] ? '1' : '0');
- deallog << std::endl;
-}
-
-
-void
-output_vector (std::vector<unsigned int> &v)
-{
- for (unsigned int i=0; i<v.size(); ++i)
- deallog << ' ' << v[i];
- deallog << std::endl;
-}
-
-
-
-template <int dim>
-void
-check (const Triangulation<dim> &tria,
- const FiniteElement<dim> &fe)
-{
- deallog << fe.get_name() << std::endl;
-
- DoFHandler<dim> dof_handler (tria);
- dof_handler.distribute_dofs (fe);
-
- // call main function in .cc files
- check_this (dof_handler);
-}
-
-
-template <int dim>
-void check_grid(const Triangulation<dim> &tr)
-{
- FE_Q<dim> q1(1);
- check(tr, q1);
- FE_Q<dim> q2(2);
- check(tr, q2);
- FE_Q<dim> q3(3);
- check(tr, q3);
-
- FE_DGQ<dim> dgq0(0);
- check(tr, dgq0);
- FE_DGQ<dim> dgq1(1);
- check(tr, dgq1);
- FE_DGQ<dim> dgq2(2);
- check(tr, dgq2);
-
- FE_DGP<dim> dgp1(1);
- check(tr, dgp1);
- FE_DGP<dim> dgp2(2);
- check(tr, dgp2);
-
- FE_Nedelec<dim> nedelec1(1);
- check(tr, nedelec1);
-
- FE_RaviartThomas<dim> rt0(0);
- check(tr, rt0);
- FE_RaviartThomas<dim> rt1(1);
- check(tr, rt1);
- FE_RaviartThomas<dim> rt2(2);
- check(tr, rt2);
-
- FESystem<dim> s1(q1, 3);
- check(tr, s1);
- FESystem<dim> s2(dgq1, 2, q1, 1);
- check(tr, s2);
- FESystem<dim> s3(q1, 2, dgq0, 3);
- check(tr, s3);
- FESystem<dim> s4(q1, 3, dgq0, 2, dgp1, 1);
- check(tr, s4);
-
- FESystem<dim> s10(rt1, 1, dgq1, 1);
- check(tr, s10);
- FESystem<dim> s11(rt0, 2, rt1, 1);
- check(tr, s11);
-
- FESystem<dim> ss1(s1, 2, s3, 1);
- check(tr, ss1);
-}
-
-
+++ /dev/null
-// ---------------------------------------------------------------------
-// $Id: test_grids.h 30049 2013-07-18 19:42:40Z maier $
-//
-// Copyright (C) 2006 - 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.
-//
-// ---------------------------------------------------------------------
-
-#include <deal.II/grid/tria.h>
-#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/tria_accessor.h>
-#include <deal.II/grid/grid_generator.h>
-
-/**
- * A set of test meshes for the deal.II test suite.
- *
- * These meshes exhibit certain key features for writing tests. If you
- * want to test certain properties of algorithms, the following table
- * might be of help.
- *
- * <table border=1>
- * <tr><th>Mesh</th><th>Feature tested</th></tr>
- * <tr><td>#hypercube(tr)</td><td>works at all on a single
- * cell</td></tr>
- * <tr><td>#hypercube(tr,2)</td><td>works on uniform meshes</td></tr>
- * <tr><td>#hypercube(tr,3,true)</td><td>works with local
- * refinement</td></tr>
- * <tr><td>#star_shaped(tr,1)</td><td>method is robust if more than
- * usual cells meet in one vertex</td></tr>
- * <tr><td>#star_shaped(tr,2,true)</td><td>method is robust if more than
- * usual cells meet in one vertex and local refinement exceeds one
- * level</td></tr>
- * </table>
- *
- * @author Guido Kanschat
- * @date 2006, 2010
- */
-namespace TestGrids
-{
- /**
- * Generate grids based on
- * hypercube. These meshes have a
- * regular geometry and topology.
- *
- * @param <tt>refinement</tt>
- * denotes the number of refinement
- * steps of the root cell.
- *
- * @param if <tt>local</tt> is
- * <tt>true</tt>, refine only the
- * cell containing the corner with
- * only negative coordinates.
- */
- template <int dim>
- void hypercube(Triangulation<dim> &tr,
- unsigned int refinement = 0,
- bool local = false)
- {
- GridGenerator::hyper_cube(tr, -1., 1.);
- if (refinement && !local)
- tr.refine_global(refinement);
- if (refinement && local)
- {
- tr.refine_global(1);
- for (unsigned int i=1; i<refinement; ++i)
- {
- for (typename Triangulation<dim>::active_cell_iterator
- cell = tr.begin_active(); cell != tr.end(); ++cell)
- {
- const Point<dim> &p = cell->center();
- bool negative = true;
- for (unsigned int d=0; d<dim; ++d)
- if (p(d) >= 0.)negative = false;
- if (negative)
- cell->set_refine_flag();
- }
- tr.execute_coarsening_and_refinement();
- }
- }
- deallog << "Triangulation hypercube " << dim << "D refinement " << refinement;
- if (local)
- deallog << " local ";
- deallog << " steps " << tr.n_active_cells() << " active cells "
- << tr.n_cells() << " total cells " << std::endl;
- }
-
- /**
- * Create a star-shaped mesh,
- * having more than the average
- * <tt>2<sup>dim</sup></tt> cells
- * in the central vertex.
- *
- * @param <tt>refinement</tt>
- * denotes the number of refinement
- * steps of the root mesh.
- *
- * @param if <tt>local</tt> is
- * <tt>true</tt>, refine only one
- * of the coarse cells.
- */
- template <int dim>
- void star_shaped(Triangulation<dim> &tr,
- unsigned int refinement = 0,
- bool local = false);
- /**
- * Local refinement of every other
- * cell in a checkerboard fashion.
- */
- template <int dim>
- void checkers(Triangulation<dim> &tr);
- /**
- * Islands of local refinement
- */
- template <int dim>
- void islands(Triangulation<dim> &tr);
- /**
- * Local refinement with an
- * unrefined hole.
- */
- template <int dim>
- void laguna(Triangulation<dim> &tr);
-}