Reference documentation for deal.II version GIT relicensing-233-g802318d791 2024-03-28 20:20:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
polynomials_p.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2004 - 2022 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_polynomials_P_h
16#define dealii_polynomials_P_h
17
18
19#include <deal.II/base/config.h>
20
22#include <deal.II/base/point.h>
25#include <deal.II/base/tensor.h>
26
27#include <memory>
28#include <vector>
29
45template <int dim>
46class PolynomialsP : public PolynomialSpace<dim>
47{
48public:
53 static constexpr unsigned int dimension = dim;
54
59 PolynomialsP(const unsigned int p);
60
67 virtual unsigned int
68 degree() const override;
69
76 std::array<unsigned int, dim>
77 directional_degrees(unsigned int n) const;
78
79 std::unique_ptr<ScalarPolynomialsBase<dim>>
80 clone() const override
81 {
82 return std::make_unique<PolynomialsP<dim>>(*this);
83 }
84
85private:
89 void
90 create_polynomial_ordering(std::vector<unsigned int> &index_map) const;
91
96 const unsigned int p;
97};
98
101template <int dim>
102inline unsigned int
104{
105 return p;
106}
107
108
109template <int dim>
110inline std::array<unsigned int, dim>
112{
113 return this->compute_index(n);
114}
115
117
118#endif
std::vector< unsigned int > index_map
static constexpr unsigned int dimension
const unsigned int p
virtual unsigned int degree() const override
void create_polynomial_ordering(std::vector< unsigned int > &index_map) const
std::unique_ptr< ScalarPolynomialsBase< dim > > clone() const override
std::array< unsigned int, dim > directional_degrees(unsigned int n) const
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503