Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.5] take over #5235 #5249

Merged
merged 1 commit into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions benchmarks/blankenbach/plugin/code.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ namespace aspect
class TemperatureAsciiOut : public Interface<dim>, public ::aspect::SimulatorAccess<dim>
{
public:
virtual
std::pair<std::string,std::string>
execute (TableHandler &statistics);
execute (TableHandler &statistics) override;
};

template <int dim>
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/hollow_sphere/hollow_sphere.cc
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ namespace aspect
* List the other postprocessors required by this plugin.
*/
std::list<std::string>
required_other_postprocessors() const;
required_other_postprocessors() const override;

private:
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ namespace aspect
class InclusionCompositionalMaterial : public InclusionMaterial<dim>
{
public:
virtual void evaluate(const MaterialModel::MaterialModelInputs<dim> &in,
MaterialModel::MaterialModelOutputs<dim> &out) const
void evaluate(const MaterialModel::MaterialModelInputs<dim> &in,
MaterialModel::MaterialModelOutputs<dim> &out) const override
{
for (unsigned int i=0; i < in.n_evaluation_points(); ++i)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<dim> &position,
const unsigned int compositional_field) const;
const unsigned int compositional_field) const override;
};


Expand Down Expand Up @@ -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<dim> &position) const;
const Point<dim> &position) const override;

virtual
double minimal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const;
double minimal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const override;

virtual
double maximal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const;
double maximal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const override;
};


Expand Down Expand Up @@ -398,9 +394,8 @@ namespace aspect
/**
* Generate graphical output from the current solution.
*/
virtual
std::pair<std::string,std::string>
execute (TableHandler &statistics);
execute (TableHandler &statistics) override;

double max_error;
double max_error_T;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ namespace aspect
{
public:
RefFunction () : Function<dim>(dim+3) {}
virtual void vector_value (const Point<dim> &/*position*/,
Vector<double> &values) const
void vector_value (const Point<dim> &/*position*/,
Vector<double> &values) const override
{
values[0] = 0.0; // velocity x
values[1] = 0.0; // velocity z
Expand All @@ -305,9 +305,8 @@ namespace aspect
/**
* Generate graphical output from the current solution.
*/
virtual
std::pair<std::string,std::string>
execute (TableHandler &statistics);
execute (TableHandler &statistics) override;

double max_error;
double max_error_T;
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/rigid_shear/plugin/rigid_shear.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ namespace aspect
: Function<dim>(n_components),
transient(transient) {}

virtual void vector_value(const Point<dim> &p,
Vector<double> &values) const
void vector_value(const Point<dim> &p,
Vector<double> &values) const override
{
const double pi = numbers::PI;
const double t = this->get_time();
Expand Down
16 changes: 6 additions & 10 deletions benchmarks/shear_bands/shear_bands.cc
Original file line number Diff line number Diff line change
Expand Up @@ -453,23 +453,21 @@ namespace aspect
/**
* Return the initial porosity as a function of position.
*/
virtual
double
initial_composition (const Point<dim> &position, const unsigned int n_comp) const;
initial_composition (const Point<dim> &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;
Expand Down Expand Up @@ -599,9 +597,8 @@ namespace aspect
/**
* Generate graphical output from the current solution.
*/
virtual
std::pair<std::string,std::string>
execute (TableHandler &statistics);
execute (TableHandler &statistics) override;
};


Expand Down Expand Up @@ -679,17 +676,16 @@ namespace aspect
/**
* Generate graphical output from the current solution.
*/
virtual
std::pair<std::string,std::string>
execute (TableHandler &statistics);
execute (TableHandler &statistics) override;

/**
* Initialization function. Take references to the material model and
* initial conditions model to get the parameters necessary for computing
* the analytical solution for the growth rate and store them.
*/
void
initialize ();
initialize () override;

private:
double amplitude;
Expand Down
5 changes: 3 additions & 2 deletions benchmarks/solcx/solcx.h
Original file line number Diff line number Diff line change
Expand Up @@ -2907,8 +2907,9 @@ namespace aspect
background_density(background_density),
n_compositional_fields(n_compositional_fields) {}

virtual void vector_value(const Point<dim> &p,
Vector<double> &values) const

void vector_value(const Point<dim> &p,
Vector<double> &values) const override
{
AssertDimension(values.size(), 4 + n_compositional_fields);

Expand Down
9 changes: 4 additions & 5 deletions benchmarks/solitary_wave/solitary_wave.cc
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ namespace aspect
delta_ = delta;
}

virtual void vector_value (const Point<dim> &p,
Vector<double> &values) const
void vector_value (const Point<dim> &p,
Vector<double> &values) const override
{
unsigned int index = static_cast<int>((p[dim-1]-delta_)/max_z_ * (initial_pressure_.size()-1));
if (p[dim-1]-delta_ < 0)
Expand Down Expand Up @@ -666,17 +666,16 @@ namespace aspect
/**
* Generate graphical output from the current solution.
*/
virtual
std::pair<std::string,std::string>
execute (TableHandler &statistics);
execute (TableHandler &statistics) override;

/**
* Initialization function. Take references to the material model and
* initial conditions model to get the parameters necessary for computing
* the analytical solution for the shape of the solitary wave and store them.
*/
void
initialize ();
initialize () override;

void
store_initial_pressure ();
Expand Down
12 changes: 4 additions & 8 deletions benchmarks/tangurnis/code/tangurnis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -289,19 +289,16 @@ namespace aspect
class TanGurnisBoundary : public BoundaryTemperature::Interface<dim>
{
public:
virtual
double boundary_temperature (const types::boundary_id /*boundary_indicator*/,
const Point<dim> &position) const
const Point<dim> &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<types::boundary_id> &fixed_boundary_ids) const;
double minimal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const override;

virtual
double maximal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const;
double maximal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const override;
};

template <int dim>
Expand Down Expand Up @@ -335,9 +332,8 @@ namespace aspect
class TanGurnisPostprocessor : public Postprocess::Interface<dim>, public ::aspect::SimulatorAccess<dim>
{
public:
virtual
std::pair<std::string,std::string>
execute (TableHandler &statistics);
execute (TableHandler &statistics) override;
};

template <int dim>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ namespace aspect
density_function (density)
{}

virtual void vector_value (const Point<dim> &p,
Vector<double> &values) const
void vector_value (const Point<dim> &p,
Vector<double> &values) const override
{
double pos[2]= {p(0),p(1)};

Expand Down
3 changes: 1 addition & 2 deletions benchmarks/tosi_et_al_2015_gcubed/tosi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string,std::string>
execute (TableHandler &statistics);
execute (TableHandler &statistics) override;
};

template <int dim>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace aspect
* beginning of the program. Checks preconditions.
*/
void
initialize ();
initialize () override;

// Avoid -Woverloaded-virtual:
using Utilities::AsciiDataInitial<dim>::initialize;
Expand Down
6 changes: 2 additions & 4 deletions cookbooks/inner_core_convection/inner_core_convection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<dim> &material_model_inputs,
const MaterialModel::MaterialModelOutputs<dim> &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
Expand All @@ -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;
/**
* @}
*/
Expand Down