Reference documentation for deal.II version 9.4.1
\(\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_raviart_thomas.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2004 - 2021 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#ifndef dealii_polynomials_raviart_thomas_h
17#define dealii_polynomials_raviart_thomas_h
18
19
20#include <deal.II/base/config.h>
21
23#include <deal.II/base/point.h>
26#include <deal.II/base/tensor.h>
29
30#include <mutex>
31#include <vector>
32
33
35
49template <int dim>
51{
52public:
61 PolynomialsRaviartThomas(const unsigned int k);
62
67
80 void
81 evaluate(const Point<dim> & unit_point,
82 std::vector<Tensor<1, dim>> &values,
83 std::vector<Tensor<2, dim>> &grads,
84 std::vector<Tensor<3, dim>> &grad_grads,
85 std::vector<Tensor<4, dim>> &third_derivatives,
86 std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
87
91 std::string
92 name() const override;
93
99 static unsigned int
100 n_polynomials(const unsigned int degree);
101
105 virtual std::unique_ptr<TensorPolynomialsBase<dim>>
106 clone() const override;
107
108private:
114
119 static std::vector<std::vector<Polynomials::Polynomial<double>>>
120 create_polynomials(const unsigned int k);
121
126 mutable std::mutex scratch_arrays_mutex;
127
134 mutable std::vector<double> scratch_values;
135 mutable std::vector<Tensor<1, dim>> scratch_grads;
136 mutable std::vector<Tensor<2, dim>> scratch_grad_grads;
137 mutable std::vector<Tensor<3, dim>> scratch_third_derivatives;
138 mutable std::vector<Tensor<4, dim>> scratch_fourth_derivatives;
139};
140
141
142
143template <int dim>
144inline std::string
146{
147 return "RaviartThomas";
148}
149
150
152
153#endif
Definition: point.h:111
static unsigned int n_polynomials(const unsigned int degree)
std::vector< Tensor< 3, dim > > scratch_third_derivatives
std::vector< double > scratch_values
std::vector< Tensor< 4, dim > > scratch_fourth_derivatives
static std::vector< std::vector< Polynomials::Polynomial< double > > > create_polynomials(const unsigned int k)
void evaluate(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 override
std::string name() const override
std::vector< Tensor< 2, dim > > scratch_grad_grads
virtual std::unique_ptr< TensorPolynomialsBase< dim > > clone() const override
const AnisotropicPolynomials< dim > polynomial_space
std::vector< Tensor< 1, dim > > scratch_grads
unsigned int degree() const
Definition: tensor.h:503
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443