Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fe_dg_vector.h
1 // ---------------------------------------------------------------------
2 // @f$Id: fe_dg_vector.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 2010 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 #ifndef __deal2__fe_dg_vector_h
18 #define __deal2__fe_dg_vector_h
19 
20 #include <deal.II/base/config.h>
21 #include <deal.II/base/table.h>
22 #include <deal.II/base/polynomials_raviart_thomas.h>
23 #include <deal.II/base/polynomials_nedelec.h>
24 #include <deal.II/base/polynomials_bdm.h>
25 #include <deal.II/base/polynomial.h>
26 #include <deal.II/base/tensor_product_polynomials.h>
27 #include <deal.II/base/geometry_info.h>
28 #include <deal.II/fe/fe.h>
29 #include <deal.II/fe/fe_poly_tensor.h>
30 
31 #include <vector>
32 
33 DEAL_II_NAMESPACE_OPEN
34 
35 template <int dim, int spacedim> class MappingQ;
36 
37 
56 template <class POLY, int dim, int spacedim=dim>
58  :
59  public FE_PolyTensor<POLY, dim, spacedim>
60 {
61 public:
66  FE_DGVector (const unsigned int p, MappingType m);
67 public:
68 
70 
80  virtual std::string get_name () const;
81 
82 
90  virtual bool has_support_on_face (const unsigned int shape_index,
91  const unsigned int face_index) const;
92 
93  virtual void interpolate(std::vector<double> &local_dofs,
94  const std::vector<double> &values) const;
95  virtual void interpolate(std::vector<double> &local_dofs,
96  const std::vector<Vector<double> > &values,
97  unsigned int offset = 0) const;
98  virtual void interpolate(
99  std::vector<double> &local_dofs,
100  const VectorSlice<const std::vector<std::vector<double> > > &values) const;
101  virtual std::size_t memory_consumption () const;
102 
103 private:
114  static std::vector<unsigned int>
115  get_dpo_vector (const unsigned int degree);
116 
128  void initialize_support_points (const unsigned int degree);
129 
141  void initialize_restriction ();
142 
151  class InternalData : public FiniteElement<dim>::InternalDataBase
152  {
153  public:
177  std::vector<std::vector<Tensor<1,dim> > > shape_values;
178 
197  std::vector<std::vector<Tensor<2,dim> > > shape_gradients;
198  };
199  Table<3, double> interior_weights;
200 };
201 
202 
203 
211 template <int dim, int spacedim=dim>
212 class FE_DGNedelec : public FE_DGVector<PolynomialsNedelec<dim>, dim, spacedim>
213 {
214 public:
219  FE_DGNedelec (const unsigned int p);
220 
230  virtual std::string get_name () const;
231 };
232 
233 
234 
242 template <int dim, int spacedim=dim>
243 class FE_DGRaviartThomas : public FE_DGVector<PolynomialsRaviartThomas<dim>, dim, spacedim>
244 {
245 public:
250  FE_DGRaviartThomas (const unsigned int p);
251 
261  virtual std::string get_name () const;
262 };
263 
264 
265 
273 template <int dim, int spacedim=dim>
274 class FE_DGBDM : public FE_DGVector<PolynomialsBDM<dim>, dim, spacedim>
275 {
276 public:
281  FE_DGBDM (const unsigned int p);
282 
292  virtual std::string get_name () const;
293 };
294 
295 
296 DEAL_II_NAMESPACE_CLOSE
297 
298 #endif
FE_DGNedelec(const unsigned int p)
MappingType
Definition: mapping.h:58
FE_DGRaviartThomas(const unsigned int p)
FE_DGBDM(const unsigned int p)
const unsigned int degree
Definition: fe_base.h:287
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
virtual std::string get_name() const
std::vector< std::vector< Tensor< 2, dim > > > shape_gradients
Definition: fe_dg_vector.h:197
void initialize_restriction()
FiniteElement< dim, spacedim > * clone() const
virtual void interpolate(std::vector< double > &local_dofs, const std::vector< double > &values) const
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
virtual std::size_t memory_consumption() const
FE_DGVector(const unsigned int p, MappingType m)
virtual std::string get_name() const
virtual std::string get_name() const
void initialize_support_points(const unsigned int degree)
std::vector< std::vector< Tensor< 1, dim > > > shape_values
Definition: fe_dg_vector.h:177
virtual std::string get_name() const