void
DoFInfo<dim,spacedim>::get_indices(const typename DoFHandler<dim, spacedim>::cell_iterator& c)
{
- indices.resize(c->get_fe().dofs_per_cell);
-
- if (block_info == 0 || block_info->local().size() == 0)
- c->get_dof_indices(indices);
- else
+ if (!c->has_children())
{
- indices_org.resize(c->get_fe().dofs_per_cell);
- c->get_dof_indices(indices_org);
- for (unsigned int i=0;i<indices.size();++i)
- indices[this->block_info->renumber(i)] = indices_org[i];
+ indices.resize(c->get_fe().dofs_per_cell);
+
+ if (block_info == 0 || block_info->local().size() == 0)
+ c->get_dof_indices(indices);
+ else
+ {
+ indices_org.resize(c->get_fe().dofs_per_cell);
+ c->get_dof_indices(indices_org);
+ for (unsigned int i=0;i<indices.size();++i)
+ indices[this->block_info->renumber(i)] = indices_org[i];
+ }
}
+ else
+ indices.resize(0);
}
* @param face_worker defines the local action on interior faces.
* @param cells_first determines, whether faces or cells are to be
* dealt with first.
+ * @param unique_faces_only determines, that a face between two cells
+ * of the same level is processed only from the cell which is less
+ * than its neighbor. If this parameter is <tt>false</tt> these faces
+ * are processed from both cells.
*
* @author Guido Kanschat, 2010
*/
const std_cxx1x::function<void (DoFInfo<dim, spacedim>&, DoFInfo<dim, spacedim>&,
typename INFOBOX::FaceInfo &,
typename INFOBOX::FaceInfo &)> &face_worker,
- bool cells_first = true)
+ const bool cells_first,
+ const bool unique_faces_only)
{
const bool integrate_cell = (cell_worker != 0);
const bool integrate_boundary = (boundary_worker != 0);
// level, but
// only do this
// from one side.
- if (neighbor < cell) continue;
+ if (unique_faces_only && (neighbor < cell)) continue;
// If iterator
// is active
// Loop over all cells
WorkStream::run(begin, end,
std_cxx1x::bind(cell_action<INFOBOX, dim, spacedim, ITERATOR>, _1, _3, _2,
- cell_worker, boundary_worker, face_worker, cells_first),
+ cell_worker, boundary_worker, face_worker, cells_first, true),
std_cxx1x::bind(internal::assemble<dim,spacedim,ASSEMBLER>, _1, assembler),
info, dof_info);