inline
QCollection<dim>::QCollection (const Quadrature<dim> &quadrature)
{
- quadratures
- .push_back (std::shared_ptr<const Quadrature<dim> >(new Quadrature<dim>(quadrature)));
+ quadratures.push_back (std::make_shared<const Quadrature<dim> >(quadrature));
}
void
QCollection<dim>::push_back (const Quadrature<dim> &new_quadrature)
{
- quadratures
- .push_back (std::shared_ptr<const Quadrature<dim> >(new Quadrature<dim>(new_quadrature)));
+ quadratures.push_back (std::make_shared<const Quadrature<dim> >(new_quadrature));
}
} // namespace hp
#include <deal.II/base/memory_consumption.h>
#include <deal.II/base/geometry_info.h>
+#include <deal.II/base/std_cxx14/memory.h>
#include <deal.II/base/thread_management.h>
#include <deal.II/hp/dof_handler.h>
#include <deal.II/hp/dof_level.h>
}
if (dim > 1)
- dof_handler.faces.reset (new internal::hp::DoFIndicesOnFaces<dim>);
+ dof_handler.faces = std_cxx14::make_unique<internal::hp::DoFIndicesOnFaces<dim>> ();
}
}
{
// decide whether we need a sequential or a parallel shared/distributed policy
if (dynamic_cast<const parallel::shared::Triangulation< dim, spacedim>*> (&*this->tria) != nullptr)
- policy.reset (new internal::DoFHandler::Policy::ParallelShared<DoFHandler<dim,spacedim> >(*this));
+ policy = std_cxx14::make_unique<internal::DoFHandler::Policy::ParallelShared<DoFHandler<dim,spacedim> >> (*this);
else if (dynamic_cast<const parallel::distributed::Triangulation< dim, spacedim >*> (&*this->tria) != nullptr)
- policy.reset (new internal::DoFHandler::Policy::ParallelDistributed<DoFHandler<dim,spacedim> >(*this));
+ policy = std_cxx14::make_unique<internal::DoFHandler::Policy::ParallelDistributed<DoFHandler<dim,spacedim> >> (*this);
else
- policy.reset (new internal::DoFHandler::Policy::Sequential<DoFHandler<dim,spacedim> >(*this));
+ policy = std_cxx14::make_unique<internal::DoFHandler::Policy::Sequential<DoFHandler<dim,spacedim> >> (*this);
create_active_fe_table ();
ExcMessage ("All elements inside a collection need to have the "
"same number of vector components!"));
- finite_elements
- .push_back (std::shared_ptr<const FiniteElement<dim,spacedim> >(new_fe.clone()));
+ finite_elements.push_back (new_fe.clone());
}
if (fe_values_table(present_fe_values_index).get() == nullptr)
fe_values_table(present_fe_values_index)
=
- std::shared_ptr<FEValuesType>
- (new FEValuesType ((*mapping_collection)[mapping_index],
- (*fe_collection)[fe_index],
- q_collection[q_index],
- update_flags));
+ std::make_shared<FEValuesType>
+ ((*mapping_collection)[mapping_index],
+ (*fe_collection)[fe_index],
+ q_collection[q_index],
+ update_flags);
// now there definitely is one!
return *fe_values_table(present_fe_values_index);