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 
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 
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:
524  const hp::MappingCollection<dim, spacedim> &mapping_collection,
525  const hp::FECollection<dim, spacedim> & fe_collection,
526  const hp::QCollection<dim - 1> & q_collection,
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  {
617  return *fe_values_table(present_fe_values_index);
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
hp::FEValuesBase::mapping_collection
const SmartPointer< const MappingCollection< dim, FEValuesType::space_dimension >, FEValuesBase< dim, q_dim, FEValuesType > > mapping_collection
Definition: fe_values.h:192
hp::FEValues
Definition: fe_values.h:281
fe_values.h
hp::FEValuesBase::present_fe_values_index
TableIndices< 3 > present_fe_values_index
Definition: fe_values.h:217
hp::FEFaceValues::FEFaceValues
FEFaceValues(const hp::MappingCollection< dim, spacedim > &mapping_collection, const hp::FECollection< dim, spacedim > &fe_collection, const hp::QCollection< dim - 1 > &q_collection, const UpdateFlags update_flags)
Definition: fe_values.cc:312
hp::FEValues::FEValues
FEValues(const MappingCollection< dim, spacedim > &mapping_collection, const FECollection< dim, spacedim > &fe_collection, const QCollection< dim > &q_collection, const UpdateFlags update_flags)
Definition: fe_values.cc:203
TableIndices< 3 >
hp::FEFaceValues::reinit
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType, 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:340
hp::FEValuesBase::get_present_fe_values
const FEValuesType & get_present_fe_values() const
Definition: fe_values.h:615
hp::FEValues::dimension
static const unsigned int dimension
Definition: fe_values.h:285
hp::FEValuesBase::get_update_flags
UpdateFlags get_update_flags() const
Definition: fe_values.h:651
hp::FEValuesBase::update_flags
const UpdateFlags update_flags
Definition: fe_values.h:222
hp::FEValuesBase
Definition: fe_values.h:66
hp::QCollection< q_dim >
Table
Definition: table.h:699
hp::FESubfaceValues::FESubfaceValues
FESubfaceValues(const hp::MappingCollection< dim, spacedim > &mapping_collection, const hp::FECollection< dim, spacedim > &fe_collection, const hp::QCollection< dim - 1 > &q_collection, const UpdateFlags update_flags)
Definition: fe_values.cc:425
hp::FEValuesBase::select_fe_values
FEValuesType & select_fe_values(const unsigned int fe_index, const unsigned int mapping_index, const unsigned int q_index)
Definition: fe_values.cc:107
fe_collection.h
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
hp::FEValuesBase::get_fe_collection
const FECollection< dim, FEValuesType::space_dimension > & get_fe_collection() const
Definition: fe_values.h:624
fe.h
hp::FEValues::reinit
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType, 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:229
DoFCellAccessor
Definition: dof_accessor.h:1321
hp::FEValuesBase::fe_values_table
Table< 3, std::unique_ptr< FEValuesType > > fe_values_table
Definition: fe_values.h:211
hp::MappingCollection< dim, FEValuesType::space_dimension >
FiniteElement
Definition: fe.h:648
UpdateFlags
UpdateFlags
Definition: fe_update_flags.h:66
hp::FEValuesBase::get_mapping_collection
const MappingCollection< dim, FEValuesType::space_dimension > & get_mapping_collection() const
Definition: fe_values.h:633
hp::FEValuesBase::precalculate_fe_values
void precalculate_fe_values()
Definition: fe_values.cc:178
hp::FEValuesBase::FEValuesBase
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
SmartPointer
Definition: smartpointer.h:68
hp::FEValues::space_dimension
static const unsigned int space_dimension
Definition: fe_values.h:287
hp::FESubfaceValues
Definition: fe_values.h:515
mapping_collection.h
hp
Definition: hp.h:117
numbers::invalid_unsigned_int
static const unsigned int invalid_unsigned_int
Definition: types.h:191
hp::FEValuesBase::operator=
FEValuesBase & operator=(const FEValuesBase &)=delete
config.h
hp::FEFaceValues
Definition: fe_values.h:408
hp::FEValuesBase::fe_collection
const SmartPointer< const FECollection< dim, FEValuesType::space_dimension >, FEValuesBase< dim, q_dim, FEValuesType > > fe_collection
Definition: fe_values.h:184
q_collection.h
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
hp::FESubfaceValues::reinit
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType, 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:453
TriaIterator
Definition: tria_iterator.h:578
hp::FEValuesBase::q_collection
const QCollection< q_dim > q_collection
Definition: fe_values.h:197
hp::FECollection< dim, FEValuesType::space_dimension >
hp::FEValuesBase::get_quadrature_collection
const QCollection< q_dim > & get_quadrature_collection() const
Definition: fe_values.h:642