Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
polynomials_abf.h
1 // ---------------------------------------------------------------------
2 // @f$Id: polynomials_abf.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 2004 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 #ifndef __deal2__polynomials_abf_h
18 #define __deal2__polynomials_abf_h
19 
20 
21 #include <deal.II/base/config.h>
23 #include <deal.II/base/tensor.h>
24 #include <deal.II/base/point.h>
25 #include <deal.II/base/polynomial.h>
26 #include <deal.II/base/polynomial_space.h>
27 #include <deal.II/base/tensor_product_polynomials.h>
28 #include <deal.II/base/table.h>
29 #include <deal.II/base/thread_management.h>
30 
31 #include <vector>
32 
34 
55 template <int dim>
57 {
58 public:
70  PolynomialsABF (const unsigned int k);
71 
75  ~PolynomialsABF ();
76 
101  void compute (const Point<dim> &unit_point,
102  std::vector<Tensor<1,dim> > &values,
103  std::vector<Tensor<2,dim> > &grads,
104  std::vector<Tensor<3,dim> > &grad_grads) const;
105 
109  unsigned int n () const;
110 
116  unsigned int degree () const;
117 
122  std::string name () const;
123 
133  static unsigned int compute_n_pols(unsigned int degree);
134 
135 private:
140  const unsigned int my_degree;
141 
150 
155  unsigned int n_pols;
156 
162 
166  mutable std::vector<double> p_values;
167 
171  mutable std::vector<Tensor<1,dim> > p_grads;
172 
176  mutable std::vector<Tensor<2,dim> > p_grad_grads;
177 };
178 
179 
180 template <int dim>
181 inline unsigned int
183 {
184  return n_pols;
185 }
186 
187 
188 template <int dim>
189 inline unsigned int
191 {
192  return my_degree;
193 }
194 
195 
196 template <int dim>
197 inline std::string
199 {
200  return "ABF";
201 }
202 
203 
204 DEAL_II_NAMESPACE_CLOSE
205 
206 #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) const
std::vector< Tensor< 2, dim > > p_grad_grads
std::vector< Tensor< 1, dim > > p_grads
AnisotropicPolynomials< dim > * polynomial_space
std::vector< double > p_values
unsigned int n() const
const unsigned int my_degree
static unsigned int compute_n_pols(unsigned int degree)
std::string name() const
unsigned int n_pols
unsigned int degree() const
PolynomialsABF(const unsigned int k)
Threads::Mutex mutex