Reference documentation for deal.II version 8.5.1
polynomials_abf.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_abf_h
17 #define dealii__polynomials_abf_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/tensor_product_polynomials.h>
27 #include <deal.II/base/table.h>
28 #include <deal.II/base/thread_management.h>
29 
30 #include <deal.II/base/std_cxx11/shared_ptr.h>
31 #include <vector>
32 
33 DEAL_II_NAMESPACE_OPEN
34 
53 template <int dim>
55 {
56 public:
65  PolynomialsABF (const unsigned int k);
66 
79  void compute (const Point<dim> &unit_point,
80  std::vector<Tensor<1,dim> > &values,
81  std::vector<Tensor<2,dim> > &grads,
82  std::vector<Tensor<3,dim> > &grad_grads,
83  std::vector<Tensor<4,dim> > &third_derivatives,
84  std::vector<Tensor<5,dim> > &fourth_derivatives) const;
85 
89  unsigned int n () const;
90 
95  unsigned int degree () const;
96 
100  std::string name () const;
101 
107  static unsigned int compute_n_pols(unsigned int degree);
108 
109 private:
113  const unsigned int my_degree;
114 
121 
125  unsigned int n_pols;
126 
131 
135  mutable std::vector<double> p_values;
136 
140  mutable std::vector<Tensor<1,dim> > p_grads;
141 
145  mutable std::vector<Tensor<2,dim> > p_grad_grads;
146 
150  mutable std::vector<Tensor<3,dim> > p_third_derivatives;
151 
155  mutable std::vector<Tensor<4,dim> > p_fourth_derivatives;
156 };
157 
158 
159 template <int dim>
160 inline unsigned int
162 {
163  return n_pols;
164 }
165 
166 
167 template <int dim>
168 inline unsigned int
170 {
171  return my_degree;
172 }
173 
174 
175 template <int dim>
176 inline std::string
178 {
179  return "ABF";
180 }
181 
182 
183 DEAL_II_NAMESPACE_CLOSE
184 
185 #endif
std::vector< Tensor< 4, dim > > p_fourth_derivatives
std::vector< Tensor< 2, dim > > p_grad_grads
std::vector< Tensor< 1, dim > > p_grads
std::vector< double > p_values
std::vector< Tensor< 3, dim > > p_third_derivatives
const unsigned int my_degree
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
unsigned int n_pols
std::string name() const
static unsigned int compute_n_pols(unsigned int degree)
unsigned int n() const
const AnisotropicPolynomials< dim > polynomial_space
unsigned int degree() const
PolynomialsABF(const unsigned int k)
Threads::Mutex mutex