Reference documentation for deal.II version 8.5.1
function_spherical.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2016 - 2017 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 at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii__function_spherical_h
17 #define dealii__function_spherical_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/function.h>
22 #include <deal.II/base/point.h>
23 #include <deal.II/base/std_cxx11/array.h>
24 
25 DEAL_II_NAMESPACE_OPEN
26 
27 namespace Functions
28 {
29 
44  template <int dim>
45  class Spherical : public Function<dim>
46  {
47  public:
56  Spherical(const Point<dim> &center = Point<dim>(),
57  const unsigned int n_components=1);
58 
65  virtual double value (const Point<dim> &point,
66  const unsigned int component = 0) const;
67 
75  virtual Tensor<1,dim> gradient (const Point<dim> &p,
76  const unsigned int component = 0) const;
77 
85  virtual SymmetricTensor<2,dim> hessian (const Point<dim> &p,
86  const unsigned int component=0) const;
87 
88  std::size_t memory_consumption () const;
89 
90  private:
95  virtual double svalue(const std_cxx11::array<double, dim> &sp,
96  const unsigned int component) const;
97 
104  virtual std_cxx11::array<double, dim> sgradient(const std_cxx11::array<double, dim> &sp,
105  const unsigned int component) const;
106 
113  virtual std_cxx11::array<double, 6> shessian (const std_cxx11::array<double, dim> &sp,
114  const unsigned int component) const;
115 
120  };
121 }
122 
123 DEAL_II_NAMESPACE_CLOSE
124 
125 #endif
126 
const Tensor< 1, dim > coordinate_system_offset
virtual SymmetricTensor< 2, dim > hessian(const Point< dim > &p, const unsigned int component=0) const
virtual double value(const Point< dim > &point, const unsigned int component=0) const
Spherical(const Point< dim > &center=Point< dim >(), const unsigned int n_components=1)
virtual Tensor< 1, dim > gradient(const Point< dim > &p, const unsigned int component=0) const
const unsigned int n_components
Definition: function.h:144
virtual std_cxx11::array< double, 6 > shessian(const std_cxx11::array< double, dim > &sp, const unsigned int component) const
virtual double svalue(const std_cxx11::array< double, dim > &sp, const unsigned int component) const
virtual std_cxx11::array< double, dim > sgradient(const std_cxx11::array< double, dim > &sp, const unsigned int component) const