]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Introduce three new FEEvaluation functions 11803/head
authorPeter Munch <peterrmuench@gmail.com>
Wed, 24 Feb 2021 20:56:20 +0000 (21:56 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Thu, 25 Feb 2021 09:37:17 +0000 (10:37 +0100)
include/deal.II/matrix_free/fe_evaluation.h

index 113096fedbf5d6945783aa745d80c2ce7050cb5c..d5c312b6fc5202d0263a309df8a05f5df9f4690e 100644 (file)
@@ -138,6 +138,12 @@ public:
   const internal::MatrixFreeFunctions::ShapeInfo<VectorizedArrayType> &
   get_shape_info() const;
 
+  /**
+   * Return a reference to the DoFInfo object currently in use.
+   */
+  const internal::MatrixFreeFunctions::DoFInfo &
+  get_dof_info() const;
+
   /**
    * Return the determinant of the Jacobian from the unit to the real cell
    * times the quadrature weight.
@@ -270,6 +276,12 @@ public:
   unsigned int
   get_active_quadrature_index() const;
 
+  /**
+   * Return the underlying MatrixFree object.
+   */
+  const MatrixFree<dim, Number, VectorizedArrayType> &
+  get_matrix_free() const;
+
 protected:
   /**
    * Constructor. Made protected to prevent users from directly using this
@@ -1107,6 +1119,12 @@ public:
 
   //@}
 
+  /**
+   * Return the first selected component.
+   */
+  unsigned int
+  get_first_selected_component() const;
+
 protected:
   /**
    * Constructor. Made protected to prevent users from directly using this
@@ -3610,6 +3628,19 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
+template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+inline const internal::MatrixFreeFunctions::DoFInfo &
+FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::get_dof_info()
+  const
+{
+  Assert(dof_info != nullptr,
+         ExcMessage(
+           "FEEvaluation was not initialized with a MatrixFree object!"));
+  return *dof_info;
+}
+
+
+
 template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
 inline DEAL_II_ALWAYS_INLINE Tensor<1, dim, VectorizedArrayType>
                              FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
@@ -3955,6 +3986,19 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 }
 
 
+
+template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+inline const MatrixFree<dim, Number, VectorizedArrayType> &
+FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
+  get_matrix_free() const
+{
+  Assert(matrix_info != nullptr,
+         ExcMessage(
+           "FEEvaluation was not initialized with a MatrixFree object!"));
+  return *matrix_info;
+}
+
+
 /*----------------------- FEEvaluationBase ----------------------------------*/
 
 template <int dim,
@@ -5417,6 +5461,20 @@ FEEvaluationBase<dim, n_components, Number, is_face, VectorizedArrayType>::
 
 
 
+template <int dim,
+          int n_components,
+          typename Number,
+          bool is_face,
+          typename VectorizedArrayType>
+inline unsigned int
+FEEvaluationBase<dim, n_components, Number, is_face, VectorizedArrayType>::
+  get_first_selected_component() const
+{
+  return first_selected_component;
+}
+
+
+
 template <int dim,
           int n_components_,
           typename Number,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.