320 const std::function<
void(DOFINFO &,
typename INFOBOX::CellInfo &)>
322 const std::function<
void(DOFINFO &,
typename INFOBOX::CellInfo &)>
324 const std::function<
void(DOFINFO &,
326 typename INFOBOX::CellInfo &,
327 typename INFOBOX::CellInfo &)> &face_worker,
330 const bool ignore_subdomain =
331 (cell->get_triangulation().locally_owned_subdomain() ==
335 cell->level_subdomain_id() :
336 cell->subdomain_id();
338 const bool own_cell =
340 (csid == cell->get_triangulation().locally_owned_subdomain());
347 dof_info.
cell.reinit(cell);
350 const bool integrate_cell = (cell_worker !=
nullptr);
351 const bool integrate_boundary = (boundary_worker !=
nullptr);
352 const bool integrate_interior_face = (face_worker !=
nullptr);
355 info.cell.reinit(dof_info.
cell);
362 cell_worker(dof_info.
cell, info.cell);
368 info.post_cell(dof_info);
370 if (integrate_interior_face || integrate_boundary)
371 for (
const unsigned int face_no : cell->face_indices())
373 typename IteratorType::AccessorType::Container::face_iterator face =
375 if (cell->at_boundary(face_no) &&
376 !cell->has_periodic_neighbor(face_no))
379 if (integrate_boundary && own_cell)
382 dof_info.
interior[face_no].reinit(cell, face, face_no);
383 info.boundary.reinit(dof_info.
interior[face_no]);
384 boundary_worker(dof_info.
interior[face_no], info.boundary);
387 else if (integrate_interior_face)
391 cell->neighbor_or_periodic_neighbor(face_no);
394 if (neighbor->is_level_cell())
395 neighbid = neighbor->level_subdomain_id();
397 else if (neighbor->is_active())
398 neighbid = neighbor->subdomain_id();
400 const bool own_neighbor =
403 cell->get_triangulation().locally_owned_subdomain());
406 if (!own_cell && !own_neighbor)
410 if (own_cell && own_neighbor &&
415 if (own_cell != own_neighbor &&
422 const bool periodic_neighbor =
423 cell->has_periodic_neighbor(face_no);
425 if ((!periodic_neighbor && cell->neighbor_is_coarser(face_no)) ||
426 (periodic_neighbor &&
427 cell->periodic_neighbor_is_coarser(face_no)))
438 const std::pair<unsigned int, unsigned int> neighbor_face_no =
440 cell->periodic_neighbor_of_coarser_periodic_neighbor(
442 cell->neighbor_of_coarser_neighbor(face_no);
443 const typename IteratorType::AccessorType::Container::
444 face_iterator nface =
445 neighbor->face(neighbor_face_no.first);
449 dof_info.
interior[face_no].reinit(cell, face, face_no);
450 info.face.reinit(dof_info.
interior[face_no]);
451 dof_info.
exterior[face_no].reinit(neighbor,
453 neighbor_face_no.first,
454 neighbor_face_no.second);
455 info.subface.reinit(dof_info.
exterior[face_no]);
457 face_worker(dof_info.
interior[face_no],
467 neighbor->has_children())
472 "Assembling from both sides for own_faces is not "
473 "supported with hanging nodes!"));
478 Assert(cell->level() == neighbor->level(),
484 if (own_cell && own_neighbor &&
498 if (own_cell && !own_neighbor &&
503 const unsigned int neighbor_face_no =
505 cell->periodic_neighbor_face_no(face_no) :
506 cell->neighbor_face_no(face_no);
507 Assert(periodic_neighbor ||
508 neighbor->face(neighbor_face_no) == face,
513 dof_info.
interior[face_no].reinit(cell, face, face_no);
514 info.face.reinit(dof_info.
interior[face_no]);
515 dof_info.
exterior[face_no].reinit(neighbor,
519 info.neighbor.reinit(dof_info.
exterior[face_no]);
521 face_worker(dof_info.
interior[face_no],
532 info.post_faces(dof_info);
539 cell_worker(dof_info.
cell, info.cell);
569 typename INFOBOX::CellInfo &)> &cell_worker,
571 typename INFOBOX::CellInfo &)> &boundary_worker,
574 typename INFOBOX::CellInfo &,
575 typename INFOBOX::CellInfo &)> &face_worker,
576 AssemblerType &assembler,
581 assembler.initialize_info(dof_info.
cell,
false);
584 assembler.initialize_info(dof_info.
interior[i],
true);
585 assembler.initialize_info(dof_info.
exterior[i],
true);
592 [&cell_worker, &boundary_worker, &face_worker, &lctrl](
594 cell_action<INFOBOX, DOFINFO, dim, spacedim, IteratorType>(
604 ::internal::assemble<dim, DOFINFO, AssemblerType>(dinfo,
virtual void face(DoFInfo< dim, spacedim, number > &dinfo1, DoFInfo< dim, spacedim, number > &dinfo2, IntegrationInfo< dim, spacedim > &info1, IntegrationInfo< dim, spacedim > &info2) const
void cell_action(IteratorType cell, DoFInfoBox< dim, DOFINFO > &dof_info, INFOBOX &info, const std::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &cell_worker, const std::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &boundary_worker, const std::function< void(DOFINFO &, DOFINFO &, typename INFOBOX::CellInfo &, typename INFOBOX::CellInfo &)> &face_worker, const LoopControl &loop_control)
void integration_loop(IteratorType begin, std_cxx20::type_identity_t< IteratorType > end, DoFInfo< dim, spacedim > &dof_info, IntegrationInfoBox< dim, spacedim > &box, const LocalIntegrator< dim, spacedim > &integrator, AssemblerType &assembler, const LoopControl &lctrl=LoopControl())
void loop(IteratorType begin, std_cxx20::type_identity_t< IteratorType > end, DOFINFO &dinfo, INFOBOX &info, const std::function< void(std_cxx20::type_identity_t< DOFINFO > &, typename INFOBOX::CellInfo &)> &cell_worker, const std::function< void(std_cxx20::type_identity_t< DOFINFO > &, typename INFOBOX::CellInfo &)> &boundary_worker, const std::function< void(std_cxx20::type_identity_t< DOFINFO > &, std_cxx20::type_identity_t< DOFINFO > &, typename INFOBOX::CellInfo &, typename INFOBOX::CellInfo &)> &face_worker, AssemblerType &assembler, const LoopControl &lctrl=LoopControl())
void run(const std::vector< std::vector< Iterator > > &colored_iterators, Worker worker, Copier copier, const ScratchData &sample_scratch_data, const CopyData &sample_copy_data, const unsigned int queue_length=2 *MultithreadInfo::n_threads(), const unsigned int chunk_size=8)