diff --git a/benchmarks/blankenbach/plugin/code.cc b/benchmarks/blankenbach/plugin/code.cc index 87d0231d245..20b8b66a56f 100644 --- a/benchmarks/blankenbach/plugin/code.cc +++ b/benchmarks/blankenbach/plugin/code.cc @@ -46,9 +46,8 @@ namespace aspect class TemperatureAsciiOut : public Interface, public ::aspect::SimulatorAccess { public: - virtual std::pair - execute (TableHandler &statistics); + execute (TableHandler &statistics) override; }; template diff --git a/benchmarks/hollow_sphere/hollow_sphere.cc b/benchmarks/hollow_sphere/hollow_sphere.cc index d81551c93e1..6dfeb08df5a 100644 --- a/benchmarks/hollow_sphere/hollow_sphere.cc +++ b/benchmarks/hollow_sphere/hollow_sphere.cc @@ -489,7 +489,7 @@ namespace aspect * List the other postprocessors required by this plugin. */ std::list - required_other_postprocessors() const; + required_other_postprocessors() const override; private: /** diff --git a/benchmarks/inclusion/compositional_fields/inclusion_compositional_fields.h b/benchmarks/inclusion/compositional_fields/inclusion_compositional_fields.h index 536db0d2598..ec7b5e8febc 100644 --- a/benchmarks/inclusion/compositional_fields/inclusion_compositional_fields.h +++ b/benchmarks/inclusion/compositional_fields/inclusion_compositional_fields.h @@ -15,8 +15,8 @@ namespace aspect class InclusionCompositionalMaterial : public InclusionMaterial { public: - virtual void evaluate(const MaterialModel::MaterialModelInputs &in, - MaterialModel::MaterialModelOutputs &out) const + void evaluate(const MaterialModel::MaterialModelInputs &in, + MaterialModel::MaterialModelOutputs &out) const override { for (unsigned int i=0; i < in.n_evaluation_points(); ++i) { diff --git a/benchmarks/operator_splitting/advection_reaction/advection_reaction.cc b/benchmarks/operator_splitting/advection_reaction/advection_reaction.cc index 1bf82df7c1e..79b07050dcf 100644 --- a/benchmarks/operator_splitting/advection_reaction/advection_reaction.cc +++ b/benchmarks/operator_splitting/advection_reaction/advection_reaction.cc @@ -304,11 +304,10 @@ namespace aspect /** * Return the boundary composition as a function of position. */ - virtual double boundary_composition (const types::boundary_id boundary_indicator, const Point &position, - const unsigned int compositional_field) const; + const unsigned int compositional_field) const override; }; @@ -337,16 +336,13 @@ namespace aspect /** * Return the boundary composition as a function of position. */ - virtual double boundary_temperature (const types::boundary_id boundary_indicator, - const Point &position) const; + const Point &position) const override; - virtual - double minimal_temperature (const std::set &fixed_boundary_ids) const; + double minimal_temperature (const std::set &fixed_boundary_ids) const override; - virtual - double maximal_temperature (const std::set &fixed_boundary_ids) const; + double maximal_temperature (const std::set &fixed_boundary_ids) const override; }; @@ -398,9 +394,8 @@ namespace aspect /** * Generate graphical output from the current solution. */ - virtual std::pair - execute (TableHandler &statistics); + execute (TableHandler &statistics) override; double max_error; double max_error_T; diff --git a/benchmarks/operator_splitting/exponential_decay/exponential_decay.cc b/benchmarks/operator_splitting/exponential_decay/exponential_decay.cc index fe23f547502..ce33ce4085a 100644 --- a/benchmarks/operator_splitting/exponential_decay/exponential_decay.cc +++ b/benchmarks/operator_splitting/exponential_decay/exponential_decay.cc @@ -279,8 +279,8 @@ namespace aspect { public: RefFunction () : Function(dim+3) {} - virtual void vector_value (const Point &/*position*/, - Vector &values) const + void vector_value (const Point &/*position*/, + Vector &values) const override { values[0] = 0.0; // velocity x values[1] = 0.0; // velocity z @@ -305,9 +305,8 @@ namespace aspect /** * Generate graphical output from the current solution. */ - virtual std::pair - execute (TableHandler &statistics); + execute (TableHandler &statistics) override; double max_error; double max_error_T; diff --git a/benchmarks/rigid_shear/plugin/rigid_shear.cc b/benchmarks/rigid_shear/plugin/rigid_shear.cc index 1783390578c..5293842f3d0 100644 --- a/benchmarks/rigid_shear/plugin/rigid_shear.cc +++ b/benchmarks/rigid_shear/plugin/rigid_shear.cc @@ -92,8 +92,8 @@ namespace aspect : Function(n_components), transient(transient) {} - virtual void vector_value(const Point &p, - Vector &values) const + void vector_value(const Point &p, + Vector &values) const override { const double pi = numbers::PI; const double t = this->get_time(); diff --git a/benchmarks/shear_bands/shear_bands.cc b/benchmarks/shear_bands/shear_bands.cc index 36f68671375..f7656be96ea 100644 --- a/benchmarks/shear_bands/shear_bands.cc +++ b/benchmarks/shear_bands/shear_bands.cc @@ -453,23 +453,21 @@ namespace aspect /** * Return the initial porosity as a function of position. */ - virtual double - initial_composition (const Point &position, const unsigned int n_comp) const; + initial_composition (const Point &position, const unsigned int n_comp) const override; static void declare_parameters (ParameterHandler &prm); - virtual void - parse_parameters (ParameterHandler &prm); + parse_parameters (ParameterHandler &prm) override; /** * Initialization function. */ void - initialize (); + initialize () override; double get_wave_amplitude () const; @@ -599,9 +597,8 @@ namespace aspect /** * Generate graphical output from the current solution. */ - virtual std::pair - execute (TableHandler &statistics); + execute (TableHandler &statistics) override; }; @@ -679,9 +676,8 @@ namespace aspect /** * Generate graphical output from the current solution. */ - virtual std::pair - execute (TableHandler &statistics); + execute (TableHandler &statistics) override; /** * Initialization function. Take references to the material model and @@ -689,7 +685,7 @@ namespace aspect * the analytical solution for the growth rate and store them. */ void - initialize (); + initialize () override; private: double amplitude; diff --git a/benchmarks/solcx/solcx.h b/benchmarks/solcx/solcx.h index 16f7c4ff509..0791335929f 100644 --- a/benchmarks/solcx/solcx.h +++ b/benchmarks/solcx/solcx.h @@ -2907,8 +2907,9 @@ namespace aspect background_density(background_density), n_compositional_fields(n_compositional_fields) {} - virtual void vector_value(const Point &p, - Vector &values) const + + void vector_value(const Point &p, + Vector &values) const override { AssertDimension(values.size(), 4 + n_compositional_fields); diff --git a/benchmarks/solitary_wave/solitary_wave.cc b/benchmarks/solitary_wave/solitary_wave.cc index a1261cbd3dd..43c9fc56e0c 100644 --- a/benchmarks/solitary_wave/solitary_wave.cc +++ b/benchmarks/solitary_wave/solitary_wave.cc @@ -281,8 +281,8 @@ namespace aspect delta_ = delta; } - virtual void vector_value (const Point &p, - Vector &values) const + void vector_value (const Point &p, + Vector &values) const override { unsigned int index = static_cast((p[dim-1]-delta_)/max_z_ * (initial_pressure_.size()-1)); if (p[dim-1]-delta_ < 0) @@ -666,9 +666,8 @@ namespace aspect /** * Generate graphical output from the current solution. */ - virtual std::pair - execute (TableHandler &statistics); + execute (TableHandler &statistics) override; /** * Initialization function. Take references to the material model and @@ -676,7 +675,7 @@ namespace aspect * the analytical solution for the shape of the solitary wave and store them. */ void - initialize (); + initialize () override; void store_initial_pressure (); diff --git a/benchmarks/tangurnis/code/tangurnis.cc b/benchmarks/tangurnis/code/tangurnis.cc index f8223b4df6a..4cfdba0cdfb 100644 --- a/benchmarks/tangurnis/code/tangurnis.cc +++ b/benchmarks/tangurnis/code/tangurnis.cc @@ -289,19 +289,16 @@ namespace aspect class TanGurnisBoundary : public BoundaryTemperature::Interface { public: - virtual double boundary_temperature (const types::boundary_id /*boundary_indicator*/, - const Point &position) const + const Point &position) const override { double wavenumber=1; return sin(numbers::PI*position(dim-1))*cos(numbers::PI*wavenumber*position(0)); } - virtual - double minimal_temperature (const std::set &fixed_boundary_ids) const; + double minimal_temperature (const std::set &fixed_boundary_ids) const override; - virtual - double maximal_temperature (const std::set &fixed_boundary_ids) const; + double maximal_temperature (const std::set &fixed_boundary_ids) const override; }; template @@ -335,9 +332,8 @@ namespace aspect class TanGurnisPostprocessor : public Postprocess::Interface, public ::aspect::SimulatorAccess { public: - virtual std::pair - execute (TableHandler &statistics); + execute (TableHandler &statistics) override; }; template diff --git a/benchmarks/time_dependent_annulus/plugin/time_dependent_annulus.h b/benchmarks/time_dependent_annulus/plugin/time_dependent_annulus.h index c471558948a..4a2e1b2c343 100644 --- a/benchmarks/time_dependent_annulus/plugin/time_dependent_annulus.h +++ b/benchmarks/time_dependent_annulus/plugin/time_dependent_annulus.h @@ -94,8 +94,8 @@ namespace aspect density_function (density) {} - virtual void vector_value (const Point &p, - Vector &values) const + void vector_value (const Point &p, + Vector &values) const override { double pos[2]= {p(0),p(1)}; diff --git a/benchmarks/tosi_et_al_2015_gcubed/tosi.cc b/benchmarks/tosi_et_al_2015_gcubed/tosi.cc index 218bc1a9fee..57d1798287e 100644 --- a/benchmarks/tosi_et_al_2015_gcubed/tosi.cc +++ b/benchmarks/tosi_et_al_2015_gcubed/tosi.cc @@ -513,9 +513,8 @@ namespace aspect * Evaluate the solution for statistics on the rate of viscous dissipation, * rate of work and the error between the two. */ - virtual std::pair - execute (TableHandler &statistics); + execute (TableHandler &statistics) override; }; template diff --git a/benchmarks/yamauchi_takei_2016_anelasticity/anelasticity_temperature.h b/benchmarks/yamauchi_takei_2016_anelasticity/anelasticity_temperature.h index 34fb60fba02..b6744f31e42 100644 --- a/benchmarks/yamauchi_takei_2016_anelasticity/anelasticity_temperature.h +++ b/benchmarks/yamauchi_takei_2016_anelasticity/anelasticity_temperature.h @@ -55,7 +55,7 @@ namespace aspect * beginning of the program. Checks preconditions. */ void - initialize (); + initialize () override; // Avoid -Woverloaded-virtual: using Utilities::AsciiDataInitial::initialize; diff --git a/cookbooks/inner_core_convection/inner_core_convection.cc b/cookbooks/inner_core_convection/inner_core_convection.cc index 96f982ae988..d58fa57f2bc 100644 --- a/cookbooks/inner_core_convection/inner_core_convection.cc +++ b/cookbooks/inner_core_convection/inner_core_convection.cc @@ -372,11 +372,10 @@ namespace aspect * Return the heating terms. For the current class, this * function obviously simply returns a constant value. */ - virtual void evaluate (const MaterialModel::MaterialModelInputs &material_model_inputs, const MaterialModel::MaterialModelOutputs &material_model_outputs, - HeatingModel::HeatingModelOutputs &heating_model_outputs) const; + HeatingModel::HeatingModelOutputs &heating_model_outputs) const override; /** * @name Functions used in dealing with run-time parameters @@ -392,9 +391,8 @@ namespace aspect /** * Read the parameters this class declares from the parameter file. */ - virtual void - parse_parameters (ParameterHandler &prm); + parse_parameters (ParameterHandler &prm) override; /** * @} */