From 02af3faf99a0ce8b7fd9f1dd3cf6ef8b17d71d16 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 4 Nov 2019 11:45:34 -0700 Subject: [PATCH] Add a test. --- tests/numerics/nedelec_projection_mixed_01.cc | 66 +++++++++++++++++++ .../nedelec_projection_mixed_01.output | 5 ++ 2 files changed, 71 insertions(+) create mode 100644 tests/numerics/nedelec_projection_mixed_01.cc create mode 100644 tests/numerics/nedelec_projection_mixed_01.output diff --git a/tests/numerics/nedelec_projection_mixed_01.cc b/tests/numerics/nedelec_projection_mixed_01.cc new file mode 100644 index 0000000000..da241209cf --- /dev/null +++ b/tests/numerics/nedelec_projection_mixed_01.cc @@ -0,0 +1,66 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2017 - 2018 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.md at +// the top level directory of deal.II. +// +// --------------------------------------------------------------------- + + + +// check VectorTools::project_boundary_values_curl_conforming_l2 for a +// combination element that has edge DoFs other than those just from +// the Nedelec base element + +#include "../tests.h" +#include + +#include +#include +#include +#include + +#include + +#include + +#include + + + +int +main() +{ + initlog(); + + const unsigned int dim = 3; + + + Triangulation triangulation; + GridGenerator::hyper_cube(triangulation, 0, 1, true); + MappingQ mapping(1); + AffineConstraints constraints; + + FESystem fe_system(FE_Q(2), 1, FE_Nedelec(0), 1); + DoFHandler dof_handler(triangulation); + dof_handler.distribute_dofs(fe_system); + + constraints.clear(); + VectorTools::project_boundary_values_curl_conforming_l2( + dof_handler, + 1, + Functions::ZeroFunction(dim + 1), + 0, + constraints, + mapping); + constraints.close(); + + constraints.print(deallog.get_file_stream()); +} diff --git a/tests/numerics/nedelec_projection_mixed_01.output b/tests/numerics/nedelec_projection_mixed_01.output new file mode 100644 index 0000000000..8d00f4cbc9 --- /dev/null +++ b/tests/numerics/nedelec_projection_mixed_01.output @@ -0,0 +1,5 @@ + + 9 = 0 + 17 = 0 + 25 = 0 + 29 = 0 -- 2.39.5