/**
* Initialize the object's member variables related to cell data
* based on the given arguments.
+ *
+ * The function also calls compute_shape_function_values() to
+ * actually set the member variables related to the values and
+ * derivatives of the mapping shape functions.
*/
void
initialize (const UpdateFlags update_flags,
/**
* Initialize the object's member variables related to cell and
- * face data based on the given arguments.
+ * face data based on the given arguments. In order to initialize
+ * cell data, this function calls initialize().
*/
void
initialize_face (const UpdateFlags update_flags,
*
* Which values, derivatives, or higher order derivatives are
* computed is determined by which of the member arrays have
- * nonzero sizes. They is typically set to their appropriate sizes
- * by the initialize() and initialize_face() functions.
+ * nonzero sizes. They are typically set to their appropriate
+ * sizes by the initialize() and initialize_face() functions,
+ * which indeed call this function internally. However, it is
+ * possible (and at times useful) to do the resizing by hand and
+ * then call this function directly. An example is in a Newton
+ * iteration where we update the location of a quadrature point
+ * (e.g., in MappingQ::transform_real_to_uni_cell()) and need to
+ * re-compute the mapping and its derivatives at this location,
+ * but have already sized all internal arrays correctly.
*/
void compute_shape_function_values (const std::vector<Point<dim> > &unit_points);
quadrature.size())));
tasks.join_all ();
- // TODO: parallelize this as well
- data->compute_shape_function_values (quadrature.get_points());
- if (!use_mapping_q_on_all_cells)
- data->mapping_q1_data.compute_shape_function_values (quadrature.get_points());
-
-
return data;
}
quadrature.size())));
tasks.join_all ();
- // TODO: parallelize this as well
- data->compute_shape_function_values (q.get_points());
- if (!use_mapping_q_on_all_cells)
- data->mapping_q1_data.compute_shape_function_values (q.get_points());
-
return data;
}
quadrature.size())));
tasks.join_all ();
- // TODO: parallelize this as well
- data->compute_shape_function_values (q.get_points());
- if (!use_mapping_q_on_all_cells)
- data->mapping_q1_data.compute_shape_function_values (q.get_points());
-
-
return data;
}
if (this->update_each &
(update_jacobian_3rd_derivatives | update_jacobian_pushed_forward_3rd_derivatives) )
shape_fourth_derivatives.resize(n_shape_functions * n_q_points);
+
+ // now also fill the various fields with their correct values
+ compute_shape_function_values (q.get_points());
}
+
template <int dim, int spacedim>
void
MappingQ1<dim,spacedim>::InternalData::
{
InternalData *data = new InternalData(1);
data->initialize (requires_update_flags(update_flags), q, q.size());
- data->compute_shape_function_values (q.get_points());
return data;
}
data->initialize_face (requires_update_flags(update_flags),
QProjector<dim>::project_to_all_faces(quadrature),
quadrature.size());
- data->compute_shape_function_values (QProjector<dim>::project_to_all_faces(quadrature).get_points());
return data;
}
data->initialize_face (requires_update_flags(update_flags),
QProjector<dim>::project_to_all_subfaces(quadrature),
quadrature.size());
- data->compute_shape_function_values (QProjector<dim>::project_to_all_subfaces(quadrature).get_points());
-
return data;
}