Reference documentation for deal.II version 9.3.3
\(\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\}}\)
shape_info.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2011 - 2021 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16
17#ifndef dealii_matrix_free_shape_info_h
18#define dealii_matrix_free_shape_info_h
19
20
21#include <deal.II/base/config.h>
22
26
27#include <deal.II/fe/fe.h>
28
29
31
32namespace internal
33{
34 namespace MatrixFreeFunctions
35 {
53 {
63
70
77
82
88
95
99 tensor_none = 6
100 };
101
102
103
112 template <typename Number>
114 {
119
123 std::size_t
125
132
140
148
156
162
168
175
182
189
197
205
221
226
232 std::array<AlignedVector<Number>, 2> shape_data_on_face;
233
244 std::array<AlignedVector<Number>, 2> quadrature_data_on_face;
245
250 std::array<AlignedVector<Number>, 2> values_within_subface;
251
256 std::array<AlignedVector<Number>, 2> gradients_within_subface;
257
262 std::array<AlignedVector<Number>, 2> hessians_within_subface;
263
269
273 unsigned int fe_degree;
274
278 unsigned int n_q_points_1d;
279
285
292
299 };
300
301
302
313 template <typename Number>
315 {
322
327
331 template <int dim, int dim_q>
333 const FiniteElement<dim> &fe,
334 const unsigned int base_element = 0);
335
344 template <int dim, int dim_q>
345 void
347 const FiniteElement<dim> &fe_dim,
348 const unsigned int base_element = 0);
349
353 template <int dim, int spacedim>
354 static bool
356
364 get_shape_data(const unsigned int dimension = 0,
365 const unsigned int component = 0) const;
366
370 std::size_t
372
380 std::vector<unsigned int> lexicographic_numbering;
381
386 std::vector<UnivariateShapeData<Number>> data;
387
394
398 unsigned int n_dimensions;
399
404 unsigned int n_components;
405
410 unsigned int n_q_points;
411
417
421 unsigned int n_q_points_face;
422
427 std::vector<unsigned int> n_q_points_faces;
428
433
470
510
518
519 private:
524 bool
526 UnivariateShapeData<Number> &univariate_shape_data);
527
534 bool
536 const UnivariateShapeData<Number> &univariate_shape_data) const;
537 };
538
539
540
541 // ------------------------------------------ inline functions
542
543 template <typename Number>
544 template <int dim, int dim_q>
546 const FiniteElement<dim> &fe_in,
547 const unsigned int base_element_number)
548 : element_type(tensor_general)
549 , n_dimensions(0)
550 , n_components(0)
551 , n_q_points(0)
552 , dofs_per_component_on_cell(0)
553 , n_q_points_face(0)
554 , dofs_per_component_on_face(0)
555 {
556 reinit(quad, fe_in, base_element_number);
557 }
558
559 template <typename Number>
560 inline const UnivariateShapeData<Number> &
561 ShapeInfo<Number>::get_shape_data(const unsigned int dimension,
562 const unsigned int component) const
563 {
564 AssertDimension(n_dimensions, data_access.size(0));
565 AssertDimension(n_components, data_access.size(1));
566 AssertIndexRange(dimension, n_dimensions);
567 AssertIndexRange(component, n_components);
568 return *(data_access(dimension, component));
569 }
570
571 } // end of namespace MatrixFreeFunctions
572
573} // end of namespace internal
574
576
577#endif
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:402
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:403
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1622
#define AssertIndexRange(index, range)
Definition: exceptions.h:1690
::Table< 2, unsigned int > face_to_cell_index_nodal
Definition: shape_info.h:469
static bool is_supported(const FiniteElement< dim, spacedim > &fe)
bool check_1d_shapes_collocation(const UnivariateShapeData< Number > &univariate_shape_data) const
std::vector< UnivariateShapeData< Number > > data
Definition: shape_info.h:386
ShapeInfo(const Quadrature< dim_q > &quad, const FiniteElement< dim > &fe, const unsigned int base_element=0)
Definition: shape_info.h:545
::Table< 2, unsigned int > face_orientations
Definition: shape_info.h:517
const UnivariateShapeData< Number > & get_shape_data(const unsigned int dimension=0, const unsigned int component=0) const
Definition: shape_info.h:561
std::vector< unsigned int > lexicographic_numbering
Definition: shape_info.h:380
::Table< 2, unsigned int > face_to_cell_index_hermite
Definition: shape_info.h:509
void reinit(const Quadrature< dim_q > &quad, const FiniteElement< dim > &fe_dim, const unsigned int base_element=0)
std::vector< unsigned int > n_q_points_faces
Definition: shape_info.h:427
::Table< 2, UnivariateShapeData< Number > * > data_access
Definition: shape_info.h:393
bool check_1d_shapes_symmetric(UnivariateShapeData< Number > &univariate_shape_data)
std::array< AlignedVector< Number >, 2 > shape_data_on_face
Definition: shape_info.h:232
AlignedVector< Number > shape_gradients_collocation_eo
Definition: shape_info.h:196
std::array< AlignedVector< Number >, 2 > hessians_within_subface
Definition: shape_info.h:262
std::array< AlignedVector< Number >, 2 > values_within_subface
Definition: shape_info.h:250
std::array< AlignedVector< Number >, 2 > quadrature_data_on_face
Definition: shape_info.h:244
AlignedVector< Number > shape_hessians_collocation_eo
Definition: shape_info.h:204
std::array< AlignedVector< Number >, 2 > gradients_within_subface
Definition: shape_info.h:256