deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20: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 {
126
127
128
137 template <typename Number>
139 {
144
148 std::size_t
150
160 template <int dim, int spacedim>
161 void
163 const Quadrature<1> &quad,
164 const std::vector<unsigned int> &lexicographic,
165 const unsigned int direction);
166
173 template <int dim, int spacedim>
174 void
176 const Quadrature<1> &quad,
177 const std::vector<unsigned int> &lexicographic,
178 const unsigned int direction);
179
184 bool
186
193 bool
195
202
210
218
226
232
238
245
252
259
267
275
291
296
302 std::array<AlignedVector<Number>, 2> shape_data_on_face;
303
313 std::array<AlignedVector<Number>, 2> quadrature_data_on_face;
314
319 std::array<AlignedVector<Number>, 2> values_within_subface;
320
325 std::array<AlignedVector<Number>, 2> gradients_within_subface;
326
331 std::array<AlignedVector<Number>, 2> hessians_within_subface;
332
337 std::array<AlignedVector<Number>, 2> subface_interpolation_matrices;
338
343 std::array<AlignedVector<typename ::internal::VectorizedArrayTrait<
344 Number>::value_type>,
345 2>
347
353
357 unsigned int fe_degree;
358
362 unsigned int n_q_points_1d;
363
369
376
383 };
384
385
386
397 template <typename Number>
399 {
406
411
415 template <int dim, int spacedim, int dim_q>
418 const unsigned int base_element = 0);
419
428 template <int dim, int spacedim, int dim_q>
429 void
431 const FiniteElement<dim, spacedim> &fe_dim,
432 const unsigned int base_element = 0);
433
450 template <int dim, int spacedim>
451 static bool
453
459 compute_orientation_table(const unsigned int n_points_per_dim);
460
468 get_shape_data(const unsigned int dimension = 0,
469 const unsigned int component = 0) const;
470
474 std::size_t
476
484 std::vector<unsigned int> lexicographic_numbering;
485
490 std::vector<UnivariateShapeData<Number>> data;
491
498
502 unsigned int n_dimensions;
503
508 unsigned int n_components;
509
514 unsigned int n_q_points;
515
521
525 unsigned int n_q_points_face;
526
531 std::vector<unsigned int> n_q_points_faces;
532
537
574
614
622
630 };
631
632
633
634 // ------------------------------------------ inline functions
635
636 template <typename Number>
637 inline const UnivariateShapeData<Number> &
638 ShapeInfo<Number>::get_shape_data(const unsigned int dimension,
639 const unsigned int component) const
640 {
641 AssertDimension(n_dimensions, data_access.size(0));
642 AssertDimension(n_components, data_access.size(1));
643 AssertIndexRange(dimension, n_dimensions);
644 AssertIndexRange(component, n_components);
645 return *(data_access(dimension, component));
646 }
647
648 } // end of namespace MatrixFreeFunctions
649
650} // end of namespace internal
651
653
654#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:573
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:621
std::vector< UnivariateShapeData< Number > > data
Definition shape_info.h:490
::Table< 2, unsigned int > face_orientations_quad
Definition shape_info.h:629
const UnivariateShapeData< Number > & get_shape_data(const unsigned int dimension=0, const unsigned int component=0) const
Definition shape_info.h:638
std::vector< unsigned int > lexicographic_numbering
Definition shape_info.h:484
::Table< 2, unsigned int > face_to_cell_index_hermite
Definition shape_info.h:613
std::vector< unsigned int > n_q_points_faces
Definition shape_info.h:531
::Table< 2, UnivariateShapeData< Number > * > data_access
Definition shape_info.h:497
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:302
std::array< AlignedVector< typename ::internal::VectorizedArrayTrait< Number >::value_type >, 2 > subface_interpolation_matrices_scalar
Definition shape_info.h:346
std::array< AlignedVector< Number >, 2 > subface_interpolation_matrices
Definition shape_info.h:337
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:331
std::array< AlignedVector< Number >, 2 > values_within_subface
Definition shape_info.h:319
std::array< AlignedVector< Number >, 2 > quadrature_data_on_face
Definition shape_info.h:313
std::array< AlignedVector< Number >, 2 > gradients_within_subface
Definition shape_info.h:325