]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add a test 3592/head
authorMatthias Maier <tamiko@43-1.org>
Wed, 16 Nov 2016 05:06:38 +0000 (23:06 -0600)
committerMatthias Maier <tamiko@43-1.org>
Wed, 16 Nov 2016 14:29:05 +0000 (08:29 -0600)
tests/lac/constraint_matrix_distribute_complex.cc [new file with mode: 0644]
tests/lac/constraint_matrix_distribute_complex.output [new file with mode: 0644]

diff --git a/tests/lac/constraint_matrix_distribute_complex.cc b/tests/lac/constraint_matrix_distribute_complex.cc
new file mode 100644 (file)
index 0000000..4c27d11
--- /dev/null
@@ -0,0 +1,51 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2005 - 2016 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/dofs/dof_handler.h>
+#include <deal.II/dofs/dof_tools.h>
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/lac/constraint_matrix.h>
+#include <deal.II/lac/vector.h>
+
+using namespace dealii;
+
+int main ()
+{
+  initlog();
+
+  const int dim = 2;
+
+  Triangulation<dim> triangulation;
+  FE_Q<dim> fe(2);
+
+  GridGenerator::hyper_cube (triangulation);
+  DoFHandler<dim>      dof_handler(triangulation);
+  dof_handler.distribute_dofs (fe);
+
+  ConstraintMatrix constraints;
+  DoFTools::make_hanging_node_constraints (dof_handler,
+                                           constraints);
+  constraints.close ();
+
+  Vector<std::complex<double> > solution;
+  solution.reinit (dof_handler.n_dofs());
+  constraints.distribute (solution);
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/lac/constraint_matrix_distribute_complex.output b/tests/lac/constraint_matrix_distribute_complex.output
new file mode 100644 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK

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.