Reference documentation for deal.II version 8.4.2
polynomials_abf.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2004 - 2015 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 <vector>
31 
32 DEAL_II_NAMESPACE_OPEN
33 
52 template <int dim>
54 {
55 public:
64  PolynomialsABF (const unsigned int k);
65 
69  ~PolynomialsABF ();
70 
83  void compute (const Point<dim> &unit_point,
84  std::vector<Tensor<1,dim> > &values,
85  std::vector<Tensor<2,dim> > &grads,
86  std::vector<Tensor<3,dim> > &grad_grads,
87  std::vector<Tensor<4,dim> > &third_derivatives,
88  std::vector<Tensor<5,dim> > &fourth_derivatives) const;
89 
93  unsigned int n () const;
94 
99  unsigned int degree () const;
100 
104  std::string name () const;
105 
111  static unsigned int compute_n_pols(unsigned int degree);
112 
113 private:
117  const unsigned int my_degree;
118 
124 
128  unsigned int n_pols;
129 
134 
138  mutable std::vector<double> p_values;
139 
143  mutable std::vector<Tensor<1,dim> > p_grads;
144 
148  mutable std::vector<Tensor<2,dim> > p_grad_grads;
149 
153  mutable std::vector<Tensor<3,dim> > p_third_derivatives;
154 
158  mutable std::vector<Tensor<4,dim> > p_fourth_derivatives;
159 };
160 
161 
162 template <int dim>
163 inline unsigned int
165 {
166  return n_pols;
167 }
168 
169 
170 template <int dim>
171 inline unsigned int
173 {
174  return my_degree;
175 }
176 
177 
178 template <int dim>
179 inline std::string
181 {
182  return "ABF";
183 }
184 
185 
186 DEAL_II_NAMESPACE_CLOSE
187 
188 #endif
std::vector< Tensor< 4, dim > > p_fourth_derivatives
std::vector< Tensor< 2, dim > > p_grad_grads
std::vector< Tensor< 1, dim > > p_grads
AnisotropicPolynomials< dim > * polynomial_space
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
unsigned int degree() const
PolynomialsABF(const unsigned int k)
Threads::Mutex mutex