deal.II version GIT relicensing-2169-gec1b43f35b 2024-11-22 07:10:00+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: LGPL-2.1-or-later
4// Copyright (C) 2012 - 2024 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15
16#ifndef dealii_matrix_free_shape_info_h
17#define dealii_matrix_free_shape_info_h
18
19
20#include <deal.II/base/config.h>
21
25#include <deal.II/base/table.h>
27
28
30
31
32// forward declaration
33template <int dim, int spacedim>
34class FiniteElement;
35
36
37namespace internal
38{
39 namespace MatrixFreeFunctions
40 {
121
122
123
132 template <typename Number>
134 {
139
143 std::size_t
145
155 template <int dim, int spacedim>
156 void
158 const Quadrature<1> &quad,
159 const std::vector<unsigned int> &lexicographic,
160 const unsigned int direction);
161
168 template <int dim, int spacedim>
169 void
171 const Quadrature<1> &quad,
172 const std::vector<unsigned int> &lexicographic,
173 const unsigned int direction);
174
179 bool
181
188 bool
190
197
205
213
221
227
233
240
247
254
262
270
286
291
297 std::array<AlignedVector<Number>, 2> shape_data_on_face;
298
308 std::array<AlignedVector<Number>, 2> quadrature_data_on_face;
309
314 std::array<AlignedVector<Number>, 2> values_within_subface;
315
320 std::array<AlignedVector<Number>, 2> gradients_within_subface;
321
326 std::array<AlignedVector<Number>, 2> hessians_within_subface;
327
332 std::array<AlignedVector<Number>, 2> subface_interpolation_matrices;
333
338 std::array<AlignedVector<typename ::internal::VectorizedArrayTrait<
339 Number>::value_type>,
340 2>
342
348
352 unsigned int fe_degree;
353
357 unsigned int n_q_points_1d;
358
364
371
378 };
379
380
381
392 template <typename Number>
394 {
401
406
410 template <int dim, int spacedim, int dim_q>
413 const unsigned int base_element = 0);
414
423 template <int dim, int spacedim, int dim_q>
424 void
426 const FiniteElement<dim, spacedim> &fe_dim,
427 const unsigned int base_element = 0);
428
445 template <int dim, int spacedim>
446 static bool
448
454 compute_orientation_table(const unsigned int n_points_per_dim);
455
463 get_shape_data(const unsigned int dimension = 0,
464 const unsigned int component = 0) const;
465
469 std::size_t
471
479 std::vector<unsigned int> lexicographic_numbering;
480
485 std::vector<UnivariateShapeData<Number>> data;
486
493
497 unsigned int n_dimensions;
498
503 unsigned int n_components;
504
509 unsigned int n_q_points;
510
516
520 unsigned int n_q_points_face;
521
526 std::vector<unsigned int> n_q_points_faces;
527
532
569
609
617
625 };
626
627
628
629 // ------------------------------------------ inline functions
630
631 template <typename Number>
632 inline const UnivariateShapeData<Number> &
633 ShapeInfo<Number>::get_shape_data(const unsigned int dimension,
634 const unsigned int component) const
635 {
636 AssertDimension(n_dimensions, data_access.size(0));
637 AssertDimension(n_components, data_access.size(1));
638 AssertIndexRange(dimension, n_dimensions);
639 AssertIndexRange(component, n_components);
640 return *(data_access(dimension, component));
641 }
642
643 } // end of namespace MatrixFreeFunctions
644
645} // end of namespace internal
646
648
649#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:498
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499
#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:568
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:616
std::vector< UnivariateShapeData< Number > > data
Definition shape_info.h:485
::Table< 2, unsigned int > face_orientations_quad
Definition shape_info.h:624
const UnivariateShapeData< Number > & get_shape_data(const unsigned int dimension=0, const unsigned int component=0) const
Definition shape_info.h:633
std::vector< unsigned int > lexicographic_numbering
Definition shape_info.h:479
::Table< 2, unsigned int > face_to_cell_index_hermite
Definition shape_info.h:608
std::vector< unsigned int > n_q_points_faces
Definition shape_info.h:526
::Table< 2, UnivariateShapeData< Number > * > data_access
Definition shape_info.h:492
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:297
std::array< AlignedVector< typename ::internal::VectorizedArrayTrait< Number >::value_type >, 2 > subface_interpolation_matrices_scalar
Definition shape_info.h:341
std::array< AlignedVector< Number >, 2 > subface_interpolation_matrices
Definition shape_info.h:332
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:326
std::array< AlignedVector< Number >, 2 > values_within_subface
Definition shape_info.h:314
std::array< AlignedVector< Number >, 2 > quadrature_data_on_face
Definition shape_info.h:308
std::array< AlignedVector< Number >, 2 > gradients_within_subface
Definition shape_info.h:320