deal.II version GIT relicensing-6868-gafcc71a9cb 2026-10-12 01:10:01+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: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2004 - 2025 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_polynomials_P_h
14#define dealii_polynomials_P_h
15
16
17#include <deal.II/base/config.h>
18
20#include <deal.II/base/point.h>
23#include <deal.II/base/tensor.h>
24
25#include <memory>
26#include <vector>
27
43template <int dim>
44class PolynomialsP : public PolynomialSpace<dim>
45{
46public:
51 static constexpr unsigned int dimension = dim;
52
58 PolynomialsP(const unsigned int p);
59
66 virtual unsigned int
67 degree() const override;
68
75 std::array<unsigned int, dim>
76 directional_degrees(unsigned int n) const;
77
78 std::unique_ptr<ScalarPolynomialsBase<dim>>
79 clone() const override
80 {
81 return std::make_unique<PolynomialsP<dim>>(*this);
82 }
83
84private:
88 void
89 create_polynomial_ordering(std::vector<unsigned int> &index_map) const;
90
95 const unsigned int p;
96};
97
100template <int dim>
101inline unsigned int
103{
104 return p;
105}
106
107
108template <int dim>
109inline std::array<unsigned int, dim>
111{
112 return this->compute_index(n);
113}
114
116
117#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:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39