//----------------------------------------------------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2003, 2004, 2005, 2009 by the deal.II authors
+// Copyright (C) 2003, 2004, 2005, 2009, 2011 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
//----------------------------------------------------------------------
#include "../tests.h"
-#include <grid/tria.h>
-#include <grid/grid_generator.h>
-#include <hp/fe_collection.h>
-#include <hp/dof_handler.h>
-#include <dofs/dof_handler.h>
-#include <fe/fe_q.h>
-#include <fe/fe_system.h>
-#include <dofs/dof_tools.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/hp/fe_collection.h>
+#include <deal.II/hp/dof_handler.h>
+#include <deal.II/dofs/dof_handler.h>
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_system.h>
+#include <deal.II/dofs/dof_tools.h>
// check
// DoFTools::
}
-int main ()
+int main ()
{
std::ofstream logfile("count_dofs_per_component_hp_01/output");
deallog.attach(logfile);
//----------------------------------------------------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2003, 2004, 2005, 2009 by the deal.II authors
+// Copyright (C) 2003, 2004, 2005, 2009, 2011 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
//----------------------------------------------------------------------
#include "../tests.h"
-#include <grid/tria.h>
-#include <grid/grid_generator.h>
-#include <grid/tria_iterator.h>
-#include <hp/fe_collection.h>
-#include <hp/dof_handler.h>
-#include <dofs/dof_handler.h>
-#include <dofs/dof_accessor.h>
-#include <fe/fe_q.h>
-#include <fe/fe_system.h>
-#include <dofs/dof_tools.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/tria_iterator.h>
+#include <deal.II/hp/fe_collection.h>
+#include <deal.II/hp/dof_handler.h>
+#include <deal.II/dofs/dof_handler.h>
+#include <deal.II/dofs/dof_accessor.h>
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_system.h>
+#include <deal.II/dofs/dof_tools.h>
// check
// DoFTools::
// count_dofs_per_component (...);
// for the hp case
//
-// in contrast to the _01 test also check that this works if the element
+// in contrast to the _01 test also check that this works if the element
// collection has more than one element
}
-int main ()
+int main ()
{
std::ofstream logfile("count_dofs_per_component_hp_02/output");
deallog.attach(logfile);
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_renumbering.h>
-#include <fe/fe_q.h>
-#include <fe/fe_system.h>
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_system.h>
template <int dim, int spacedim>
bool operator == (const DoFHandler<dim,spacedim> &t1,
return false;
if (c1->neighbor(f)->index() != c2->neighbor(f)->index())
return false;
- }
+ }
}
-
+
if (c1->subdomain_id() != c2->subdomain_id())
return false;
-
+
if (c1->material_id() != c2->material_id())
return false;
if (c1->get_fe().get_name() != c2->get_fe().get_name())
return false;
-
+
if (c1->active_fe_index() != c2->active_fe_index())
return false;
{
std::vector<unsigned int> local_dofs_1 (c1->get_fe().dofs_per_cell);
std::vector<unsigned int> local_dofs_2 (c2->get_fe().dofs_per_cell);
-
+
c1->get_dof_indices (local_dofs_1);
c2->get_dof_indices (local_dofs_2);
if (local_dofs_1 != local_dofs_2)
return false;
-
+
for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
{
std::vector<unsigned int> local_dofs_1 (c1->get_fe().dofs_per_face);
std::vector<unsigned int> local_dofs_2 (c2->get_fe().dofs_per_face);
-
+
c1->face(f)->get_dof_indices (local_dofs_1);
c2->face(f)->get_dof_indices (local_dofs_2);
if (local_dofs_1 != local_dofs_2)
tria.begin_active()->set_refine_flag (RefinementCase<dim>::cut_x);
do_boundary (tria);
-
+
FESystem<dim,spacedim> fe (FE_Q<dim,spacedim>(2),dim,
FE_Q<dim,spacedim>(1),1);
DoFHandler<dim,spacedim> dof_1 (tria);
DoFHandler<dim,spacedim> dof_2 (tria);
-
+
dof_1.distribute_dofs (fe);
dof_2.distribute_dofs (fe);
-
+
// right now, both DoFHandlers are the same. Renumber one of the them
DoFRenumbering::Cuthill_McKee (dof_1);
-
+
verify (dof_1, dof_2);
}
test<2,2> ();
test<2,3> ();
test<3,3> ();
-
+
deallog << "OK" << std::endl;
}