--- /dev/null
+//----------------------------------------------------------------------
+// $Id$
+//
+// Copyright (C) 2012 by the deal.II authors
+//
+// This file is subject to QPL and may not be distributed
+// without copyright and license information. Please refer
+// to the file deal.II/doc/license.html for the text and
+// further information on this license.
+//
+//----------------------------------------------------------------------
+
+/**
+ * @file Test initialization of Assembler::MatrixSimple and
+ * DoFInfo including assigning of local block sizes
+ */
+
+#include "../tests.h"
+#include <deal.II/base/logstream.h>
+#include <deal.II/lac/full_matrix.h>
+#include <deal.II/lac/block_indices.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/dofs/dof_handler.h>
+#include <deal.II/meshworker/local_results.h>
+#include <deal.II/meshworker/dof_info.h>
+#include <deal.II/meshworker/simple.h>
+
+#include <deal.II/fe/fe_dgp.h>
+#include <deal.II/fe/fe_system.h>
+
+using namespace dealii;
+
+template <int dim>
+void test(FiniteElement<dim>& fe)
+{
+ deallog << fe.get_name() << std::endl;
+
+ Triangulation<dim> tr;
+ GridGenerator::hyper_cube(tr);
+ tr.refine_global(1);
+ tr.begin_active()->neighbor(1)->set_refine_flag();
+ tr.execute_coarsening_and_refinement();
+
+ DoFHandler<dim> dof(tr);
+ dof.distribute_dofs(fe);
+ dof.initialize_local_block_info();
+
+ typename DoFHandler<dim>::active_cell_iterator cell = dof.begin_active();
+ typename DoFHandler<dim>::face_iterator face = cell->face(1);
+
+ MeshWorker::Assembler::MatrixSimple<FullMatrix<double> > ass;
+ ass.initialize_local_blocks(dof.block_info().local());
+ MeshWorker::DoFInfo<dim> info(dof.block_info());
+ ass.initialize_info(info, false);
+
+ deallog.push("cell");
+ info.reinit(cell);
+ info.print_debug(deallog);
+ deallog.pop();
+
+ deallog.push("face1");
+ info.reinit(cell, face, 1);
+ info.print_debug(deallog);
+ deallog.pop();
+
+ deallog.push("face2");
+ ass.initialize_info(info, true);
+ info.reinit(cell, face, 1);
+ info.print_debug(deallog);
+ deallog.pop();
+}
+
+int main()
+{
+ const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ std::ofstream logfile(logname.c_str());
+ deallog.attach(logfile);
+ deallog.depth_console (0);
+
+ FE_DGP<2> p0(0);
+ FE_DGP<2> p1(1);
+ FE_DGP<2> p2(2);
+
+ FESystem<2> sys1(p0,1, p1, 1);
+ FESystem<2> sys2(p2,2,p0,3,p1,1);
+
+ test(sys1);
+ test(sys2);
+}
--- /dev/null
+
+DEAL::FESystem<2>[FE_DGP<2>(0)-FE_DGP<2>(1)]
+DEAL:cell::J: 0
+DEAL:cell::R: 0
+DEAL:cell::M: 4 face 0
+DEAL:cell:: 0,0 1x1
+DEAL:cell:: 0,1 1x3
+DEAL:cell:: 1,0 3x1
+DEAL:cell:: 1,1 3x3
+DEAL:face1::J: 0
+DEAL:face1::R: 0
+DEAL:face1::M: 4 face 0
+DEAL:face1:: 0,0 1x1
+DEAL:face1:: 0,1 1x3
+DEAL:face1:: 1,0 3x1
+DEAL:face1:: 1,1 3x3
+DEAL:face2::J: 0
+DEAL:face2::R: 0
+DEAL:face2::M: 4 face 4
+DEAL:face2:: 0,0 1x1 face 0,0 1x1
+DEAL:face2:: 0,1 1x3 face 0,1 1x3
+DEAL:face2:: 1,0 3x1 face 1,0 3x1
+DEAL:face2:: 1,1 3x3 face 1,1 3x3
+DEAL::FESystem<2>[FE_DGP<2>(2)^2-FE_DGP<2>(0)^3-FE_DGP<2>(1)]
+DEAL:cell::J: 0
+DEAL:cell::R: 0
+DEAL:cell::M: 36 face 0
+DEAL:cell:: 0,0 6x6
+DEAL:cell:: 0,1 6x6
+DEAL:cell:: 0,2 6x1
+DEAL:cell:: 0,3 6x1
+DEAL:cell:: 0,4 6x1
+DEAL:cell:: 0,5 6x3
+DEAL:cell:: 1,0 6x6
+DEAL:cell:: 1,1 6x6
+DEAL:cell:: 1,2 6x1
+DEAL:cell:: 1,3 6x1
+DEAL:cell:: 1,4 6x1
+DEAL:cell:: 1,5 6x3
+DEAL:cell:: 2,0 1x6
+DEAL:cell:: 2,1 1x6
+DEAL:cell:: 2,2 1x1
+DEAL:cell:: 2,3 1x1
+DEAL:cell:: 2,4 1x1
+DEAL:cell:: 2,5 1x3
+DEAL:cell:: 3,0 1x6
+DEAL:cell:: 3,1 1x6
+DEAL:cell:: 3,2 1x1
+DEAL:cell:: 3,3 1x1
+DEAL:cell:: 3,4 1x1
+DEAL:cell:: 3,5 1x3
+DEAL:cell:: 4,0 1x6
+DEAL:cell:: 4,1 1x6
+DEAL:cell:: 4,2 1x1
+DEAL:cell:: 4,3 1x1
+DEAL:cell:: 4,4 1x1
+DEAL:cell:: 4,5 1x3
+DEAL:cell:: 5,0 3x6
+DEAL:cell:: 5,1 3x6
+DEAL:cell:: 5,2 3x1
+DEAL:cell:: 5,3 3x1
+DEAL:cell:: 5,4 3x1
+DEAL:cell:: 5,5 3x3
+DEAL:face1::J: 0
+DEAL:face1::R: 0
+DEAL:face1::M: 36 face 0
+DEAL:face1:: 0,0 6x6
+DEAL:face1:: 0,1 6x6
+DEAL:face1:: 0,2 6x1
+DEAL:face1:: 0,3 6x1
+DEAL:face1:: 0,4 6x1
+DEAL:face1:: 0,5 6x3
+DEAL:face1:: 1,0 6x6
+DEAL:face1:: 1,1 6x6
+DEAL:face1:: 1,2 6x1
+DEAL:face1:: 1,3 6x1
+DEAL:face1:: 1,4 6x1
+DEAL:face1:: 1,5 6x3
+DEAL:face1:: 2,0 1x6
+DEAL:face1:: 2,1 1x6
+DEAL:face1:: 2,2 1x1
+DEAL:face1:: 2,3 1x1
+DEAL:face1:: 2,4 1x1
+DEAL:face1:: 2,5 1x3
+DEAL:face1:: 3,0 1x6
+DEAL:face1:: 3,1 1x6
+DEAL:face1:: 3,2 1x1
+DEAL:face1:: 3,3 1x1
+DEAL:face1:: 3,4 1x1
+DEAL:face1:: 3,5 1x3
+DEAL:face1:: 4,0 1x6
+DEAL:face1:: 4,1 1x6
+DEAL:face1:: 4,2 1x1
+DEAL:face1:: 4,3 1x1
+DEAL:face1:: 4,4 1x1
+DEAL:face1:: 4,5 1x3
+DEAL:face1:: 5,0 3x6
+DEAL:face1:: 5,1 3x6
+DEAL:face1:: 5,2 3x1
+DEAL:face1:: 5,3 3x1
+DEAL:face1:: 5,4 3x1
+DEAL:face1:: 5,5 3x3
+DEAL:face2::J: 0
+DEAL:face2::R: 0
+DEAL:face2::M: 36 face 36
+DEAL:face2:: 0,0 6x6 face 0,0 6x6
+DEAL:face2:: 0,1 6x6 face 0,1 6x6
+DEAL:face2:: 0,2 6x1 face 0,2 6x1
+DEAL:face2:: 0,3 6x1 face 0,3 6x1
+DEAL:face2:: 0,4 6x1 face 0,4 6x1
+DEAL:face2:: 0,5 6x3 face 0,5 6x3
+DEAL:face2:: 1,0 6x6 face 1,0 6x6
+DEAL:face2:: 1,1 6x6 face 1,1 6x6
+DEAL:face2:: 1,2 6x1 face 1,2 6x1
+DEAL:face2:: 1,3 6x1 face 1,3 6x1
+DEAL:face2:: 1,4 6x1 face 1,4 6x1
+DEAL:face2:: 1,5 6x3 face 1,5 6x3
+DEAL:face2:: 2,0 1x6 face 2,0 1x6
+DEAL:face2:: 2,1 1x6 face 2,1 1x6
+DEAL:face2:: 2,2 1x1 face 2,2 1x1
+DEAL:face2:: 2,3 1x1 face 2,3 1x1
+DEAL:face2:: 2,4 1x1 face 2,4 1x1
+DEAL:face2:: 2,5 1x3 face 2,5 1x3
+DEAL:face2:: 3,0 1x6 face 3,0 1x6
+DEAL:face2:: 3,1 1x6 face 3,1 1x6
+DEAL:face2:: 3,2 1x1 face 3,2 1x1
+DEAL:face2:: 3,3 1x1 face 3,3 1x1
+DEAL:face2:: 3,4 1x1 face 3,4 1x1
+DEAL:face2:: 3,5 1x3 face 3,5 1x3
+DEAL:face2:: 4,0 1x6 face 4,0 1x6
+DEAL:face2:: 4,1 1x6 face 4,1 1x6
+DEAL:face2:: 4,2 1x1 face 4,2 1x1
+DEAL:face2:: 4,3 1x1 face 4,3 1x1
+DEAL:face2:: 4,4 1x1 face 4,4 1x1
+DEAL:face2:: 4,5 1x3 face 4,5 1x3
+DEAL:face2:: 5,0 3x6 face 5,0 3x6
+DEAL:face2:: 5,1 3x6 face 5,1 3x6
+DEAL:face2:: 5,2 3x1 face 5,2 3x1
+DEAL:face2:: 5,3 3x1 face 5,3 3x1
+DEAL:face2:: 5,4 3x1 face 5,4 3x1
+DEAL:face2:: 5,5 3x3 face 5,5 3x3