reinit(const typename Triangulation<dim, spacedim>::cell_iterator &cell,
const ArrayView<const Point<dim>> &unit_points);
+ /**
+ * Reinitialize the evaluator to point to the correct precomputed mapping of
+ * the single cell in the MappingInfo object.
+ */
+ void
+ reinit();
+
/**
* Reinitialize the evaluator to point to the correct precomputed mapping of
* the cell in the MappingInfo object.
, is_reinitialized(false)
{
setup(first_selected_component);
- mapping_info.is_reinitialized.connect(
+ mapping_info.connect_is_reinitialized(
[this]() { this->is_reinitialized = false; });
}
+template <int n_components, int dim, int spacedim, typename Number>
+void
+FEPointEvaluation<n_components, dim, spacedim, Number>::reinit()
+{
+ current_cell_index = numbers::invalid_unsigned_int;
+ current_face_number = numbers::invalid_unsigned_int;
+
+ do_reinit();
+}
+
+
+
template <int n_components, int dim, int spacedim, typename Number>
void
FEPointEvaluation<n_components, dim, spacedim, Number>::reinit(
const EvaluationFlags::EvaluationFlags &evaluation_flag)
{
if (!is_reinitialized)
- reinit(numbers::invalid_unsigned_int);
+ reinit();
if (n_q_points == 0)
return;
const ArrayView<Number> & solution_values,
const EvaluationFlags::EvaluationFlags &integration_flags)
{
+ if (!is_reinitialized)
+ reinit();
+
if (n_q_points == 0) // no evaluation points provided
{
std::fill(solution_values.begin(), solution_values.end(), 0.0);
UpdateFlags
get_update_flags() const;
- /**
- * This signal is triggered right after
- * this object is reinitialized, to let dependent
- * objects know that they need to reinitialize as well.
- */
- boost::signals2::signal<void()> is_reinitialized;
+ /**
+ * Connects to is_reinitialized().
+ */
+ boost::signals2::connection
+ connect_is_reinitialized(const std::function<void()> &set_is_reinitialized);
private:
/**
* A bool that determines weather cell index compression should be done.
*/
bool do_cell_index_compression;
+
+ /**
+ * This signal is triggered right after this object is reinitialized, to let
+ * dependent objects know that they need to reinitialize as well.
+ */
+ boost::signals2::signal<void()> is_reinitialized;
};
// ----------------------- template functions ----------------------
mapping_data[0]);
state = State::single_cell;
-
is_reinitialized();
}
+ template <int dim, int spacedim>
+ boost::signals2::connection
+ MappingInfo<dim, spacedim>::connect_is_reinitialized(
+ const std::function<void()> &set_is_reinitialized)
+ {
+ return is_reinitialized.connect(set_is_reinitialized);
+ }
+
+
+
template <int dim, int spacedim>
void
MappingInfo<dim, spacedim>::compute_mapping_data_for_generic_points(