deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20: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
function_spherical.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) 2017 - 2026 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_function_spherical_h
14#define dealii_function_spherical_h
15
16#include <deal.II/base/config.h>
17
19#include <deal.II/base/point.h>
21#include <deal.II/base/tensor.h>
22
23#include <array>
24#include <cstddef>
25
27
28namespace Functions
29{
43 template <int dim>
44 class Spherical : public Function<dim>
45 {
46 public:
55 Spherical(const Point<dim> &center = Point<dim>(),
56 const unsigned int n_components = 1);
57
64 virtual double
65 value(const Point<dim> &point,
66 const unsigned int component = 0) const override;
67
75 virtual Tensor<1, dim>
76 gradient(const Point<dim> &p,
77 const unsigned int component = 0) const override;
78
87 hessian(const Point<dim> &p,
88 const unsigned int component = 0) const override;
89
93 virtual std::size_t
94 memory_consumption() const override;
95
96 private:
101 virtual double
102 svalue(const std::array<double, dim> &sp,
103 const unsigned int component) const;
104
111 virtual std::array<double, dim>
112 sgradient(const std::array<double, dim> &sp,
113 const unsigned int component) const;
114
122 virtual std::array<double, 6>
123 shessian(const std::array<double, dim> &sp,
124 const unsigned int component) const;
125
130 };
131} // namespace Functions
132
134
135#endif
const unsigned int n_components
Definition function.h:162
virtual SymmetricTensor< 2, dim > hessian(const Point< dim > &p, const unsigned int component=0) const override
const Tensor< 1, dim > coordinate_system_offset
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const override
virtual std::array< double, dim > sgradient(const std::array< double, dim > &sp, const unsigned int component) const
virtual double value(const Point< dim > &point, const unsigned int component=0) const override
virtual std::size_t memory_consumption() const override
virtual std::array< double, 6 > shessian(const std::array< double, dim > &sp, const unsigned int component) const
virtual double svalue(const std::array< double, dim > &sp, const unsigned int component) const
Definition point.h:111
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39