From 33469be4762e904c45d07121cbb3f776af0003b3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 3 Nov 2016 16:53:45 -0600 Subject: [PATCH] Rename a function argument. DataOutRotation::build_one_patch took a variable named 'patches', but unlike in #3445, it is not a reference to the class's member variable of the same name. Rather, it is an array this function needs to fill in, and nobody else sees it. Consequently, rename it 'my_patches'. While there, also update the documentation, which is no longer in agreement with the implementation. --- include/deal.II/numerics/data_out_rotation.h | 8 +-- source/numerics/data_out_rotation.cc | 70 ++++++++++---------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/include/deal.II/numerics/data_out_rotation.h b/include/deal.II/numerics/data_out_rotation.h index eeb10e87e6..af59da9966 100644 --- a/include/deal.II/numerics/data_out_rotation.h +++ b/include/deal.II/numerics/data_out_rotation.h @@ -193,14 +193,14 @@ public: private: /** - * Builds every @p n_threads's patch. This function may be called in - * parallel. If multithreading is not used, the function is called once and - * generates all patches. + * Build all of the patches that correspond to the cell given in the first + * argument. Use the second argument as scratch space for parallel + * invocation in WorkStream, and put the results into the last argument. */ void build_one_patch (const cell_iterator *cell, internal::DataOutRotation::ParallelData &data, - std::vector > &patches); + std::vector > &my_patches); }; diff --git a/source/numerics/data_out_rotation.cc b/source/numerics/data_out_rotation.cc index 6812cebc5a..4b14ef7265 100644 --- a/source/numerics/data_out_rotation.cc +++ b/source/numerics/data_out_rotation.cc @@ -93,9 +93,9 @@ namespace internal template void DataOutRotation:: -build_one_patch (const cell_iterator *cell, +build_one_patch (const cell_iterator *cell, internal::DataOutRotation::ParallelData &data, - std::vector > &patches) + std::vector > &my_patches) { if (dim == 3) { @@ -140,10 +140,10 @@ build_one_patch (const cell_iterator *cell, Assert (r1 >= 0, ExcRadialVariableHasNegativeValues(r1)); Assert (r2 >= 0, ExcRadialVariableHasNegativeValues(r2)); - patches[angle].vertices[0] = r1*angle_directions[angle]; - patches[angle].vertices[1] = r2*angle_directions[angle]; - patches[angle].vertices[2] = r1*angle_directions[angle+1]; - patches[angle].vertices[3] = r2*angle_directions[angle+1]; + my_patches[angle].vertices[0] = r1*angle_directions[angle]; + my_patches[angle].vertices[1] = r2*angle_directions[angle]; + my_patches[angle].vertices[2] = r1*angle_directions[angle+1]; + my_patches[angle].vertices[3] = r2*angle_directions[angle+1]; break; }; @@ -161,12 +161,12 @@ build_one_patch (const cell_iterator *cell, Assert (v(0) >= 0, ExcRadialVariableHasNegativeValues(v(0))); // now set the vertices of the patch - patches[angle].vertices[vertex] = v(0) * angle_directions[angle]; - patches[angle].vertices[vertex][0] = v(1); + my_patches[angle].vertices[vertex] = v(0) * angle_directions[angle]; + my_patches[angle].vertices[vertex][0] = v(1); - patches[angle].vertices[vertex+GeometryInfo::vertices_per_cell] + my_patches[angle].vertices[vertex+GeometryInfo::vertices_per_cell] = v(0) * angle_directions[angle+1]; - patches[angle].vertices[vertex+GeometryInfo::vertices_per_cell][0] + my_patches[angle].vertices[vertex+GeometryInfo::vertices_per_cell][0] = v(1); }; @@ -254,8 +254,8 @@ build_one_patch (const cell_iterator *cell, case 1: for (unsigned int x=0; x