*/
FEPointEvaluationBase(FEPointEvaluationBase &&other) noexcept;
- /**
- * Destructor.
- */
- ~FEPointEvaluationBase();
-
public:
/**
* Return the value at quadrature point number @p point_index after a call to
bool fast_path;
/**
- * Connection to NonMatching::MappingInfo to check whether mapping data
- * has been invalidated.
+ * Bool indicating if class needs to call reinit() inside
+ * evaluate()/integrate() functions, which is the case when the present
+ * class does not own the MappingInfo object but shares evaluation points
+ * with another object.
*/
- boost::signals2::connection connection_is_reinitialized;
-
- /**
- * Bool indicating if class is reinitialized and data vectors a resized.
- */
- bool is_reinitialized;
+ bool must_reinitialize_pointers;
/**
* Vector containing tensor product shape functions evaluated (during
, mapping_info(mapping_info_on_the_fly.get())
, current_cell_index(numbers::invalid_unsigned_int)
, current_face_number(numbers::invalid_unsigned_int)
- , is_reinitialized(false)
+ , must_reinitialize_pointers(false)
, is_interior(true)
{
setup(first_selected_component);
, mapping_info(&mapping_info)
, current_cell_index(numbers::invalid_unsigned_int)
, current_face_number(numbers::invalid_unsigned_int)
- , is_reinitialized(false)
+ , must_reinitialize_pointers(true)
, is_interior(is_interior)
{
setup(first_selected_component);
- connection_is_reinitialized = mapping_info.connect_is_reinitialized(
- [this]() { this->is_reinitialized = false; });
}
, current_cell_index(other.current_cell_index)
, current_face_number(other.current_face_number)
, fast_path(other.fast_path)
- , is_reinitialized(false)
+ , must_reinitialize_pointers(true)
, is_interior(other.is_interior)
-{
- connection_is_reinitialized = mapping_info->connect_is_reinitialized(
- [this]() { this->is_reinitialized = false; });
-}
+{}
, current_cell_index(other.current_cell_index)
, current_face_number(other.current_face_number)
, fast_path(other.fast_path)
- , is_reinitialized(false)
+ , must_reinitialize_pointers(other.must_reinitialize_pointers)
, is_interior(other.is_interior)
-{
- connection_is_reinitialized = mapping_info->connect_is_reinitialized(
- [this]() { this->is_reinitialized = false; });
-}
-
-
-
-template <int n_components_, int dim, int spacedim, typename Number>
-FEPointEvaluationBase<n_components_, dim, spacedim, Number>::
- ~FEPointEvaluationBase()
-{
- connection_is_reinitialized.disconnect();
-}
+{}
}
if (n_q_points == 0)
- {
- is_reinitialized = true;
- return;
- }
+ return;
// set unit point pointer
const unsigned int unit_point_offset =
}
}
}
-
- is_reinitialized = true;
}
ExcNotImplemented());
this->mapping_info->reinit(cell, unit_points);
+ this->must_reinitialize_pointers = false;
if (!this->fast_path)
{
FEPointEvaluation<n_components_, dim, spacedim, Number>::reinit(
const unsigned int cell_index)
{
- this->current_cell_index = cell_index;
- this->current_face_number = numbers::invalid_unsigned_int;
+ this->current_cell_index = cell_index;
+ this->current_face_number = numbers::invalid_unsigned_int;
+ this->must_reinitialize_pointers = false;
if (this->use_linear_path)
this->template do_reinit<false, true>();
const StridedArrayView<const ScalarNumber, stride_view> &solution_values,
const EvaluationFlags::EvaluationFlags &evaluation_flags)
{
- if (!this->is_reinitialized)
+ if (this->must_reinitialize_pointers)
reinit();
if (this->n_q_points == 0)
const EvaluationFlags::EvaluationFlags &integration_flags,
const bool sum_into_values)
{
- if (!this->is_reinitialized)
+ if (this->must_reinitialize_pointers)
reinit();
Assert(!(integration_flags & EvaluationFlags::hessians), ExcNotImplemented());
const unsigned int cell_index,
const unsigned int face_number)
{
- this->current_cell_index = cell_index;
- this->current_face_number = face_number;
+ this->current_cell_index = cell_index;
+ this->current_face_number = face_number;
+ this->must_reinitialize_pointers = false;
if (this->use_linear_path)
this->template do_reinit<true, true>();
this->current_cell_index = face_index;
this->current_face_number =
this->mapping_info->get_face_number(face_index, this->is_interior);
+ this->must_reinitialize_pointers = false;
if (this->use_linear_path)
this->template do_reinit<true, true>();
const StridedArrayView<const ScalarNumber, stride_view> &solution_values,
const EvaluationFlags::EvaluationFlags &evaluation_flags)
{
- Assert(this->is_reinitialized, ExcMessage("Is not reinitialized!"));
+ Assert(!this->must_reinitialize_pointers,
+ ExcMessage("Object has not been reinitialized!"));
if (this->n_q_points == 0)
return;
const EvaluationFlags::EvaluationFlags &integration_flags,
const bool sum_into_values)
{
- Assert(this->is_reinitialized, ExcMessage("Is not reinitialized!"));
+ Assert(!this->must_reinitialize_pointers,
+ ExcMessage("Object has not been reinitialized!"));
Assert(!(integration_flags & EvaluationFlags::hessians), ExcNotImplemented());
const EvaluationFlags::EvaluationFlags &integration_flags,
const bool sum_into_values)
{
- Assert(this->is_reinitialized, ExcMessage("Is not reinitialized!"));
+ Assert(!this->must_reinitialize_pointers,
+ ExcMessage("Object has not been reinitialized!"));
Assert(!(integration_flags & EvaluationFlags::hessians), ExcNotImplemented());
UpdateFlags
get_update_flags_mapping() const;
- /**
- * Connects to is_reinitialized().
- */
- boost::signals2::connection
- connect_is_reinitialized(const std::function<void()> &set_is_reinitialized);
-
/**
* Compute the geometry index offset of the current cell/face.
*/
*/
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;
-
/**
* Reference to the triangulation passed via the cells to the
* reinit functions. This field is only set if
compressed_data_index_offsets.push_back(0);
state = State::single_cell;
- is_reinitialized();
}
}
state = State::cell_vector;
- is_reinitialized();
}
}
state = State::faces_on_cells_in_vector;
- is_reinitialized();
}
}
state = State::face_vector;
- is_reinitialized();
}
- template <int dim, int spacedim, typename Number>
- boost::signals2::connection
- MappingInfo<dim, spacedim, Number>::connect_is_reinitialized(
- const std::function<void()> &set_is_reinitialized)
- {
- return is_reinitialized.connect(set_is_reinitialized);
- }
-
-
-
template <int dim, int spacedim, typename Number>
std::size_t
MappingInfo<dim, spacedim, Number>::memory_consumption() const