From: Martin Kronbichler Date: Tue, 19 Jan 2016 21:40:13 +0000 (+0100) Subject: Small changes to due comments on code. X-Git-Tag: v8.4.0-rc2~76^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24da7eb4d256ae5d51c351e2ca3156adb2742d7f;p=dealii.git Small changes to due comments on code. --- diff --git a/include/deal.II/multigrid/mg_transfer_matrix_free.h b/include/deal.II/multigrid/mg_transfer_matrix_free.h index 2999a62e9f..a56fd061ef 100644 --- a/include/deal.II/multigrid/mg_transfer_matrix_free.h +++ b/include/deal.II/multigrid/mg_transfer_matrix_free.h @@ -90,10 +90,10 @@ public: * to_level using the embedding matrices of the underlying finite * element. The previous content of dst is overwritten. * - * @arg src is a vector with as many elements as there are degrees of + * @param src is a vector with as many elements as there are degrees of * freedom on the coarser level involved. * - * @arg dst has as many elements as there are degrees of freedom on the + * @param dst has as many elements as there are degrees of freedom on the * finer level. */ virtual void prolongate (const unsigned int to_level, @@ -102,17 +102,17 @@ public: /** * Restrict a vector from level from_level to level - * from_level-1 using the transpose operation of the @p prolongate + * from_level-1 using the transpose operation of the prolongate() * method. If the region covered by cells on level from_level is * smaller than that of level from_level-1 (local refinement), then * some degrees of freedom in dst are active and will not be * altered. For the other degrees of freedom, the result of the restriction * is added. * - * @arg src is a vector with as many elements as there are degrees of + * @param src is a vector with as many elements as there are degrees of * freedom on the finer level involved. * - * @arg dst has as many elements as there are degrees of freedom on the + * @param dst has as many elements as there are degrees of freedom on the * coarser level. */ virtual void restrict_and_add (const unsigned int from_level, @@ -170,13 +170,13 @@ private: std::vector > level_dof_indices; /** - * Stores the connectivity from parent to child cell numbers. + * Stores the connectivity from parent to child cell numbers for each level. */ std::vector > > parent_child_connect; /** * Stores the number of cells owned on a given process (sets the bounds for - * the worker loops). + * the worker loops) for each level. */ std::vector n_owned_level_cells; @@ -198,11 +198,16 @@ private: * elements they appear. We store the data in vectorized form to allow for * cheap access. Moreover, we utilize the fact that we only need to store * 3dim indices. + * + * Data is organized in terms of each level (outer vector) and the cells on + * each level (inner vector). */ std::vector > > weights_on_refined; /** - * Stores the local indices of Dirichlet boundary conditions on cells. + * Stores the local indices of Dirichlet boundary conditions on cells for + * all levels (outer index), the cells within the levels (second index), and + * the indices on the cell (inner index). */ std::vector > > dirichlet_indices; diff --git a/source/multigrid/mg_transfer_matrix_free.cc b/source/multigrid/mg_transfer_matrix_free.cc index 31f97d48dc..8bb7c5992f 100644 --- a/source/multigrid/mg_transfer_matrix_free.cc +++ b/source/multigrid/mg_transfer_matrix_free.cc @@ -340,7 +340,10 @@ void MGTransferMatrixFree::build bool cell_is_remote = !consider_cell; for (unsigned int c=0; c::max_children_per_cell; ++c) if (cell->child(c)->level_subdomain_id()==tria.locally_owned_subdomain()) - consider_cell = true; + { + consider_cell = true; + break; + } if (!consider_cell) continue; diff --git a/tests/matrix_free/parallel_multigrid_adaptive_mf.cc b/tests/matrix_free/parallel_multigrid_adaptive_mf.cc index fdc6862a8b..3d9592d9f7 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_mf.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_mf.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2014-2015 by the deal.II authors +// Copyright (C) 2014-2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -14,7 +14,6 @@ // --------------------------------------------------------------------- - // same test as parallel_multigrid_adaptive but using but using adaptive // meshes with hanging nodes (doing local smoothing) @@ -44,8 +43,6 @@ #include #include -std::ofstream logfile("output"); - template class LaplaceOperator : public Subscriptor diff --git a/tests/matrix_free/parallel_multigrid_mf.cc b/tests/matrix_free/parallel_multigrid_mf.cc index 1a38e6d86f..81fdb30f0c 100644 --- a/tests/matrix_free/parallel_multigrid_mf.cc +++ b/tests/matrix_free/parallel_multigrid_mf.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2014-2015 by the deal.II authors +// Copyright (C) 2014-2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -14,7 +14,6 @@ // --------------------------------------------------------------------- - // same test as parallel_multigrid but using matrix-free transfer operations // (and including single-precision multigrid preconditioning) @@ -44,8 +43,6 @@ #include #include -std::ofstream logfile("output"); - template class LaplaceOperator : public Subscriptor