for (unsigned int child=0; child<this->n_children(); ++child)
{
- // prolong the given data
- // to the present cell
- this->get_fe().get_prolongation_matrix(child, this->refinement_case())
- .vmult (tmp, local_values);
+ Assert (this->child(child)->get_fe().dofs_per_cell == dofs_per_cell,
+ ExcNotImplemented());
- this->child(child)->set_dof_values_by_interpolation (tmp, values);
+ // prolong the given data
+ // to the present
+ // cell. FullMatrix only
+ // wants us to call vmult
+ // if the matrix size is
+ // actually non-zero, so
+ // check that case
+ if (tmp.size() > 0)
+ {
+ this->get_fe().get_prolongation_matrix(child, this->refinement_case())
+ .vmult (tmp, local_values);
+
+ this->child(child)->set_dof_values_by_interpolation (tmp, values);
+ }
}
}
}
else
tmp2.swap (tmp);
- // now do the interpolation operation
+ // now do the interpolation
+ // operation. FullMatrix only wants us
+ // to call vmult if the matrix size is
+ // actually non-zero, so check that
+ // case
const unsigned int dofs_per_cell = tmp2.size();
tmp.reinit (dofs_per_cell, true);
- cell->child(most_general_child)->get_fe().
- get_restriction_matrix(child, cell->refinement_case()).vmult (tmp, tmp2);
+ if (dofs_per_cell > 0)
+ cell->child(most_general_child)->get_fe().
+ get_restriction_matrix(child, cell->refinement_case()).vmult (tmp, tmp2);
for (unsigned int i=0; i<dofs_per_cell; ++i)
if (restriction_is_additive[fe_ind_general][i])
dof_values_on_cell[n_cf][j](i) += tmp(i);