public:
/**
* Constructor. Is called by the @p get_data function. Sets the size of
- * the @p base_fe_datas vector to @p n_base_elements.
+ * the @p base_fe_datas vector to @p n_base_elements and initializes
+ * the compute_hessians field.
*/
- InternalData (const unsigned int n_base_elements);
+ InternalData (const unsigned int n_base_elements,
+ const bool compute_hessians);
/**
* Destructor. Deletes all @p InternalDatas whose pointers are stored by
/**
* Flag indicating whether second derivatives shall be computed.
*/
- bool compute_hessians;
+ const bool compute_hessians;
/**
* Gives write-access to the pointer to a @p InternalData of the @p
template <int dim, int spacedim>
-FESystem<dim,spacedim>::InternalData::InternalData(const unsigned int n_base_elements):
+FESystem<dim,spacedim>::InternalData::InternalData(const unsigned int n_base_elements,
+ const bool compute_hessians)
+:
+ compute_hessians (compute_hessians),
base_fe_datas(n_base_elements),
base_fe_values_datas(n_base_elements)
{}
const Quadrature<dim> &quadrature) const
{
UpdateFlags flags = flags_;
- InternalData *data = new InternalData(this->n_base_elements());
+ InternalData *data = new InternalData(this->n_base_elements(),
+ flags & update_hessians);
data->update_once = update_once (flags);
data->update_each = update_each (flags);
// finite differencing are required,
// then initialize some objects for
// that
- data->compute_hessians = flags & update_hessians;
if (data->compute_hessians)
{
// delete
const Quadrature<dim-1> &quadrature) const
{
UpdateFlags flags = flags_;
- InternalData *data = new InternalData(this->n_base_elements());
+ InternalData *data = new InternalData(this->n_base_elements(),
+ flags & update_hessians);
data->update_once = update_once (flags);
data->update_each = update_each (flags);
flags = data->update_once | data->update_each;
UpdateFlags sub_flags = flags;
- data->compute_hessians = flags & update_hessians;
if (data->compute_hessians)
{
sub_flags = UpdateFlags (sub_flags ^ update_hessians);
const Quadrature<dim-1> &quadrature) const
{
UpdateFlags flags = flags_;
- InternalData *data = new InternalData(this->n_base_elements());
+ InternalData *data = new InternalData(this->n_base_elements(),
+ flags & update_hessians);
data->update_once = update_once (flags);
data->update_each = update_each (flags);
flags = data->update_once | data->update_each;
UpdateFlags sub_flags = flags;
- data->compute_hessians = flags & update_hessians;
if (data->compute_hessians)
{
sub_flags = UpdateFlags (sub_flags ^ update_hessians);