version GIT relicensing-7278-g091132d5eb 2026-12-02 03:10:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
shape_info.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2012 - 2025 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13
14#ifndef dealii_matrix_free_shape_info_h
15#define dealii_matrix_free_shape_info_h
16
17
18#include <deal.II/base/config.h>
19
23#include <deal.II/base/table.h>
25
26
28
29
30// forward declaration
31template <int dim, int spacedim>
32class FiniteElement;
33
34
35namespace internal
36{
37 namespace MatrixFreeFunctions
38 {
124
125
126
135 template <typename Number>
137 {
142
146 std::size_t
148
158 template <int dim, int spacedim>
159 void
161 const Quadrature<1> &quad,
162 const std::vector<unsigned int> &lexicographic,
163 const unsigned int direction);
164
171 template <int dim, int spacedim>
172 void
174 const Quadrature<1> &quad,
175 const std::vector<unsigned int> &lexicographic,
176 const unsigned int direction);
177
182 bool
184
191 bool
193
200
208
216
224
230
236
243
250
257
265
273
289
294
300 std::array<AlignedVector<Number>, 2> shape_data_on_face;
301
311 std::array<AlignedVector<Number>, 2> quadrature_data_on_face;
312
317 std::array<AlignedVector<Number>, 2> values_within_subface;
318
323 std::array<AlignedVector<Number>, 2> gradients_within_subface;
324
329 std::array<AlignedVector<Number>, 2> hessians_within_subface;
330
335 std::array<AlignedVector<Number>, 2> subface_interpolation_matrices;
336
341 std::array<AlignedVector<typename ::internal::VectorizedArrayTrait<
342 Number>::value_type>,
343 2>
345
351
355 unsigned int fe_degree;
356
360 unsigned int n_q_points_1d;
361
367
374
381 };
382
383
384
395 template <typename Number>
397 {
404
409
413 template <int dim, int spacedim, int dim_q>
416 const unsigned int base_element = 0);
417
426 template <int dim, int spacedim, int dim_q>
427 void
429 const FiniteElement<dim, spacedim> &fe_dim,
430 const unsigned int base_element = 0);
431
448 template <int dim, int spacedim>
449 static bool
451
457 compute_orientation_table(const unsigned int n_points_per_dim);
458
466 get_shape_data(const unsigned int dimension = 0,
467 const unsigned int component = 0) const;
468
472 std::size_t
474
482 std::vector<unsigned int> lexicographic_numbering;
483
488 std::vector<UnivariateShapeData<Number>> data;
489
496
500 unsigned int n_dimensions;
501
506 unsigned int n_components;
507
512 unsigned int n_q_points;
513
519
523 unsigned int n_q_points_face;
524
529 std::vector<unsigned int> n_q_points_faces;
530
535
572
612
620
628 };
629
630
631
632 // ------------------------------------------ inline functions
633
634 template <typename Number>
635 inline const UnivariateShapeData<Number> &
636 ShapeInfo<Number>::get_shape_data(const unsigned int dimension,
637 const unsigned int component) const
638 {
639 AssertDimension(n_dimensions, data_access.size(0));
640 AssertDimension(n_components, data_access.size(1));
641 AssertIndexRange(dimension, n_dimensions);
642 AssertIndexRange(component, n_components);
643 return *(data_access(dimension, component));
644 }
645
646 } // end of namespace MatrixFreeFunctions
647
648} // end of namespace internal
649
651
652#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static Table< 2, unsigned int > compute_orientation_table(const unsigned int n_points_per_dim)
ShapeInfo(const Quadrature< dim_q > &quad, const FiniteElement< dim, spacedim > &fe, const unsigned int base_element=0)
::Table< 2, unsigned int > face_to_cell_index_nodal
Definition shape_info.h:571
void reinit(const Quadrature< dim_q > &quad, const FiniteElement< dim, spacedim > &fe_dim, const unsigned int base_element=0)
static bool is_supported(const FiniteElement< dim, spacedim > &fe)
::Table< 2, unsigned int > face_orientations_dofs
Definition shape_info.h:619
std::vector< UnivariateShapeData< Number > > data
Definition shape_info.h:488
::Table< 2, unsigned int > face_orientations_quad
Definition shape_info.h:627
const UnivariateShapeData< Number > & get_shape_data(const unsigned int dimension=0, const unsigned int component=0) const
Definition shape_info.h:636
std::vector< unsigned int > lexicographic_numbering
Definition shape_info.h:482
::Table< 2, unsigned int > face_to_cell_index_hermite
Definition shape_info.h:611
std::vector< unsigned int > n_q_points_faces
Definition shape_info.h:529
::Table< 2, UnivariateShapeData< Number > * > data_access
Definition shape_info.h:495
void evaluate_collocation_space(const FiniteElement< dim, spacedim > &fe, const Quadrature< 1 > &quad, const std::vector< unsigned int > &lexicographic, const unsigned int direction)
std::array< AlignedVector< Number >, 2 > shape_data_on_face
Definition shape_info.h:300
std::array< AlignedVector< typename ::internal::VectorizedArrayTrait< Number >::value_type >, 2 > subface_interpolation_matrices_scalar
Definition shape_info.h:344
std::array< AlignedVector< Number >, 2 > subface_interpolation_matrices
Definition shape_info.h:335
void evaluate_shape_functions(const FiniteElement< dim, spacedim > &fe, const Quadrature< 1 > &quad, const std::vector< unsigned int > &lexicographic, const unsigned int direction)
std::array< AlignedVector< Number >, 2 > hessians_within_subface
Definition shape_info.h:329
std::array< AlignedVector< Number >, 2 > values_within_subface
Definition shape_info.h:317
std::array< AlignedVector< Number >, 2 > quadrature_data_on_face
Definition shape_info.h:311
std::array< AlignedVector< Number >, 2 > gradients_within_subface
Definition shape_info.h:323