From 525db22936fa8aa48f0223d5ac75ff478952aaa9 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sat, 2 May 2020 23:53:58 -0400 Subject: [PATCH] Fix warning about default constructors and default assignment operators --- examples/step-32/step-32.cc | 23 ----------------------- include/deal.II/meshworker/dof_info.h | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 23 deletions(-) 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() -- 2.39.5