Reference documentation for deal.II version 9.1.0-pre
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.md at
12 // the top level directory of deal.II.
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 
22 #include <deal.II/base/exceptions.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/tensor.h>
28 #include <deal.II/base/tensor_product_polynomials.h>
29 #include <deal.II/base/thread_management.h>
30 
31 #include <memory>
32 #include <vector>
33 
34 DEAL_II_NAMESPACE_OPEN
35 
54 template <int dim>
56 {
57 public:
66  PolynomialsABF(const unsigned int k);
67 
80  void
81  compute(const Point<dim> & unit_point,
82  std::vector<Tensor<1, dim>> &values,
83  std::vector<Tensor<2, dim>> &grads,
84  std::vector<Tensor<3, dim>> &grad_grads,
85  std::vector<Tensor<4, dim>> &third_derivatives,
86  std::vector<Tensor<5, dim>> &fourth_derivatives) const;
87 
91  unsigned int
92  n() const;
93 
98  unsigned int
99  degree() const;
100 
104  std::string
105  name() const;
106 
112  static unsigned int
113  compute_n_pols(unsigned int degree);
114 
115 private:
119  const unsigned int my_degree;
120 
127 
131  unsigned int n_pols;
132 
137 
141  mutable std::vector<double> p_values;
142 
146  mutable std::vector<Tensor<1, dim>> p_grads;
147 
151  mutable std::vector<Tensor<2, dim>> p_grad_grads;
152 
156  mutable std::vector<Tensor<3, dim>> p_third_derivatives;
157 
161  mutable std::vector<Tensor<4, dim>> p_fourth_derivatives;
162 };
163 
164 
165 template <int dim>
166 inline unsigned int
168 {
169  return n_pols;
170 }
171 
172 
173 template <int dim>
174 inline unsigned int
176 {
177  return my_degree;
178 }
179 
180 
181 template <int dim>
182 inline std::string
184 {
185  return "ABF";
186 }
187 
188 
189 DEAL_II_NAMESPACE_CLOSE
190 
191 #endif
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< double > p_values
unsigned int n() const
const unsigned int my_degree
std::vector< Tensor< 3, dim > > p_third_derivatives
std::vector< Tensor< 1, dim > > p_grads
std::string name() const
std::vector< Tensor< 4, dim > > p_fourth_derivatives
unsigned int n_pols
static unsigned int compute_n_pols(unsigned int degree)
const AnisotropicPolynomials< dim > polynomial_space
unsigned int degree() const
std::vector< Tensor< 2, dim > > p_grad_grads
PolynomialsABF(const unsigned int k)
Threads::Mutex mutex