@@ -434,14 +434,42 @@ namespace aspect
434434 UpdateTimeFlags
435435 need_update () const ;
436436
437+ /* *
438+ * Return which data of the solution component @p component
439+ * has to be provided to update the current particle property.
440+ *
441+ * Note that particle properties can only ask for update_default
442+ * (no data), update_values (solution values), and update_gradients
443+ * (solution gradients). All other update flags will have no effect.
444+ *
445+ * As an example consider a particle property that depends on the
446+ * solution values and gradients of the velocity field. In this case
447+ * the function should return update_values | update_gradients if the
448+ * @p component is one of the velocity components, and update_default
449+ * otherwise.
450+ *
451+ * @param component The component of the solution which is to be
452+ * evaluated.
453+ *
454+ * @return The necessary update flags for the solution component
455+ * @p component that is required for this particle property.
456+ */
457+ virtual
458+ UpdateFlags
459+ get_update_flags (const unsigned int component) const ;
460+
437461 /* *
438462 * Return which data has to be provided to update all properties.
439463 * Note that particle properties can only ask for update_default
440464 * (no data), update_values (solution values), and update_gradients
441465 * (solution gradients). All other update flags will have no effect.
442466 *
443467 * @return The necessary update flags for this particle property.
468+ *
469+ * @deprecated This function is deprecated. Use the above version of
470+ * get_update_flags() instead.
444471 */
472+ DEAL_II_DEPRECATED
445473 virtual
446474 UpdateFlags
447475 get_needed_update_flags () const ;
@@ -624,9 +652,16 @@ namespace aspect
624652 * Note that particle properties can only ask for update_default
625653 * (no data), update_values (solution values), and update_gradients
626654 * (solution gradients). All other update flags will have no effect.
655+ * The result of this function is a combination of the
656+ * get_update_flags() functions of all individual properties
657+ * that are selected.
658+ *
659+ * @return A vector that contains the update flags that are
660+ * required to update all particle properties. The vector has as many entries
661+ * as there solution components.
627662 */
628- UpdateFlags
629- get_needed_update_flags () const ;
663+ std::vector< UpdateFlags>
664+ get_update_flags () const ;
630665
631666 /* *
632667 * Checks if the particle plugin specified by @p name exists
0 commit comments