--- /dev/null
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2013 - 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.
+//
+// ---------------------------------------------------------------------
+
+// Same as project_bv_curl_conf.cc for std::complex<double>
+
+#include <deal.II/base/function.h>
+
+#include <deal.II/dofs/dof_handler.h>
+
+#include <deal.II/fe/fe_nedelec.h>
+#include <deal.II/fe/fe_nedelec_sz.h>
+
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/tria.h>
+
+#include <deal.II/lac/affine_constraints.h>
+
+#include <deal.II/numerics/vector_tools.h>
+
+#include "../tests.h"
+
+template <int dim>
+class BoundaryFunction : public Function<dim, std::complex<double>>
+{
+public:
+ BoundaryFunction();
+ virtual void
+ vector_value(const Point<dim> &p, Vector<std::complex<double>> &values) const;
+};
+
+template <int dim>
+BoundaryFunction<dim>::BoundaryFunction()
+ : Function<dim, std::complex<double>>(dim)
+{}
+
+template <int dim>
+void
+BoundaryFunction<dim>::vector_value(const Point<dim> &,
+ Vector<std::complex<double>> &values) const
+{
+ for (unsigned int d = 0; d < dim; ++d)
+ values(d) = d + 1.0;
+}
+
+template <int dim>
+void
+test_boundary_values(const FiniteElement<dim> &fe)
+{
+ Triangulation<dim> triangulation;
+
+ GridGenerator::subdivided_hyper_cube(triangulation, 2);
+
+ DoFHandler<dim> dof_handler(triangulation);
+
+ dof_handler.distribute_dofs(fe);
+
+ BoundaryFunction<dim> boundary_function;
+ AffineConstraints<std::complex<double>> constraints;
+
+ constraints.clear();
+ VectorTools::project_boundary_values_curl_conforming_l2(
+ dof_handler, 0, boundary_function, 0, constraints);
+ constraints.close();
+ constraints.print(deallog.get_file_stream());
+}
+
+int
+main()
+{
+ initlog();
+
+ {
+ deallog << "Tests with FE_NEdelec:" << std::endl;
+
+ FE_Nedelec<2> fe_2(1);
+
+ deallog << "dim=2:" << std::endl;
+ test_boundary_values(fe_2);
+
+ FE_Nedelec<3> fe_3(1);
+
+ deallog << "dim=3:" << std::endl;
+ test_boundary_values(fe_3);
+ }
+
+ {
+ deallog << "Tests with FE_NEdelecSZ:" << std::endl;
+
+ FE_NedelecSZ<2> fe_2(1);
+
+ deallog << "dim=2:" << std::endl;
+ test_boundary_values(fe_2);
+
+ FE_NedelecSZ<3> fe_3(1);
+
+ deallog << "dim=3:" << std::endl;
+ test_boundary_values(fe_3);
+ }
+}
--- /dev/null
+
+DEAL::Tests with FE_NEdelec:
+DEAL::dim=2:
+ 0 = (1.00000,0.00000)
+ 1 = 0
+ 4 = (0.500000,0.00000)
+ 5 = 0
+ 12 = (1.00000,0.00000)
+ 13 = 0
+ 14 = (0.500000,0.00000)
+ 15 = 0
+ 22 = (1.00000,0.00000)
+ 23 = 0
+ 26 = (0.500000,0.00000)
+ 27 = 0
+ 32 = (1.00000,0.00000)
+ 33 = 0
+ 34 = (0.500000,0.00000)
+ 35 = 0
+DEAL::dim=3:
+ 0 = (1.00000,0.00000)
+ 1 = 0
+ 2 = (1.00000,0.00000)
+ 3 = 0
+ 4 = (0.500000,0.00000)
+ 5 = 0
+ 6 = (0.500000,0.00000)
+ 7 = 0
+ 8 = (1.00000,0.00000)
+ 9 = 0
+ 12 = (0.500000,0.00000)
+ 13 = 0
+ 16 = (1.50000,0.00000)
+ 17 = 0
+ 18 = (1.50000,0.00000)
+ 19 = 0
+ 20 = (1.50000,0.00000)
+ 21 = 0
+ 24 = 0
+ 25 = 0
+ 26 = 0
+ 27 = 0
+ 32 = 0
+ 33 = 0
+ 34 = 0
+ 35 = 0
+ 40 = 0
+ 41 = 0
+ 42 = 0
+ 43 = 0
+ 54 = (1.00000,0.00000)
+ 55 = 0
+ 56 = (0.500000,0.00000)
+ 57 = 0
+ 58 = (0.500000,0.00000)
+ 59 = 0
+ 60 = (1.00000,0.00000)
+ 61 = 0
+ 62 = (0.500000,0.00000)
+ 63 = 0
+ 66 = (1.50000,0.00000)
+ 67 = 0
+ 68 = (1.50000,0.00000)
+ 69 = 0
+ 70 = 0
+ 71 = 0
+ 72 = 0
+ 73 = 0
+ 74 = 0
+ 75 = 0
+ 76 = 0
+ 77 = 0
+ 82 = 0
+ 83 = 0
+ 84 = 0
+ 85 = 0
+ 96 = (1.00000,0.00000)
+ 97 = 0
+ 98 = (1.00000,0.00000)
+ 99 = 0
+ 100 = (0.500000,0.00000)
+ 101 = 0
+ 102 = (1.00000,0.00000)
+ 103 = 0
+ 106 = (0.500000,0.00000)
+ 107 = 0
+ 108 = (1.50000,0.00000)
+ 109 = 0
+ 110 = (1.50000,0.00000)
+ 111 = 0
+ 112 = 0
+ 113 = 0
+ 114 = 0
+ 115 = 0
+ 120 = 0
+ 121 = 0
+ 122 = 0
+ 123 = 0
+ 124 = 0
+ 125 = 0
+ 126 = 0
+ 127 = 0
+ 138 = (1.00000,0.00000)
+ 139 = 0
+ 140 = (0.500000,0.00000)
+ 141 = 0
+ 142 = (1.00000,0.00000)
+ 143 = 0
+ 144 = (0.500000,0.00000)
+ 145 = 0
+ 146 = (1.50000,0.00000)
+ 147 = 0
+ 148 = 0
+ 149 = 0
+ 150 = 0
+ 151 = 0
+ 152 = 0
+ 153 = 0
+ 154 = 0
+ 155 = 0
+ 156 = 0
+ 157 = 0
+ 158 = 0
+ 159 = 0
+ 170 = (1.00000,0.00000)
+ 171 = 0
+ 172 = (1.00000,0.00000)
+ 173 = 0
+ 174 = (0.500000,0.00000)
+ 175 = 0
+ 176 = (0.500000,0.00000)
+ 177 = 0
+ 178 = (1.50000,0.00000)
+ 179 = 0
+ 180 = (1.50000,0.00000)
+ 181 = 0
+ 182 = (1.50000,0.00000)
+ 183 = 0
+ 186 = 0
+ 187 = 0
+ 188 = 0
+ 189 = 0
+ 194 = 0
+ 195 = 0
+ 196 = 0
+ 197 = 0
+ 202 = 0
+ 203 = 0
+ 204 = 0
+ 205 = 0
+ 212 = (1.00000,0.00000)
+ 213 = 0
+ 214 = (0.500000,0.00000)
+ 215 = 0
+ 216 = (0.500000,0.00000)
+ 217 = 0
+ 218 = (1.50000,0.00000)
+ 219 = 0
+ 220 = (1.50000,0.00000)
+ 221 = 0
+ 222 = 0
+ 223 = 0
+ 224 = 0
+ 225 = 0
+ 226 = 0
+ 227 = 0
+ 228 = 0
+ 229 = 0
+ 234 = 0
+ 235 = 0
+ 236 = 0
+ 237 = 0
+ 244 = (1.00000,0.00000)
+ 245 = 0
+ 246 = (1.00000,0.00000)
+ 247 = 0
+ 248 = (0.500000,0.00000)
+ 249 = 0
+ 250 = (1.50000,0.00000)
+ 251 = 0
+ 252 = (1.50000,0.00000)
+ 253 = 0
+ 254 = 0
+ 255 = 0
+ 256 = 0
+ 257 = 0
+ 262 = 0
+ 263 = 0
+ 264 = 0
+ 265 = 0
+ 266 = 0
+ 267 = 0
+ 268 = 0
+ 269 = 0
+ 276 = (1.00000,0.00000)
+ 277 = 0
+ 278 = (0.500000,0.00000)
+ 279 = 0
+ 280 = (1.50000,0.00000)
+ 281 = 0
+ 282 = 0
+ 283 = 0
+ 284 = 0
+ 285 = 0
+ 286 = 0
+ 287 = 0
+ 288 = 0
+ 289 = 0
+ 290 = 0
+ 291 = 0
+ 292 = 0
+ 293 = 0
+DEAL::Tests with FE_NEdelecSZ:
+DEAL::dim=2:
+ 0 = (-1.00000,0.00000)
+ 1 = 0
+ 4 = (-0.500000,0.00000)
+ 5 = 0
+ 12 = (-1.00000,0.00000)
+ 13 = 0
+ 14 = (-0.500000,0.00000)
+ 15 = 0
+ 22 = (-1.00000,0.00000)
+ 23 = 0
+ 26 = (-0.500000,0.00000)
+ 27 = 0
+ 32 = (-1.00000,0.00000)
+ 33 = 0
+ 34 = (-0.500000,0.00000)
+ 35 = 0
+DEAL::dim=3:
+ 0 = (-1.00000,0.00000)
+ 1 = 0
+ 2 = (-1.00000,0.00000)
+ 3 = 0
+ 4 = (-0.500000,0.00000)
+ 5 = 0
+ 6 = (-0.500000,0.00000)
+ 7 = 0
+ 8 = (-1.00000,0.00000)
+ 9 = 0
+ 12 = (-0.500000,0.00000)
+ 13 = 0
+ 16 = (-1.50000,0.00000)
+ 17 = 0
+ 18 = (-1.50000,0.00000)
+ 19 = 0
+ 20 = (-1.50000,0.00000)
+ 21 = 0
+ 24 = 0
+ 25 = 0
+ 26 = 0
+ 27 = 0
+ 32 = 0
+ 33 = 0
+ 34 = 0
+ 35 = 0
+ 40 = 0
+ 41 = 0
+ 42 = 0
+ 43 = 0
+ 54 = (-1.00000,0.00000)
+ 55 = 0
+ 56 = (-0.500000,0.00000)
+ 57 = 0
+ 58 = (-0.500000,0.00000)
+ 59 = 0
+ 60 = (-1.00000,0.00000)
+ 61 = 0
+ 62 = (-0.500000,0.00000)
+ 63 = 0
+ 66 = (-1.50000,0.00000)
+ 67 = 0
+ 68 = (-1.50000,0.00000)
+ 69 = 0
+ 70 = 0
+ 71 = 0
+ 72 = 0
+ 73 = 0
+ 74 = 0
+ 75 = 0
+ 76 = 0
+ 77 = 0
+ 82 = 0
+ 83 = 0
+ 84 = 0
+ 85 = 0
+ 96 = (-1.00000,0.00000)
+ 97 = 0
+ 98 = (-1.00000,0.00000)
+ 99 = 0
+ 100 = (-0.500000,0.00000)
+ 101 = 0
+ 102 = (-1.00000,0.00000)
+ 103 = 0
+ 106 = (-0.500000,0.00000)
+ 107 = 0
+ 108 = (-1.50000,0.00000)
+ 109 = 0
+ 110 = (-1.50000,0.00000)
+ 111 = 0
+ 112 = 0
+ 113 = 0
+ 114 = 0
+ 115 = 0
+ 120 = 0
+ 121 = 0
+ 122 = 0
+ 123 = 0
+ 124 = 0
+ 125 = 0
+ 126 = 0
+ 127 = 0
+ 138 = (-1.00000,0.00000)
+ 139 = 0
+ 140 = (-0.500000,0.00000)
+ 141 = 0
+ 142 = (-1.00000,0.00000)
+ 143 = 0
+ 144 = (-0.500000,0.00000)
+ 145 = 0
+ 146 = (-1.50000,0.00000)
+ 147 = 0
+ 148 = 0
+ 149 = 0
+ 150 = 0
+ 151 = 0
+ 152 = 0
+ 153 = 0
+ 154 = 0
+ 155 = 0
+ 156 = 0
+ 157 = 0
+ 158 = 0
+ 159 = 0
+ 170 = (-1.00000,0.00000)
+ 171 = 0
+ 172 = (-1.00000,0.00000)
+ 173 = 0
+ 174 = (-0.500000,0.00000)
+ 175 = 0
+ 176 = (-0.500000,0.00000)
+ 177 = 0
+ 178 = (-1.50000,0.00000)
+ 179 = 0
+ 180 = (-1.50000,0.00000)
+ 181 = 0
+ 182 = (-1.50000,0.00000)
+ 183 = 0
+ 186 = 0
+ 187 = 0
+ 188 = 0
+ 189 = 0
+ 194 = 0
+ 195 = 0
+ 196 = 0
+ 197 = 0
+ 202 = 0
+ 203 = 0
+ 204 = 0
+ 205 = 0
+ 212 = (-1.00000,0.00000)
+ 213 = 0
+ 214 = (-0.500000,0.00000)
+ 215 = 0
+ 216 = (-0.500000,0.00000)
+ 217 = 0
+ 218 = (-1.50000,0.00000)
+ 219 = 0
+ 220 = (-1.50000,0.00000)
+ 221 = 0
+ 222 = 0
+ 223 = 0
+ 224 = 0
+ 225 = 0
+ 226 = 0
+ 227 = 0
+ 228 = 0
+ 229 = 0
+ 234 = 0
+ 235 = 0
+ 236 = 0
+ 237 = 0
+ 244 = (-1.00000,0.00000)
+ 245 = 0
+ 246 = (-1.00000,0.00000)
+ 247 = 0
+ 248 = (-0.500000,0.00000)
+ 249 = 0
+ 250 = (-1.50000,0.00000)
+ 251 = 0
+ 252 = (-1.50000,0.00000)
+ 253 = 0
+ 254 = 0
+ 255 = 0
+ 256 = 0
+ 257 = 0
+ 262 = 0
+ 263 = 0
+ 264 = 0
+ 265 = 0
+ 266 = 0
+ 267 = 0
+ 268 = 0
+ 269 = 0
+ 276 = (-1.00000,0.00000)
+ 277 = 0
+ 278 = (-0.500000,0.00000)
+ 279 = 0
+ 280 = (-1.50000,0.00000)
+ 281 = 0
+ 282 = 0
+ 283 = 0
+ 284 = 0
+ 285 = 0
+ 286 = 0
+ 287 = 0
+ 288 = 0
+ 289 = 0
+ 290 = 0
+ 291 = 0
+ 292 = 0
+ 293 = 0