Reference documentation for deal.II version Git 840703ecf3 2019-10-14 17:15:20 -0400
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
fe_raviart_thomas.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_fe_raviart_thomas_h
17 #define dealii_fe_raviart_thomas_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/geometry_info.h>
22 #include <deal.II/base/polynomial.h>
23 #include <deal.II/base/polynomials_raviart_thomas.h>
24 #include <deal.II/base/table.h>
25 #include <deal.II/base/tensor_product_polynomials.h>
26 
27 #include <deal.II/fe/fe.h>
28 #include <deal.II/fe/fe_poly_tensor.h>
29 
30 #include <vector>
31 
32 DEAL_II_NAMESPACE_OPEN
33 
36 
129 template <int dim>
130 class FE_RaviartThomas : public FE_PolyTensor<dim>
131 {
132 public:
136  FE_RaviartThomas(const unsigned int p);
137 
143  virtual std::string
144  get_name() const override;
145 
146  // documentation inherited from the base class
147  virtual std::unique_ptr<FiniteElement<dim, dim>>
148  clone() const override;
149 
157  virtual bool
158  has_support_on_face(const unsigned int shape_index,
159  const unsigned int face_index) const override;
160 
161  // documentation inherited from the base class
162  virtual void
164  const std::vector<Vector<double>> &support_point_values,
165  std::vector<double> & nodal_values) const override;
166 
171  virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
172  get_constant_modes() const override;
173 
174  virtual std::size_t
175  memory_consumption() const override;
176 
177 private:
184  static std::vector<unsigned int>
185  get_dpo_vector(const unsigned int degree);
186 
192  void
193  initialize_support_points(const unsigned int rt_degree);
194 
201  void
203 
215 
223 
224  // Allow access from other dimensions.
225  template <int dim1>
226  friend class FE_RaviartThomas;
227 };
228 
229 
230 
270 template <int dim>
272 {
273 public:
277  FE_RaviartThomasNodal(const unsigned int p);
278 
284  virtual std::string
285  get_name() const override;
286 
287  // documentation inherited from the base class
288  virtual std::unique_ptr<FiniteElement<dim, dim>>
289  clone() const override;
290 
291  virtual void
293  const std::vector<Vector<double>> &support_point_values,
294  std::vector<double> & nodal_values) const override;
295 
296  virtual void
298  FullMatrix<double> &matrix) const override;
299 
300  virtual void
302  const unsigned int subface,
303  FullMatrix<double> &matrix) const override;
304  virtual bool
305  hp_constraints_are_implemented() const override;
306 
307  virtual std::vector<std::pair<unsigned int, unsigned int>>
308  hp_vertex_dof_identities(const FiniteElement<dim> &fe_other) const override;
309 
310  virtual std::vector<std::pair<unsigned int, unsigned int>>
311  hp_line_dof_identities(const FiniteElement<dim> &fe_other) const override;
312 
313  virtual std::vector<std::pair<unsigned int, unsigned int>>
314  hp_quad_dof_identities(const FiniteElement<dim> &fe_other) const override;
315 
321  const unsigned int codim = 0) const override final;
322 
323 private:
330  static std::vector<unsigned int>
331  get_dpo_vector(const unsigned int degree);
332 
337  static std::vector<bool>
338  get_ria_vector(const unsigned int degree);
339 
347  virtual bool
348  has_support_on_face(const unsigned int shape_index,
349  const unsigned int face_index) const override;
359  void
360  initialize_support_points(const unsigned int rt_degree);
361 };
362 
363 
366 /* -------------- declaration of explicit specializations ------------- */
367 
368 #ifndef DOXYGEN
369 
370 template <>
371 void
373 
374 #endif // DOXYGEN
375 
376 DEAL_II_NAMESPACE_CLOSE
377 
378 #endif
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
Definition: fe.cc:895
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:950
const unsigned int degree
Definition: fe_base.h:298
virtual std::size_t memory_consumption() const override
virtual std::string get_name() const override
void initialize_support_points(const unsigned int rt_degree)
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
Definition: fe.cc:911
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:928
virtual std::unique_ptr< FiniteElement< dim, dim > > clone() const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Definition: fe.cc:939
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
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const
Definition: fe.cc:971
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
virtual bool hp_constraints_are_implemented() const
Definition: fe.cc:820
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
Table< 3, double > interior_weights
Table< 2, double > boundary_weights