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/dofs/dof_handler.h>
22 
23 #include <deal.II/fe/fe.h>
24 #include <deal.II/fe/fe_values.h>
25 
26 #include <deal.II/grid/tria.h>
27 #include <deal.II/grid/tria_iterator.h>
28 
29 #include <deal.II/hp/fe_collection.h>
30 #include <deal.II/hp/mapping_collection.h>
31 #include <deal.II/hp/q_collection.h>
32 
33 #include <map>
34 #include <memory>
35 
36 DEAL_II_NAMESPACE_OPEN
37 
38 // Forward declaration
39 #ifndef DOXYGEN
40 template <int dim, int spacedim>
41 class FiniteElement;
42 #endif
43 
44 
45 namespace hp
46 {
47   /**
48    * Base class for the <tt>hp::FE*Values</tt> classes, storing the data
49    * that is common to them. The main task of this class is to provide a
50    * table where for every combination of finite element, mapping, and
51    * quadrature object from their corresponding collection objects there is
52    * a matching ::FEValues, ::FEFaceValues, or ::FESubfaceValues object.
53    *
54    * To make things more efficient, however, these FE*Values objects are only
55    * created once requested (lazy allocation). Alternatively if desired, this
56    * can be bypassed by computing all objects in advance with the corresponding
57    * precalculate_fe_values() function.
58    *
59    * The first template parameter denotes the space dimension we are in, the
60    * second the dimensionality of the object that we integrate on, i.e. for
61    * usual @p hp::FEValues it is equal to the first one, while for face
62    * integration it is one less. The third template parameter indicates the
63    * type of underlying non-hp FE*Values base type, i.e. it could either be
64    * ::FEValues, ::FEFaceValues, or ::FESubfaceValues.
65    *
66    * @ingroup hp
67    */
68   template <int dim, int q_dim, class FEValuesType>
69   class FEValuesBase
70   {
71   public:
72     /**
73      * Constructor. Set the fields of this class to the values indicated by
74      * the parameters to the constructor.
75      */
76     FEValuesBase(
77       const MappingCollection<dim, FEValuesType::space_dimension>
78         &mapping_collection,
79       const FECollection<dim, FEValuesType::space_dimension> &fe_collection,
80       const QCollection<q_dim> &                              q_collection,
81       const UpdateFlags                                       update_flags);
82 
83     /**
84      * Constructor. This constructor is equivalent to the other one except
85      * that it makes the object use a $Q_1$ mapping (i.e., an object of type
86      * MappingQGeneric(1)) implicitly.
87      */
88     FEValuesBase(
89       const FECollection<dim, FEValuesType::space_dimension> &fe_collection,
90       const QCollection<q_dim> &                              q_collection,
91       const UpdateFlags                                       update_flags);
92 
93     /**
94      * Copy constructor.
95      */
96     FEValuesBase(const FEValuesBase<dim, q_dim, FEValuesType> &other);
97 
98     /**
99      * Copy operator. While objects of this type can be copy-constructed,
100      * they cannot be copied and consequently this operator is disabled.
101      */
102     FEValuesBase &
103     operator=(const FEValuesBase &) = delete;
104 
105     /**
106      * For timing purposes it may be useful to create all required FE*Values
107      * objects in advance, rather than computing them on request via lazy
108      * allocation as usual in this class.
109      *
110      * This function precalculates the FE*Values objects corresponding to the
111      * provided parameters: The total of all vector entries corresponding to the
112      * same index describes an FE*Values object similarly to select_fe_values().
113      */
114     void
115     precalculate_fe_values(const std::vector<unsigned int> &fe_indices,
116                            const std::vector<unsigned int> &mapping_indices,
117                            const std::vector<unsigned int> &q_indices);
118 
119     /**
120      * Same as above, geared to the most common use of hp::FEValues objects in
121      * which FE, quadrature and mapping indices are similar on each individual
122      * cell.
123      *
124      * FE*Values objects are created for every FE in the FECollection, with
125      * quadrature and mapping corresponding to the same index from the
126      * QuadratureCollection and MappingCollection, respectively.
127      *
128      * If QuadratureCollection or MappingCollection contains only one object, it
129      * is used for all FE*Values objects.
130      */
131     void
132     precalculate_fe_values();
133 
134     /**
135      * Get a reference to the collection of finite element objects used
136      * here.
137      */
138     const FECollection<dim, FEValuesType::space_dimension> &
139     get_fe_collection() const;
140 
141     /**
142      * Get a reference to the collection of mapping objects used here.
143      */
144     const MappingCollection<dim, FEValuesType::space_dimension> &
145     get_mapping_collection() const;
146 
147     /**
148      * Get a reference to the collection of quadrature objects used here.
149      */
150     const QCollection<q_dim> &
151     get_quadrature_collection() const;
152 
153     /**
154      * Get the underlying update flags.
155      */
156     UpdateFlags
157     get_update_flags() const;
158 
159     /**
160      * Return a reference to the @p FEValues object selected by the last
161      * call to select_fe_values(). select_fe_values() in turn is called when
162      * you called the @p reinit function of the <tt>hp::FE*Values</tt> class
163      * the last time.
164      */
165     const FEValuesType &
166     get_present_fe_values() const;
167 
168   protected:
169     /**
170      * Select a FEValues object suitable for the given FE, quadrature, and
171      * mapping indices. If such an object doesn't yet exist, create one.
172      *
173      * The function returns a writable reference so that derived classes can
174      * also reinit() the selected FEValues object.
175      */
176     FEValuesType &
177     select_fe_values(const unsigned int fe_index,
178                      const unsigned int mapping_index,
179                      const unsigned int q_index);
180 
181   protected:
182     /**
183      * A pointer to the collection of finite elements to be used.
184      */
185     const SmartPointer<const FECollection<dim, FEValuesType::space_dimension>,
186                        FEValuesBase<dim, q_dim, FEValuesType>>
187       fe_collection;
188 
189     /**
190      * A pointer to the collection of mappings to be used.
191      */
192     const SmartPointer<
193       const MappingCollection<dim, FEValuesType::space_dimension>,
194       FEValuesBase<dim, q_dim, FEValuesType>>
195       mapping_collection;
196 
197     /**
198      * Copy of the quadrature collection object provided to the constructor.
199      */
200     const QCollection<q_dim> q_collection;
201 
202   private:
203     /**
204      * A table in which we store pointers to fe_values objects for different
205      * finite element, mapping, and quadrature objects from our collection.
206      * The first index indicates the index of the finite element within the
207      * fe_collection, the second the index of the mapping within the mapping
208      * collection, and the last one the index of the quadrature formula
209      * within the q_collection.
210      *
211      * Initially, all entries have zero pointers, and we will allocate them
212      * lazily as needed in select_fe_values() or precalculate_fe_values().
213      */
214     Table<3, std::unique_ptr<FEValuesType>> fe_values_table;
215 
216     /**
217      * Set of indices pointing at the fe_values object selected last time
218      * the select_fe_value() function was called.
219      */
220     TableIndices<3> present_fe_values_index;
221 
222     /**
223      * Values of the update flags as given to the constructor.
224      */
225     const UpdateFlags update_flags;
226   };
227 
228 } // namespace hp
229 
230 
231 namespace hp
232 {
233   /**
234    * An hp equivalent of the ::FEValues class. See the step-27 tutorial
235    * program for examples of use.
236    *
237    * The idea of this class is as follows: when one assembled matrices in the
238    * hp finite element method, there may be different finite elements on
239    * different cells, and consequently one may also want to use different
240    * quadrature formulas for different cells. On the other hand, the
241    * ::FEValues efficiently handles pre-evaluating whatever information is
242    * necessary for a single finite element and quadrature object. This class
243    * brings these concepts together: it provides a "collection" of ::FEValues
244    * objects.
245    *
246    * Upon construction, one passes not one finite element and quadrature
247    * object (and possible a mapping), but a whole collection of type
248    * hp::FECollection and hp::QCollection. Later on, when one sits on a
249    * concrete cell, one would call the reinit() function for this particular
250    * cell, just as one does for a regular ::FEValues object. The difference is
251    * that this time, the reinit() function looks up the active_fe_index of
252    * that cell, if necessary creates a ::FEValues object that matches the
253    * finite element and quadrature formulas with that particular index in
254    * their collections, and then re-initializes it for the current cell. The
255    * ::FEValues object that then fits the finite element and quadrature
256    * formula for the current cell can then be accessed using the
257    * get_present_fe_values() function, and one would work with it just like
258    * with any ::FEValues object for non-hp DoF handler objects.
259    *
260    * The reinit() functions have additional arguments with default values. If
261    * not specified, the function takes the index into the hp::FECollection,
262    * hp::QCollection, and hp::MappingCollection objects from the
263    * active_fe_index of the cell, as explained above. However, one can also
264    * select different indices for a current cell. For example, by specifying a
265    * different index into the hp::QCollection class, one does not need to sort
266    * the quadrature objects in the quadrature collection so that they match
267    * one-to-one the order of finite element objects in the FE collection (even
268    * though choosing such an order is certainly convenient).
269    *
270    * Note that ::FEValues objects are created on the fly, i.e. only as they
271    * are needed. This ensures that we do not create objects for every
272    * combination of finite element, quadrature formula and mapping, but only
273    * those that will actually be needed. Alternatively if desired, this
274    * can be bypassed by computing all objects in advance with the corresponding
275    * hp::FEValuesBase::precalculate_fe_values() function.
276    *
277    * This class has not yet been implemented for the use in the codimension
278    * one case (<tt>spacedim != dim </tt>).
279    *
280    * @ingroup hp hpcollection
281    */
282   template <int dim, int spacedim = dim>
283   class FEValues
284     : public hp::FEValuesBase<dim, dim, dealii::FEValues<dim, spacedim>>
285   {
286   public:
287     static const unsigned int dimension = dim;
288 
289     static const unsigned int space_dimension = spacedim;
290 
291     /**
292      * Constructor. Initialize this object with the given parameters.
293      */
294     FEValues(const MappingCollection<dim, spacedim> &mapping_collection,
295              const FECollection<dim, spacedim> &     fe_collection,
296              const QCollection<dim> &                q_collection,
297              const UpdateFlags                       update_flags);
298 
299 
300     /**
301      * Constructor. This constructor is equivalent to the other one except
302      * that it makes the object use a $Q_1$ mapping (i.e., an object of type
303      * MappingQGeneric(1)) implicitly.
304      */
305     FEValues(const FECollection<dim, spacedim> &fe_collection,
306              const QCollection<dim> &           q_collection,
307              const UpdateFlags                  update_flags);
308 
309 
310     /**
311      * Reinitialize the object for the given cell.
312      *
313      * After the call, you can get an FEValues object using the
314      * get_present_fe_values() function that corresponds to the present cell.
315      * For this FEValues object, we use the additional arguments described
316      * below to determine which finite element, mapping, and quadrature
317      * formula to use. They are order in such a way that the arguments one may
318      * want to change most frequently come first. The rules for these
319      * arguments are as follows:
320      *
321      * If the @p fe_index argument to this function is left at its default
322      * value, then we use that finite element within the hp::FECollection
323      * passed to the constructor of this class with index given by
324      * <code>cell-@>active_fe_index()</code>. Consequently, the
325      * hp::FECollection argument given to this object should really be the
326      * same as that used in the construction of the DoFHandler associated
327      * with the present cell. On the other hand, if a value is given for this
328      * argument, it overrides the choice of
329      * <code>cell-@>active_fe_index()</code>.
330      *
331      * If the @p q_index argument is left at its default value, then we use
332      * that quadrature formula within the hp::QCollection passed to the
333      * constructor of this class with index given by
334      * <code>cell-@>active_fe_index()</code>, i.e. the same index as that of
335      * the finite element. In this case, there should be a corresponding
336      * quadrature formula for each finite element in the hp::FECollection. As
337      * a special case, if the quadrature collection contains only a single
338      * element (a frequent case if one wants to use the same quadrature object
339      * for all finite elements in an hp discretization, even if that may not
340      * be the most efficient), then this single quadrature is used unless a
341      * different value for this argument is specified. On the other hand, if a
342      * value is given for this argument, it overrides the choice of
343      * <code>cell-@>active_fe_index()</code> or the choice for the single
344      * quadrature.
345      *
346      * If the @p mapping_index argument is left at its default value, then we
347      * use that mapping object within the hp::MappingCollection passed to the
348      * constructor of this class with index given by
349      * <code>cell-@>active_fe_index()</code>, i.e. the same index as that of
350      * the finite element. As above, if the mapping collection contains only a
351      * single element (a frequent case if one wants to use a $Q_1$ mapping for
352      * all finite elements in an hp discretization), then this single mapping
353      * is used unless a different value for this argument is specified.
354      */
355     template <bool lda>
356     void
357     reinit(const TriaIterator<DoFCellAccessor<dim, spacedim, lda>> &cell,
358            const unsigned int q_index       = numbers::invalid_unsigned_int,
359            const unsigned int mapping_index = numbers::invalid_unsigned_int,
360            const unsigned int fe_index      = numbers::invalid_unsigned_int);
361 
362     /**
363      * Like the previous function, but for non-DoFHandler iterators. The reason
364      * this function exists is so that one can use hp::FEValues for
365      * Triangulation objects too.
366      *
367      * Since <code>cell-@>active_fe_index()</code> doesn't make sense for
368      * triangulation iterators, this function chooses the zero-th finite
369      * element, mapping, and quadrature object from the relevant constructions
370      * passed to the constructor of this object. The only exception is if you
371      * specify a value different from the default value for any of these last
372      * three arguments.
373      */
374     void
375     reinit(const typename Triangulation<dim, spacedim>::cell_iterator &cell,
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 
383   /**
384    * This is the equivalent of the hp::FEValues class but for face
385    * integrations, i.e. it is to hp::FEValues what ::FEFaceValues is to
386    * ::FEValues.
387    *
388    * The same comments apply as in the documentation of the hp::FEValues
389    * class. However, it is important to note that it is here more common that
390    * one would want to explicitly specify an index to a particular quadrature
391    * formula in the reinit() functions. This is because the default index
392    * corresponds to the finite element index on the current function. On the
393    * other hand, integration on faces will typically have to happen with a
394    * quadrature formula that is adjusted to the finite elements used on both
395    * sides of a face. If one sorts the elements of the hp::FECollection with
396    * ascending polynomial degree, and matches these finite elements with
397    * corresponding quadrature formulas in the hp::QCollection passed to the
398    * constructor, then the quadrature index passed to the reinit() function
399    * should typically be something like <code>std::max
400    * (cell-@>active_fe_index(), neighbor-@>active_fe_index()</code> to ensure
401    * that a quadrature formula is chosen that is sufficiently accurate for
402    * <em>both</em> finite elements.
403    *
404    * @ingroup hp hpcollection
405    */
406   template <int dim, int spacedim = dim>
407   class FEFaceValues
408     : public hp::FEValuesBase<dim, dim - 1, dealii::FEFaceValues<dim, spacedim>>
409   {
410   public:
411     /**
412      * Constructor. Initialize this object with the given parameters.
413      */
414     FEFaceValues(const hp::MappingCollection<dim, spacedim> &mapping_collection,
415                  const hp::FECollection<dim, spacedim> &     fe_collection,
416                  const hp::QCollection<dim - 1> &            q_collection,
417                  const UpdateFlags                           update_flags);
418 
419 
420     /**
421      * Constructor. This constructor is equivalent to the other one except
422      * that it makes the object use a $Q_1$ mapping (i.e., an object of type
423      * MappingQGeneric(1)) implicitly.
424      */
425     FEFaceValues(const hp::FECollection<dim, spacedim> &fe_collection,
426                  const hp::QCollection<dim - 1> &       q_collection,
427                  const UpdateFlags                      update_flags);
428 
429     /**
430      * Reinitialize the object for the given cell and face.
431      *
432      * After the call, you can get an FEFaceValues object using the
433      * get_present_fe_values() function that corresponds to the present cell.
434      * For this FEFaceValues object, we use the additional arguments described
435      * below to determine which finite element, mapping, and quadrature
436      * formula to use. They are order in such a way that the arguments one may
437      * want to change most frequently come first. The rules for these
438      * arguments are as follows:
439      *
440      * If the @p fe_index argument to this function is left at its default
441      * value, then we use that finite element within the hp::FECollection
442      * passed to the constructor of this class with index given by
443      * <code>cell-@>active_fe_index()</code>. Consequently, the
444      * hp::FECollection argument given to this object should really be the
445      * same as that used in the construction of the DoFHandler associated
446      * with the present cell. On the other hand, if a value is given for this
447      * argument, it overrides the choice of
448      * <code>cell-@>active_fe_index()</code>.
449      *
450      * If the @p q_index argument is left at its default value, then we use
451      * that quadrature formula within the hp::QCollection passed to the
452      * constructor of this class with index given by
453      * <code>cell-@>active_fe_index()</code>, i.e. the same index as that of
454      * the finite element. In this case, there should be a corresponding
455      * quadrature formula for each finite element in the hp::FECollection. As
456      * a special case, if the quadrature collection contains only a single
457      * element (a frequent case if one wants to use the same quadrature object
458      * for all finite elements in an hp discretization, even if that may not
459      * be the most efficient), then this single quadrature is used unless a
460      * different value for this argument is specified. On the other hand, if a
461      * value is given for this argument, it overrides the choice of
462      * <code>cell-@>active_fe_index()</code> or the choice for the single
463      * quadrature.
464      *
465      * If the @p mapping_index argument is left at its default value, then we
466      * use that mapping object within the hp::MappingCollection passed to the
467      * constructor of this class with index given by
468      * <code>cell-@>active_fe_index()</code>, i.e. the same index as that of
469      * the finite element. As above, if the mapping collection contains only a
470      * single element (a frequent case if one wants to use a $Q_1$ mapping for
471      * all finite elements in an hp discretization), then this single mapping
472      * is used unless a different value for this argument is specified.
473      */
474     template <bool lda>
475     void
476     reinit(const TriaIterator<DoFCellAccessor<dim, spacedim, lda>> &cell,
477            const unsigned int                                       face_no,
478            const unsigned int q_index       = numbers::invalid_unsigned_int,
479            const unsigned int mapping_index = numbers::invalid_unsigned_int,
480            const unsigned int fe_index      = numbers::invalid_unsigned_int);
481 
482     /**
483      * Reinitialize the object for the given cell and face.
484      *
485      * @note @p face must be one of @p cell's face iterators.
486      */
487     template <bool lda>
488     void
489     reinit(const TriaIterator<DoFCellAccessor<dim, spacedim, lda>> &   cell,
490            const typename Triangulation<dim, spacedim>::face_iterator &face,
491            const unsigned int q_index       = numbers::invalid_unsigned_int,
492            const unsigned int mapping_index = numbers::invalid_unsigned_int,
493            const unsigned int fe_index      = numbers::invalid_unsigned_int);
494 
495     /**
496      * Like the previous function, but for non-DoFHandler iterators. The reason
497      * this function exists is so that one can use this class for
498      * Triangulation objects too.
499      *
500      * Since <code>cell-@>active_fe_index()</code> doesn't make sense for
501      * triangulation iterators, this function chooses the zero-th finite
502      * element, mapping, and quadrature object from the relevant constructions
503      * passed to the constructor of this object. The only exception is if you
504      * specify a value different from the default value for any of these last
505      * three arguments.
506      */
507     void
508     reinit(const typename Triangulation<dim, spacedim>::cell_iterator &cell,
509            const unsigned int                                          face_no,
510            const unsigned int q_index       = numbers::invalid_unsigned_int,
511            const unsigned int mapping_index = numbers::invalid_unsigned_int,
512            const unsigned int fe_index      = numbers::invalid_unsigned_int);
513 
514     /**
515      * Reinitialize the object for the given cell and face.
516      *
517      * @note @p face must be one of @p cell's face iterators.
518      */
519     void
520     reinit(const typename Triangulation<dim, spacedim>::cell_iterator &cell,
521            const typename Triangulation<dim, spacedim>::face_iterator &face,
522            const unsigned int q_index       = numbers::invalid_unsigned_int,
523            const unsigned int mapping_index = numbers::invalid_unsigned_int,
524            const unsigned int fe_index      = numbers::invalid_unsigned_int);
525   };
526 
527 
528 
529   /**
530    * This class implements for subfaces what hp::FEFaceValues does for faces.
531    * See there for further documentation.
532    *
533    * @ingroup hp hpcollection
534    */
535   template <int dim, int spacedim = dim>
536   class FESubfaceValues
537     : public hp::
538         FEValuesBase<dim, dim - 1, dealii::FESubfaceValues<dim, spacedim>>
539   {
540   public:
541     /**
542      * Constructor. Initialize this object with the given parameters.
543      */
544     FESubfaceValues(
545       const hp::MappingCollection<dim, spacedim> &mapping_collection,
546       const hp::FECollection<dim, spacedim> &     fe_collection,
547       const hp::QCollection<dim - 1> &            q_collection,
548       const UpdateFlags                           update_flags);
549 
550 
551     /**
552      * Constructor. This constructor is equivalent to the other one except
553      * that it makes the object use a $Q_1$ mapping (i.e., an object of type
554      * MappingQGeneric(1)) implicitly.
555      */
556     FESubfaceValues(const hp::FECollection<dim, spacedim> &fe_collection,
557                     const hp::QCollection<dim - 1> &       q_collection,
558                     const UpdateFlags                      update_flags);
559 
560     /**
561      * Reinitialize the object for the given cell, face, and subface.
562      *
563      * After the call, you can get an FESubfaceValues object using the
564      * get_present_fe_values() function that corresponds to the present cell.
565      * For this FESubfaceValues object, we use the additional arguments
566      * described below to determine which finite element, mapping, and
567      * quadrature formula to use. They are order in such a way that the
568      * arguments one may want to change most frequently come first. The rules
569      * for these arguments are as follows:
570      *
571      * If the @p q_index argument is left at its default value, then we use
572      * that quadrature formula within the hp::QCollection passed to the
573      * constructor of this class with index given by
574      * <code>cell-@>active_fe_index()</code>, i.e. the same index as that of
575      * the finite element. In this case, there should be a corresponding
576      * quadrature formula for each finite element in the hp::FECollection. As
577      * a special case, if the quadrature collection contains only a single
578      * element (a frequent case if one wants to use the same quadrature object
579      * for all finite elements in an hp discretization, even if that may not
580      * be the most efficient), then this single quadrature is used unless a
581      * different value for this argument is specified. On the other hand, if a
582      * value is given for this argument, it overrides the choice of
583      * <code>cell-@>active_fe_index()</code> or the choice for the single
584      * quadrature.
585      *
586      * If the @p mapping_index argument is left at its default value, then we
587      * use that mapping object within the hp::MappingCollection passed to the
588      * constructor of this class with index given by
589      * <code>cell-@>active_fe_index()</code>, i.e. the same index as that of
590      * the finite element. As above, if the mapping collection contains only a
591      * single element (a frequent case if one wants to use a $Q_1$ mapping for
592      * all finite elements in an hp discretization), then this single mapping
593      * is used unless a different value for this argument is specified.
594      */
595     template <bool lda>
596     void
597     reinit(const TriaIterator<DoFCellAccessor<dim, spacedim, lda>> &cell,
598            const unsigned int                                       face_no,
599            const unsigned int                                       subface_no,
600            const unsigned int q_index       = numbers::invalid_unsigned_int,
601            const unsigned int mapping_index = numbers::invalid_unsigned_int,
602            const unsigned int fe_index      = numbers::invalid_unsigned_int);
603 
604     /**
605      * Like the previous function, but for non-DoFHandler iterators. The reason
606      * this function exists is so that one can use this class for
607      * Triangulation objects too.
608      *
609      * Since <code>cell-@>active_fe_index()</code> doesn't make sense for
610      * Triangulation iterators, this function chooses the zero-th finite
611      * element, mapping, and quadrature object from the relevant constructions
612      * passed to the constructor of this object. The only exception is if you
613      * specify a value different from the default value for any of these last
614      * three arguments.
615      */
616     void
617     reinit(const typename Triangulation<dim, spacedim>::cell_iterator &cell,
618            const unsigned int                                          face_no,
619            const unsigned int subface_no,
620            const unsigned int q_index       = numbers::invalid_unsigned_int,
621            const unsigned int mapping_index = numbers::invalid_unsigned_int,
622            const unsigned int fe_index      = numbers::invalid_unsigned_int);
623   };
624 
625 } // namespace hp
626 
627 
628 // -------------- inline and template functions --------------
629 
630 namespace hp
631 {
632   template <int dim, int q_dim, class FEValuesType>
633   inline const FEValuesType &
get_present_fe_values()634   FEValuesBase<dim, q_dim, FEValuesType>::get_present_fe_values() const
635   {
636     return *fe_values_table(present_fe_values_index);
637   }
638 
639 
640 
641   template <int dim, int q_dim, class FEValuesType>
642   inline const FECollection<dim, FEValuesType::space_dimension> &
get_fe_collection()643   FEValuesBase<dim, q_dim, FEValuesType>::get_fe_collection() const
644   {
645     return *fe_collection;
646   }
647 
648 
649 
650   template <int dim, int q_dim, class FEValuesType>
651   inline const MappingCollection<dim, FEValuesType::space_dimension> &
get_mapping_collection()652   FEValuesBase<dim, q_dim, FEValuesType>::get_mapping_collection() const
653   {
654     return *mapping_collection;
655   }
656 
657 
658 
659   template <int dim, int q_dim, class FEValuesType>
660   inline const QCollection<q_dim> &
get_quadrature_collection()661   FEValuesBase<dim, q_dim, FEValuesType>::get_quadrature_collection() const
662   {
663     return q_collection;
664   }
665 
666 
667 
668   template <int dim, int q_dim, class FEValuesType>
669   inline UpdateFlags
get_update_flags()670   FEValuesBase<dim, q_dim, FEValuesType>::get_update_flags() const
671   {
672     return update_flags;
673   }
674 } // namespace hp
675 
676 DEAL_II_NAMESPACE_CLOSE
677 
678 #endif
679