--- /dev/null
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2001 - 2015 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/quadrature_lib.h>
+#include <deal.II/base/logstream.h>
+#include <deal.II/lac/vector.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/tria_iterator.h>
+#include <deal.II/dofs/dof_accessor.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/grid_out.h>
+#include <deal.II/grid/tria_boundary_lib.h>
+#include <deal.II/fe/mapping_cartesian.h>
+#include <deal.II/fe/mapping_q1.h>
+#include <deal.II/fe/mapping_q.h>
+#include <deal.II/fe/mapping_fe_field.h>
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_values.h>
+#include <deal.II/fe/fe.h>
+#include <deal.II/fe/fe_bernstein.h>
+#include <deal.II/fe/fe_system.h>
+#include <deal.II/numerics/vector_tools.h>
+
+#include <vector>
+#include <fstream>
+#include <iomanip>
+#include <string>
+#include <sstream>
+
+#define PRECISION 2
+
+template<int dim, int spacedim>
+void test(const unsigned int degree) {
+ deallog << "dim = " << dim << ", spacedim = " << spacedim << std::endl;
+ deallog << "degree = " << degree << std::endl;
+
+ Triangulation<dim,spacedim> tria;
+ GridGenerator::hyper_cube(tria, 0., 1.);
+ tria.refine_global (2);
+
+ FE_Bernstein<dim,spacedim> fe(degree);
+ //FE_Q<dim> fe(degree);
+ FESystem<dim,spacedim> fe_sys(fe, spacedim);
+
+ // DoFHandler<dim> dof(tria);
+ DoFHandler<dim,spacedim> dof_sys(tria);
+ // dof.distribute_dofs(fe);
+ dof_sys.distribute_dofs(fe_sys);
+
+ Vector<double> euler;
+ euler.reinit(dof_sys.n_dofs());
+ const ComponentMask mask(spacedim, true);
+
+ VectorTools::get_position_vector(dof_sys, euler, mask);
+ MappingFEField<dim,spacedim> map_fe(dof_sys, euler, mask);
+
+ QIterated<dim> quadrature_formula(QTrapez<1>(), fe.degree);
+
+ FEValues<dim,spacedim> fe_values ( map_fe, fe_sys,
+ quadrature_formula,
+ update_values |
+ update_JxW_values);
+
+ typename DoFHandler<dim,spacedim>::active_cell_iterator
+ cell = dof_sys.begin_active(),
+ endc = dof_sys.end();
+
+ for (; cell!=endc; ++cell) {
+ fe_values.reinit (cell);
+ deallog << "Cell " << cell << ": OK" << std::endl;
+ }
+}
+
+int main()
+{
+ initlog();
+
+ for(unsigned int d=1; d<4; ++d) {
+ test<2,2>(d);
+ test<2,3>(d);
+ test<3,3>(d);
+ }
+}
--- /dev/null
+
+DEAL::dim = 2, spacedim = 2
+DEAL::degree = 1
+DEAL::Cell 2.0: OK
+DEAL::Cell 2.1: OK
+DEAL::Cell 2.2: OK
+DEAL::Cell 2.3: OK
+DEAL::Cell 2.4: OK
+DEAL::Cell 2.5: OK
+DEAL::Cell 2.6: OK
+DEAL::Cell 2.7: OK
+DEAL::Cell 2.8: OK
+DEAL::Cell 2.9: OK
+DEAL::Cell 2.10: OK
+DEAL::Cell 2.11: OK
+DEAL::Cell 2.12: OK
+DEAL::Cell 2.13: OK
+DEAL::Cell 2.14: OK
+DEAL::Cell 2.15: OK
+DEAL::dim = 2, spacedim = 3
+DEAL::degree = 1
+DEAL::Cell 2.0: OK
+DEAL::Cell 2.1: OK
+DEAL::Cell 2.2: OK
+DEAL::Cell 2.3: OK
+DEAL::Cell 2.4: OK
+DEAL::Cell 2.5: OK
+DEAL::Cell 2.6: OK
+DEAL::Cell 2.7: OK
+DEAL::Cell 2.8: OK
+DEAL::Cell 2.9: OK
+DEAL::Cell 2.10: OK
+DEAL::Cell 2.11: OK
+DEAL::Cell 2.12: OK
+DEAL::Cell 2.13: OK
+DEAL::Cell 2.14: OK
+DEAL::Cell 2.15: OK
+DEAL::dim = 3, spacedim = 3
+DEAL::degree = 1
+DEAL::Cell 2.0: OK
+DEAL::Cell 2.1: OK
+DEAL::Cell 2.2: OK
+DEAL::Cell 2.3: OK
+DEAL::Cell 2.4: OK
+DEAL::Cell 2.5: OK
+DEAL::Cell 2.6: OK
+DEAL::Cell 2.7: OK
+DEAL::Cell 2.8: OK
+DEAL::Cell 2.9: OK
+DEAL::Cell 2.10: OK
+DEAL::Cell 2.11: OK
+DEAL::Cell 2.12: OK
+DEAL::Cell 2.13: OK
+DEAL::Cell 2.14: OK
+DEAL::Cell 2.15: OK
+DEAL::Cell 2.16: OK
+DEAL::Cell 2.17: OK
+DEAL::Cell 2.18: OK
+DEAL::Cell 2.19: OK
+DEAL::Cell 2.20: OK
+DEAL::Cell 2.21: OK
+DEAL::Cell 2.22: OK
+DEAL::Cell 2.23: OK
+DEAL::Cell 2.24: OK
+DEAL::Cell 2.25: OK
+DEAL::Cell 2.26: OK
+DEAL::Cell 2.27: OK
+DEAL::Cell 2.28: OK
+DEAL::Cell 2.29: OK
+DEAL::Cell 2.30: OK
+DEAL::Cell 2.31: OK
+DEAL::Cell 2.32: OK
+DEAL::Cell 2.33: OK
+DEAL::Cell 2.34: OK
+DEAL::Cell 2.35: OK
+DEAL::Cell 2.36: OK
+DEAL::Cell 2.37: OK
+DEAL::Cell 2.38: OK
+DEAL::Cell 2.39: OK
+DEAL::Cell 2.40: OK
+DEAL::Cell 2.41: OK
+DEAL::Cell 2.42: OK
+DEAL::Cell 2.43: OK
+DEAL::Cell 2.44: OK
+DEAL::Cell 2.45: OK
+DEAL::Cell 2.46: OK
+DEAL::Cell 2.47: OK
+DEAL::Cell 2.48: OK
+DEAL::Cell 2.49: OK
+DEAL::Cell 2.50: OK
+DEAL::Cell 2.51: OK
+DEAL::Cell 2.52: OK
+DEAL::Cell 2.53: OK
+DEAL::Cell 2.54: OK
+DEAL::Cell 2.55: OK
+DEAL::Cell 2.56: OK
+DEAL::Cell 2.57: OK
+DEAL::Cell 2.58: OK
+DEAL::Cell 2.59: OK
+DEAL::Cell 2.60: OK
+DEAL::Cell 2.61: OK
+DEAL::Cell 2.62: OK
+DEAL::Cell 2.63: OK
+DEAL::dim = 2, spacedim = 2
+DEAL::degree = 2
+DEAL::Cell 2.0: OK
+DEAL::Cell 2.1: OK
+DEAL::Cell 2.2: OK
+DEAL::Cell 2.3: OK
+DEAL::Cell 2.4: OK
+DEAL::Cell 2.5: OK
+DEAL::Cell 2.6: OK
+DEAL::Cell 2.7: OK
+DEAL::Cell 2.8: OK
+DEAL::Cell 2.9: OK
+DEAL::Cell 2.10: OK
+DEAL::Cell 2.11: OK
+DEAL::Cell 2.12: OK
+DEAL::Cell 2.13: OK
+DEAL::Cell 2.14: OK
+DEAL::Cell 2.15: OK
+DEAL::dim = 2, spacedim = 3
+DEAL::degree = 2
+DEAL::Cell 2.0: OK
+DEAL::Cell 2.1: OK
+DEAL::Cell 2.2: OK
+DEAL::Cell 2.3: OK
+DEAL::Cell 2.4: OK
+DEAL::Cell 2.5: OK
+DEAL::Cell 2.6: OK
+DEAL::Cell 2.7: OK
+DEAL::Cell 2.8: OK
+DEAL::Cell 2.9: OK
+DEAL::Cell 2.10: OK
+DEAL::Cell 2.11: OK
+DEAL::Cell 2.12: OK
+DEAL::Cell 2.13: OK
+DEAL::Cell 2.14: OK
+DEAL::Cell 2.15: OK
+DEAL::dim = 3, spacedim = 3
+DEAL::degree = 2
+DEAL::Cell 2.0: OK
+DEAL::Cell 2.1: OK
+DEAL::Cell 2.2: OK
+DEAL::Cell 2.3: OK
+DEAL::Cell 2.4: OK
+DEAL::Cell 2.5: OK
+DEAL::Cell 2.6: OK
+DEAL::Cell 2.7: OK
+DEAL::Cell 2.8: OK
+DEAL::Cell 2.9: OK
+DEAL::Cell 2.10: OK
+DEAL::Cell 2.11: OK
+DEAL::Cell 2.12: OK
+DEAL::Cell 2.13: OK
+DEAL::Cell 2.14: OK
+DEAL::Cell 2.15: OK
+DEAL::Cell 2.16: OK
+DEAL::Cell 2.17: OK
+DEAL::Cell 2.18: OK
+DEAL::Cell 2.19: OK
+DEAL::Cell 2.20: OK
+DEAL::Cell 2.21: OK
+DEAL::Cell 2.22: OK
+DEAL::Cell 2.23: OK
+DEAL::Cell 2.24: OK
+DEAL::Cell 2.25: OK
+DEAL::Cell 2.26: OK
+DEAL::Cell 2.27: OK
+DEAL::Cell 2.28: OK
+DEAL::Cell 2.29: OK
+DEAL::Cell 2.30: OK
+DEAL::Cell 2.31: OK
+DEAL::Cell 2.32: OK
+DEAL::Cell 2.33: OK
+DEAL::Cell 2.34: OK
+DEAL::Cell 2.35: OK
+DEAL::Cell 2.36: OK
+DEAL::Cell 2.37: OK
+DEAL::Cell 2.38: OK
+DEAL::Cell 2.39: OK
+DEAL::Cell 2.40: OK
+DEAL::Cell 2.41: OK
+DEAL::Cell 2.42: OK
+DEAL::Cell 2.43: OK
+DEAL::Cell 2.44: OK
+DEAL::Cell 2.45: OK
+DEAL::Cell 2.46: OK
+DEAL::Cell 2.47: OK
+DEAL::Cell 2.48: OK
+DEAL::Cell 2.49: OK
+DEAL::Cell 2.50: OK
+DEAL::Cell 2.51: OK
+DEAL::Cell 2.52: OK
+DEAL::Cell 2.53: OK
+DEAL::Cell 2.54: OK
+DEAL::Cell 2.55: OK
+DEAL::Cell 2.56: OK
+DEAL::Cell 2.57: OK
+DEAL::Cell 2.58: OK
+DEAL::Cell 2.59: OK
+DEAL::Cell 2.60: OK
+DEAL::Cell 2.61: OK
+DEAL::Cell 2.62: OK
+DEAL::Cell 2.63: OK
+DEAL::dim = 2, spacedim = 2
+DEAL::degree = 3
+DEAL::Cell 2.0: OK
+DEAL::Cell 2.1: OK
+DEAL::Cell 2.2: OK
+DEAL::Cell 2.3: OK
+DEAL::Cell 2.4: OK
+DEAL::Cell 2.5: OK
+DEAL::Cell 2.6: OK
+DEAL::Cell 2.7: OK
+DEAL::Cell 2.8: OK
+DEAL::Cell 2.9: OK
+DEAL::Cell 2.10: OK
+DEAL::Cell 2.11: OK
+DEAL::Cell 2.12: OK
+DEAL::Cell 2.13: OK
+DEAL::Cell 2.14: OK
+DEAL::Cell 2.15: OK
+DEAL::dim = 2, spacedim = 3
+DEAL::degree = 3
+DEAL::Cell 2.0: OK
+DEAL::Cell 2.1: OK
+DEAL::Cell 2.2: OK
+DEAL::Cell 2.3: OK
+DEAL::Cell 2.4: OK
+DEAL::Cell 2.5: OK
+DEAL::Cell 2.6: OK
+DEAL::Cell 2.7: OK
+DEAL::Cell 2.8: OK
+DEAL::Cell 2.9: OK
+DEAL::Cell 2.10: OK
+DEAL::Cell 2.11: OK
+DEAL::Cell 2.12: OK
+DEAL::Cell 2.13: OK
+DEAL::Cell 2.14: OK
+DEAL::Cell 2.15: OK
+DEAL::dim = 3, spacedim = 3
+DEAL::degree = 3
+DEAL::Cell 2.0: OK
+DEAL::Cell 2.1: OK
+DEAL::Cell 2.2: OK
+DEAL::Cell 2.3: OK
+DEAL::Cell 2.4: OK
+DEAL::Cell 2.5: OK
+DEAL::Cell 2.6: OK
+DEAL::Cell 2.7: OK
+DEAL::Cell 2.8: OK
+DEAL::Cell 2.9: OK
+DEAL::Cell 2.10: OK
+DEAL::Cell 2.11: OK
+DEAL::Cell 2.12: OK
+DEAL::Cell 2.13: OK
+DEAL::Cell 2.14: OK
+DEAL::Cell 2.15: OK
+DEAL::Cell 2.16: OK
+DEAL::Cell 2.17: OK
+DEAL::Cell 2.18: OK
+DEAL::Cell 2.19: OK
+DEAL::Cell 2.20: OK
+DEAL::Cell 2.21: OK
+DEAL::Cell 2.22: OK
+DEAL::Cell 2.23: OK
+DEAL::Cell 2.24: OK
+DEAL::Cell 2.25: OK
+DEAL::Cell 2.26: OK
+DEAL::Cell 2.27: OK
+DEAL::Cell 2.28: OK
+DEAL::Cell 2.29: OK
+DEAL::Cell 2.30: OK
+DEAL::Cell 2.31: OK
+DEAL::Cell 2.32: OK
+DEAL::Cell 2.33: OK
+DEAL::Cell 2.34: OK
+DEAL::Cell 2.35: OK
+DEAL::Cell 2.36: OK
+DEAL::Cell 2.37: OK
+DEAL::Cell 2.38: OK
+DEAL::Cell 2.39: OK
+DEAL::Cell 2.40: OK
+DEAL::Cell 2.41: OK
+DEAL::Cell 2.42: OK
+DEAL::Cell 2.43: OK
+DEAL::Cell 2.44: OK
+DEAL::Cell 2.45: OK
+DEAL::Cell 2.46: OK
+DEAL::Cell 2.47: OK
+DEAL::Cell 2.48: OK
+DEAL::Cell 2.49: OK
+DEAL::Cell 2.50: OK
+DEAL::Cell 2.51: OK
+DEAL::Cell 2.52: OK
+DEAL::Cell 2.53: OK
+DEAL::Cell 2.54: OK
+DEAL::Cell 2.55: OK
+DEAL::Cell 2.56: OK
+DEAL::Cell 2.57: OK
+DEAL::Cell 2.58: OK
+DEAL::Cell 2.59: OK
+DEAL::Cell 2.60: OK
+DEAL::Cell 2.61: OK
+DEAL::Cell 2.62: OK
+DEAL::Cell 2.63: OK