From: Peter Munch Date: Sat, 8 Feb 2020 09:42:07 +0000 (+0100) Subject: Remove most new in folder include/deal.II/matrix_free/ X-Git-Tag: v9.2.0-rc1~548^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebaf2b86f1745aee7874b6a3ea1992f03604a750;p=dealii.git Remove most new in folder include/deal.II/matrix_free/ --- diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index e053184092..ae16502ebc 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -3233,12 +3233,12 @@ inline FEEvaluationBase( - other.mapped_geometry->get_fe_values().get_mapping(), - other.mapped_geometry->get_quadrature(), - other.mapped_geometry->get_fe_values().get_update_flags())); + mapped_geometry = std::make_shared< + internal::MatrixFreeFunctions:: + MappingDataOnTheFly>( + other.mapped_geometry->get_fe_values().get_mapping(), + other.mapped_geometry->get_quadrature(), + other.mapped_geometry->get_fe_values().get_update_flags()); mapping_data = &mapped_geometry->get_data_storage(); cell = 0; @@ -3311,12 +3311,12 @@ operator=(const FEEvaluationBase( - other.mapped_geometry->get_fe_values().get_mapping(), - other.mapped_geometry->get_quadrature(), - other.mapped_geometry->get_fe_values().get_update_flags())); + mapped_geometry = std::make_shared< + internal::MatrixFreeFunctions:: + MappingDataOnTheFly>( + other.mapped_geometry->get_fe_values().get_mapping(), + other.mapped_geometry->get_quadrature(), + other.mapped_geometry->get_fe_values().get_update_flags()); cell = 0; mapping_data = &mapped_geometry->get_data_storage(); jacobian = mapped_geometry->get_data_storage().jacobians[0].begin(); diff --git a/include/deal.II/matrix_free/mapping_info.templates.h b/include/deal.II/matrix_free/mapping_info.templates.h index f61e09d0ab..307abf4348 100644 --- a/include/deal.II/matrix_free/mapping_info.templates.h +++ b/include/deal.II/matrix_free/mapping_info.templates.h @@ -674,11 +674,14 @@ namespace internal const unsigned int n_q_points = mapping_info.cell_data[my_q].descriptor[fe_index].n_q_points; if (fe_values[my_q][fe_index].get() == nullptr) - fe_values[my_q][fe_index].reset(new dealii::FEValues( - mapping, - dummy_fe, - mapping_info.cell_data[my_q].descriptor[fe_index].quadrature, - update_flags_feval)); + fe_values[my_q][fe_index] = + std::make_shared>( + mapping, + dummy_fe, + mapping_info.cell_data[my_q] + .descriptor[fe_index] + .quadrature, + update_flags_feval); dealii::FEValues &fe_val = *fe_values[my_q][fe_index]; cell_data.resize(n_q_points); @@ -1324,12 +1327,17 @@ namespace internal if (is_boundary_face && fe_boundary_face_values_container[my_q][0] == nullptr) - fe_boundary_face_values_container[my_q][0].reset( - new FEFaceValues( - mapping, dummy_fe, quadrature, update_flags_boundary)); + fe_boundary_face_values_container[my_q][0] = + std::make_shared>(mapping, + dummy_fe, + quadrature, + update_flags_boundary); else if (fe_face_values_container[my_q][0] == nullptr) - fe_face_values_container[my_q][0].reset(new FEFaceValues( - mapping, dummy_fe, quadrature, update_flags_inner)); + fe_face_values_container[my_q][0] = + std::make_shared>(mapping, + dummy_fe, + quadrature, + update_flags_inner); FEFaceValues &fe_face_values = is_boundary_face ? *fe_boundary_face_values_container[my_q][0] : @@ -1471,11 +1479,12 @@ namespace internal else { if (fe_subface_values_container[my_q][0] == nullptr) - fe_subface_values_container[my_q][0].reset( - new FESubfaceValues(mapping, - dummy_fe, - quadrature, - update_flags_inner)); + fe_subface_values_container[my_q][0] = + std::make_shared>( + mapping, + dummy_fe, + quadrature, + update_flags_inner); fe_subface_values_container[my_q][0]->reinit( cell_it, faces[face].exterior_face_no, @@ -2017,19 +2026,19 @@ namespace internal for (const unsigned int face : GeometryInfo::face_indices()) { if (fe_face_values[my_q][fe_index].get() == nullptr) - fe_face_values[my_q][fe_index].reset( - new dealii::FEFaceValues( + fe_face_values[my_q][fe_index] = + std::make_shared>( mapping, dummy_fe, face_data_by_cells[my_q].descriptor[fe_index].quadrature, - update_flags)); + update_flags); if (fe_face_values_neigh[my_q][fe_index].get() == nullptr) - fe_face_values_neigh[my_q][fe_index].reset( - new dealii::FEFaceValues( + fe_face_values_neigh[my_q][fe_index] = + std::make_shared>( mapping, dummy_fe, face_data_by_cells[my_q].descriptor[fe_index].quadrature, - update_flags)); + update_flags); dealii::FEFaceValues &fe_val = *fe_face_values[my_q][fe_index]; dealii::FEFaceValues &fe_val_neigh = diff --git a/include/deal.II/matrix_free/matrix_free.templates.h b/include/deal.II/matrix_free/matrix_free.templates.h index 6505aeb3e8..3c98ada2a2 100644 --- a/include/deal.II/matrix_free/matrix_free.templates.h +++ b/include/deal.II/matrix_free/matrix_free.templates.h @@ -988,9 +988,9 @@ MatrixFree::initialize_indices( // set locally owned range for each component Assert(locally_owned_set[no].is_contiguous(), ExcNotImplemented()); - dof_info[no].vector_partitioner.reset( - new Utilities::MPI::Partitioner(locally_owned_set[no], - task_info.communicator)); + dof_info[no].vector_partitioner = + std::make_shared(locally_owned_set[no], + task_info.communicator); // initialize the arrays for indices const unsigned int n_components_total = @@ -1618,9 +1618,9 @@ MatrixFree::initialize_indices( di.vector_partitioner_face_variants[0] = di.vector_partitioner; else { - di.vector_partitioner_face_variants[0].reset( - new Utilities::MPI::Partitioner(part.locally_owned_range(), - part.get_mpi_communicator())); + di.vector_partitioner_face_variants[0] = + std::make_shared( + part.locally_owned_range(), part.get_mpi_communicator()); const_cast( di.vector_partitioner_face_variants[0].get()) ->set_ghost_indices(compressed_set, part.ghost_indices()); @@ -1789,10 +1789,10 @@ MatrixFree::initialize_indices( vector_partitioner_values = di.vector_partitioner; else { - vector_partitioner_values.reset( - new Utilities::MPI::Partitioner( + vector_partitioner_values = + std::make_shared( part.locally_owned_range(), - part.get_mpi_communicator())); + part.get_mpi_communicator()); const_cast( vector_partitioner_values.get()) ->set_ghost_indices(compressed_set, @@ -1901,10 +1901,10 @@ MatrixFree::initialize_indices( vector_partitioner_gradients = di.vector_partitioner; else { - vector_partitioner_gradients.reset( - new Utilities::MPI::Partitioner( + vector_partitioner_gradients = + std::make_shared( part.locally_owned_range(), - part.get_mpi_communicator())); + part.get_mpi_communicator()); const_cast( vector_partitioner_gradients.get()) ->set_ghost_indices(compressed_set, @@ -1936,12 +1936,12 @@ MatrixFree::initialize_indices( } else { - di.vector_partitioner_face_variants[3].reset( - new Utilities::MPI::Partitioner(part.locally_owned_range(), - part.get_mpi_communicator())); - di.vector_partitioner_face_variants[4].reset( - new Utilities::MPI::Partitioner(part.locally_owned_range(), - part.get_mpi_communicator())); + di.vector_partitioner_face_variants[3] = + std::make_shared( + part.locally_owned_range(), part.get_mpi_communicator()); + di.vector_partitioner_face_variants[4] = + std::make_shared( + part.locally_owned_range(), part.get_mpi_communicator()); } } } diff --git a/include/deal.II/matrix_free/operators.h b/include/deal.II/matrix_free/operators.h index 9d71deab6d..5f93f4ed2f 100644 --- a/include/deal.II/matrix_free/operators.h +++ b/include/deal.II/matrix_free/operators.h @@ -1789,8 +1789,9 @@ namespace MatrixFreeOperators Assert((Base::data.get() != nullptr), ExcNotInitialized()); - this->inverse_diagonal_entries.reset(new DiagonalMatrix()); - this->diagonal_entries.reset(new DiagonalMatrix()); + this->inverse_diagonal_entries = + std::make_shared>(); + this->diagonal_entries = std::make_shared>(); VectorType &inverse_diagonal_vector = this->inverse_diagonal_entries->get_vector(); VectorType &diagonal_vector = this->diagonal_entries->get_vector(); @@ -1977,8 +1978,9 @@ namespace MatrixFreeOperators Assert((Base::data.get() != nullptr), ExcNotInitialized()); - this->inverse_diagonal_entries.reset(new DiagonalMatrix()); - this->diagonal_entries.reset(new DiagonalMatrix()); + this->inverse_diagonal_entries = + std::make_shared>(); + this->diagonal_entries = std::make_shared>(); VectorType &inverse_diagonal_vector = this->inverse_diagonal_entries->get_vector(); VectorType &diagonal_vector = this->diagonal_entries->get_vector();