Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fe_dg_vector.templates.h
1 // ---------------------------------------------------------------------
2 // @f$Id: fe_dg_vector.templates.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 2006 - 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 
18 #include <deal.II/fe/fe_dg_vector.h>
19 #include <deal.II/fe/fe_tools.h>
20 #include <deal.II/base/quadrature_lib.h>
21 
22 DEAL_II_NAMESPACE_OPEN
23 
24 
25 //TODO:[GK] deg+1 is wrong here and should bew fixed after FiniteElementData was cleaned up
26 
27 template <class POLY, int dim, int spacedim>
29  const unsigned int deg, MappingType map)
30  :
31  FE_PolyTensor<POLY, dim, spacedim>(
32  deg,
33  FiniteElementData<dim>(
34  get_dpo_vector(deg), dim, deg+1, FiniteElementData<dim>::L2, 1),
35  std::vector<bool>(POLY::compute_n_pols(deg), true),
36  std::vector<ComponentMask>(POLY::compute_n_pols(deg),
37  ComponentMask(dim,true)))
38 {
39  this->mapping_type = map;
40  const unsigned int polynomial_degree = this->tensor_degree();
41 
42  QGauss<dim> quadrature(polynomial_degree+1);
43  this->generalized_support_points = quadrature.get_points();
44 
48 }
49 
50 
51 template <class POLY, int dim, int spacedim>
54 {
55  return new FE_DGVector<POLY, dim, spacedim>(*this);
56 }
57 
58 
59 template <class POLY, int dim, int spacedim>
60 std::string
62 {
63  std::ostringstream namebuf;
64  namebuf << "FE_DGVector_" << this->poly_space.name()
65  << "<" << dim << ">(" << this->degree-1 << ")";
66  return namebuf.str();
67 }
68 
69 
70 template <class POLY, int dim, int spacedim>
71 std::vector<unsigned int>
73 {
74  std::vector<unsigned int> dpo(dim+1);
75  dpo[dim] = POLY::compute_n_pols(deg);
76 
77  return dpo;
78 }
79 
80 
81 template <class POLY, int dim, int spacedim>
82 bool
84  const unsigned int,
85  const unsigned int) const
86 {
87  return true;
88 }
89 
90 
91 template <class POLY, int dim, int spacedim>
92 void
94  std::vector<double> &,
95  const std::vector<double> &) const
96 {
97  Assert(false, ExcNotImplemented());
98 }
99 
100 
101 template <class POLY, int dim, int spacedim>
102 void
104  std::vector<double> & /*local_dofs*/,
105  const std::vector<Vector<double> > & /*values*/,
106  unsigned int /*offset*/) const
107 {
108  Assert(false, ExcNotImplemented());
109 }
110 
111 template <class POLY, int dim, int spacedim>
112 void
114  std::vector<double> & /*local_dofs*/,
115  const VectorSlice<const std::vector<std::vector<double> > > & /*values*/) const
116 {
117  Assert(false, ExcNotImplemented());
118 }
119 
120 
121 template <class POLY, int dim, int spacedim>
122 std::size_t
124 {
125  Assert(false, ExcNotImplemented());
126  return 0;
127 }
128 
129 DEAL_II_NAMESPACE_CLOSE
MappingType
Definition: mapping.h:58
const std::vector< Point< dim > > & get_points() const
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
std::vector< std::vector< FullMatrix< double > > > restriction
Definition: fe.h:1639
unsigned int tensor_degree() const
#define Assert(cond, exc)
Definition: exceptions.h:299
void compute_embedding_matrices(const FiniteElement< dim, spacedim > &fe, std::vector< std::vector< FullMatrix< number > > > &matrices, const bool isotropic_only=false)
std::vector< Point< dim > > generalized_support_points
Definition: fe.h:1690
FiniteElement< dim, spacedim > * clone() const
virtual void interpolate(std::vector< double > &local_dofs, const std::vector< double > &values) const
std::vector< std::vector< FullMatrix< double > > > prolongation
Definition: fe.h:1653
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
MappingType mapping_type
void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
virtual std::size_t memory_consumption() const
FE_DGVector(const unsigned int p, MappingType m)
void compute_projection_matrices(const FiniteElement< dim, spacedim > &fe, std::vector< std::vector< FullMatrix< number > > > &matrices, const bool isotropic_only=false)
::ExceptionBase & ExcNotImplemented()
virtual std::string get_name() const