From b5f7e23daed75c35e1b28127be8e7bc01a9389dd Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 15 Nov 2016 23:06:38 -0600 Subject: [PATCH] add a test --- .../constraint_matrix_distribute_complex.cc | 51 +++++++++++++++++++ ...onstraint_matrix_distribute_complex.output | 2 + 2 files changed, 53 insertions(+) create mode 100644 tests/lac/constraint_matrix_distribute_complex.cc create mode 100644 tests/lac/constraint_matrix_distribute_complex.output diff --git a/tests/lac/constraint_matrix_distribute_complex.cc b/tests/lac/constraint_matrix_distribute_complex.cc new file mode 100644 index 0000000000..4c27d11930 --- /dev/null +++ b/tests/lac/constraint_matrix_distribute_complex.cc @@ -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 +#include +#include +#include +#include +#include +#include + +using namespace dealii; + +int main () +{ + initlog(); + + const int dim = 2; + + Triangulation triangulation; + FE_Q fe(2); + + GridGenerator::hyper_cube (triangulation); + DoFHandler dof_handler(triangulation); + dof_handler.distribute_dofs (fe); + + ConstraintMatrix constraints; + DoFTools::make_hanging_node_constraints (dof_handler, + constraints); + constraints.close (); + + Vector > 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 index 0000000000..0fd8fc12f0 --- /dev/null +++ b/tests/lac/constraint_matrix_distribute_complex.output @@ -0,0 +1,2 @@ + +DEAL::OK -- 2.39.5