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_face.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2009 - 2019 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_fe_face_h
17 #define dealii_fe_face_h
18 
19 #include <deal.II/base/config.h>
20 
23 
25 
27 
28 
56 template <int dim, int spacedim = dim>
57 class FE_FaceQ
58  : public FE_PolyFace<TensorProductPolynomials<dim - 1>, dim, spacedim>
59 {
60 public:
66  FE_FaceQ(const unsigned int p);
67 
68  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
69  clone() const override;
70 
76  virtual std::string
77  get_name() const override;
78 
86  virtual void
88  const std::vector<Vector<double>> &support_point_values,
89  std::vector<double> & nodal_values) const override;
90 
99  virtual void
101  FullMatrix<double> &matrix) const override;
102 
111  virtual void
113  const unsigned int subface,
114  FullMatrix<double> &matrix) const override;
115 
120  virtual bool
121  has_support_on_face(const unsigned int shape_index,
122  const unsigned int face_index) const override;
123 
146  virtual std::vector<std::pair<unsigned int, unsigned int>>
148  const FiniteElement<dim, spacedim> &fe_other) const override;
149 
156  virtual std::vector<std::pair<unsigned int, unsigned int>>
158  const FiniteElement<dim, spacedim> &fe_other) const override;
159 
166  virtual std::vector<std::pair<unsigned int, unsigned int>>
168  const FiniteElement<dim, spacedim> &fe_other) const override;
169 
174  virtual bool
175  hp_constraints_are_implemented() const override;
176 
182  const unsigned int codim = 0) const override final;
183 
192  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
193  get_constant_modes() const override;
194 
195 private:
199  static std::vector<unsigned int>
200  get_dpo_vector(const unsigned int deg);
201 };
202 
203 
204 
217 template <int spacedim>
218 class FE_FaceQ<1, spacedim> : public FiniteElement<1, spacedim>
219 {
220 public:
224  FE_FaceQ(const unsigned int p);
225 
226  virtual std::unique_ptr<FiniteElement<1, spacedim>>
227  clone() const override;
228 
234  virtual std::string
235  get_name() const override;
236 
237  // for documentation, see the FiniteElement base class
238  virtual UpdateFlags
239  requires_update_flags(const UpdateFlags update_flags) const override;
240 
249  virtual void
251  FullMatrix<double> &matrix) const override;
252 
261  virtual void
263  const unsigned int subface,
264  FullMatrix<double> &matrix) const override;
265 
270  virtual bool
271  has_support_on_face(const unsigned int shape_index,
272  const unsigned int face_index) const override;
273 
278  virtual bool
279  hp_constraints_are_implemented() const override;
280 
298  virtual std::vector<std::pair<unsigned int, unsigned int>>
300  const FiniteElement<1, spacedim> &fe_other) const override;
301 
308  virtual std::vector<std::pair<unsigned int, unsigned int>>
310  const FiniteElement<1, spacedim> &fe_other) const override;
311 
318  virtual std::vector<std::pair<unsigned int, unsigned int>>
320  const FiniteElement<1, spacedim> &fe_other) const override;
321 
326  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
327  get_constant_modes() const override;
328 
329 protected:
330  /*
331  * NOTE: The following functions have their definitions inlined into the class
332  * declaration because we otherwise run into a compiler error with MS Visual
333  * Studio.
334  */
335 
336 
337  virtual std::unique_ptr<typename FiniteElement<1, spacedim>::InternalDataBase>
339  const UpdateFlags /*update_flags*/,
340  const Mapping<1, spacedim> & /*mapping*/,
341  const Quadrature<1> & /*quadrature*/,
343  spacedim>
344  & /*output_data*/) const override
345  {
346  return std_cxx14::make_unique<
348  }
349 
350  std::unique_ptr<typename FiniteElement<1, spacedim>::InternalDataBase>
352  const UpdateFlags update_flags,
353  const Mapping<1, spacedim> & /*mapping*/,
354  const Quadrature<0> &quadrature,
356  spacedim>
357  & /*output_data*/) const override
358  {
359  // generate a new data object and initialize some fields
360  auto data_ptr = std_cxx14::make_unique<
362  data_ptr->update_each = requires_update_flags(update_flags);
363 
364  const unsigned int n_q_points = quadrature.size();
365  AssertDimension(n_q_points, 1);
366  (void)n_q_points;
367 
368  // No derivatives of this element are implemented.
369  if (data_ptr->update_each & update_gradients ||
370  data_ptr->update_each & update_hessians)
371  {
372  Assert(false, ExcNotImplemented());
373  }
374 
375  return data_ptr;
376  }
377 
378  std::unique_ptr<typename FiniteElement<1, spacedim>::InternalDataBase>
380  const UpdateFlags update_flags,
381  const Mapping<1, spacedim> &mapping,
382  const Quadrature<0> & quadrature,
384  spacedim>
385  &output_data) const override
386  {
387  return get_face_data(update_flags, mapping, quadrature, output_data);
388  }
389 
390  virtual void
392  const typename Triangulation<1, spacedim>::cell_iterator &cell,
393  const CellSimilarity::Similarity cell_similarity,
394  const Quadrature<1> & quadrature,
395  const Mapping<1, spacedim> & mapping,
396  const typename Mapping<1, spacedim>::InternalDataBase & mapping_internal,
397  const ::internal::FEValuesImplementation::MappingRelatedData<1,
398  spacedim>
399  & mapping_data,
400  const typename FiniteElement<1, spacedim>::InternalDataBase &fe_internal,
402  spacedim>
403  &output_data) const override;
404 
405  virtual void
407  const typename Triangulation<1, spacedim>::cell_iterator &cell,
408  const unsigned int face_no,
409  const Quadrature<0> & quadrature,
410  const Mapping<1, spacedim> & mapping,
411  const typename Mapping<1, spacedim>::InternalDataBase & mapping_internal,
412  const ::internal::FEValuesImplementation::MappingRelatedData<1,
413  spacedim>
414  & mapping_data,
415  const typename FiniteElement<1, spacedim>::InternalDataBase &fe_internal,
417  spacedim>
418  &output_data) const override;
419 
420  virtual void
422  const typename Triangulation<1, spacedim>::cell_iterator &cell,
423  const unsigned int face_no,
424  const unsigned int sub_no,
425  const Quadrature<0> & quadrature,
426  const Mapping<1, spacedim> & mapping,
427  const typename Mapping<1, spacedim>::InternalDataBase & mapping_internal,
428  const ::internal::FEValuesImplementation::MappingRelatedData<1,
429  spacedim>
430  & mapping_data,
431  const typename FiniteElement<1, spacedim>::InternalDataBase &fe_internal,
433  spacedim>
434  &output_data) const override;
435 
436 private:
440  static std::vector<unsigned int>
441  get_dpo_vector(const unsigned int deg);
442 };
443 
444 
445 
470 template <int dim, int spacedim = dim>
471 class FE_FaceP : public FE_PolyFace<PolynomialSpace<dim - 1>, dim, spacedim>
472 {
473 public:
479  FE_FaceP(unsigned int p);
480 
481  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
482  clone() const override;
483 
489  virtual std::string
490  get_name() const override;
491 
500  virtual void
502  FullMatrix<double> &matrix) const override;
503 
512  virtual void
514  const unsigned int subface,
515  FullMatrix<double> &matrix) const override;
516 
521  virtual bool
522  has_support_on_face(const unsigned int shape_index,
523  const unsigned int face_index) const override;
524 
529  virtual bool
530  hp_constraints_are_implemented() const override;
531 
537  const unsigned int codim = 0) const override final;
538 
545  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
546  get_constant_modes() const override;
547 
548 private:
552  static std::vector<unsigned int>
553  get_dpo_vector(const unsigned int deg);
554 };
555 
556 
557 
562 template <int spacedim>
563 class FE_FaceP<1, spacedim> : public FE_FaceQ<1, spacedim>
564 {
565 public:
569  FE_FaceP(const unsigned int p);
570 
574  std::string
575  get_name() const override;
576 };
577 
578 
580 
581 #endif
tensor_product_polynomials.h
FE_PolyFace
Definition: fe_poly_face.h:61
internal::FEValuesImplementation::FiniteElementRelatedData
Definition: fe_update_flags.h:524
FE_FaceP
Definition: fe_face.h:471
FE_FaceQ< 1, spacedim >::get_data
virtual std::unique_ptr< typename FiniteElement< 1, spacedim >::InternalDataBase > get_data(const UpdateFlags, const Mapping< 1, spacedim > &, const Quadrature< 1 > &, ::internal::FEValuesImplementation::FiniteElementRelatedData< 1, spacedim > &) const override
Definition: fe_face.h:338
FE_FaceP::get_face_interpolation_matrix
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
Definition: fe_face.cc:862
FE_FaceQ::hp_vertex_dof_identities
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
Definition: fe_face.cc:282
StandardExceptions::ExcNotImplemented
static ::ExceptionBase & ExcNotImplemented()
Triangulation
Definition: tria.h:1109
FE_FaceQ::get_dpo_vector
static std::vector< unsigned int > get_dpo_vector(const unsigned int deg)
Definition: fe_face.cc:260
FE_FaceQ::hp_line_dof_identities
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
Definition: fe_face.cc:293
FE_FaceP::clone
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
Definition: fe_face.cc:762
CellSimilarity::Similarity
Similarity
Definition: fe_update_flags.h:378
FE_FaceQ
Definition: fe_face.h:57
FE_FaceP::get_constant_modes
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
Definition: fe_face.cc:979
fe_poly_face.h
FE_FaceQ::get_face_interpolation_matrix
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
Definition: fe_face.cc:147
FE_FaceQ< 1, spacedim >::get_subface_data
std::unique_ptr< typename FiniteElement< 1, spacedim >::InternalDataBase > get_subface_data(const UpdateFlags update_flags, const Mapping< 1, spacedim > &mapping, const Quadrature< 0 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< 1, spacedim > &output_data) const override
Definition: fe_face.h:379
FE_FaceQ::has_support_on_face
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
Definition: fe_face.cc:249
FE_FaceQ::compare_for_domination
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
Definition: fe_face.cc:439
FE_FaceP::get_name
virtual std::string get_name() const override
Definition: fe_face.cc:771
FE_FaceQ::get_constant_modes
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
Definition: fe_face.cc:476
Mapping
Abstract base class for mapping classes.
Definition: mapping.h:302
FE_FaceP::hp_constraints_are_implemented
virtual bool hp_constraints_are_implemented() const override
Definition: fe_face.cc:814
FiniteElementDomination::Domination
Domination
Definition: fe_base.h:83
FE_PolyFace< TensorProductPolynomials< dim - 1 >, dim, dim >::get_face_data
std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_face_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &, const Quadrature< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &) const override
Definition: fe_poly_face.h:104
FE_FaceP::compare_for_domination
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
Definition: fe_face.cc:823
FE_FaceQ< 1, spacedim >::get_face_data
std::unique_ptr< typename FiniteElement< 1, spacedim >::InternalDataBase > get_face_data(const UpdateFlags update_flags, const Mapping< 1, spacedim > &, const Quadrature< 0 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< 1, spacedim > &) const override
Definition: fe_face.h:351
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
FE_FaceQ::get_name
virtual std::string get_name() const override
Definition: fe_face.cc:131
update_gradients
@ update_gradients
Shape function gradients.
Definition: fe_update_flags.h:84
LAPACKSupport::matrix
@ matrix
Contents is actually a matrix.
Definition: lapack_support.h:60
polynomial_space.h
AssertDimension
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1579
FiniteElement
Definition: fe.h:648
UpdateFlags
UpdateFlags
Definition: fe_update_flags.h:66
FE_FaceQ::FE_FaceQ
FE_FaceQ(const unsigned int p)
Definition: fe_face.cc:51
FE_FaceQ::get_subface_interpolation_matrix
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const override
Definition: fe_face.cc:160
FE_FaceQ::hp_constraints_are_implemented
virtual bool hp_constraints_are_implemented() const override
Definition: fe_face.cc:273
FE_PolyFace< TensorProductPolynomials< dim - 1 >, dim, dim >::requires_update_flags
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
FE_FaceQ::clone
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
Definition: fe_face.cc:122
Assert
#define Assert(cond, exc)
Definition: exceptions.h:1419
update_hessians
@ update_hessians
Second derivatives of shape functions.
Definition: fe_update_flags.h:90
Mapping::InternalDataBase
Definition: mapping.h:597
FE_FaceP::has_support_on_face
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
Definition: fe_face.cc:787
FE_FaceP::get_subface_interpolation_matrix
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const override
Definition: fe_face.cc:875
FE_FaceQ::convert_generalized_support_point_values_to_dof_values
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double >> &support_point_values, std::vector< double > &nodal_values) const override
Definition: fe_face.cc:487
FE_FaceP::get_dpo_vector
static std::vector< unsigned int > get_dpo_vector(const unsigned int deg)
Definition: fe_face.cc:798
config.h
Quadrature::size
unsigned int size() const
FullMatrix< double >
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
FE_PolyFace< TensorProductPolynomials< dim - 1 >, dim, dim >::fill_fe_face_values
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const Quadrature< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const ::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
Quadrature< 1 >
Vector< double >
FE_FaceQ::hp_quad_dof_identities
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
Definition: fe_face.cc:362
FE_PolyFace< TensorProductPolynomials< dim - 1 >, dim, dim >::fill_fe_values
virtual void fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const ::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
FE_FaceP::FE_FaceP
FE_FaceP(unsigned int p)
Definition: fe_face.cc:747
FE_PolyFace< TensorProductPolynomials< dim - 1 >, dim, dim >::fill_fe_subface_values
virtual void fill_fe_subface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const ::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override