/**
* Combination of the flags needed for Piola transform of Hdiv elements.
*/
- update_piola = update_volume_elements | update_contravariant_transformation
+ update_piola = update_volume_elements | update_contravariant_transformation,
+ /**
+ * Combination of the flags that require a mapping calculation
+ */
+ update_mapping =
+ // Direct data
+ update_quadrature_points |
+ update_JxW_values |
+ update_jacobians |
+ update_jacobian_grads |
+ update_jacobian_pushed_forward_grads |
+ update_jacobian_2nd_derivatives |
+ update_jacobian_pushed_forward_2nd_derivatives |
+ update_jacobian_3rd_derivatives |
+ update_jacobian_pushed_forward_3rd_derivatives |
+ update_inverse_jacobians |
+ update_boundary_forms |
+ update_normal_vectors |
+ // Transformation dependence
+ update_covariant_transformation |
+ update_contravariant_transformation |
+ update_transformation_values |
+ update_transformation_gradients |
+ // Volume data
+ update_volume_elements
};
const UpdateFlags flags = this->compute_update_flags (update_flags);
// initialize the base classes
- this->mapping_output.initialize(this->n_quadrature_points, flags);
+ if (flags & update_mapping)
+ this->mapping_output.initialize(this->n_quadrature_points, flags);
this->finite_element_output.initialize(this->n_quadrature_points, *this->fe, flags);
// then get objects into which the FE and the Mapping can store
quadrature,
this->finite_element_output);
Threads::Task<typename Mapping<dim,spacedim>::InternalDataBase *>
- mapping_get_data = Threads::new_task (&Mapping<dim,spacedim>::get_data,
- *this->mapping,
- flags,
- quadrature);
+ mapping_get_data;
+ if (flags & update_mapping)
+ mapping_get_data = Threads::new_task (&Mapping<dim,spacedim>::get_data,
+ *this->mapping,
+ flags,
+ quadrature);
this->update_flags = flags;
// then collect answers from the two task above
this->fe_data.reset (fe_get_data.return_value());
- this->mapping_data.reset (mapping_get_data.return_value());
+ if (flags & update_mapping)
+ this->mapping_data.reset (mapping_get_data.return_value());
}
// specific to the mapping. also let it inspect the
// cell similarity flag and, if necessary, update
// it
- this->cell_similarity
- = this->get_mapping().fill_fe_values(*this->present_cell,
- this->cell_similarity,
- quadrature,
- *this->mapping_data,
- this->mapping_output);
+ if (this->update_flags & update_mapping)
+ {
+ this->cell_similarity
+ = this->get_mapping().fill_fe_values(*this->present_cell,
+ this->cell_similarity,
+ quadrature,
+ *this->mapping_data,
+ this->mapping_output);
+ }
// then call the finite element and, with the data
// already filled by the mapping, let it compute the