virtual ~InternalDataBase ();
/**
- * Values updated by the constructor or by reinit.
- */
- UpdateFlags update_flags;
-
- /**
- * Values computed by constructor.
- */
- UpdateFlags update_once;
-
- /**
- * Values updated on each cell by reinit.
+ * Values updated on each cell by Mapping::fill_fe_values() and friends.
*/
UpdateFlags update_each;
- /**
- * If <tt>first_cell==true</tt> this function returns @p update_flags,
- * i.e. <tt>update_once|update_each</tt>. If <tt>first_cell==false</tt> it
- * returns @p update_each.
- */
- UpdateFlags current_update_flags() const;
-
- /**
- * Set the @p first_cell flag to @p false. Used by the @p FEValues class
- * to indicate that we have already done the work on the first cell.
- */
- virtual void clear_first_cell ();
-
/**
* Return an estimate (in bytes) or the memory consumption of this object.
*/
virtual std::size_t memory_consumption () const;
-
- private:
- /**
- * Initially set to true, but reset to false when clear_first_cell()
- * is called.
- */
- bool first_cell;
};
};
-/* ------------------------- inline functions ------------------------- */
-
-#ifndef DOXYGEN
-
-template <int dim, int spacedim>
-inline
-UpdateFlags
-Mapping<dim,spacedim>::InternalDataBase::current_update_flags () const
-{
- if (first_cell)
- {
- Assert (update_flags==(update_once|update_each),
- ExcInternalError());
- return update_flags;
- }
- else
- return update_each;
-}
-
-
-
-template <int dim, int spacedim>
-inline
-void
-Mapping<dim,spacedim>::InternalDataBase::clear_first_cell ()
-{
- first_cell = false;
-}
-
-
-#endif // DOXYGEN
-
DEAL_II_NAMESPACE_CLOSE
#endif
this->cell_similarity);
this->fe_data->clear_first_cell ();
- this->mapping_data->clear_first_cell ();
}
*this);
this->fe_data->clear_first_cell ();
- this->mapping_data->clear_first_cell ();
}
*this);
this->fe_data->clear_first_cell ();
- this->mapping_data->clear_first_cell ();
}
template <int dim, int spacedim>
Mapping<dim, spacedim>::InternalDataBase::InternalDataBase ():
- update_flags(update_default),
- update_once(update_default),
- update_each(update_default),
- first_cell(true)
+ update_each(update_default)
{}
{
InternalData *data = new InternalData (q);
- data->update_once = update_once(update_flags);
data->update_each = update_each(update_flags);
- data->update_flags = data->update_once | data->update_each;
return data;
}
InternalData *data
= new InternalData (QProjector<dim>::project_to_all_faces(quadrature));
- data->update_once = update_once(update_flags);
data->update_each = update_each(update_flags);
- data->update_flags = data->update_once | data->update_each;
return data;
}
InternalData *data
= new InternalData (QProjector<dim>::project_to_all_subfaces(quadrature));
- data->update_once = update_once(update_flags);
data->update_each = update_each(update_flags);
- data->update_flags = data->update_once | data->update_each;
return data;
}
{
case mapping_covariant:
{
- Assert (data.update_flags & update_covariant_transformation,
+ Assert (data.update_each & update_covariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_covariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
case mapping_contravariant:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
}
case mapping_piola:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
- Assert (data.update_flags & update_volume_elements,
+ Assert (data.update_each & update_volume_elements,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_volume_elements"));
for (unsigned int i=0; i<output.size(); ++i)
{
case mapping_covariant:
{
- Assert (data.update_flags & update_covariant_transformation,
+ Assert (data.update_each & update_covariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_covariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
case mapping_contravariant:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
case mapping_covariant_gradient:
{
- Assert (data.update_flags & update_covariant_transformation,
+ Assert (data.update_each & update_covariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_covariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
case mapping_contravariant_gradient:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
case mapping_piola:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
- Assert (data.update_flags & update_volume_elements,
+ Assert (data.update_each & update_volume_elements,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_volume_elements"));
for (unsigned int i=0; i<output.size(); ++i)
case mapping_piola_gradient:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
- Assert (data.update_flags & update_volume_elements,
+ Assert (data.update_each & update_volume_elements,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_volume_elements"));
for (unsigned int i=0; i<output.size(); ++i)
{
case mapping_covariant:
{
- Assert (data.update_flags & update_covariant_transformation,
+ Assert (data.update_each & update_covariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_covariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
case mapping_contravariant:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
case mapping_covariant_gradient:
{
- Assert (data.update_flags & update_covariant_transformation,
+ Assert (data.update_each & update_covariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_covariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
case mapping_contravariant_gradient:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
case mapping_piola:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
- Assert (data.update_flags & update_volume_elements,
+ Assert (data.update_each & update_volume_elements,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_volume_elements"));
for (unsigned int i=0; i<output.size(); ++i)
}
case mapping_piola_gradient:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
- Assert (data.update_flags & update_volume_elements,
+ Assert (data.update_each & update_volume_elements,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_volume_elements"));
for (unsigned int i=0; i<output.size(); ++i)
const unsigned int n_original_q_points,
InternalData &data) const
{
- const unsigned int n_q_points = q.size();
-
- data.update_once = update_once(update_flags);
data.update_each = update_each(update_flags);
- data.update_flags = data.update_once | data.update_each;
- const UpdateFlags flags(data.update_flags);
+ const unsigned int n_q_points = q.size();
+ const UpdateFlags flags = update_once(update_flags) | update_each(update_flags);
if (flags & update_transformation_values)
data.shape_values.resize(data.n_shape_functions * n_q_points);
if (dim > 1)
{
- if (data.update_flags & update_boundary_forms)
+ if (update_flags & update_boundary_forms)
{
data.aux.resize (dim-1, std::vector<Tensor<1,spacedim> > (n_original_q_points));
{
case mapping_contravariant:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
case mapping_piola:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
- Assert (data.update_flags & update_volume_elements,
+ Assert (data.update_each & update_volume_elements,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_volume_elements"));
Assert (rank==1, ExcMessage("Only for rank 1"));
for (unsigned int i=0; i<output.size(); ++i)
//rather than DerivativeForm
case mapping_covariant:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
{
case mapping_covariant:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
const unsigned int n_original_q_points,
InternalData &data) const
{
- const unsigned int n_q_points = q.size();
-
- data.update_once = update_once(update_flags);
data.update_each = update_each(update_flags);
- data.update_flags = data.update_once | data.update_each;
- const UpdateFlags flags(data.update_flags);
+ const unsigned int n_q_points = q.size();
+ const UpdateFlags flags = update_once(update_flags) | update_each(update_flags);
// see if we need the (transformation) shape function values
// and/or gradients and resize the necessary arrays
if (dim > 1)
{
- if (data.update_flags & update_boundary_forms)
+ if (update_flags & update_boundary_forms)
{
data.aux.resize (dim-1, std::vector<Tensor<1,spacedim> > (n_original_q_points));
{
case mapping_contravariant:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
case mapping_piola:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
- Assert (data.update_flags & update_volume_elements,
+ Assert (data.update_each & update_volume_elements,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_volume_elements"));
Assert (rank==1, ExcMessage("Only for rank 1"));
if (rank!=1)
//rather than DerivativeForm
case mapping_covariant:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)
{
case mapping_contravariant_gradient:
{
- Assert (data.update_flags & update_covariant_transformation,
+ Assert (data.update_each & update_covariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_covariant_transformation"));
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
Assert (rank==2, ExcMessage("Only for rank 2"));
case mapping_covariant_gradient:
{
- Assert (data.update_flags & update_covariant_transformation,
+ Assert (data.update_each & update_covariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_covariant_transformation"));
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
Assert (rank==2, ExcMessage("Only for rank 2"));
case mapping_piola_gradient:
{
- Assert (data.update_flags & update_covariant_transformation,
+ Assert (data.update_each & update_covariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_covariant_transformation"));
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
- Assert (data.update_flags & update_volume_elements,
+ Assert (data.update_each & update_volume_elements,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_volume_elements"));
Assert (rank==2, ExcMessage("Only for rank 2"));
{
case mapping_covariant:
{
- Assert (data.update_flags & update_contravariant_transformation,
+ Assert (data.update_each & update_contravariant_transformation,
typename FEValuesBase<dim>::ExcAccessToUninitializedField("update_contravariant_transformation"));
for (unsigned int i=0; i<output.size(); ++i)