Reference documentation for deal.II version 9.1.0-pre
polynomials_nedelec.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2010 - 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 
17 #ifndef dealii_polynomials_nedelec_h
18 #define dealii_polynomials_nedelec_h
19 
20 
21 #include <deal.II/base/config.h>
22 
23 #include <deal.II/base/exceptions.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/table.h>
28 #include <deal.II/base/tensor.h>
29 #include <deal.II/base/tensor_product_polynomials.h>
30 
31 #include <vector>
32 
33 DEAL_II_NAMESPACE_OPEN
34 
52 template <int dim>
54 {
55 public:
63  PolynomialsNedelec(const unsigned int k);
64 
77  void
78  compute(const Point<dim> & unit_point,
79  std::vector<Tensor<1, dim>> &values,
80  std::vector<Tensor<2, dim>> &grads,
81  std::vector<Tensor<3, dim>> &grad_grads,
82  std::vector<Tensor<4, dim>> &third_derivatives,
83  std::vector<Tensor<5, dim>> &fourth_derivatives) const;
84 
88  unsigned int
89  n() const;
90 
95  unsigned int
96  degree() const;
97 
101  std::string
102  name() const;
103 
109  static unsigned int
110  compute_n_pols(unsigned int degree);
111 
112 private:
116  const unsigned int my_degree;
117 
123 
127  const unsigned int n_pols;
128 
133  static std::vector<std::vector<Polynomials::Polynomial<double>>>
134  create_polynomials(const unsigned int k);
135 };
136 
137 
138 template <int dim>
139 inline unsigned int
141 {
142  return n_pols;
143 }
144 
145 
146 template <int dim>
147 inline unsigned int
149 {
150  return my_degree;
151 }
152 
153 
154 template <int dim>
155 inline std::string
157 {
158  return "Nedelec";
159 }
160 
161 
162 DEAL_II_NAMESPACE_CLOSE
163 
164 #endif
const unsigned int n_pols
unsigned int n() const
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
const AnisotropicPolynomials< dim > polynomial_space
const unsigned int my_degree
PolynomialsNedelec(const unsigned int k)
static unsigned int compute_n_pols(unsigned int degree)
unsigned int degree() const
std::string name() const
static std::vector< std::vector< Polynomials::Polynomial< double > > > create_polynomials(const unsigned int k)