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

Prefer std::array over C-style arrays. #5206

Merged
merged 1 commit into from Jul 8, 2023
Merged

Conversation

bangerth
Copy link
Contributor

@bangerth bangerth commented Jul 8, 2023

No description provided.

@bangerth
Copy link
Contributor Author

bangerth commented Jul 8, 2023

Ah, we broke the main branch:

/__w/aspect/aspect/source/particle/property/strain_rate.cc:49:15: error: cannot bind non-const lvalue reference of type 'dealii::ArrayView<double, dealii::MemorySpace::Host>&' to an rvalue of type 'dealii::ArrayView<double, dealii::MemorySpace::Host>'
   49 |         auto &data = particle->get_properties();
      |               ^~~~
/__w/aspect/aspect/source/particle/property/strain_rate.cc: In instantiation of 'void aspect::Particle::Property::StrainRate<dim>::update_particle_property(unsigned int, const dealii::Vector<double>&, const std::vector<dealii::Tensor<1, dim> >&, typename dealii::Particles::ParticleHandler<dim>::particle_iterator&) const [with int dim = 3; typename dealii::Particles::ParticleHandler<dim>::particle_iterator = dealii::Particles::ParticleIterator<3, 3>]':
/__w/aspect/aspect/source/particle/property/strain_rate.cc:96:7:   required from here
/__w/aspect/aspect/source/particle/property/strain_rate.cc:49:15: error: cannot bind non-const lvalue reference of type 'dealii::ArrayView<double, dealii::MemorySpace::Host>&' to an rvalue of type 'dealii::ArrayView<double, dealii::MemorySpace::Host>'
In file included from CMakeFiles/aspect.dir/Unity/unity_24_cxx.cxx:17:
/__w/aspect/aspect/source/particle/property/viscoplastic_strain_invariants.cc: In instantiation of 'void aspect::Particle::Property::ViscoPlasticStrainInvariant<dim>::update_particle_property(unsigned int, const dealii::Vector<double>&, const std::vector<dealii::Tensor<1, dim> >&, typename dealii::Particles::ParticleHandler<dim>::particle_iterator&) const [with int dim = 2; typename dealii::Particles::ParticleHandler<dim>::particle_iterator = dealii::Particles::ParticleIterator<2, 2>]':
/__w/aspect/aspect/source/particle/property/viscoplastic_strain_invariants.cc:232:7:   required from here
/__w/aspect/aspect/source/particle/property/viscoplastic_strain_invariants.cc:133:15: error: cannot bind non-const lvalue reference of type 'dealii::ArrayView<double, dealii::MemorySpace::Host>&' to an rvalue of type 'dealii::ArrayView<double, dealii::MemorySpace::Host>'
  133 |         auto &data = particle->get_properties();
      |               ^~~~

@tjhei tjhei merged commit 06b16e0 into geodynamics:main Jul 8, 2023
5 of 6 checks passed
@bangerth bangerth deleted the array-2 branch July 8, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants