--- /dev/null
+############################################################
+# $Id$
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
+############################################################
+
+############################################################
+# Include general settings for including DEAL libraries
+############################################################
+
+D=../../deal.II
+include $D/common/Make.global_options
+debug-mode = on
+
+libraries += $(lib-deal2-2d.g) $(lib-deal2-3d.g) $(lib-lac) $(lib-base)
+
+default: run-tests
+
+############################################################
+
+tests_x = dof_handler_size
+
+# from above list of regular expressions, generate the real set of
+# tests
+expand = $(shell echo $(addsuffix .cc,$(1)) \
+ | $(PERL) -pi -e 's/\.cc//g;')
+tests = $(call expand,$(tests_x))
+
+
+############################################################
+# First how to create executables, including all necessary
+# flags:
+############################################################
+
+flags = $(CXXFLAGS.g)
+
+ifeq ($(findstring gcc,$(GXX_VERSION)),gcc)
+flags += -Wno-missing-noreturn
+endif
+
+%/obj.g.$(OBJEXT) : %.cc
+ @echo =====debug========= $<
+ @echo Compiling > $*/status
+ @$(CXX) $(flags) -c $< -o $@
+
+%/obj.$(OBJEXT) : %.cc
+ @echo =====optimized===== $<
+ @echo Compiling > $*/status
+ @$(CXX) $(CXXFLAGS.o) -c $< -o $@
+
+######################################################################
+# Don't put $(libraries) into this line since it is already in $^
+######################################################################
+%/exe : %/obj.$(OBJEXT)
+ @echo =====linking======= $@
+ @echo Linking > $*/status
+ @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+
+############################################################
+# After all these general rules, here is the target to be
+# executed by make: for each entry in the list $(tests)
+# perform a check.
+############################################################
+run-tests: $(tests:%=%/output)
+
+build: $(tests:%=%/exe)
+
+refs: $(tests:%=%/ref)
+
+
+Makefile.tests: Makefile $(shell echo *.cc)
+ @echo =====Targets======= $@
+ @for i in $(tests) ; do \
+ echo "$$i/exe : $$i/obj.\$$(OBJEXT) \$$(libraries)"; \
+ done \
+ > $@
+
+
+
+
+include Makefile.depend
+include Makefile.tests
--- /dev/null
+//----------------------------------------------------------------------
+// $Id$
+// Version: $Name$
+//
+// Copyright (C) 2007 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.
+//
+//----------------------------------------------------------------------
+
+#include <base/logstream.h>
+#include <grid/tria.h>
+#include <grid/grid_generator.h>
+#include <dofs/dof_handler.h>
+#include <fe/fe_q.h>
+#include <fe/fe_dgq.h>
+#include <fe/fe_system.h>
+
+using namespace dealii;
+
+
+template <int dim>
+void check ()
+{
+ deallog << "Dimension " << dim << std::endl;
+ Triangulation<dim> tr;
+ GridGenerator::hyper_cube(tr);
+ tr.refine_global(18/dim);
+
+ deallog << "Cells " << tr.n_cells()
+ << " active " << tr.n_active_cells()
+ << " memory " << tr.memory_consumption()
+ << std::endl;
+
+ FE_Q<dim> q1(1);
+ FE_Q<dim> q3(3);
+ FESystem<dim> sys1(q3, 1);
+ FESystem<dim> sys2(q3, 10);
+ DoFHandler<dim> dof(tr);
+
+ dof.distribute_dofs(q1);
+ deallog << "Dofs Q1 " << dof.n_dofs()
+ << " memory " << dof.memory_consumption()
+ << std::endl;
+
+ dof.distribute_dofs(q3);
+ deallog << "Dofs Q3 " << dof.n_dofs()
+ << " memory " << dof.memory_consumption()
+ << std::endl;
+
+ dof.distribute_dofs(sys1);
+ deallog << "Dofs Sys1 " << dof.n_dofs()
+ << " memory " << dof.memory_consumption()
+ << std::endl;
+
+ dof.distribute_dofs(sys2);
+ deallog << "Dofs Sys2 " << dof.n_dofs()
+ << " memory " << dof.memory_consumption()
+ << std::endl;
+}
+
+int main()
+{
+ deallog.log_execution_time(true);
+ check<2>();
+ check<3>();
+}
+