Reference documentation for deal.II version 9.2.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\}}\)
fe_values.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2003 - 2020 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 
21 #include <deal.II/fe/fe.h>
22 #include <deal.II/fe/fe_values.h>
23 
27 
28 #include <map>
29 #include <memory>
30 
32 
33 // Forward declaration
34 #ifndef DOXYGEN
35 template <int dim, int spacedim>
36 class FiniteElement;
37 #endif
38 
39 
40 namespace hp
41 {
65  template <int dim, int q_dim, class FEValuesType>
67  {
68  public:
79 
87  const QCollection<q_dim> & q_collection,
88  const UpdateFlags update_flags);
89 
94 
99  FEValuesBase &
100  operator=(const FEValuesBase &) = delete;
101 
111  void
112  precalculate_fe_values(const std::vector<unsigned int> &fe_indices,
113  const std::vector<unsigned int> &mapping_indices,
114  const std::vector<unsigned int> &q_indices);
115 
128  void
130 
136  get_fe_collection() const;
137 
142  get_mapping_collection() const;
143 
147  const QCollection<q_dim> &
149 
154  get_update_flags() const;
155 
162  const FEValuesType &
163  get_present_fe_values() const;
164 
165  protected:
173  FEValuesType &
174  select_fe_values(const unsigned int fe_index,
175  const unsigned int mapping_index,
176  const unsigned int q_index);
177 
178  protected:
185 
189  const SmartPointer<
193 
198 
199  private:
212 
218 
223  };
224 
225 } // namespace hp
226 
227 
228 namespace hp
229 {
280  template <int dim, int spacedim = dim>
281  class FEValues
282  : public hp::FEValuesBase<dim, dim, ::FEValues<dim, spacedim>>
283  {
284  public:
285  static const unsigned int dimension = dim;
286 
287  static const unsigned int space_dimension = spacedim;
288 
295  const UpdateFlags update_flags);
296 
297 
305  const UpdateFlags update_flags);
306 
307 
353  template <typename DoFHandlerType, bool lda>
354  void
356  const unsigned int q_index = numbers::invalid_unsigned_int,
357  const unsigned int mapping_index = numbers::invalid_unsigned_int,
358  const unsigned int fe_index = numbers::invalid_unsigned_int);
359 
374  void
376  const unsigned int q_index = numbers::invalid_unsigned_int,
377  const unsigned int mapping_index = numbers::invalid_unsigned_int,
378  const unsigned int fe_index = numbers::invalid_unsigned_int);
379  };
380 
381 
382 
407  template <int dim, int spacedim = dim>
409  : public hp::FEValuesBase<dim, dim - 1, ::FEFaceValues<dim, spacedim>>
410  {
411  public:
418  const UpdateFlags update_flags);
419 
420 
426  FEFaceValues(const hp::FECollection<dim, spacedim> &fe_collection,
427  const hp::QCollection<dim - 1> & q_collection,
428  const UpdateFlags update_flags);
429 
475  template <typename DoFHandlerType, bool lda>
476  void
478  const unsigned int face_no,
479  const unsigned int q_index = numbers::invalid_unsigned_int,
480  const unsigned int mapping_index = numbers::invalid_unsigned_int,
481  const unsigned int fe_index = numbers::invalid_unsigned_int);
482 
497  void
499  const unsigned int face_no,
500  const unsigned int q_index = numbers::invalid_unsigned_int,
501  const unsigned int mapping_index = numbers::invalid_unsigned_int,
502  const unsigned int fe_index = numbers::invalid_unsigned_int);
503  };
504 
505 
506 
514  template <int dim, int spacedim = dim>
516  : public hp::
517  FEValuesBase<dim, dim - 1, ::FESubfaceValues<dim, spacedim>>
518  {
519  public:
527  const UpdateFlags update_flags);
528 
529 
536  const hp::QCollection<dim - 1> & q_collection,
537  const UpdateFlags update_flags);
538 
574  template <typename DoFHandlerType, bool lda>
575  void
577  const unsigned int face_no,
578  const unsigned int subface_no,
579  const unsigned int q_index = numbers::invalid_unsigned_int,
580  const unsigned int mapping_index = numbers::invalid_unsigned_int,
581  const unsigned int fe_index = numbers::invalid_unsigned_int);
582 
597  void
599  const unsigned int face_no,
600  const unsigned int subface_no,
601  const unsigned int q_index = numbers::invalid_unsigned_int,
602  const unsigned int mapping_index = numbers::invalid_unsigned_int,
603  const unsigned int fe_index = numbers::invalid_unsigned_int);
604  };
605 
606 } // namespace hp
607 
608 
609 // -------------- inline and template functions --------------
610 
611 namespace hp
612 {
613  template <int dim, int q_dim, class FEValuesType>
614  inline const FEValuesType &
616  {
618  }
619 
620 
621 
622  template <int dim, int q_dim, class FEValuesType>
625  {
626  return *fe_collection;
627  }
628 
629 
630 
631  template <int dim, int q_dim, class FEValuesType>
634  {
635  return *mapping_collection;
636  }
637 
638 
639 
640  template <int dim, int q_dim, class FEValuesType>
641  inline const QCollection<q_dim> &
643  {
644  return q_collection;
645  }
646 
647 
648 
649  template <int dim, int q_dim, class FEValuesType>
650  inline UpdateFlags
652  {
653  return update_flags;
654  }
655 } // namespace hp
656 
658 
659 #endif
static const unsigned int invalid_unsigned_int
Definition: types.h:191
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
Definition: matrix_block.h:621
const QCollection< q_dim > q_collection
Definition: fe_values.h:197
const SmartPointer< const MappingCollection< dim, FEValuesType::space_dimension >, FEValuesBase< dim, q_dim, FEValuesType > > mapping_collection
Definition: fe_values.h:192
TableIndices< 3 > present_fe_values_index
Definition: fe_values.h:217
UpdateFlags get_update_flags() const
Definition: fe_values.h:651
const UpdateFlags update_flags
Definition: fe_values.h:222
const MappingCollection< dim, FEValuesType::space_dimension > & get_mapping_collection() const
Definition: fe_values.h:633
UpdateFlags
void precalculate_fe_values()
Definition: fe_values.cc:178
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
FEValuesBase & operator=(const FEValuesBase &)=delete
Definition: hp.h:117
const SmartPointer< const FECollection< dim, FEValuesType::space_dimension >, FEValuesBase< dim, q_dim, FEValuesType > > fe_collection
Definition: fe_values.h:184
FEValuesType & select_fe_values(const unsigned int fe_index, const unsigned int mapping_index, const unsigned int q_index)
Definition: fe_values.cc:107
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
const FECollection< dim, FEValuesType::space_dimension > & get_fe_collection() const
Definition: fe_values.h:624
const QCollection< q_dim > & get_quadrature_collection() const
Definition: fe_values.h:642
Table< 3, std::unique_ptr< FEValuesType > > fe_values_table
Definition: fe_values.h:211
Definition: table.h:699
FEValuesBase(const MappingCollection< dim, FEValuesType::space_dimension > &mapping_collection, const FECollection< dim, FEValuesType::space_dimension > &fe_collection, const QCollection< q_dim > &q_collection, const UpdateFlags update_flags)
Definition: fe_values.cc:30
const FEValuesType & get_present_fe_values() const
Definition: fe_values.h:615