From: Wolfgang Bangerth Date: Thu, 9 Mar 2023 02:56:46 +0000 (-0700) Subject: Make an input variable 'const'. X-Git-Tag: v9.5.0-rc1~493^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14860%2Fhead;p=dealii.git Make an input variable 'const'. --- diff --git a/examples/step-69/step-69.cc b/examples/step-69/step-69.cc index c013a95546..2306140cd5 100644 --- a/examples/step-69/step-69.cc +++ b/examples/step-69/step-69.cc @@ -367,11 +367,11 @@ namespace Step69 // classes at hand we can now implement the explicit time-stepping scheme // that was introduced in the discussion above. The main method of the // %TimeStepping class is make_one_step(vector_type &U, - // double t) that takes a reference to a state vector + // const double t) that takes a reference to a state vector // U and a time point t (as input arguments) // computes the updated solution, stores it in the vector // temp, swaps its contents with the vector U, - // and returns the chosen step-size $\tau$. + // and finally returns the chosen step-size $\tau$. // // The other important method is prepare() which primarily // sets the proper partition and sparsity pattern for the temporary @@ -398,7 +398,7 @@ namespace Step69 void prepare(); - double make_one_step(vector_type &U, double t); + double make_one_step(vector_type &U, const double t); private: const MPI_Comm mpi_communicator; @@ -1755,7 +1755,7 @@ namespace Step69 // offline_data->sparsity_pattern). template - double TimeStepping::make_one_step(vector_type &U, double t) + double TimeStepping::make_one_step(vector_type &U, const double t) { const auto &n_locally_owned = offline_data->n_locally_owned; const auto &n_locally_relevant = offline_data->n_locally_relevant;