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

[Urgent] Fix 'main' breakage. #5208

Merged
merged 1 commit into from
Jul 8, 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
2 changes: 1 addition & 1 deletion source/particle/property/integrated_strain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace aspect
const std::vector<Tensor<1,dim>> &gradients,
typename ParticleHandler<dim>::particle_iterator &particle) const
{
auto &data = particle->get_properties();
const auto data = particle->get_properties();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_properties() used to return a const ArrayView<...> object. It isn't a reference, so capturing it with auto & was always a poor design choice. It worked because the compiler deduced auto = const ArrayView, and binding a temporary to a const reference is allowed. But dealii/dealii#15671 changed the return type to drop the const, which means that the compiler deduces auto = ArrayView, and now we have a non-const reference for which the returned temporary is no longer able to bind -- and the compiler errors out.


Tensor<2,dim> old_strain;
for (unsigned int i = 0; i < Tensor<2,dim>::n_independent_components ; ++i)
Expand Down
2 changes: 1 addition & 1 deletion source/particle/property/integrated_strain_invariant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace aspect
typename ParticleHandler<dim>::particle_iterator &particle) const
{
// Integrated strain invariant from prior time step
auto &data = particle->get_properties();
const auto data = particle->get_properties();
double old_strain = data[data_position];

// Current timestep
Expand Down
2 changes: 1 addition & 1 deletion source/particle/property/strain_rate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace aspect
const std::vector<Tensor<1,dim>> &gradients,
typename ParticleHandler<dim>::particle_iterator &particle) const
{
auto &data = particle->get_properties();
const auto data = particle->get_properties();
// Velocity gradients
Tensor<2,dim> grad_u;
for (unsigned int d=0; d<dim; ++d)
Expand Down
2 changes: 1 addition & 1 deletion source/particle/property/viscoplastic_strain_invariants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ namespace aspect
const bool plastic_yielding = viscoplastic.is_yielding(material_inputs);

// Next take the integrated strain invariant from the prior time step.
auto &data = particle->get_properties();
const auto data = particle->get_properties();

// Calculate strain rate second invariant
const double edot_ii = std::sqrt(std::max(-second_invariant(deviator(material_inputs.strain_rate[0])), 0.));
Expand Down