Debian Codegraph @

include/deal.II/base/function_bessel.h

raw
1 // ------------------------------------------------------------------------
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 // Copyright (C) 2010 - 2025 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_function_bessel_h
16 #define dealii_function_bessel_h
17
18
19 #include <deal.II/base/config.h>
20
21 #include <deal.II/base/function.h>
22 #include <deal.II/base/point.h>
23
24 #include <vector>
25
26
27 DEAL_II_NAMESPACE_OPEN
28
29 namespace Functions
30 {
31 /**
32 * The Bessel functions of first kind or positive integer order.
33 *
34 * @ingroup functions
35 */
36 template <int dim>
37 class Bessel1 : public Function<dim>
38 {
39 public:
40 /**
41 * Constructor. @p wave_number must be nonnegative.
42 */
43 Bessel1(const unsigned int order,
44 const double wave_number,
45 const Point<dim> center = Point<dim>());
46
47 virtual double
48 value(const Point<dim> &points,
49 const unsigned int component = 0) const override;
50
51 virtual void
52 value_list(const std::vector<Point<dim>> &points,
53 std::vector<double> &values,
54 const unsigned int component = 0) const override;
55
56 virtual Tensor<1, dim>
57 gradient(const Point<dim> &p,
58 const unsigned int component = 0) const override;
59
60 virtual void
61 gradient_list(const std::vector<Point<dim>> &points,
62 std::vector<Tensor<1, dim>> &gradients,
63 const unsigned int component = 0) const override;
64
65 private:
66 unsigned int order;
67 double wave_number;
68 Point<dim> center;
69 };
70 } // namespace Functions
71
72 DEAL_II_NAMESPACE_CLOSE
73
74 #endif