/**
* Internal data of mapping.
*/
- SmartPointer<typename Mapping<dim,spacedim>::InternalDataBase,FEValuesBase<dim,spacedim> > mapping_data;
+ std_cxx11::unique_ptr<typename Mapping<dim,spacedim>::InternalDataBase> mapping_data;
/**
* Internal data of finite element.
*/
- SmartPointer<typename FiniteElement<dim,spacedim>::InternalDataBase,FEValuesBase<dim,spacedim> > fe_data;
+ std_cxx11::unique_ptr<typename FiniteElement<dim,spacedim>::InternalDataBase> fe_data;
/**
* Original update flags handed to the constructor of FEValues.
dofs_per_cell (dofs_per_cell),
mapping(&mapping, typeid(*this).name()),
fe(&fe, typeid(*this).name()),
- mapping_data(0, typeid(*this).name()),
- fe_data(0, typeid(*this).name()),
fe_values_views_cache (*this)
{
Assert (n_q_points > 0,
template <int dim, int spacedim>
FEValuesBase<dim,spacedim>::~FEValuesBase ()
{
- // delete those fields that were
- // created by the mapping and
- // finite element objects,
- // respectively, but of which we
- // have assumed ownership
- if (fe_data != 0)
- {
- typename FiniteElement<dim,spacedim>::InternalDataBase *tmp1=fe_data;
- fe_data=0;
- delete tmp1;
- }
-
- if (mapping_data != 0)
- {
- typename Mapping<dim,spacedim>::InternalDataBase *tmp1=mapping_data;
- mapping_data=0;
- delete tmp1;
- }
-
tria_listener.disconnect ();
}
// FE and the Mapping can store
// intermediate data used across
// calls to reinit
- this->mapping_data = this->mapping->get_data(flags, quadrature);
- this->fe_data = this->fe->get_data(flags, *this->mapping, quadrature);
+ this->mapping_data.reset (this->mapping->get_data(flags, quadrature));
+ this->fe_data.reset (this->fe->get_data(flags, *this->mapping, quadrature));
// initialize the base classes
internal::FEValues::MappingRelatedData<dim,spacedim>::initialize(this->n_quadrature_points, flags);
// FE and the Mapping can store
// intermediate data used across
// calls to reinit
- this->mapping_data = this->mapping->get_face_data(flags, this->quadrature);
- this->fe_data = this->fe->get_face_data(flags, *this->mapping, this->quadrature);
+ this->mapping_data.reset (this->mapping->get_face_data(flags, this->quadrature));
+ this->fe_data.reset (this->fe->get_face_data(flags, *this->mapping, this->quadrature));
// initialize the base classes
internal::FEValues::MappingRelatedData<dim,spacedim>::initialize(this->n_quadrature_points, flags);
// FE and the Mapping can store
// intermediate data used across
// calls to reinit
- this->mapping_data = this->mapping->get_subface_data(flags, this->quadrature);
- this->fe_data = this->fe->get_subface_data(flags,
+ this->mapping_data.reset (this->mapping->get_subface_data(flags, this->quadrature));
+ this->fe_data.reset (this->fe->get_subface_data(flags,
*this->mapping,
- this->quadrature);
+ this->quadrature));
// initialize the base classes
internal::FEValues::MappingRelatedData<dim,spacedim>::initialize(this->n_quadrature_points, flags);