From: Wolfgang Bangerth Date: Wed, 7 Mar 2001 18:17:21 +0000 (+0000) Subject: Annotation to one of the TODO items. X-Git-Tag: v8.0.0~19610 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd5796d5d6572b9df66f28481e439f5f7b62d760;p=dealii.git Annotation to one of the TODO items. git-svn-id: https://svn.dealii.org/trunk@4161 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_tools.cc b/deal.II/deal.II/source/fe/fe_tools.cc index 09c77b4fb8..4d7ce88639 100644 --- a/deal.II/deal.II/source/fe/fe_tools.cc +++ b/deal.II/deal.II/source/fe/fe_tools.cc @@ -56,9 +56,11 @@ void FETools::get_interpolation_matrix(const FiniteElement &fe1, phantom_weights); // This is a bad workaround as we - // can't ask the FEs for their shape - // values any more. - // TODO: do this better. + // can't ask the FEs for their + // shape values any more. +// TODO: do this better. don't create a triangulation and dofhandler here! +// maybe we can get it work by passing an end_iterator or something to the +// FEValues::reinit function? Triangulation tria; DoFHandler dof_handler(tria); GridGenerator::hyper_cube(tria); @@ -69,15 +71,12 @@ void FETools::get_interpolation_matrix(const FiniteElement &fe1, for (unsigned int i=0; i &dof1, for (unsigned int level=0; level::cell_iterator cell=dof2.begin(level), - endc=dof2.end(level); + typename DoFHandler::cell_iterator cell=dof2.begin(level), + endc=dof2.end(level); for (; cell!=endc; ++cell) - { - if (!cell->active()) - { - bool active_children=false; - for (unsigned int child_n=0; - child_n::children_per_cell; ++child_n) - if (cell->child(child_n)->active()) - { - active_children=true; - break; - } - - if (active_children) + if (!cell->active()) + { + // check whether this + // cell has active + // children + bool active_children=false; + for (unsigned int child_n=0; + child_n::children_per_cell; ++child_n) + if (cell->child(child_n)->active()) { - cell->get_interpolated_dof_values(u3, dof_values); - cell->set_dof_values_by_interpolation(dof_values, u2); + active_children=true; + break; } - } - } - } + + // if there are active + // children, the we have + // to work on this + // cell. get the data + // from the one vector + // and set it on the + // other + if (active_children) + { + cell->get_interpolated_dof_values(u3, dof_values); + cell->set_dof_values_by_interpolation(dof_values, u2); + } + } + } }