From d9180b0d3402b470c936855668538785d18cff75 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Sun, 10 May 2020 12:48:46 +0200 Subject: [PATCH] Fixed small issues. --- examples/step-70/doc/intro.dox | 16 +++++++--------- examples/step-70/step-70.cc | 9 ++++++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/examples/step-70/doc/intro.dox b/examples/step-70/doc/intro.dox index 9a6d1e190c..3eb0395004 100644 --- a/examples/step-70/doc/intro.dox +++ b/examples/step-70/doc/intro.dox @@ -37,7 +37,7 @@ motion) is coupled with a rotating, independent, grid. In order to maintain the same notations used in step-60, we use $\Omega$ to denote the domain in $R^{\text{spacedim}}$ representing the container of both the fluid and the impeller, and we use $\Gamma$ in $R^{\text{dim}}$ to denote -either the full empeller (when its `spacedim` measure is non-negligible, i.e., +either the full impeller (when its `spacedim` measure is non-negligible, i.e., when we can represent it as a grid of dimension `dim` equal to `spacedim`), a co-dimension one representation of a thin impeller, or just the boundary of the full impeller. @@ -395,11 +395,11 @@ in this step. When looking at the formulation for both the penalization approach ($\mathcal{L}^2$ or $\mathcal{H}^1$) and the Nitsche method, we can come to the conclusion that we only require limited information related to $\Gamma$ on its quadrature points that is: +- Their reference location w.r.t. to the embedding fluid cell - The weights times the jacobian of the transformation, i.e JxW. -- In the case of the Nitsche method, the normal vector of the face. Since both of these properties are point-properties (or point-vectors) that are -attached to the solid material they can be idealized as a set of disconnected +attached to the solid material, they can be idealized as a set of disconnected infinitesimally small particles, which carry the required information with the movement of the solid. Deal.II already possesses the ability to distribute and store such a set of particles in large-scale parallel computations in form of @@ -409,12 +409,10 @@ al., 2018), and we will make use of this functionality in this tutorial. Thus, the approach taken in this step is as follows: - Create a parallel::distributed::Triangulation for the domain $\Gamma$ - Create Particles::Particle at the position of the quadrature points on $\Gamma$ - by using the Particles::Generators::quadrature_points() generator. Since the quadrature_points generator - uses the Particles::ParticleHandler::insert_global_particles() function, the particles - will be automatically distributed across the processors, *following - the solid triangulation* -- Attach the necessary information to the particles, i.e., the quadrature - weight. +- Call the Particles::ParticleHandler::insert_global_particles() function, + to distribute the particles across processors, *following the solid + triangulation* +- Attach the quadrature weight as property to each Particles::Particle object. This structure is relatively expensive to generate, but must only be generated once per simulation. Once the Particles::ParticleHandler is generated and the diff --git a/examples/step-70/step-70.cc b/examples/step-70/step-70.cc index 92781364b4..de46f05bb3 100644 --- a/examples/step-70/step-70.cc +++ b/examples/step-70/step-70.cc @@ -516,7 +516,7 @@ namespace Step70 void output_particles(const Particles::ParticleHandler &particles, std::string fprefix, const unsigned int iter, - const double time) const; + const double time) const; // As noted before, we make sure we cannot modify this object from within // this class, by making it a const reference. @@ -1109,6 +1109,9 @@ namespace Step70 constraints.close(); } + auto locally_owned_dofs_per_processor = + Utilities::MPI::all_gather(mpi_communicator, + fluid_dh.locally_owned_dofs()); { system_matrix.clear(); @@ -1129,7 +1132,7 @@ namespace Step70 SparsityTools::distribute_sparsity_pattern( dsp, - fluid_dh.compute_locally_owned_dofs_per_processor(), + locally_owned_dofs_per_processor, mpi_communicator, locally_relevant_dofs); @@ -1153,7 +1156,7 @@ namespace Step70 fluid_dh, coupling, dsp, constraints, false); SparsityTools::distribute_sparsity_pattern( dsp, - fluid_dh.compute_locally_owned_dofs_per_processor(), + locally_owned_dofs_per_processor, mpi_communicator, locally_relevant_dofs); preconditioner_matrix.reinit(fluid_owned_dofs, dsp, mpi_communicator); -- 2.39.5