Reference documentation for deal.II version 8.5.1
fe_values.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2003 - 2016 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 at
12 // the top level of the deal.II distribution.
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 #include <deal.II/fe/fe.h>
21 #include <deal.II/hp/fe_collection.h>
22 #include <deal.II/hp/q_collection.h>
23 #include <deal.II/hp/mapping_collection.h>
24 #include <deal.II/fe/fe_values.h>
25 
26 #include <map>
27 #include <deal.II/base/std_cxx11/shared_ptr.h>
28 
29 DEAL_II_NAMESPACE_OPEN
30 
31 template <int dim, int spacedim> class FiniteElement;
32 
33 
34 
35 namespace internal
36 {
37  namespace hp
38  {
59  template <int dim, int q_dim, class FEValuesType>
61  {
62  public:
67  FEValuesBase (const ::hp::MappingCollection<dim,FEValuesType::space_dimension> &mapping_collection,
68  const ::hp::FECollection<dim,FEValuesType::space_dimension> &fe_collection,
69  const ::hp::QCollection<q_dim> &q_collection,
76  FEValuesBase (const ::hp::FECollection<dim,FEValuesType::space_dimension> &fe_collection,
77  const ::hp::QCollection<q_dim> &q_collection,
79 
84  const ::hp::FECollection<dim,FEValuesType::space_dimension> &
85  get_fe_collection () const;
86 
90  const ::hp::MappingCollection<dim,FEValuesType::space_dimension> &
91  get_mapping_collection () const;
92 
96  const ::hp::QCollection<q_dim> &
98 
103 
110  const FEValuesType &get_present_fe_values () const;
111 
112  protected:
113 
121  FEValuesType &
122  select_fe_values (const unsigned int fe_index,
123  const unsigned int mapping_index,
124  const unsigned int q_index);
125 
126  protected:
132 
138 
142  const ::hp::QCollection<q_dim> q_collection;
143 
144  private:
157 
163 
168  };
169 
170  }
171 
172 }
173 
174 
175 namespace hp
176 {
177 
226  template <int dim, int spacedim=dim>
227  class FEValues : public ::internal::hp::FEValuesBase<dim,dim,::FEValues<dim,spacedim> >
228  {
229  public:
230 
231  static const unsigned int dimension = dim;
232 
233  static const unsigned int space_dimension = spacedim;
234 
244  FEValues (const ::hp::MappingCollection<dim,spacedim> &mapping_collection,
245  const ::hp::FECollection<dim,spacedim> &fe_collection,
246  const ::hp::QCollection<dim> &q_collection,
247  const UpdateFlags update_flags);
248 
249 
263  const UpdateFlags update_flags);
264 
265 
311  template <typename DoFHandlerType, bool lda>
312  void
314  const unsigned int q_index = numbers::invalid_unsigned_int,
315  const unsigned int mapping_index = numbers::invalid_unsigned_int,
316  const unsigned int fe_index = numbers::invalid_unsigned_int);
317 
332  void
334  const unsigned int q_index = numbers::invalid_unsigned_int,
335  const unsigned int mapping_index = numbers::invalid_unsigned_int,
336  const unsigned int fe_index = numbers::invalid_unsigned_int);
337 
338 
339  };
340 
341 
342 
367  template <int dim, int spacedim=dim>
368  class FEFaceValues : public ::internal::hp::FEValuesBase<dim,dim-1,::FEFaceValues<dim,spacedim> >
369  {
370  public:
383  const UpdateFlags update_flags);
384 
385 
399  const UpdateFlags update_flags);
400 
446  template <typename DoFHandlerType, bool lda>
447  void
449  const unsigned int face_no,
450  const unsigned int q_index = numbers::invalid_unsigned_int,
451  const unsigned int mapping_index = numbers::invalid_unsigned_int,
452  const unsigned int fe_index = numbers::invalid_unsigned_int);
453 
468  void
470  const unsigned int face_no,
471  const unsigned int q_index = numbers::invalid_unsigned_int,
472  const unsigned int mapping_index = numbers::invalid_unsigned_int,
473  const unsigned int fe_index = numbers::invalid_unsigned_int);
474  };
475 
476 
477 
485  template <int dim, int spacedim=dim>
486  class FESubfaceValues : public ::internal::hp::FEValuesBase<dim,dim-1,::FESubfaceValues<dim,spacedim> >
487  {
488  public:
501  const UpdateFlags update_flags);
502 
503 
517  const UpdateFlags update_flags);
518 
554  template <typename DoFHandlerType, bool lda>
555  void
557  const unsigned int face_no,
558  const unsigned int subface_no,
559  const unsigned int q_index = numbers::invalid_unsigned_int,
560  const unsigned int mapping_index = numbers::invalid_unsigned_int,
561  const unsigned int fe_index = numbers::invalid_unsigned_int);
562 
577  void
579  const unsigned int face_no,
580  const unsigned int subface_no,
581  const unsigned int q_index = numbers::invalid_unsigned_int,
582  const unsigned int mapping_index = numbers::invalid_unsigned_int,
583  const unsigned int fe_index = numbers::invalid_unsigned_int);
584  };
585 
586 }
587 
588 
589 // -------------- inline and template functions --------------
590 
591 namespace internal
592 {
593  namespace hp
594  {
595  template <int dim, int q_dim, class FEValuesType>
596  inline
597  const FEValuesType &
599  {
600  return *fe_values_table(present_fe_values_index);
601  }
602 
603 
604 
605  template <int dim, int q_dim, class FEValuesType>
606  inline
607  const ::hp::FECollection<dim,FEValuesType::space_dimension> &
609  {
610  return *fe_collection;
611  }
612 
613 
614 
615  template <int dim, int q_dim, class FEValuesType>
616  inline
617  const ::hp::MappingCollection<dim,FEValuesType::space_dimension> &
619  {
620  return *mapping_collection;
621  }
622 
623 
624 
625  template <int dim, int q_dim, class FEValuesType>
626  inline
627  const ::hp::QCollection<q_dim> &
629  {
630  return q_collection;
631  }
632 
633 
634 
635  template <int dim, int q_dim, class FEValuesType>
636  inline
639  {
640  return update_flags;
641  }
642  }
643 
644 }
645 
646 DEAL_II_NAMESPACE_CLOSE
647 
648 #endif
static const unsigned int invalid_unsigned_int
Definition: types.h:170
const ::hp::MappingCollection< dim, FEValuesType::space_dimension > & get_mapping_collection() const
Definition: fe_values.h:618
FEValuesType & select_fe_values(const unsigned int fe_index, const unsigned int mapping_index, const unsigned int q_index)
Definition: fe_values.cc:72
const UpdateFlags update_flags
Definition: fe_values.h:167
TableIndices< 3 > present_fe_values_index
Definition: fe_values.h:162
const SmartPointer< const ::hp::MappingCollection< dim, FEValuesType::space_dimension >, FEValuesBase< dim, q_dim, FEValuesType > > mapping_collection
Definition: fe_values.h:137
const ::hp::FECollection< dim, FEValuesType::space_dimension > & get_fe_collection() const
Definition: fe_values.h:608
const FEValuesType & get_present_fe_values() const
Definition: fe_values.h:598
FEValuesBase(const ::hp::MappingCollection< dim, FEValuesType::space_dimension > &mapping_collection, const ::hp::FECollection< dim, FEValuesType::space_dimension > &fe_collection, const ::hp::QCollection< q_dim > &q_collection, const ::UpdateFlags update_flags)
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:380
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:144
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:235
const ::hp::QCollection< q_dim > q_collection
Definition: fe_values.h:142
UpdateFlags
const ::hp::QCollection< q_dim > & get_quadrature_collection() const
Definition: fe_values.h:628
Definition: hp.h:102
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:354
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:261
const SmartPointer< const ::hp::FECollection< dim, FEValuesType::space_dimension >, FEValuesBase< dim, q_dim, FEValuesType > > fe_collection
Definition: fe_values.h:131
FEValues(const ::hp::MappingCollection< dim, spacedim > &mapping_collection, const ::hp::FECollection< dim, spacedim > &fe_collection, const ::hp::QCollection< dim > &q_collection, const UpdateFlags update_flags)
::Table< 3, std_cxx11::shared_ptr< FEValuesType > > fe_values_table
Definition: fe_values.h:156
Definition: table.h:33
UpdateFlags get_update_flags() const
Definition: fe_values.h:638