Reference documentation for deal.II version 9.0.0
polynomials_bdm.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2004 - 2017 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 at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_polynomials_BDM_h
17 #define dealii_polynomials_BDM_h
18 
19 
20 #include <deal.II/base/config.h>
21 #include <deal.II/base/exceptions.h>
22 #include <deal.II/base/tensor.h>
23 #include <deal.II/base/point.h>
24 #include <deal.II/base/polynomial.h>
25 #include <deal.II/base/polynomial_space.h>
26 #include <deal.II/base/table.h>
27 #include <deal.II/base/thread_management.h>
28 
29 #include <vector>
30 
31 DEAL_II_NAMESPACE_OPEN
32 
99 template <int dim>
101 {
102 public:
111  PolynomialsBDM (const unsigned int k);
112 
125  void compute (const Point<dim> &unit_point,
126  std::vector<Tensor<1,dim> > &values,
127  std::vector<Tensor<2,dim> > &grads,
128  std::vector<Tensor<3,dim> > &grad_grads,
129  std::vector<Tensor<4,dim> > &third_derivatives,
130  std::vector<Tensor<5,dim> > &fourth_derivatives) const;
131 
135  unsigned int n () const;
136 
141  unsigned int degree () const;
142 
146  std::string name () const;
147 
153  static unsigned int compute_n_pols(unsigned int degree);
154 
155 private:
161 
166  std::vector<Polynomials::Polynomial<double> > monomials;
167 
171  unsigned int n_pols;
172 
177 
181  mutable std::vector<double> p_values;
182 
186  mutable std::vector<Tensor<1,dim> > p_grads;
187 
191  mutable std::vector<Tensor<2,dim> > p_grad_grads;
192 
196  mutable std::vector<Tensor<3,dim> > p_third_derivatives;
197 
201  mutable std::vector<Tensor<4,dim> > p_fourth_derivatives;
202 };
203 
204 
205 template <int dim>
206 inline unsigned int
208 {
209  return n_pols;
210 }
211 
212 
213 template <int dim>
214 inline unsigned int
216 {
217  return polynomial_space.degree()-1;
218 }
219 
220 
221 template <int dim>
222 inline std::string
224 {
225  return "BDM";
226 }
227 
228 
229 DEAL_II_NAMESPACE_CLOSE
230 
231 #endif
PolynomialsBDM(const unsigned int k)
std::vector< Tensor< 3, dim > > p_third_derivatives
unsigned int n() const
std::string name() const
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, std::vector< Tensor< 4, dim > > &third_derivatives, std::vector< Tensor< 5, dim > > &fourth_derivatives) const
std::vector< Polynomials::Polynomial< double > > monomials
std::vector< Tensor< 1, dim > > p_grads
std::vector< Tensor< 4, dim > > p_fourth_derivatives
std::vector< double > p_values
std::vector< Tensor< 2, dim > > p_grad_grads
static unsigned int compute_n_pols(unsigned int degree)
unsigned int degree() const
unsigned int n_pols
Threads::Mutex mutex
const PolynomialSpace< dim > polynomial_space