From: Marc Fehling Date: Mon, 24 Jun 2024 11:26:04 +0000 (+0200) Subject: Fix warnings. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b69cb533b1d8a752c4b33fef8fcff287fccfdee7;p=code-gallery.git Fix warnings. --- diff --git a/nonlinear-heat_transfer_with_AD_NOX/include/nonlinear_heat.h b/nonlinear-heat_transfer_with_AD_NOX/include/nonlinear_heat.h index fb95a02..21502a9 100755 --- a/nonlinear-heat_transfer_with_AD_NOX/include/nonlinear_heat.h +++ b/nonlinear-heat_transfer_with_AD_NOX/include/nonlinear_heat.h @@ -120,7 +120,7 @@ public: {} // Returns the intitial values. virtual double value(const Point<2> &p, - const unsigned int component =0) const; + const unsigned int component =0) const override; }; /** A class to apply the boundary (Dirichlet) condition at the left edge. diff --git a/nonlinear-heat_transfer_with_AD_NOX/source/boundary_values.cc b/nonlinear-heat_transfer_with_AD_NOX/source/boundary_values.cc index 8d4f689..4facac4 100644 --- a/nonlinear-heat_transfer_with_AD_NOX/source/boundary_values.cc +++ b/nonlinear-heat_transfer_with_AD_NOX/source/boundary_values.cc @@ -9,16 +9,16 @@ * @param p A point (2D) * @return Value at the boundary */ -double Boundary_values_left::value(const Point<2> &p, const unsigned int) const +double Boundary_values_left::value(const Point<2> & /*p*/, const unsigned int /*comp*/) const { - - nonlinear_heat nlheat; - double total_time = nlheat.tot_time; return 100; + /** * To linearly ramp the temperature at the left end to 100 over the * entire time span, use the below line. See step-23 as to how the time * variable can be used. */ - // this->get_time() * 100.0/total_time; + // nonlinear_heat nlheat; + // double total_time = nlheat.tot_time; + // return this->get_time() * 100.0/total_time; } diff --git a/nonlinear-heat_transfer_with_AD_NOX/source/initial_conditions.cc b/nonlinear-heat_transfer_with_AD_NOX/source/initial_conditions.cc index 44d559c..5507942 100644 --- a/nonlinear-heat_transfer_with_AD_NOX/source/initial_conditions.cc +++ b/nonlinear-heat_transfer_with_AD_NOX/source/initial_conditions.cc @@ -5,7 +5,7 @@ * @param comp component * @return */ -double Initialcondition::value(const Point<2> &p, const unsigned int comp) const +double Initialcondition::value(const Point<2> & /*p*/, const unsigned int /*comp*/) const { /** * In the current case, we asume that the initial conditions are zero everywhere. diff --git a/parallel_in_time/src/Utilities.cc b/parallel_in_time/src/Utilities.cc index 785ecbb..99c8a40 100644 --- a/parallel_in_time/src/Utilities.cc +++ b/parallel_in_time/src/Utilities.cc @@ -17,6 +17,7 @@ int procID = 0; +#ifdef USE_MPI // The shared variables static std::string s_pout_filename ; @@ -26,7 +27,6 @@ static std::ofstream s_pout ; static bool s_pout_init = false ; static bool s_pout_open = false ; -#ifdef USE_MPI // in parallel, compute the filename give the basename //[NOTE: dont call this before MPI is initialized.] static void setFileName() @@ -49,18 +49,6 @@ static void openFile() // to try again later than to make believe it succeeded s_pout_open = (bool)s_pout ; } - -#else -// in serial, filename is always cout -static void setFileName() -{ - s_pout_filename = "cout" ; -} - -// in serial, this does absolutely nothing -static void openFile() -{ -} #endif std::ostream& pout()