From: Daniel Arndt Date: Sun, 3 May 2020 03:53:58 +0000 (-0400) Subject: Fix warning about default constructors and default assignment operators X-Git-Tag: v9.2.0-rc1~136^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=525db22936fa8aa48f0223d5ac75ff478952aaa9;p=dealii.git Fix warning about default constructors and default assignment operators --- diff --git a/examples/step-32/step-32.cc b/examples/step-32/step-32.cc index 6877affc84..19a1be8b21 100644 --- a/examples/step-32/step-32.cc +++ b/examples/step-32/step-32.cc @@ -654,7 +654,6 @@ namespace Step32 struct StokesSystem : public StokesPreconditioner { StokesSystem(const FiniteElement &stokes_fe); - StokesSystem(const StokesSystem &data); Vector local_rhs; }; @@ -665,19 +664,12 @@ namespace Step32 , local_rhs(stokes_fe.dofs_per_cell) {} - template - StokesSystem::StokesSystem(const StokesSystem &data) - : StokesPreconditioner(data) - , local_rhs(data.local_rhs) - {} - template struct TemperatureMatrix { TemperatureMatrix(const FiniteElement &temperature_fe); - TemperatureMatrix(const TemperatureMatrix &data); FullMatrix local_mass_matrix; FullMatrix local_stiffness_matrix; @@ -694,20 +686,12 @@ namespace Step32 , local_dof_indices(temperature_fe.dofs_per_cell) {} - template - TemperatureMatrix::TemperatureMatrix(const TemperatureMatrix &data) - : local_mass_matrix(data.local_mass_matrix) - , local_stiffness_matrix(data.local_stiffness_matrix) - , local_dof_indices(data.local_dof_indices) - {} - template struct TemperatureRHS { TemperatureRHS(const FiniteElement &temperature_fe); - TemperatureRHS(const TemperatureRHS &data); Vector local_rhs; std::vector local_dof_indices; @@ -722,13 +706,6 @@ namespace Step32 , matrix_for_bc(temperature_fe.dofs_per_cell, temperature_fe.dofs_per_cell) {} - - template - TemperatureRHS::TemperatureRHS(const TemperatureRHS &data) - : local_rhs(data.local_rhs) - , local_dof_indices(data.local_dof_indices) - , matrix_for_bc(data.matrix_for_bc) - {} } // namespace CopyData } // namespace Assembly diff --git a/include/deal.II/meshworker/dof_info.h b/include/deal.II/meshworker/dof_info.h index 177c7a20e0..822801b991 100644 --- a/include/deal.II/meshworker/dof_info.h +++ b/include/deal.II/meshworker/dof_info.h @@ -234,6 +234,12 @@ namespace MeshWorker */ DoFInfoBox(const DoFInfoBox &); + /** + * Copy assignment operator, taking another object as seed. + */ + DoFInfoBox & + operator=(const DoFInfoBox &); + /** * Reset all the availability flags. */ @@ -453,6 +459,23 @@ namespace MeshWorker } + template + inline DoFInfoBox & + DoFInfoBox::operator=(const DoFInfoBox &other) + { + cell = other.cell; + cell_valid = other.cell_valid; + for (unsigned int i : GeometryInfo::face_indices()) + { + exterior[i] = other.exterior[i]; + interior[i] = other.interior[i]; + interior_face_available[i] = false; + exterior_face_available[i] = false; + } + return *this; + } + + template inline void DoFInfoBox::reset()