* @param first_selected_component For multi-component FiniteElement
* objects, this parameter allows to select a range of `n_components`
* components starting from this parameter.
+ *
+ * @param lexicographic_numbering If this class is used together with
+ * FEEvaluation this parameter should be set to 'true' because FEEvaluation
+ * stores the DoF values internally always in lexicographic numbering.
+ * Otherwise, the numbering detected from the FiniteElement passed to this
+ * class will be used (which is lexicographic for e.g. FE_DGQ but hierarchic
+ * for FE_Q).
*/
FEPointEvaluation(const Mapping<dim, spacedim> &mapping,
const FiniteElement<dim, spacedim> &fe,
const UpdateFlags update_flags,
- const unsigned int first_selected_component = 0);
+ const unsigned int first_selected_component = 0,
+ const bool lexicographic_numbering = false);
/**
* Constructor to make the present class able to re-use the geometry
* @param first_selected_component For multi-component FiniteElement
* objects, this parameter allows to select a range of `n_components`
* components starting from this parameter.
+ *
+ * @param lexicographic_numbering If this class is used together with
+ * FEEvaluation this parameter should be set to 'true' because FEEvaluation
+ * stores the DoF values internally always in lexicographic numbering.
+ * Otherwise, the numbering detected from the FiniteElement passed to this
+ * class will be used (which is lexicographic for e.g. FE_DGQ but hierarchic
+ * for FE_Q).
*/
FEPointEvaluation(
const NonMatching::MappingInfo<dim, spacedim, Number> &mapping_info,
const FiniteElement<dim, spacedim> &fe,
- const unsigned int first_selected_component = 0);
+ const unsigned int first_selected_component = 0,
+ const bool lexicographic_numbering = false);
/**
* Set up the mapping information for the given cell, e.g., by computing the
static constexpr std::size_t stride =
internal::VectorizedArrayTrait<Number>::stride();
+ const bool lexicographic_numbering;
+
/**
* Resizes necessary data fields, reads in and renumbers solution values.
* Interpolates onto face if face path is selected.
FEPointEvaluation<n_components_, dim, spacedim, Number>::FEPointEvaluation(
const NonMatching::MappingInfo<dim, spacedim, Number> &mapping_info,
const FiniteElement<dim, spacedim> &fe,
- const unsigned int first_selected_component)
+ const unsigned int first_selected_component,
+ const bool lexicographic_numbering)
: FEPointEvaluationBase<n_components_, dim, spacedim, Number>(
mapping_info,
fe,
first_selected_component)
+ , lexicographic_numbering(lexicographic_numbering || this->renumber.empty())
{}
const Mapping<dim, spacedim> &mapping,
const FiniteElement<dim, spacedim> &fe,
const UpdateFlags update_flags,
- const unsigned int first_selected_component)
+ const unsigned int first_selected_component,
+ const bool lexicographic_numbering)
: FEPointEvaluationBase<n_components_, dim, spacedim, Number>(
mapping,
fe,
update_flags,
first_selected_component)
+ , lexicographic_numbering(lexicographic_numbering || this->renumber.empty())
{}
const std::size_t offset =
(this->component_in_base_element + comp) * dofs_per_comp;
- if ((is_linear && n_components == 1) || this->renumber.empty())
+ if ((is_linear && n_components == 1) || lexicographic_numbering)
{
for (unsigned int i = 0; i < dofs_per_comp; ++i)
ETT::read_value(solution_values[i + offset],
const std::size_t offset =
(this->component_in_base_element + comp) * dofs_per_comp;
- if (is_linear || this->renumber.empty())
+ if (is_linear || lexicographic_numbering)
{
for (unsigned int i = 0; i < dofs_per_comp; ++i)
if (sum_into_values)