Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
polynomials_bdm.h
1 // ---------------------------------------------------------------------
2 // @f$Id: polynomials_bdm.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 2004 - 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__polynomials_BDM_h
18 #define __deal2__polynomials_BDM_h
19 
20 
21 #include <deal.II/base/config.h>
23 #include <deal.II/base/tensor.h>
24 #include <deal.II/base/point.h>
25 #include <deal.II/base/polynomial.h>
26 #include <deal.II/base/polynomial_space.h>
27 #include <deal.II/base/table.h>
28 #include <deal.II/base/thread_management.h>
29 
30 #include <vector>
31 
32 DEAL_II_NAMESPACE_OPEN
33 
62 template <int dim>
64 {
65 public:
78  PolynomialsBDM (const unsigned int k);
79 
104  void compute (const Point<dim> &unit_point,
105  std::vector<Tensor<1,dim> > &values,
106  std::vector<Tensor<2,dim> > &grads,
107  std::vector<Tensor<3,dim> > &grad_grads) const;
108 
112  unsigned int n () const;
113 
119  unsigned int degree () const;
120 
125  std::string name () const;
126 
136  static unsigned int compute_n_pols(unsigned int degree);
137 
138 private:
146 
154  std::vector<Polynomials::Polynomial<double> > monomials;
155 
160  unsigned int n_pols;
161 
167 
171  mutable std::vector<double> p_values;
172 
176  mutable std::vector<Tensor<1,dim> > p_grads;
177 
181  mutable std::vector<Tensor<2,dim> > p_grad_grads;
182 };
183 
184 
185 template <int dim>
186 inline unsigned int
188 {
189  return n_pols;
190 }
191 
192 
193 template <int dim>
194 inline unsigned int
196 {
197  return polynomial_space.degree();
198 }
199 
200 
201 template <int dim>
202 inline std::string
204 {
205  return "BDM";
206 }
207 
208 
209 DEAL_II_NAMESPACE_CLOSE
210 
211 #endif
PolynomialsBDM(const unsigned int k)
unsigned int n() const
std::vector< Polynomials::Polynomial< double > > monomials
void compute(const Point< dim > &unit_point, std::vector< Tensor< 1, dim > > &values, std::vector< Tensor< 2, dim > > &grads, std::vector< Tensor< 3, dim > > &grad_grads) const
std::vector< Tensor< 1, dim > > p_grads
static unsigned int compute_n_pols(unsigned int degree)
unsigned int degree() const
std::string name() const
std::vector< double > p_values
std::vector< Tensor< 2, dim > > p_grad_grads
unsigned int n_pols
Threads::Mutex mutex
const PolynomialSpace< dim > polynomial_space