Reference documentation for deal.II version Git 1d6f7faded 2020-04-08 17:58:29 +0200
\(\newcommand{\vcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\vcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
fe_values.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2003 - 2018 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 
24 #include <deal.II/hp/fe_collection.h>
25 #include <deal.II/hp/mapping_collection.h>
26 #include <deal.II/hp/q_collection.h>
27 
28 #include <map>
29 #include <memory>
30 
31 DEAL_II_NAMESPACE_OPEN
32 
33 // Forward declaration
34 #ifndef DOXYGEN
35 template <int dim, int spacedim>
36 class FiniteElement;
37 #endif
38 
39 
40 namespace hp
41 {
62  template <int dim, int q_dim, class FEValuesType>
64  {
65  public:
83  const QCollection<q_dim> & q_collection,
84  const UpdateFlags update_flags);
85 
91  get_fe_collection() const;
92 
97  get_mapping_collection() const;
98 
102  const QCollection<q_dim> &
104 
109  get_update_flags() const;
110 
117  const FEValuesType &
118  get_present_fe_values() const;
119 
120  protected:
128  FEValuesType &
129  select_fe_values(const unsigned int fe_index,
130  const unsigned int mapping_index,
131  const unsigned int q_index);
132 
133  protected:
140 
144  const SmartPointer<
148 
153 
154  private:
167 
173 
178  };
179 
180 } // namespace hp
181 
182 
183 namespace hp
184 {
233  template <int dim, int spacedim = dim>
234  class FEValues
235  : public hp::FEValuesBase<dim, dim, ::FEValues<dim, spacedim>>
236  {
237  public:
238  static const unsigned int dimension = dim;
239 
240  static const unsigned int space_dimension = spacedim;
241 
248  const UpdateFlags update_flags);
249 
250 
256  FEValues(const FECollection<dim, spacedim> &fe_collection,
257  const QCollection<dim> & q_collection,
258  const UpdateFlags update_flags);
259 
260 
306  template <typename DoFHandlerType, bool lda>
307  void
309  const unsigned int q_index = numbers::invalid_unsigned_int,
310  const unsigned int mapping_index = numbers::invalid_unsigned_int,
311  const unsigned int fe_index = numbers::invalid_unsigned_int);
312 
327  void
328  reinit(const typename Triangulation<dim, spacedim>::cell_iterator &cell,
329  const unsigned int q_index = numbers::invalid_unsigned_int,
330  const unsigned int mapping_index = numbers::invalid_unsigned_int,
331  const unsigned int fe_index = numbers::invalid_unsigned_int);
332  };
333 
334 
335 
360  template <int dim, int spacedim = dim>
362  : public hp::FEValuesBase<dim, dim - 1, ::FEFaceValues<dim, spacedim>>
363  {
364  public:
371  const UpdateFlags update_flags);
372 
373 
379  FEFaceValues(const hp::FECollection<dim, spacedim> &fe_collection,
380  const hp::QCollection<dim - 1> & q_collection,
381  const UpdateFlags update_flags);
382 
428  template <typename DoFHandlerType, bool lda>
429  void
431  const unsigned int face_no,
432  const unsigned int q_index = numbers::invalid_unsigned_int,
433  const unsigned int mapping_index = numbers::invalid_unsigned_int,
434  const unsigned int fe_index = numbers::invalid_unsigned_int);
435 
450  void
451  reinit(const typename Triangulation<dim, spacedim>::cell_iterator &cell,
452  const unsigned int face_no,
453  const unsigned int q_index = numbers::invalid_unsigned_int,
454  const unsigned int mapping_index = numbers::invalid_unsigned_int,
455  const unsigned int fe_index = numbers::invalid_unsigned_int);
456  };
457 
458 
459 
467  template <int dim, int spacedim = dim>
469  : public hp::
470  FEValuesBase<dim, dim - 1, ::FESubfaceValues<dim, spacedim>>
471  {
472  public:
480  const UpdateFlags update_flags);
481 
482 
489  const hp::QCollection<dim - 1> & q_collection,
490  const UpdateFlags update_flags);
491 
527  template <typename DoFHandlerType, bool lda>
528  void
530  const unsigned int face_no,
531  const unsigned int subface_no,
532  const unsigned int q_index = numbers::invalid_unsigned_int,
533  const unsigned int mapping_index = numbers::invalid_unsigned_int,
534  const unsigned int fe_index = numbers::invalid_unsigned_int);
535 
550  void
551  reinit(const typename Triangulation<dim, spacedim>::cell_iterator &cell,
552  const unsigned int face_no,
553  const unsigned int subface_no,
554  const unsigned int q_index = numbers::invalid_unsigned_int,
555  const unsigned int mapping_index = numbers::invalid_unsigned_int,
556  const unsigned int fe_index = numbers::invalid_unsigned_int);
557  };
558 
559 } // namespace hp
560 
561 
562 // -------------- inline and template functions --------------
563 
564 namespace hp
565 {
566  template <int dim, int q_dim, class FEValuesType>
567  inline const FEValuesType &
569  {
571  }
572 
573 
574 
575  template <int dim, int q_dim, class FEValuesType>
578  {
579  return *fe_collection;
580  }
581 
582 
583 
584  template <int dim, int q_dim, class FEValuesType>
587  {
588  return *mapping_collection;
589  }
590 
591 
592 
593  template <int dim, int q_dim, class FEValuesType>
594  inline const QCollection<q_dim> &
596  {
597  return q_collection;
598  }
599 
600 
601 
602  template <int dim, int q_dim, class FEValuesType>
603  inline UpdateFlags
605  {
606  return update_flags;
607  }
608 } // namespace hp
609 
610 DEAL_II_NAMESPACE_CLOSE
611 
612 #endif
static const unsigned int invalid_unsigned_int
Definition: types.h:190
const QCollection< q_dim > q_collection
Definition: fe_values.h:152
const SmartPointer< const MappingCollection< dim, FEValuesType::space_dimension >, FEValuesBase< dim, q_dim, FEValuesType > > mapping_collection
Definition: fe_values.h:147
TableIndices< 3 > present_fe_values_index
Definition: fe_values.h:172
UpdateFlags get_update_flags() const
Definition: fe_values.h:604
const UpdateFlags update_flags
Definition: fe_values.h:177
const MappingCollection< dim, FEValuesType::space_dimension > & get_mapping_collection() const
Definition: fe_values.h:586
UpdateFlags
Definition: hp.h:117
const SmartPointer< const FECollection< dim, FEValuesType::space_dimension >, FEValuesBase< dim, q_dim, FEValuesType > > fe_collection
Definition: fe_values.h:139
FEValuesType & select_fe_values(const unsigned int fe_index, const unsigned int mapping_index, const unsigned int q_index)
Definition: fe_values.cc:67
const FECollection< dim, FEValuesType::space_dimension > & get_fe_collection() const
Definition: fe_values.h:577
const QCollection< q_dim > & get_quadrature_collection() const
Definition: fe_values.h:595
Definition: table.h:699
Table< 3, std::shared_ptr< FEValuesType > > fe_values_table
Definition: fe_values.h:166
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:27
const FEValuesType & get_present_fe_values() const
Definition: fe_values.h:568