deal.II version GIT relicensing-2291-g668cd86249 2024-12-24 11:30:00+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: LGPL-2.1-or-later
4// Copyright (C) 2017 - 2023 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_spherical_h
16#define dealii_function_spherical_h
17
18#include <deal.II/base/config.h>
19
21#include <deal.II/base/point.h>
22
23#include <array>
24
26
27namespace Functions
28{
42 template <int dim>
43 class Spherical : public Function<dim>
44 {
45 public:
54 Spherical(const Point<dim> &center = Point<dim>(),
55 const unsigned int n_components = 1);
56
63 virtual double
64 value(const Point<dim> &point,
65 const unsigned int component = 0) const override;
66
74 virtual Tensor<1, dim>
75 gradient(const Point<dim> &p,
76 const unsigned int component = 0) const override;
77
86 hessian(const Point<dim> &p,
87 const unsigned int component = 0) const override;
88
92 virtual std::size_t
93 memory_consumption() const override;
94
95 private:
100 virtual double
101 svalue(const std::array<double, dim> &sp,
102 const unsigned int component) const;
103
110 virtual std::array<double, dim>
111 sgradient(const std::array<double, dim> &sp,
112 const unsigned int component) const;
113
121 virtual std::array<double, 6>
122 shessian(const std::array<double, dim> &sp,
123 const unsigned int component) const;
124
129 };
130} // namespace Functions
131
133
134#endif
const unsigned int n_components
Definition function.h:163
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:498
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499