void test ()
{
// create a hp::DoFHandler with different finite elements on the
- // cells. note that we assign active_fe_indices also to inactive
+ // cells. note that we skip setting active_fe_indices on inactive
// elements
Triangulation<dim> tr;
GridGenerator::hyper_cube(tr, 0., 1.);
hp::DoFHandler<dim> dof_handler(tr);
for (typename hp::DoFHandler<dim>::cell_iterator cell=dof_handler.begin();
cell!=dof_handler.end(); ++cell)
- cell->set_active_fe_index (cell->index() % fe.size());
+ if (cell->has_children() == false)
+ cell->set_active_fe_index (cell->index() % fe.size());
dof_handler.distribute_dofs (fe);
void test ()
{
// create a hp::DoFHandler with different finite elements on the
- // cells. note that we assign active_fe_indices also to inactive
+ // cells. note that we skip setting active_fe_indices on inactive
// elements
Triangulation<dim> tr;
GridGenerator::hyper_cube(tr, 0., 1.);
hp::DoFHandler<dim> dof_handler(tr);
for (typename hp::DoFHandler<dim>::cell_iterator cell=dof_handler.begin();
cell!=dof_handler.end(); ++cell)
- cell->set_active_fe_index (cell->index() % fe.size());
+ if (cell->has_children() == false)
+ cell->set_active_fe_index (cell->index() % fe.size());
dof_handler.distribute_dofs (fe);
void test ()
{
deallog << dim << "D" << std::endl;
-
+
// create a hp::DoFHandler with different finite elements on the
- // cells. note that we assign active_fe_indices also to inactive
+ // cells. note that we skip setting active_fe_indices on inactive
// elements
Triangulation<dim> tr;
GridGenerator::hyper_cube(tr, 0., 1.);
hp::DoFHandler<dim> dof_handler(tr);
for (typename hp::DoFHandler<dim>::cell_iterator cell=dof_handler.begin();
cell!=dof_handler.end(); ++cell)
- cell->set_active_fe_index (cell->index() % fe.size());
+ if (cell->has_children() == false)
+ cell->set_active_fe_index (cell->index() % fe.size());
dof_handler.distribute_dofs (fe);
void test ()
{
// create a hp::DoFHandler with different finite elements on the
- // cells. note that we assign active_fe_indices also to inactive
+ // cells. note that we skip setting active_fe_indices on inactive
// elements
Triangulation<dim> tr;
GridGenerator::hyper_cube(tr, 0., 1.);
hp::DoFHandler<dim> dof_handler(tr);
for (typename hp::DoFHandler<dim>::cell_iterator cell=dof_handler.begin();
cell!=dof_handler.end(); ++cell)
- cell->set_active_fe_index (cell->index() % fe.size());
+ if (cell->has_children() == false)
+ cell->set_active_fe_index (cell->index() % fe.size());
dof_handler.distribute_dofs (fe);
void test ()
{
// create a hp::DoFHandler with different finite elements on the
- // cells. note that we assign active_fe_indices also to inactive
+ // cells. note that we skip setting active_fe_indices on inactive
// elements
Triangulation<dim> tr;
GridGenerator::hyper_cube(tr, 0., 1.);
hp::DoFHandler<dim> dof_handler(tr);
for (typename hp::DoFHandler<dim>::cell_iterator cell=dof_handler.begin();
cell!=dof_handler.end(); ++cell)
- cell->set_active_fe_index (cell->index() % fe.size());
+ if (cell->has_children() == false)
+ cell->set_active_fe_index (cell->index() % fe.size());
dof_handler.distribute_dofs (fe);
{
solution1 = 0;
solution2 = 0;
-
+
// set values without specifying an explicit fe_index
Vector<double> local (cell->get_fe().dofs_per_cell);
for (unsigned int i=0; i<local.size(); ++i)
local(i) = i;
-
+
cell->set_dof_values_by_interpolation (local, solution1);
// then do the same with the "correct", local fe_index
void test ()
{
deallog << dim << "D" << std::endl;
-
+
// create a hp::DoFHandler with different finite elements on the
- // cells. note that we assign active_fe_indices also to inactive
+ // cells. note that we skip setting active_fe_indices on inactive
// elements
Triangulation<dim> tr;
GridGenerator::hyper_cube(tr, 0., 1.);
hp::DoFHandler<dim> dof_handler(tr);
for (typename hp::DoFHandler<dim>::cell_iterator cell=dof_handler.begin();
cell!=dof_handler.end(); ++cell)
- cell->set_active_fe_index (cell->index() % fe.size());
+ if (cell->has_children() == false)
+ cell->set_active_fe_index (cell->index() % fe.size());
dof_handler.distribute_dofs (fe);