Reference documentation for deal.II version Git 840703ecf3 2019-10-14 17:15:20 -0400
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
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 
245  FEValues(
246  const ::hp::MappingCollection<dim, spacedim> &mapping_collection,
247  const ::hp::FECollection<dim, spacedim> & fe_collection,
248  const ::hp::QCollection<dim> & q_collection,
249  const UpdateFlags update_flags);
250 
251 
257  FEValues(const hp::FECollection<dim, spacedim> &fe_collection,
258  const hp::QCollection<dim> & q_collection,
259  const UpdateFlags update_flags);
260 
261 
307  template <typename DoFHandlerType, bool lda>
308  void
310  const unsigned int q_index = numbers::invalid_unsigned_int,
311  const unsigned int mapping_index = numbers::invalid_unsigned_int,
312  const unsigned int fe_index = numbers::invalid_unsigned_int);
313 
328  void
329  reinit(const typename Triangulation<dim, spacedim>::cell_iterator &cell,
330  const unsigned int q_index = numbers::invalid_unsigned_int,
331  const unsigned int mapping_index = numbers::invalid_unsigned_int,
332  const unsigned int fe_index = numbers::invalid_unsigned_int);
333  };
334 
335 
336 
361  template <int dim, int spacedim = dim>
363  : public hp::FEValuesBase<dim, dim - 1, ::FEFaceValues<dim, spacedim>>
364  {
365  public:
372  const UpdateFlags update_flags);
373 
374 
380  FEFaceValues(const hp::FECollection<dim, spacedim> &fe_collection,
381  const hp::QCollection<dim - 1> & q_collection,
382  const UpdateFlags update_flags);
383 
429  template <typename DoFHandlerType, bool lda>
430  void
432  const unsigned int face_no,
433  const unsigned int q_index = numbers::invalid_unsigned_int,
434  const unsigned int mapping_index = numbers::invalid_unsigned_int,
435  const unsigned int fe_index = numbers::invalid_unsigned_int);
436 
451  void
452  reinit(const typename Triangulation<dim, spacedim>::cell_iterator &cell,
453  const unsigned int face_no,
454  const unsigned int q_index = numbers::invalid_unsigned_int,
455  const unsigned int mapping_index = numbers::invalid_unsigned_int,
456  const unsigned int fe_index = numbers::invalid_unsigned_int);
457  };
458 
459 
460 
468  template <int dim, int spacedim = dim>
470  : public hp::
471  FEValuesBase<dim, dim - 1, ::FESubfaceValues<dim, spacedim>>
472  {
473  public:
481  const UpdateFlags update_flags);
482 
483 
490  const hp::QCollection<dim - 1> & q_collection,
491  const UpdateFlags update_flags);
492 
528  template <typename DoFHandlerType, bool lda>
529  void
531  const unsigned int face_no,
532  const unsigned int subface_no,
533  const unsigned int q_index = numbers::invalid_unsigned_int,
534  const unsigned int mapping_index = numbers::invalid_unsigned_int,
535  const unsigned int fe_index = numbers::invalid_unsigned_int);
536 
551  void
552  reinit(const typename Triangulation<dim, spacedim>::cell_iterator &cell,
553  const unsigned int face_no,
554  const unsigned int subface_no,
555  const unsigned int q_index = numbers::invalid_unsigned_int,
556  const unsigned int mapping_index = numbers::invalid_unsigned_int,
557  const unsigned int fe_index = numbers::invalid_unsigned_int);
558  };
559 
560 } // namespace hp
561 
562 
563 // -------------- inline and template functions --------------
564 
565 namespace hp
566 {
567  template <int dim, int q_dim, class FEValuesType>
568  inline const FEValuesType &
570  {
572  }
573 
574 
575 
576  template <int dim, int q_dim, class FEValuesType>
579  {
580  return *fe_collection;
581  }
582 
583 
584 
585  template <int dim, int q_dim, class FEValuesType>
588  {
589  return *mapping_collection;
590  }
591 
592 
593 
594  template <int dim, int q_dim, class FEValuesType>
595  inline const QCollection<q_dim> &
597  {
598  return q_collection;
599  }
600 
601 
602 
603  template <int dim, int q_dim, class FEValuesType>
604  inline UpdateFlags
606  {
607  return update_flags;
608  }
609 } // namespace hp
610 
611 DEAL_II_NAMESPACE_CLOSE
612 
613 #endif
static const unsigned int invalid_unsigned_int
Definition: types.h:187
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:605
const UpdateFlags update_flags
Definition: fe_values.h:177
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)
const MappingCollection< dim, FEValuesType::space_dimension > & get_mapping_collection() const
Definition: fe_values.h:587
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:69
const FECollection< dim, FEValuesType::space_dimension > & get_fe_collection() const
Definition: fe_values.h:578
const QCollection< q_dim > & get_quadrature_collection() const
Definition: fe_values.h:596
Definition: table.h:699
Table< 3, std::shared_ptr< FEValuesType > > fe_values_table
Definition: fe_values.h:166
const FEValuesType & get_present_fe_values() const
Definition: fe_values.h:569