// Create deep copy of mapped geometry for use in parallel...
if (other.mapped_geometry.get() != nullptr)
{
- mapped_geometry.reset(
- new internal::MatrixFreeFunctions::
- MappingDataOnTheFly<dim, Number, VectorizedArrayType>(
- 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<dim, Number, VectorizedArrayType>>(
+ 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;
// Create deep copy of mapped geometry for use in parallel...
if (other.mapped_geometry.get() != nullptr)
{
- mapped_geometry.reset(
- new internal::MatrixFreeFunctions::
- MappingDataOnTheFly<dim, Number, VectorizedArrayType>(
- 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<dim, Number, VectorizedArrayType>>(
+ 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();
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<dim>(
- 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<dealii::FEValues<dim>>(
+ mapping,
+ dummy_fe,
+ mapping_info.cell_data[my_q]
+ .descriptor[fe_index]
+ .quadrature,
+ update_flags_feval);
dealii::FEValues<dim> &fe_val = *fe_values[my_q][fe_index];
cell_data.resize(n_q_points);
if (is_boundary_face &&
fe_boundary_face_values_container[my_q][0] == nullptr)
- fe_boundary_face_values_container[my_q][0].reset(
- new FEFaceValues<dim>(
- mapping, dummy_fe, quadrature, update_flags_boundary));
+ fe_boundary_face_values_container[my_q][0] =
+ std::make_shared<FEFaceValues<dim>>(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<dim>(
- mapping, dummy_fe, quadrature, update_flags_inner));
+ fe_face_values_container[my_q][0] =
+ std::make_shared<FEFaceValues<dim>>(mapping,
+ dummy_fe,
+ quadrature,
+ update_flags_inner);
FEFaceValues<dim> &fe_face_values =
is_boundary_face ? *fe_boundary_face_values_container[my_q][0] :
else
{
if (fe_subface_values_container[my_q][0] == nullptr)
- fe_subface_values_container[my_q][0].reset(
- new FESubfaceValues<dim>(mapping,
- dummy_fe,
- quadrature,
- update_flags_inner));
+ fe_subface_values_container[my_q][0] =
+ std::make_shared<FESubfaceValues<dim>>(
+ mapping,
+ dummy_fe,
+ quadrature,
+ update_flags_inner);
fe_subface_values_container[my_q][0]->reinit(
cell_it,
faces[face].exterior_face_no,
for (const unsigned int face : GeometryInfo<dim>::face_indices())
{
if (fe_face_values[my_q][fe_index].get() == nullptr)
- fe_face_values[my_q][fe_index].reset(
- new dealii::FEFaceValues<dim>(
+ fe_face_values[my_q][fe_index] =
+ std::make_shared<dealii::FEFaceValues<dim>>(
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<dim>(
+ fe_face_values_neigh[my_q][fe_index] =
+ std::make_shared<dealii::FEFaceValues<dim>>(
mapping,
dummy_fe,
face_data_by_cells[my_q].descriptor[fe_index].quadrature,
- update_flags));
+ update_flags);
dealii::FEFaceValues<dim> &fe_val =
*fe_face_values[my_q][fe_index];
dealii::FEFaceValues<dim> &fe_val_neigh =
// 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<Utilities::MPI::Partitioner>(locally_owned_set[no],
+ task_info.communicator);
// initialize the arrays for indices
const unsigned int n_components_total =
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<Utilities::MPI::Partitioner>(
+ part.locally_owned_range(), part.get_mpi_communicator());
const_cast<Utilities::MPI::Partitioner *>(
di.vector_partitioner_face_variants[0].get())
->set_ghost_indices(compressed_set, part.ghost_indices());
vector_partitioner_values = di.vector_partitioner;
else
{
- vector_partitioner_values.reset(
- new Utilities::MPI::Partitioner(
+ vector_partitioner_values =
+ std::make_shared<Utilities::MPI::Partitioner>(
part.locally_owned_range(),
- part.get_mpi_communicator()));
+ part.get_mpi_communicator());
const_cast<Utilities::MPI::Partitioner *>(
vector_partitioner_values.get())
->set_ghost_indices(compressed_set,
vector_partitioner_gradients = di.vector_partitioner;
else
{
- vector_partitioner_gradients.reset(
- new Utilities::MPI::Partitioner(
+ vector_partitioner_gradients =
+ std::make_shared<Utilities::MPI::Partitioner>(
part.locally_owned_range(),
- part.get_mpi_communicator()));
+ part.get_mpi_communicator());
const_cast<Utilities::MPI::Partitioner *>(
vector_partitioner_gradients.get())
->set_ghost_indices(compressed_set,
}
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<Utilities::MPI::Partitioner>(
+ part.locally_owned_range(), part.get_mpi_communicator());
+ di.vector_partitioner_face_variants[4] =
+ std::make_shared<Utilities::MPI::Partitioner>(
+ part.locally_owned_range(), part.get_mpi_communicator());
}
}
}
Assert((Base<dim, VectorType, VectorizedArrayType>::data.get() != nullptr),
ExcNotInitialized());
- this->inverse_diagonal_entries.reset(new DiagonalMatrix<VectorType>());
- this->diagonal_entries.reset(new DiagonalMatrix<VectorType>());
+ this->inverse_diagonal_entries =
+ std::make_shared<DiagonalMatrix<VectorType>>();
+ this->diagonal_entries = std::make_shared<DiagonalMatrix<VectorType>>();
VectorType &inverse_diagonal_vector =
this->inverse_diagonal_entries->get_vector();
VectorType &diagonal_vector = this->diagonal_entries->get_vector();
Assert((Base<dim, VectorType, VectorizedArrayType>::data.get() != nullptr),
ExcNotInitialized());
- this->inverse_diagonal_entries.reset(new DiagonalMatrix<VectorType>());
- this->diagonal_entries.reset(new DiagonalMatrix<VectorType>());
+ this->inverse_diagonal_entries =
+ std::make_shared<DiagonalMatrix<VectorType>>();
+ this->diagonal_entries = std::make_shared<DiagonalMatrix<VectorType>>();
VectorType &inverse_diagonal_vector =
this->inverse_diagonal_entries->get_vector();
VectorType &diagonal_vector = this->diagonal_entries->get_vector();