#include <deal.II/base/vectorization.h>
#include <deal.II/matrix_free/hanging_nodes_internal.h>
+#include <deal.II/matrix_free/shape_info.h>
DEAL_II_NAMESPACE_OPEN
template <FEEvaluationImplHangingNodesRunnerTypes,
int dim,
int fe_degree,
- typename Number,
- bool is_face>
+ typename Number>
class FEEvaluationImplHangingNodesRunner;
- template <int dim, int fe_degree, typename Number, bool is_face>
+ template <int dim, int fe_degree, typename Number>
class FEEvaluationImplHangingNodesRunner<
FEEvaluationImplHangingNodesRunnerTypes::vectorized,
dim,
fe_degree,
- Number,
- is_face>
+ Number>
{
private:
template <int structdim, unsigned int direction, bool transpose>
public:
template <bool transpose>
static void
- run_internal(const unsigned int n_components,
- const FEEvaluationBaseData<dim,
- typename Number::value_type,
- is_face,
- Number> &fe_eval,
+ run_internal(const unsigned int n_components,
+ const MatrixFreeFunctions::ShapeInfo<Number> &shape_info,
const std::array<MatrixFreeFunctions::ConstraintKinds,
- Number::size()> & constraint_mask,
- Number * values)
+ Number::size()> & constraint_mask,
+ Number * values)
{
using Kinds = MatrixFreeFunctions::ConstraintKinds;
const unsigned int given_degree =
- fe_degree != -1 ? fe_degree :
- fe_eval.get_shape_info().data.front().fe_degree;
+ fe_degree != -1 ? fe_degree : shape_info.data.front().fe_degree;
const Number *DEAL_II_RESTRICT weights =
- fe_eval.get_shape_info()
- .data.front()
- .subface_interpolation_matrices[0]
- .data();
+ shape_info.data.front().subface_interpolation_matrices[0].data();
const unsigned int points = given_degree + 1;
- const unsigned int n_dofs =
- fe_eval.get_shape_info().dofs_per_component_on_cell;
+ const unsigned int n_dofs = shape_info.dofs_per_component_on_cell;
if (dim == 2)
{
template <typename T>
static inline const std::array<AlignedVector<interpolation_type>, 2> &
- get_interpolation_matrix(const T &fe_eval)
+ get_interpolation_matrix(const T &shape_info)
{
- return fe_eval.get_shape_info()
- .data.front()
- .subface_interpolation_matrices_scalar;
+ return shape_info.data.front().subface_interpolation_matrices_scalar;
}
static inline DEAL_II_ALWAYS_INLINE_RELEASE unsigned int
template <typename T>
static inline const std::array<AlignedVector<T1>, 2> &
- get_interpolation_matrix(const T &fe_eval)
+ get_interpolation_matrix(const T &shape_info)
{
- return fe_eval.get_shape_info()
- .data.front()
- .subface_interpolation_matrices;
+ return shape_info.data.front().subface_interpolation_matrices;
}
static inline DEAL_II_ALWAYS_INLINE_RELEASE bool
template <typename T>
static inline const std::array<AlignedVector<T1>, 2> &
- get_interpolation_matrix(const T &fe_eval)
+ get_interpolation_matrix(const T &shape_info)
{
- return fe_eval.get_shape_info()
- .data.front()
- .subface_interpolation_matrices;
+ return shape_info.data.front().subface_interpolation_matrices;
}
static inline DEAL_II_ALWAYS_INLINE_RELEASE bool
template <typename T>
static inline const std::array<AlignedVector<T1>, 2> &
- get_interpolation_matrix(const T &fe_eval)
+ get_interpolation_matrix(const T &shape_info)
{
- return fe_eval.get_shape_info()
- .data.front()
- .subface_interpolation_matrices;
+ return shape_info.data.front().subface_interpolation_matrices;
}
static inline DEAL_II_ALWAYS_INLINE_RELEASE bool
};
- template <int dim, int fe_degree, typename Number, bool is_face>
+ template <int dim, int fe_degree, typename Number>
class FEEvaluationImplHangingNodesRunner<
FEEvaluationImplHangingNodesRunnerTypes::scalar,
dim,
fe_degree,
- Number,
- is_face>
+ Number>
{
public:
static const VectorizationTypes VectorizationType =
public:
template <bool transpose>
static void
- run_internal(const unsigned int n_desired_components,
- const FEEvaluationBaseData<dim,
- typename Number::value_type,
- is_face,
- Number> &fe_eval,
+ run_internal(const unsigned int n_desired_components,
+ const MatrixFreeFunctions::ShapeInfo<Number> &shape_info,
const std::array<MatrixFreeFunctions::ConstraintKinds,
- Number::size()> & constraint_mask,
- Number * values)
+ Number::size()> & constraint_mask,
+ Number * values)
{
const unsigned int given_degree =
- fe_degree != -1 ? fe_degree :
- fe_eval.get_shape_info().data.front().fe_degree;
+ fe_degree != -1 ? fe_degree : shape_info.data.front().fe_degree;
const auto &interpolation_matrices =
- Trait<Number, VectorizationType>::get_interpolation_matrix(fe_eval);
+ Trait<Number, VectorizationType>::get_interpolation_matrix(shape_info);
const auto constraint_mask_sorted =
Trait<Number, VectorizationType>::create_mask(constraint_mask);
}
}
- values += fe_eval.get_shape_info().dofs_per_component_on_cell;
+ values += shape_info.dofs_per_component_on_cell;
}
}
};
- template <int dim, typename Number, bool is_face>
+ template <int dim, typename Number>
struct FEEvaluationImplHangingNodes
{
public:
template <int fe_degree, int n_q_points_1d>
static bool
- run(const unsigned int n_desired_components,
- const FEEvaluationBaseData<dim,
- typename Number::value_type,
- is_face,
- Number> &fe_eval,
- const bool transpose,
+ run(const unsigned int n_desired_components,
+ const MatrixFreeFunctions::ShapeInfo<Number> &shape_info,
+ const bool transpose,
const std::array<MatrixFreeFunctions::ConstraintKinds, Number::size()>
& c_mask,
Number *values)
FEEvaluationImplHangingNodesRunner<used_runner_type<fe_degree>(),
dim,
fe_degree,
- Number,
- is_face>;
+ Number>;
if (transpose)
RunnerType::template run_internal<true>(n_desired_components,
- fe_eval,
+ shape_info,
c_mask,
values);
else
RunnerType::template run_internal<false>(n_desired_components,
- fe_eval,
+ shape_info,
c_mask,
values);
typename VectorizedArrayType = VectorizedArray<Number>>
struct FEEvaluationHangingNodesFactory
{
- /**
- * For cells.
- */
static void
apply(const unsigned int n_components,
const unsigned int fe_degree,
- const FEEvaluationBaseData<dim, Number, false, VectorizedArrayType>
- & fe_eval,
- const bool transpose,
- const std::array<MatrixFreeFunctions::ConstraintKinds,
- VectorizedArrayType::size()> &c_mask,
- VectorizedArrayType * values);
-
- /**
- * For faces.
- *
- * @note Not implemented.
- */
- static void
- apply(const unsigned int n_components,
- const unsigned int fe_degree,
- const FEEvaluationBaseData<dim, Number, true, VectorizedArrayType>
- & fe_eval,
- const bool transpose,
+ const MatrixFreeFunctions::ShapeInfo<VectorizedArrayType> &shape_info,
+ const bool transpose,
const std::array<MatrixFreeFunctions::ConstraintKinds,
- VectorizedArrayType::size()> &c_mask,
- VectorizedArrayType * values);
+ VectorizedArrayType::size()> & c_mask,
+ VectorizedArrayType * values);
};
} // end of namespace internal
#include <deal.II/matrix_free/evaluation_kernels_hanging_nodes.h>
#include <deal.II/matrix_free/evaluation_template_factory.h>
#include <deal.II/matrix_free/evaluation_template_factory_internal.h>
-#include <deal.II/matrix_free/fe_evaluation_base_data.h>
+#include <deal.II/matrix_free/shape_info.h>
DEAL_II_NAMESPACE_OPEN
template <int dim, typename Number, typename VectorizedArrayType>
void
FEEvaluationHangingNodesFactory<dim, Number, VectorizedArrayType>::apply(
- const unsigned int n_components,
- const unsigned int fe_degree,
- const FEEvaluationBaseData<dim, Number, false, VectorizedArrayType>
- & fe_eval,
- const bool transpose,
+ const unsigned int n_components,
+ const unsigned int fe_degree,
+ const MatrixFreeFunctions::ShapeInfo<VectorizedArrayType> &shape_info,
+ const bool transpose,
const std::array<MatrixFreeFunctions::ConstraintKinds,
- VectorizedArrayType::size()> &c_mask,
- VectorizedArrayType * values)
+ VectorizedArrayType::size()> & c_mask,
+ VectorizedArrayType * values)
{
instantiation_helper_degree_run<
1,
- FEEvaluationImplHangingNodes<dim, VectorizedArrayType, false>>(
- fe_degree, n_components, fe_eval, transpose, c_mask, values);
- }
-
-
-
- template <int dim, typename Number, typename VectorizedArrayType>
- void
- FEEvaluationHangingNodesFactory<dim, Number, VectorizedArrayType>::apply(
- const unsigned int n_components,
- const unsigned int fe_degree,
- const FEEvaluationBaseData<dim, Number, true, VectorizedArrayType> &fe_eval,
- const bool transpose,
- const std::array<MatrixFreeFunctions::ConstraintKinds,
- VectorizedArrayType::size()> &c_mask,
- VectorizedArrayType * values)
- {
- instantiation_helper_degree_run<
- 1,
- FEEvaluationImplHangingNodes<dim, VectorizedArrayType, true>>(
- fe_degree, n_components, fe_eval, transpose, c_mask, values);
+ FEEvaluationImplHangingNodes<dim, VectorizedArrayType>>(
+ fe_degree, n_components, shape_info, transpose, c_mask, values);
}
} // end of namespace internal