From 6281af560ff02b9f5e405ed87a8ea3fbcea6d7fd Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 3 Nov 2016 10:39:47 -0600 Subject: [PATCH] Make variable names uniform. Specifically, in DataPostprocessor-derived classes in the tutorial programs, use the names of function arguments that we also use in DataPostprocessor. --- examples/step-29/step-29.cc | 20 ++++++++++---------- examples/step-32/step-32.cc | 26 +++++++++++++------------- examples/step-33/step-33.cc | 32 ++++++++++++++++---------------- examples/step-47/step-47.cc | 20 ++++++++++---------- 4 files changed, 49 insertions(+), 49 deletions(-) diff --git a/examples/step-29/step-29.cc b/examples/step-29/step-29.cc index 25d9b4ab7e..155a34c63e 100644 --- a/examples/step-29/step-29.cc +++ b/examples/step-29/step-29.cc @@ -300,9 +300,9 @@ namespace Step29 virtual void - compute_derived_quantities_vector (const std::vector > &uh, - const std::vector > > &duh, - const std::vector > > &dduh, + compute_derived_quantities_vector (const std::vector > &solution_values, + const std::vector > > &solution_gradients, + const std::vector > > &solution_hessians, const std::vector > &normals, const std::vector > &evaluation_points, std::vector > &computed_quantities) const; @@ -347,16 +347,16 @@ namespace Step29 template void ComputeIntensity::compute_derived_quantities_vector ( - const std::vector > &uh, - const std::vector > > & /*duh*/, - const std::vector > > & /*dduh*/, + const std::vector > &solution_values, + const std::vector > > & /*solution_gradients*/, + const std::vector > > & /*solution_hessians*/, const std::vector > & /*normals*/, const std::vector > & /*evaluation_points*/, std::vector > &computed_quantities ) const { - Assert(computed_quantities.size() == uh.size(), - ExcDimensionMismatch (computed_quantities.size(), uh.size())); + Assert(computed_quantities.size() == solution_values.size(), + ExcDimensionMismatch (computed_quantities.size(), solution_values.size())); // The computation itself is straightforward: We iterate over each entry // in the output vector and compute $|u|$ from the corresponding values of @@ -365,9 +365,9 @@ namespace Step29 { Assert(computed_quantities[i].size() == 1, ExcDimensionMismatch (computed_quantities[i].size(), 1)); - Assert(uh[i].size() == 2, ExcDimensionMismatch (uh[i].size(), 2)); + Assert(solution_values[i].size() == 2, ExcDimensionMismatch (solution_values[i].size(), 2)); - computed_quantities[i](0) = std::sqrt(uh[i](0)*uh[i](0) + uh[i](1)*uh[i](1)); + computed_quantities[i](0) = std::sqrt(solution_values[i](0)*solution_values[i](0) + solution_values[i](1)*solution_values[i](1)); } } diff --git a/examples/step-32/step-32.cc b/examples/step-32/step-32.cc index e1656ca381..2bf00cf58e 100644 --- a/examples/step-32/step-32.cc +++ b/examples/step-32/step-32.cc @@ -3150,9 +3150,9 @@ namespace Step32 virtual void - compute_derived_quantities_vector (const std::vector > &uh, - const std::vector > > &duh, - const std::vector > > &dduh, + compute_derived_quantities_vector (const std::vector > &solution_values, + const std::vector > > &solution_gradients, + const std::vector > > &solution_hessians, const std::vector > &normals, const std::vector > &evaluation_points, std::vector > &computed_quantities) const; @@ -3242,33 +3242,33 @@ namespace Step32 template void BoussinesqFlowProblem::Postprocessor:: - compute_derived_quantities_vector (const std::vector > &uh, - const std::vector > > &duh, - const std::vector > > &/*dduh*/, + compute_derived_quantities_vector (const std::vector > &solution_values, + const std::vector > > &solution_gradients, + const std::vector > > &/*solution_hessians*/, const std::vector > &/*normals*/, const std::vector > &/*evaluation_points*/, std::vector > &computed_quantities) const { - const unsigned int n_quadrature_points = uh.size(); - Assert (duh.size() == n_quadrature_points, ExcInternalError()); + const unsigned int n_quadrature_points = solution_values.size(); + Assert (solution_gradients.size() == n_quadrature_points, ExcInternalError()); Assert (computed_quantities.size() == n_quadrature_points, ExcInternalError()); - Assert (uh[0].size() == dim+2, ExcInternalError()); + Assert (solution_values[0].size() == dim+2, ExcInternalError()); for (unsigned int q=0; q grad_u; for (unsigned int d=0; d strain_rate = symmetrize (grad_u); computed_quantities[q](dim+2) = 2 * EquationData::eta * strain_rate * strain_rate; diff --git a/examples/step-33/step-33.cc b/examples/step-33/step-33.cc index b721d7ab86..454934fa75 100644 --- a/examples/step-33/step-33.cc +++ b/examples/step-33/step-33.cc @@ -543,9 +543,9 @@ namespace Step33 virtual void - compute_derived_quantities_vector (const std::vector > &uh, - const std::vector > > &duh, - const std::vector > > &dduh, + compute_derived_quantities_vector (const std::vector > &solution_values, + const std::vector > > &solution_gradients, + const std::vector > > &solution_hessians, const std::vector > &normals, const std::vector > &evaluation_points, std::vector > &computed_quantities) const; @@ -584,14 +584,14 @@ namespace Step33 // quadrature point is itself vector-valued, namely the conserved // variables. What we're going to do here is to compute the quantities we're // interested in at each quadrature point. Note that for this we can ignore - // the Hessians ("dduh") and normal vectors; to avoid compiler warnings + // the Hessians ("solution_hessians") and normal vectors; to avoid compiler warnings // about unused variables, we comment out their names. template void EulerEquations::Postprocessor:: - compute_derived_quantities_vector (const std::vector > &uh, - const std::vector > > &duh, - const std::vector > > &/*dduh*/, + compute_derived_quantities_vector (const std::vector > &solution_values, + const std::vector > > &solution_gradients, + const std::vector > > &/*solution_hessians*/, const std::vector > &/*normals*/, const std::vector > &/*evaluation_points*/, std::vector > &computed_quantities) const @@ -599,21 +599,21 @@ namespace Step33 // At the beginning of the function, let us make sure that all variables // have the correct sizes, so that we can access individual vector // elements without having to wonder whether we might read or write - // invalid elements; we also check that the duh vector only + // invalid elements; we also check that the solution_gradients vector only // contains data if we really need it (the system knows about this because // we say so in the get_needed_update_flags() function // below). For the inner vectors, we check that at least the first element // of the outer vector has the correct inner size: - const unsigned int n_quadrature_points = uh.size(); + const unsigned int n_quadrature_points = solution_values.size(); if (do_schlieren_plot == true) - Assert (duh.size() == n_quadrature_points, + Assert (solution_gradients.size() == n_quadrature_points, ExcInternalError()); Assert (computed_quantities.size() == n_quadrature_points, ExcInternalError()); - Assert (uh[0].size() == n_components, + Assert (solution_values[0].size() == n_components, ExcInternalError()); if (do_schlieren_plot == true) @@ -630,17 +630,17 @@ namespace Step33 // density_component information: for (unsigned int q=0; q > &uh, - const std::vector > > &duh, - const std::vector > > &dduh, + compute_derived_quantities_vector (const std::vector > &solution_values, + const std::vector > > &solution_gradients, + const std::vector > > &solution_hessians, const std::vector > &normals, const std::vector > &evaluation_points, std::vector > &computed_quantities) const; @@ -955,24 +955,24 @@ namespace Step47 template void Postprocessor:: - compute_derived_quantities_vector (const std::vector > &uh, - const std::vector > > &/*duh*/, - const std::vector > > &/*dduh*/, + compute_derived_quantities_vector (const std::vector > &solution_values, + const std::vector > > &/*solution_gradients*/, + const std::vector > > &/*solution_hessians*/, const std::vector > &/*normals*/, const std::vector > &evaluation_points, std::vector > &computed_quantities) const { - const unsigned int n_quadrature_points = uh.size(); + const unsigned int n_quadrature_points = solution_values.size(); Assert (computed_quantities.size() == n_quadrature_points, ExcInternalError()); - Assert (uh[0].size() == 2, ExcInternalError()); + Assert (solution_values[0].size() == 2, ExcInternalError()); for (unsigned int q=0; q