--- /dev/null
+DEAL_II_PICKUP_TESTS()
+++ /dev/null
-############################################################
-# $Id$
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors
-############################################################
-
-include ../Makefile.paths
-include $D/common/Make.global_options
-include ../Makefile.rules
--include Makefile.depend
--include Makefile.tests
int main()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
int main()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
int main()
{
- initlog(__FILE__);
+ initlog();
FE_DGP<2> p0(0);
FE_DGP<2> p1(1);
int main(int argc, char **argv)
{
Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv);
- initlog(__FILE__);
+ initlog();
FE_DGP<2> p0(0);
FE_DGP<2> p1(1);
int main()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
int main()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
int main()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
int main()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
int main ()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
int main()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.log_execution_time(false);
int main()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console(0);
int main()
{
- initlog(__FILE__);
+ initlog();
deallog.threshold_double(1.e-10);
Triangulation<2> tr2;
int main ()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
int main()
{
- initlog(__FILE__);
+ initlog();
deallog.threshold_double(1.e-10);
Triangulation<2> tr2;
int main ()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
int main ()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
int main ()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
int main ()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
int main ()
{
- const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ const std::string logname = "output";
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
deallog.depth_console (0);
--- /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);
+}