From dd4c806baf4fd00786178e0e89393067ce27dd24 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 2 May 2006 14:43:26 +0000 Subject: [PATCH] Fix a number of issues to make the tests in hp/ run again. git-svn-id: https://svn.dealii.org/trunk@12962 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/dofs/hp_dof_handler.cc | 48 ++++++++++++------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/deal.II/deal.II/source/dofs/hp_dof_handler.cc b/deal.II/deal.II/source/dofs/hp_dof_handler.cc index d087b17f61..a1a07a7d56 100644 --- a/deal.II/deal.II/source/dofs/hp_dof_handler.cc +++ b/deal.II/deal.II/source/dofs/hp_dof_handler.cc @@ -1575,6 +1575,7 @@ namespace hp DoFHandler<1>::distribute_dofs_on_cell (active_cell_iterator &cell, unsigned int next_free_dof) { +//TODO[WB]: this may be completely bogus -- look through it // get the fe for this cell const FiniteElement<1> &fe = cell->get_fe(); @@ -1597,11 +1598,13 @@ namespace hp if (v==0) for (unsigned int d=0; dset_vertex_dof_index (0, d, - neighbor->vertex_dof_index (1, d)); + neighbor->vertex_dof_index (1, d), + cell->active_fe_index()); else for (unsigned int d=0; dset_vertex_dof_index (1, d, - neighbor->vertex_dof_index (0, d)); + neighbor->vertex_dof_index (0, d), + cell->active_fe_index()); // next neighbor continue; @@ -1610,12 +1613,14 @@ namespace hp // otherwise: create dofs newly for (unsigned int d=0; dset_vertex_dof_index (v, d, next_free_dof++); + cell->set_vertex_dof_index (v, d, next_free_dof++, + cell->active_fe_index()); }; // dofs of line for (unsigned int d=0; dset_dof_index (d, next_free_dof++); + cell->set_dof_index (d, next_free_dof++, + cell->active_fe_index()); // note that this cell has been processed cell->set_user_flag (); @@ -1633,6 +1638,7 @@ namespace hp DoFHandler<2>::distribute_dofs_on_cell (active_cell_iterator &cell, unsigned int next_free_dof) { +//TODO[WB]: Check for correctness // get the fe for this cell const FiniteElement<2> &fe = cell->get_fe(); @@ -1642,9 +1648,11 @@ namespace hp // check whether dofs for this // vertex have been distributed // (only check the first dof) - if (cell->vertex_dof_index(vertex, 0) == invalid_dof_index) + if (cell->vertex_dof_index(vertex, 0, cell->active_fe_index()) + == invalid_dof_index) for (unsigned int d=0; dset_vertex_dof_index (vertex, d, next_free_dof++); + cell->set_vertex_dof_index (vertex, d, next_free_dof++, + cell->active_fe_index()); // for the four sides //TODO[?] Does not work for continuous FEs @@ -1656,17 +1664,19 @@ namespace hp // distribute dofs if necessary: // check whether line dof is already // numbered (check only first dof) - if (line->dof_index(0) == invalid_dof_index) + if (line->dof_index(0,cell->active_fe_index()) == invalid_dof_index) // if not: distribute dofs for (unsigned int d=0; dset_dof_index (d, next_free_dof++); + line->set_dof_index (d, next_free_dof++, + cell->active_fe_index()); }; // dofs of quad if (fe.dofs_per_quad > 0) for (unsigned int d=0; dset_dof_index (d, next_free_dof++); + cell->set_dof_index (d, next_free_dof++, + cell->active_fe_index()); // note that this cell has been processed @@ -1685,6 +1695,7 @@ namespace hp DoFHandler<3>::distribute_dofs_on_cell (active_cell_iterator &cell, unsigned int next_free_dof) { +//TODO[WB]: check for correctness // get the fe for this cell const FiniteElement<3> &fe = cell->get_fe(); @@ -1694,9 +1705,11 @@ namespace hp // check whether dofs for this // vertex have been distributed // (only check the first dof) - if (cell->vertex_dof_index(vertex, 0) == invalid_dof_index) + if (cell->vertex_dof_index(vertex, 0,cell->active_fe_index()) + == invalid_dof_index) for (unsigned int d=0; dset_vertex_dof_index (vertex, d, next_free_dof++); + cell->set_vertex_dof_index (vertex, d, next_free_dof++, + cell->active_fe_index()); // for the lines if (fe.dofs_per_line > 0) @@ -1707,10 +1720,11 @@ namespace hp // distribute dofs if necessary: // check whether line dof is already // numbered (check only first dof) - if (line->dof_index(0) == invalid_dof_index) + if (line->dof_index(0, cell->active_fe_index()) == invalid_dof_index) // if not: distribute dofs for (unsigned int d=0; dset_dof_index (d, next_free_dof++); + line->set_dof_index (d, next_free_dof++, + cell->active_fe_index()); }; // for the quads @@ -1722,17 +1736,19 @@ namespace hp // distribute dofs if necessary: // check whether quad dof is already // numbered (check only first dof) - if (quad->dof_index(0) == invalid_dof_index) + if (quad->dof_index(0, cell->active_fe_index()) == invalid_dof_index) // if not: distribute dofs for (unsigned int d=0; dset_dof_index (d, next_free_dof++); + quad->set_dof_index (d, next_free_dof++, + cell->active_fe_index()); }; // dofs of hex if (fe.dofs_per_hex > 0) for (unsigned int d=0; dset_dof_index (d, next_free_dof++); + cell->set_dof_index (d, next_free_dof++, + cell->active_fe_index()); // note that this cell has been processed -- 2.39.5