* Struct to distinguish between the value and gradient types of different
* numbers of components used by the FlexibleEvaluator class.
*/
- template <int dim, int n_components, typename Number>
+ template <int dim,
+ int spacedim,
+ int n_components,
+ typename Number,
+ typename Enable = void>
struct EvaluatorTypeTraits
{
using ScalarNumber =
using vectorized_value_type =
Tensor<1, n_components, VectorizedArrayType>;
using gradient_type = Tensor<1, n_components, Tensor<1, dim, Number>>;
+ using real_gradient_type = std::conditional_t<
+ n_components == spacedim,
+ Tensor<2, spacedim, Number>,
+ Tensor<1, n_components, Tensor<1, spacedim, Number>>>;
using scalar_gradient_type =
Tensor<1, n_components, Tensor<1, dim, ScalarNumber>>;
using vectorized_gradient_type =
}
static void
- set_zero_gradient(gradient_type &value, const unsigned int vector_lane)
+ get_gradient(interface_vectorized_gradient_type &value,
+ const unsigned int vector_lane,
+ const DerivativeForm<1, dim, n_components, Number> &result)
{
for (unsigned int i = 0; i < n_components; ++i)
for (unsigned int d = 0; d < dim; ++d)
+ internal::VectorizedArrayTrait<Number>::get_from_vectorized(
+ value[d][i], vector_lane) = result[i][d];
+ }
+
+ static void
+ set_zero_gradient(real_gradient_type &value,
+ const unsigned int vector_lane)
+ {
+ for (unsigned int i = 0; i < n_components; ++i)
+ for (unsigned int d = 0; d < spacedim; ++d)
internal::VectorizedArrayTrait<Number>::get(value[i][d],
vector_lane) = 0.;
}
}
static void
- access(gradient_type &value,
- const unsigned int vector_lane,
- const unsigned int component,
- const Tensor<1, dim, ScalarNumber> &shape_gradient)
+ access(real_gradient_type &value,
+ const unsigned int vector_lane,
+ const unsigned int component,
+ const Tensor<1, spacedim, ScalarNumber> &shape_gradient)
{
- for (unsigned int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < spacedim; ++d)
internal::VectorizedArrayTrait<Number>::get(value[component][d],
vector_lane) +=
shape_gradient[d];
}
- static Tensor<1, dim, ScalarNumber>
- access(const gradient_type &value,
- const unsigned int vector_lane,
- const unsigned int component)
+ static Tensor<1, spacedim, ScalarNumber>
+ access(const real_gradient_type &value,
+ const unsigned int vector_lane,
+ const unsigned int component)
{
- Tensor<1, dim, ScalarNumber> result;
- for (unsigned int d = 0; d < dim; ++d)
+ Tensor<1, spacedim, ScalarNumber> result;
+ for (unsigned int d = 0; d < spacedim; ++d)
result[d] =
internal::VectorizedArrayTrait<Number>::get(value[component][d],
vector_lane);
}
};
- template <int dim, typename Number>
- struct EvaluatorTypeTraits<dim, 1, Number>
+ template <int dim, int spacedim, typename Number>
+ struct EvaluatorTypeTraits<dim, spacedim, 1, Number>
{
using ScalarNumber =
typename internal::VectorizedArrayTrait<Number>::value_type;
using scalar_value_type = ScalarNumber;
using vectorized_value_type = VectorizedArrayType;
using gradient_type = Tensor<1, dim, Number>;
+ using real_gradient_type = Tensor<1, spacedim, Number>;
using scalar_gradient_type = Tensor<1, dim, ScalarNumber>;
using vectorized_gradient_type = Tensor<1, dim, VectorizedArrayType>;
using interface_vectorized_gradient_type = vectorized_gradient_type;
}
static void
- set_zero_gradient(gradient_type &value, const unsigned int vector_lane)
+ set_zero_gradient(real_gradient_type &value,
+ const unsigned int vector_lane)
{
- for (unsigned int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < spacedim; ++d)
internal::VectorizedArrayTrait<Number>::get(value[d], vector_lane) =
0.;
}
}
static void
- access(gradient_type &value,
- const unsigned int vector_lane,
+ access(real_gradient_type &value,
+ const unsigned int vector_lane,
const unsigned int,
- const scalar_gradient_type &shape_gradient)
+ const Tensor<1, spacedim, ScalarNumber> &shape_gradient)
{
- for (unsigned int d = 0; d < dim; ++d)
+ for (unsigned int d = 0; d < spacedim; ++d)
internal::VectorizedArrayTrait<Number>::get(value[d], vector_lane) +=
shape_gradient[d];
}
- static scalar_gradient_type
- access(const gradient_type &value,
- const unsigned int vector_lane,
+ static Tensor<1, spacedim, ScalarNumber>
+ access(const real_gradient_type &value,
+ const unsigned int vector_lane,
const unsigned int)
{
- scalar_gradient_type result;
- for (unsigned int d = 0; d < dim; ++d)
+ Tensor<1, spacedim, ScalarNumber> result;
+ for (unsigned int d = 0; d < spacedim; ++d)
result[d] =
internal::VectorizedArrayTrait<Number>::get(value[d], vector_lane);
return result;
};
template <int dim, typename Number>
- struct EvaluatorTypeTraits<dim, dim, Number>
+ struct EvaluatorTypeTraits<dim,
+ dim,
+ dim,
+ Number,
+ std::enable_if_t<dim != 1>>
{
using ScalarNumber =
typename internal::VectorizedArrayTrait<Number>::value_type;
using scalar_value_type = Tensor<1, dim, ScalarNumber>;
using vectorized_value_type = Tensor<1, dim, VectorizedArrayType>;
using gradient_type = Tensor<2, dim, Number>;
+ using real_gradient_type = gradient_type;
using scalar_gradient_type = Tensor<2, dim, ScalarNumber>;
using vectorized_gradient_type = Tensor<2, dim, VectorizedArrayType>;
using interface_vectorized_gradient_type =
}
static void
- access(gradient_type &value,
+ access(real_gradient_type &value,
const unsigned int vector_lane,
const unsigned int component,
const Tensor<1, dim, ScalarNumber> &shape_gradient)
}
static Tensor<1, dim, ScalarNumber>
- access(const gradient_type &value,
- const unsigned int vector_lane,
- const unsigned int component)
+ access(const real_gradient_type &value,
+ const unsigned int vector_lane,
+ const unsigned int component)
{
Tensor<1, dim, ScalarNumber> result;
for (unsigned int d = 0; d < dim; ++d)
}
};
- template <typename Number>
- struct EvaluatorTypeTraits<1, 1, Number>
- {
- using ScalarNumber =
- typename internal::VectorizedArrayTrait<Number>::value_type;
- using VectorizedArrayType =
- typename dealii::internal::VectorizedArrayTrait<
- Number>::vectorized_value_type;
- using value_type = Number;
- using scalar_value_type = ScalarNumber;
- using vectorized_value_type = VectorizedArrayType;
- using gradient_type = Tensor<1, 1, Number>;
- using scalar_gradient_type = Tensor<1, 1, ScalarNumber>;
- using vectorized_gradient_type = Tensor<1, 1, VectorizedArrayType>;
- using interface_vectorized_gradient_type = vectorized_gradient_type;
-
- static void
- read_value(const ScalarNumber vector_entry,
- const unsigned int,
- scalar_value_type &result)
- {
- result = vector_entry;
- }
-
- static scalar_value_type
- sum_value(const scalar_value_type &result)
- {
- return result;
- }
-
- static scalar_value_type
- sum_value(const vectorized_value_type &result)
- {
- return result.sum();
- }
-
- static ScalarNumber
- sum_value(const unsigned int, const vectorized_value_type &result)
- {
- return result.sum();
- }
-
- static void
- set_gradient(const vectorized_gradient_type &value,
- const unsigned int vector_lane,
- scalar_gradient_type &result)
- {
- result[0] = value[0][vector_lane];
- }
-
- static void
- set_gradient(const vectorized_gradient_type &value,
- const unsigned int,
- vectorized_gradient_type &result)
- {
- result = value;
- }
-
- static void
- get_gradient(vectorized_gradient_type &value,
- const unsigned int vector_lane,
- const scalar_gradient_type &result)
- {
- value[0][vector_lane] = result[0];
- }
-
- static void
- get_gradient(vectorized_gradient_type &value,
- const unsigned int,
- const vectorized_gradient_type &result)
- {
- value = result;
- }
-
- static void
- set_zero_gradient(gradient_type &value, const unsigned int vector_lane)
- {
- internal::VectorizedArrayTrait<Number>::get(value[0], vector_lane) = 0.;
- }
-
- static void
- set_value(const vectorized_value_type &value,
- const unsigned int vector_lane,
- scalar_value_type &result)
- {
- result = value[vector_lane];
- }
-
- static void
- set_value(const vectorized_value_type &value,
- const unsigned int,
- vectorized_value_type &result)
- {
- result = value;
- }
-
- static void
- get_value(vectorized_value_type &value,
- const unsigned int vector_lane,
- const scalar_value_type &result)
- {
- value[vector_lane] = result;
- }
-
- static void
- get_value(vectorized_value_type &value,
- const unsigned int,
- const vectorized_value_type &result)
- {
- value = result;
- }
-
- static void
- set_zero_value(value_type &value, const unsigned int vector_lane)
- {
- internal::VectorizedArrayTrait<Number>::get(value, vector_lane) = 0.;
- }
-
- static void
- access(value_type &value,
- const unsigned int vector_lane,
- const unsigned int,
- const ScalarNumber &shape_value)
- {
- internal::VectorizedArrayTrait<Number>::get(value, vector_lane) +=
- shape_value;
- }
-
- static ScalarNumber
- access(const value_type &value,
- const unsigned int vector_lane,
- const unsigned int)
- {
- return internal::VectorizedArrayTrait<Number>::get(value, vector_lane);
- }
-
- static void
- access(gradient_type &value,
- const unsigned int vector_lane,
- const unsigned int,
- const scalar_gradient_type &shape_gradient)
- {
- internal::VectorizedArrayTrait<Number>::get(value[0], vector_lane) +=
- shape_gradient[0];
- }
-
- static scalar_gradient_type
- access(const gradient_type &value,
- const unsigned int vector_lane,
- const unsigned int)
- {
- scalar_gradient_type result;
- result[0] =
- internal::VectorizedArrayTrait<Number>::get(value[0], vector_lane);
- return result;
- }
- };
-
template <int dim, int spacedim>
bool
is_fast_path_supported(const FiniteElement<dim, spacedim> &fe,
using VectorizedArrayType = typename dealii::internal::VectorizedArrayTrait<
Number>::vectorized_value_type;
using ETT = typename internal::FEPointEvaluation::
- EvaluatorTypeTraits<dim, n_components, Number>;
+ EvaluatorTypeTraits<dim, spacedim, n_components, Number>;
using value_type = typename ETT::value_type;
using scalar_value_type = typename ETT::scalar_value_type;
using vectorized_value_type = typename ETT::vectorized_value_type;
- using gradient_type = typename ETT::gradient_type;
+ using gradient_type = typename ETT::real_gradient_type;
using interface_vectorized_gradient_type =
typename ETT::interface_vectorized_gradient_type;
* objects, this parameter allows to select a range of `n_components`
* components starting from this parameter.
*/
- FEPointEvaluationBase(const Mapping<dim> &mapping,
- const FiniteElement<dim> &fe,
- const UpdateFlags update_flags,
- const unsigned int first_selected_component = 0);
+ FEPointEvaluationBase(const Mapping<dim, spacedim> &mapping,
+ const FiniteElement<dim, spacedim> &fe,
+ const UpdateFlags update_flags,
+ const unsigned int first_selected_component = 0);
/**
* Constructor to make the present class able to re-use the geometry
*/
FEPointEvaluationBase(
NonMatching::MappingInfo<dim, spacedim, Number> &mapping_info,
- const FiniteElement<dim> &fe,
+ const FiniteElement<dim, spacedim> &fe,
const unsigned int first_selected_component = 0,
const bool is_interior = true);
/**
* Pointer to the FiniteElement object passed to the constructor.
*/
- SmartPointer<const FiniteElement<dim>> fe;
+ SmartPointer<const FiniteElement<dim, spacedim>> fe;
/**
* Description of the 1d polynomial basis for tensor product elements used
using VectorizedArrayType = typename dealii::internal::VectorizedArrayTrait<
Number>::vectorized_value_type;
using ETT = typename internal::FEPointEvaluation::
- EvaluatorTypeTraits<dim, n_components, Number>;
+ EvaluatorTypeTraits<dim, spacedim, n_components, Number>;
using value_type = typename ETT::value_type;
using scalar_value_type = typename ETT::scalar_value_type;
using vectorized_value_type = typename ETT::vectorized_value_type;
- using gradient_type = typename ETT::gradient_type;
+ using unit_gradient_type = typename ETT::gradient_type;
+ using gradient_type = typename ETT::real_gradient_type;
using interface_vectorized_gradient_type =
typename ETT::interface_vectorized_gradient_type;
* objects, this parameter allows to select a range of `n_components`
* components starting from this parameter.
*/
- FEPointEvaluation(const Mapping<dim> &mapping,
- const FiniteElement<dim> &fe,
- const UpdateFlags update_flags,
- const unsigned int first_selected_component = 0);
+ FEPointEvaluation(const Mapping<dim, spacedim> &mapping,
+ const FiniteElement<dim, spacedim> &fe,
+ const UpdateFlags update_flags,
+ const unsigned int first_selected_component = 0);
/**
* Constructor to make the present class able to re-use the geometry
*/
FEPointEvaluation(
NonMatching::MappingInfo<dim, spacedim, Number> &mapping_info,
- const FiniteElement<dim> &fe,
+ const FiniteElement<dim, spacedim> &fe,
const unsigned int first_selected_component = 0);
/**
using VectorizedArrayType = typename dealii::internal::VectorizedArrayTrait<
Number>::vectorized_value_type;
using ETT = typename internal::FEPointEvaluation::
- EvaluatorTypeTraits<dim, n_components, Number>;
+ EvaluatorTypeTraits<dim, spacedim, n_components, Number>;
using value_type = typename ETT::value_type;
using scalar_value_type = typename ETT::scalar_value_type;
using vectorized_value_type = typename ETT::vectorized_value_type;
- using gradient_type = typename ETT::gradient_type;
+ using unit_gradient_type = typename ETT::gradient_type;
+ using gradient_type = typename ETT::real_gradient_type;
using interface_vectorized_gradient_type =
typename ETT::interface_vectorized_gradient_type;
*/
FEFacePointEvaluation(
NonMatching::MappingInfo<dim, spacedim, Number> &mapping_info,
- const FiniteElement<dim> &fe,
+ const FiniteElement<dim, spacedim> &fe,
const bool is_interior = true,
const unsigned int first_selected_component = 0);
const bool sum_into_values);
};
+
+
// ----------------------- template and inline function ----------------------
template <int n_components_, int dim, int spacedim, typename Number>
FEPointEvaluationBase<n_components_, dim, spacedim, Number>::
- FEPointEvaluationBase(const Mapping<dim> &mapping,
- const FiniteElement<dim> &fe,
- const UpdateFlags update_flags,
- const unsigned int first_selected_component)
+ FEPointEvaluationBase(const Mapping<dim, spacedim> &mapping,
+ const FiniteElement<dim, spacedim> &fe,
+ const UpdateFlags update_flags,
+ const unsigned int first_selected_component)
: n_q_batches(numbers::invalid_unsigned_int)
, n_q_points(numbers::invalid_unsigned_int)
, n_q_points_scalar(numbers::invalid_unsigned_int)
FEPointEvaluationBase<n_components_, dim, spacedim, Number>::
FEPointEvaluationBase(
NonMatching::MappingInfo<dim, spacedim, Number> &mapping_info,
- const FiniteElement<dim> &fe,
+ const FiniteElement<dim, spacedim> &fe,
const unsigned int first_selected_component,
const bool is_interior)
: n_q_batches(numbers::invalid_unsigned_int)
template <int n_components_, int dim, int spacedim, typename Number>
FEPointEvaluationBase<n_components_, dim, spacedim, Number>::
- FEPointEvaluationBase(
- FEPointEvaluationBase<n_components_, dim, spacedim, Number>
- &&other) noexcept
+ FEPointEvaluationBase(FEPointEvaluationBase &&other) noexcept
: n_q_batches(other.n_q_batches)
, n_q_points(other.n_q_points)
, n_q_points_scalar(other.n_q_points_scalar)
template <int n_components_, int dim, int spacedim, typename Number>
FEPointEvaluation<n_components_, dim, spacedim, Number>::FEPointEvaluation(
NonMatching::MappingInfo<dim, spacedim, Number> &mapping_info,
- const FiniteElement<dim> &fe,
+ const FiniteElement<dim, spacedim> &fe,
const unsigned int first_selected_component)
: FEPointEvaluationBase<n_components_, dim, spacedim, Number>(
mapping_info,
template <int n_components_, int dim, int spacedim, typename Number>
FEPointEvaluation<n_components_, dim, spacedim, Number>::FEPointEvaluation(
- const Mapping<dim> &mapping,
- const FiniteElement<dim> &fe,
- const UpdateFlags update_flags,
- const unsigned int first_selected_component)
+ const Mapping<dim, spacedim> &mapping,
+ const FiniteElement<dim, spacedim> &fe,
+ const UpdateFlags update_flags,
+ const unsigned int first_selected_component)
: FEPointEvaluationBase<n_components_, dim, spacedim, Number>(
mapping,
fe,
v < stride && (stride == 1 || offset < this->n_q_points_scalar);
++v, ++offset)
{
- gradient_type unit_gradient;
+ unit_gradient_type unit_gradient;
ETT::set_gradient(gradient, v, unit_gradient);
this->gradients[offset] =
this->cell_type <=
internal::MatrixFreeFunctions::GeometryType::cartesian ?
- apply_diagonal_transformation(this->inverse_jacobian_ptr[0],
- unit_gradient) :
+ apply_diagonal_transformation(
+ this->inverse_jacobian_ptr[0].transpose(), unit_gradient) :
apply_transformation(
this
->inverse_jacobian_ptr[this->cell_type <=
v < stride && (stride == 1 || offset < this->n_q_points_scalar);
++v, ++offset)
{
- const auto grad_w =
+ const gradient_type grad_w =
do_JxW ? this->gradients[offset] * this->JxW_ptr[offset] :
this->gradients[offset];
ETT::get_gradient(
FEFacePointEvaluation<n_components_, dim, spacedim, Number>::
FEFacePointEvaluation(
NonMatching::MappingInfo<dim, spacedim, Number> &mapping_info,
- const FiniteElement<dim> &fe,
+ const FiniteElement<dim, spacedim> &fe,
const bool is_interior,
const unsigned int first_selected_component)
: FEPointEvaluationBase<n_components_, dim, spacedim, Number>(
v < stride && (stride == 1 || offset < this->n_q_points_scalar);
++v, ++offset)
{
- gradient_type unit_gradient;
+ unit_gradient_type unit_gradient;
ETT::set_gradient(gradient, v, unit_gradient);
this->gradients[offset] =
this->cell_type <=
internal::MatrixFreeFunctions::GeometryType::cartesian ?
- apply_diagonal_transformation(this->inverse_jacobian_ptr[0],
- unit_gradient) :
+ apply_diagonal_transformation(
+ this->inverse_jacobian_ptr[0].transpose(), unit_gradient) :
apply_transformation(
this
->inverse_jacobian_ptr[this->cell_type <=
- template <int dim>
+ template <int dim, int spacedim>
void
get_element_type_specific_information(
- const FiniteElement<dim, dim> &fe_in,
- const FiniteElement<dim, dim> &fe,
- const unsigned int base_element_number,
- ElementType &element_type,
- std::vector<unsigned int> &scalar_lexicographic,
- std::vector<unsigned int> &lexicographic_numbering)
+ const FiniteElement<dim, spacedim> &fe_in,
+ const FiniteElement<dim, spacedim> &fe,
+ const unsigned int base_element_number,
+ ElementType &element_type,
+ std::vector<unsigned int> &scalar_lexicographic,
+ std::vector<unsigned int> &lexicographic_numbering)
{
element_type = tensor_general;
- const auto fe_poly = dynamic_cast<const FE_Poly<dim, dim> *>(&fe);
+ const auto fe_poly = dynamic_cast<const FE_Poly<dim, spacedim> *>(&fe);
- if (dynamic_cast<const FE_SimplexPoly<dim, dim> *>(&fe) != nullptr ||
- dynamic_cast<const FE_WedgePoly<dim, dim> *>(&fe) != nullptr ||
- dynamic_cast<const FE_PyramidPoly<dim, dim> *>(&fe) != nullptr)
+ if (dynamic_cast<const FE_SimplexPoly<dim, spacedim> *>(&fe) != nullptr ||
+ dynamic_cast<const FE_WedgePoly<dim, spacedim> *>(&fe) != nullptr ||
+ dynamic_cast<const FE_PyramidPoly<dim, spacedim> *>(&fe) != nullptr)
{
scalar_lexicographic.resize(fe.n_dofs_per_cell());
for (unsigned int i = 0; i < scalar_lexicographic.size(); ++i)
Polynomials::PiecewisePolynomial<double>> *>(
&fe_poly->get_poly_space()) != nullptr))
scalar_lexicographic = fe_poly->get_poly_space_numbering_inverse();
- else if (const auto fe_dgp = dynamic_cast<const FE_DGP<dim> *>(&fe))
+ else if (const auto fe_dgp =
+ dynamic_cast<const FE_DGP<dim, spacedim> *>(&fe))
{
scalar_lexicographic.resize(fe_dgp->n_dofs_per_cell());
for (unsigned int i = 0; i < fe_dgp->n_dofs_per_cell(); ++i)
scalar_lexicographic[i] = i;
element_type = truncated_tensor;
}
- else if (const auto fe_q_dg0 = dynamic_cast<const FE_Q_DG0<dim> *>(&fe))
+ else if (const auto fe_q_dg0 =
+ dynamic_cast<const FE_Q_DG0<dim, spacedim> *>(&fe))
{
scalar_lexicographic = fe_q_dg0->get_poly_space_numbering_inverse();
element_type = tensor_symmetric_plus_dg0;
Assert(fe_name[template_starts + 1] ==
(dim == 1 ? '1' : (dim == 2 ? '2' : '3')),
ExcInternalError());
- fe_name[template_starts + 1] = std::to_string(dim_to).c_str()[0];
+ fe_name[template_starts + 1] = std::to_string(dim_to)[0];
}
return FETools::get_fe_by_name<dim_to, dim_to>(fe_name);
}
const FiniteElement<dim, spacedim> &fe_in,
const unsigned int base_element_number)
{
- static_assert(dim == spacedim,
- "Currently, only the case dim=spacedim is implemented");
-
// ShapeInfo for RT elements. Here, data is of size 2 instead of 1.
// data[0] is univariate_shape_data in normal direction and
// data[1] is univariate_shape_data in tangential direction
const auto quad = quad_in.get_tensor_basis()[0];
- const FiniteElement<dim> &fe =
+ const FiniteElement<dim, spacedim> &fe =
fe_in.base_element(base_element_number);
n_dimensions = dim;
n_components = fe_in.n_components();
return;
}
else if (quad_in.is_tensor_product() == false ||
- dynamic_cast<const FE_SimplexPoly<dim, dim> *>(
+ dynamic_cast<const FE_SimplexPoly<dim, spacedim> *>(
&fe_in.base_element(base_element_number)) != nullptr ||
- dynamic_cast<const FE_WedgePoly<dim, dim> *>(
+ dynamic_cast<const FE_WedgePoly<dim, spacedim> *>(
&fe_in.base_element(base_element_number)) != nullptr ||
- dynamic_cast<const FE_PyramidPoly<dim, dim> *>(
+ dynamic_cast<const FE_PyramidPoly<dim, spacedim> *>(
&fe_in.base_element(base_element_number)) != nullptr)
{
// specialization for arbitrary finite elements and quadrature rules
const auto quad = quad_in.get_tensor_basis()[0];
- const FiniteElement<dim> &fe = fe_in.base_element(base_element_number);
- n_dimensions = dim;
- n_components = fe_in.n_components();
+ const FiniteElement<dim, spacedim> &fe =
+ fe_in.base_element(base_element_number);
+ n_dimensions = dim;
+ n_components = fe_in.n_components();
Assert(fe.n_components() == 1,
ExcMessage("FEEvaluation only works for scalar finite elements."));
scalar_lexicographic,
0);
- if (dim > 1 && (dynamic_cast<const FE_Q<dim> *>(&fe) ||
- dynamic_cast<const FE_Q_iso_Q1<dim> *>(&fe)))
+ if (dim > 1 && (dynamic_cast<const FE_Q<dim, spacedim> *>(&fe) ||
+ dynamic_cast<const FE_Q_iso_Q1<dim, spacedim> *>(&fe)))
{
auto &subface_interpolation_matrix_0 =
univariate_shape_data.subface_interpolation_matrices[0];
subface_interpolation_matrix_scalar_0.resize(nn * nn);
subface_interpolation_matrix_scalar_1.resize(nn * nn);
- const bool is_feq = dynamic_cast<const FE_Q<dim> *>(&fe) != nullptr;
+ const bool is_feq =
+ dynamic_cast<const FE_Q<dim, spacedim> *>(&fe) != nullptr;
std::vector<Point<1>> fe_q_points =
is_feq ? QGaussLobatto<1>(nn).get_points() :
if (element_type == tensor_general &&
univariate_shape_data.check_and_set_shapes_symmetric())
{
- if (dynamic_cast<const FE_Q_iso_Q1<dim> *>(&fe) &&
+ if (dynamic_cast<const FE_Q_iso_Q1<dim, spacedim> *>(&fe) &&
fe.tensor_degree() > 1)
element_type = tensor_symmetric_no_collocation;
else if (univariate_shape_data.check_shapes_collocation())
bool
ShapeInfo<Number>::is_supported(const FiniteElement<dim, spacedim> &fe)
{
- if (dim != spacedim)
- return false;
-
if (dynamic_cast<const FE_RaviartThomasNodal<dim> *>(&fe))
return true;
dynamic_cast<const FE_Poly<dim, spacedim> *>(fe_ptr);
// Simplices are a special case since the polynomial family is not
// indicative of their support
- if (dynamic_cast<const FE_SimplexPoly<dim, dim> *>(fe_poly_ptr) !=
- nullptr ||
- dynamic_cast<const FE_WedgePoly<dim, dim> *>(fe_poly_ptr) !=
- nullptr ||
- dynamic_cast<const FE_PyramidPoly<dim, dim> *>(fe_poly_ptr) !=
- nullptr)
+ if (dynamic_cast<const FE_SimplexPoly<dim, spacedim> *>(
+ fe_poly_ptr) != nullptr ||
+ dynamic_cast<const FE_WedgePoly<dim, spacedim> *>(
+ fe_poly_ptr) != nullptr ||
+ dynamic_cast<const FE_PyramidPoly<dim, spacedim> *>(
+ fe_poly_ptr) != nullptr)
return true;
if (dynamic_cast<const TensorProductPolynomials<