ParallelDoFs Namespace Reference#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
DoF-layout helpers shared by the CG, DG and FV discretizations. More...
Functions | |
| template<int dim, int spacedim> | |
| dealii::IndexSet | make_ghost_set (const dealii::DoFHandler< dim, spacedim > &dof_handler) |
| The ghost (locally relevant) set used by the replicated-mesh policy: everything. | |
| template<int dim, int spacedim> | |
| void | build_support_points (const dealii::Mapping< dim, spacedim > &mapping, const dealii::DoFHandler< dim, spacedim > &dof_handler, std::vector< dealii::Point< spacedim > > &support_points) |
| Fill a dense, mesh-wide support point array on every rank. | |
Detailed Description
DoF-layout helpers shared by the CG, DG and FV discretizations.
These exist because the answer to "which dofs does this rank hold?" differs between a serial and a partitioned triangulation, and every discretization needs the same answer.
Function Documentation
◆ build_support_points()
| void DiFfRG::ParallelDoFs::build_support_points | ( | const dealii::Mapping< dim, spacedim > & | mapping, |
| const dealii::DoFHandler< dim, spacedim > & | dof_handler, | ||
| std::vector< dealii::Point< spacedim > > & | support_points ) |
Fill a dense, mesh-wide support point array on every rank.
Why this is not just DoFTools::map_dofs_to_support_points: the std::vector overload of that function refuses to run on a DoFHandler built on a parallel::TriangulationBase – and parallel::shared::Triangulation is one – because its precondition is an array sized to the global dof count. Calling it on a partitioned mesh is an error, not a silent degradation.
The std::map overload does work in parallel, but returns only the locally relevant dofs. The union of those sets over all ranks is the whole mesh, so a max-reduction over a lowest()-initialized array reconstructs the dense global array exactly. Support points are pure geometry – every rank that holds a given dof computes bit-identical coordinates for it – so the reduction is a gather, not an approximation, and the result does not depend on the rank count.
- Parameters
-
support_points resized to dof_handler.n_dofs() and fully populated on every rank.
◆ make_ghost_set()
| dealii::IndexSet DiFfRG::ParallelDoFs::make_ghost_set | ( | const dealii::DoFHandler< dim, spacedim > & | dof_handler | ) |
The ghost (locally relevant) set used by the replicated-mesh policy: everything.
This is deliberately NOT DoFTools::extract_locally_relevant_dofs. The KT reconstruction stencil reaches three cells deep normal to a boundary and reads corner/diagonal cells that are not face neighbours at all (see FV/assembler/reconstruction_cache.hh), and the EoM search and the output path read arbitrary global indices. A one-ring relevant set is not wide enough for any of them, and being too narrow is a silent wrong answer rather than an error.
Ghosting everything costs exactly today's memory footprint, which is the whole reason the replicated-mesh rung is cheap. Narrowing this to extract_locally_relevant_dofs is the defining step of the fully-distributed rung, and every call site that reads a global index has to be revisited at the same time.
Generated by