Reference documentation for deal.II version 8.1.0
tensor_product_polynomials_const.h
1 // ---------------------------------------------------------------------
2 // @f$Id: tensor_product_polynomials_const.h 31527 2013-11-03 09:58:45Z maier @f$
3 //
4 // Copyright (C) 2012 - 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__tensor_product_polynomials_const_h
18 #define __deal2__tensor_product_polynomials_const_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/tensor_product_polynomials.h>
27 #include <deal.II/base/utilities.h>
28 
29 #include <vector>
30 
32 
33 
47 template <int dim>
49 {
50 public:
57  static const unsigned int dimension = dim;
58 
64  template <class Pol>
65  TensorProductPolynomialsConst (const std::vector<Pol> &pols);
66 
79  void compute (const Point<dim> &unit_point,
80  std::vector<double> &values,
81  std::vector<Tensor<1,dim> > &grads,
82  std::vector<Tensor<2,dim> > &grad_grads) const;
83 
96  double compute_value (const unsigned int i,
97  const Point<dim> &p) const;
98 
111  Tensor<1,dim> compute_grad (const unsigned int i,
112  const Point<dim> &p) const;
113 
126  Tensor<2,dim> compute_grad_grad (const unsigned int i,
127  const Point<dim> &p) const;
128 
133  unsigned int n () const;
134 };
135 
139 /* ---------------- template and inline functions ---------- */
140 
141 #ifndef DOXYGEN
142 
143 template <int dim>
144 template <class Pol>
145 inline
147 TensorProductPolynomialsConst(const std::vector<Pol> &pols)
148  :
149  TensorProductPolynomials<dim>(pols)
150 {
151  // append index for renumbering
152  this->index_map.push_back(this->n_tensor_pols);
153  this->index_map_inverse.push_back(this->n_tensor_pols);
154 }
155 
156 
157 
158 template <int dim>
159 inline
160 unsigned int
162 {
163  return this->n_tensor_pols+1;
164 }
165 
166 
167 
168 template <>
169 inline
170 unsigned int
172 {
174 }
175 
176 
177 #endif // DOXYGEN
178 DEAL_II_NAMESPACE_CLOSE
179 
180 #endif
Tensor< 2, dim > compute_grad_grad(const unsigned int i, const Point< dim > &p) const
static const unsigned int invalid_unsigned_int
Definition: types.h:191
double compute_value(const unsigned int i, const Point< dim > &p) const
void compute(const Point< dim > &unit_point, std::vector< double > &values, std::vector< Tensor< 1, dim > > &grads, std::vector< Tensor< 2, dim > > &grad_grads) const
Tensor< 1, dim > compute_grad(const unsigned int i, const Point< dim > &p) const
std::vector< unsigned int > index_map_inverse
TensorProductPolynomialsConst(const std::vector< Pol > &pols)
unsigned int n() const