template <int dim, int q_dim>
class FEValuesBase
{
- private:
- /**
- * Default mapping, in case
- * none was provided through
- * the call to the constructor.
- */
- static const MappingQ1<dim> default_mapping;
-
public:
/**
* Constructor. Set the fields
* upon construction of the
* object.
*/
- const ::hp::MappingCollection<dim> mapping_collection;
+ SmartPointer<const ::hp::MappingCollection<dim> > mapping_collection;
/**
* Copy of the quadrature
// -------------------------- FEValuesBase -------------------------
- template <int dim, int q_dim>
- const MappingQ1<dim>
- FEValuesBase<dim,q_dim>::default_mapping;
-
-
-
template <int dim, int q_dim>
FEValuesBase<dim,q_dim>::FEValuesBase (
const ::hp::MappingCollection<dim> &mapping_collection,
const ::hp::QCollection<q_dim> &q_collection,
const UpdateFlags update_flags)
:
- mapping_collection (mapping_collection),
+ mapping_collection (&mapping_collection),
q_collection (q_collection),
update_flags (update_flags)
{}
FEValuesBase<dim,q_dim>::FEValuesBase (const ::hp::QCollection<q_dim> &q_collection,
const UpdateFlags update_flags)
:
- mapping_collection (default_mapping),
+ mapping_collection (&::hp::StaticMappingQ1<dim>::mapping_collection),
q_collection (q_collection),
update_flags (update_flags)
{}
const unsigned int active_fe_index) const
{
return new ::FEValues<dim> (
- this->mapping_collection[active_fe_index], fe,
+ (*this->mapping_collection)[active_fe_index], fe,
this->q_collection[active_fe_index], this->update_flags);
}
const unsigned int active_fe_index) const
{
return new ::FEFaceValues<dim> (
- this->mapping_collection[active_fe_index], fe,
+ (*this->mapping_collection)[active_fe_index], fe,
this->q_collection[active_fe_index], this->update_flags);
}
const unsigned int active_fe_index) const
{
return new ::FESubfaceValues<dim> (
- this->mapping_collection[active_fe_index], fe,
+ (*this->mapping_collection)[active_fe_index], fe,
this->q_collection[active_fe_index], this->update_flags);
}
}