Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
polynomials_abf.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2004 - 2018 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/tensor.h>
27 #include <deal.II/base/tensor_product_polynomials.h>
28 #include <deal.II/base/thread_management.h>
29 
30 #include <memory>
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
80  compute(const Point<dim> & unit_point,
81  std::vector<Tensor<1, dim>> &values,
82  std::vector<Tensor<2, dim>> &grads,
83  std::vector<Tensor<3, dim>> &grad_grads,
84  std::vector<Tensor<4, dim>> &third_derivatives,
85  std::vector<Tensor<5, dim>> &fourth_derivatives) const;
86 
90  unsigned int
91  n() const;
92 
97  unsigned int
98  degree() const;
99 
103  std::string
104  name() const;
105 
111  static unsigned int
112  compute_n_pols(unsigned int degree);
113 
114 private:
118  const unsigned int my_degree;
119 
126 
130  unsigned int n_pols;
131 
136 
140  mutable std::vector<double> p_values;
141 
145  mutable std::vector<Tensor<1, dim>> p_grads;
146 
150  mutable std::vector<Tensor<2, dim>> p_grad_grads;
151 
155  mutable std::vector<Tensor<3, dim>> p_third_derivatives;
156 
160  mutable std::vector<Tensor<4, dim>> p_fourth_derivatives;
161 };
162 
163 
164 template <int dim>
165 inline unsigned int
167 {
168  return n_pols;
169 }
170 
171 
172 template <int dim>
173 inline unsigned int
175 {
176  return my_degree;
177 }
178 
179 
180 template <int dim>
181 inline std::string
183 {
184  return "ABF";
185 }
186 
187 
188 DEAL_II_NAMESPACE_CLOSE
189 
190 #endif
std::vector< double > p_values
const unsigned int my_degree
std::vector< Tensor< 3, dim > > p_third_derivatives
std::vector< Tensor< 1, dim > > p_grads
std::vector< Tensor< 4, dim > > p_fourth_derivatives
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
std::vector< Tensor< 2, dim > > p_grad_grads
unsigned int degree() const
PolynomialsABF(const unsigned int k)
Threads::Mutex mutex