Reference documentation for deal.II version 9.5.0
\(\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
fe_values.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2003 - 2023 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#ifndef dealii_hp_fe_values_h
17#define dealii_hp_fe_values_h
18
19#include <deal.II/base/config.h>
20
22
23#include <deal.II/fe/fe.h>
25
26#include <deal.II/grid/tria.h>
28
32
33#include <memory>
34
36
37// Forward declaration
38#ifndef DOXYGEN
39template <int dim, int spacedim>
40class FiniteElement;
41#endif
42
43
44namespace hp
45{
67 template <int dim, int q_dim, class FEValuesType>
69 {
70 public:
81
91 const std::vector<QCollection<q_dim>> & q_collection,
93
103
111 const std::vector<QCollection<q_dim>> & q_collection,
113
118
124 operator=(const FEValuesBase &) = delete;
125
135 void
136 precalculate_fe_values(const std::vector<unsigned int> &fe_indices,
137 const std::vector<unsigned int> &mapping_indices,
138 const std::vector<unsigned int> &q_indices);
139
152 void
154
161
167
171 const QCollection<q_dim> &
173
179
186 const FEValuesType &
188
189 protected:
197 FEValuesType &
198 select_fe_values(const unsigned int fe_index,
199 const unsigned int mapping_index,
200 const unsigned int q_index);
201
202 protected:
209
213 const SmartPointer<
217
222
231 const std::vector<QCollection<q_dim>> q_collections;
232
233 private:
246
252
257 };
258
259} // namespace hp
260
261
262namespace hp
263{
313 template <int dim, int spacedim = dim>
315 : public hp::FEValuesBase<dim, dim, ::FEValues<dim, spacedim>>
316 {
317 public:
318 static constexpr unsigned int dimension = dim;
319
320 static constexpr unsigned int space_dimension = spacedim;
321
329
330
339
340
386 template <bool lda>
387 void
389 const unsigned int q_index = numbers::invalid_unsigned_int,
390 const unsigned int mapping_index = numbers::invalid_unsigned_int,
391 const unsigned int fe_index = numbers::invalid_unsigned_int);
392
405 void
407 const unsigned int q_index = numbers::invalid_unsigned_int,
408 const unsigned int mapping_index = numbers::invalid_unsigned_int,
409 const unsigned int fe_index = numbers::invalid_unsigned_int);
410 };
411
412
413
437 template <int dim, int spacedim = dim>
439 : public hp::FEValuesBase<dim, dim - 1, ::FEFaceValues<dim, spacedim>>
440 {
441 public:
449
461 const std::vector<hp::QCollection<dim - 1>> &q_collections,
463
464
473
484 const std::vector<hp::QCollection<dim - 1>> &q_collections,
486
535 template <bool lda>
536 void
538 const unsigned int face_no,
539 const unsigned int q_index = numbers::invalid_unsigned_int,
540 const unsigned int mapping_index = numbers::invalid_unsigned_int,
541 const unsigned int fe_index = numbers::invalid_unsigned_int);
542
548 template <bool lda>
549 void
552 const unsigned int q_index = numbers::invalid_unsigned_int,
553 const unsigned int mapping_index = numbers::invalid_unsigned_int,
554 const unsigned int fe_index = numbers::invalid_unsigned_int);
555
568 void
570 const unsigned int face_no,
571 const unsigned int q_index = numbers::invalid_unsigned_int,
572 const unsigned int mapping_index = numbers::invalid_unsigned_int,
573 const unsigned int fe_index = numbers::invalid_unsigned_int);
574
580 void
583 const unsigned int q_index = numbers::invalid_unsigned_int,
584 const unsigned int mapping_index = numbers::invalid_unsigned_int,
585 const unsigned int fe_index = numbers::invalid_unsigned_int);
586 };
587
588
589
596 template <int dim, int spacedim = dim>
598 : public hp::
599 FEValuesBase<dim, dim - 1, ::FESubfaceValues<dim, spacedim>>
600 {
601 public:
606 const hp::MappingCollection<dim, spacedim> &mapping_collection,
607 const hp::FECollection<dim, spacedim> & fe_collection,
608 const hp::QCollection<dim - 1> & q_collection,
609 const UpdateFlags update_flags);
610
611
618 const hp::QCollection<dim - 1> & q_collection,
619 const UpdateFlags update_flags);
620
656 template <bool lda>
657 void
659 const unsigned int face_no,
660 const unsigned int subface_no,
661 const unsigned int q_index = numbers::invalid_unsigned_int,
662 const unsigned int mapping_index = numbers::invalid_unsigned_int,
663 const unsigned int fe_index = numbers::invalid_unsigned_int);
664
677 void
679 const unsigned int face_no,
680 const unsigned int subface_no,
681 const unsigned int q_index = numbers::invalid_unsigned_int,
682 const unsigned int mapping_index = numbers::invalid_unsigned_int,
683 const unsigned int fe_index = numbers::invalid_unsigned_int);
684 };
685
686} // namespace hp
687
688
689// -------------- inline and template functions --------------
690
691namespace hp
692{
693 template <int dim, int q_dim, class FEValuesType>
694 inline const FEValuesType &
696 {
697 return *fe_values_table(present_fe_values_index);
698 }
699
700
701
702 template <int dim, int q_dim, class FEValuesType>
705 {
706 return *fe_collection;
707 }
708
709
710
711 template <int dim, int q_dim, class FEValuesType>
714 {
715 return *mapping_collection;
716 }
717
718
719
720 template <int dim, int q_dim, class FEValuesType>
721 inline const QCollection<q_dim> &
723 {
724 return q_collection;
725 }
726
727
728
729 template <int dim, int q_dim, class FEValuesType>
730 inline UpdateFlags
732 {
733 return update_flags;
734 }
735} // namespace hp
736
738
739#endif
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, lda > > &cell, const unsigned int face_no, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
Definition fe_values.cc:424
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, lda > > &cell, const unsigned int face_no, const unsigned int subface_no, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
Definition fe_values.cc:564
const QCollection< q_dim > & get_quadrature_collection() const
Definition fe_values.h:722
FEValuesBase & operator=(const FEValuesBase &)=delete
const FEValuesType & get_present_fe_values() const
Definition fe_values.h:695
const std::vector< QCollection< q_dim > > q_collections
Definition fe_values.h:231
FEValuesType & select_fe_values(const unsigned int fe_index, const unsigned int mapping_index, const unsigned int q_index)
Definition fe_values.cc:176
const QCollection< q_dim > q_collection
Definition fe_values.h:221
const SmartPointer< const FECollection< dim, FEValuesType::space_dimension >, FEValuesBase< dim, q_dim, FEValuesType > > fe_collection
Definition fe_values.h:208
UpdateFlags get_update_flags() const
Definition fe_values.h:731
const MappingCollection< dim, FEValuesType::space_dimension > & get_mapping_collection() const
Definition fe_values.h:713
Table< 3, std::unique_ptr< FEValuesType > > fe_values_table
Definition fe_values.h:245
const FECollection< dim, FEValuesType::space_dimension > & get_fe_collection() const
Definition fe_values.h:704
TableIndices< 3 > present_fe_values_index
Definition fe_values.h:251
void precalculate_fe_values()
Definition fe_values.cc:243
const SmartPointer< const MappingCollection< dim, FEValuesType::space_dimension >, FEValuesBase< dim, q_dim, FEValuesType > > mapping_collection
Definition fe_values.h:216
const UpdateFlags update_flags
Definition fe_values.h:256
static constexpr unsigned int dimension
Definition fe_values.h:318
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, lda > > &cell, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
Definition fe_values.cc:294
static constexpr unsigned int space_dimension
Definition fe_values.h:320
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
UpdateFlags
Definition hp.h:118
static const unsigned int invalid_unsigned_int
Definition types.h:213