Reference documentation for deal.II version Git 5a2787e538 2021-09-21 14:55:10 -0600
\(\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\}}\)
function_level_set.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2019 - 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_function_level_set_h
17 #define dealii_function_level_set_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/function.h>
22 
24 
25 namespace Functions
26 {
27  namespace LevelSet
28  {
45  template <int dim>
46  class Sphere : public Function<dim>
47  {
48  public:
52  Sphere(const Point<dim> &center = Point<dim>(), const double radius = 1);
53 
54  double
55  value(const Point<dim> & point,
56  const unsigned int component = 0) const override;
57 
68  gradient(const Point<dim> & point,
69  const unsigned int component = 0) const override;
70 
81  hessian(const Point<dim> & point,
82  const unsigned int component = 0) const override;
83 
84  private:
86  const double radius;
87  };
88 
89 
101  template <int dim>
102  class Plane : public Function<dim>
103  {
104  public:
108  Plane(const Point<dim> &point, const Tensor<1, dim> &normal);
109 
110  double
111  value(const Point<dim> & point,
112  const unsigned int component = 0) const override;
113 
115  gradient(const Point<dim> &,
116  const unsigned int component = 0) const override;
117 
119  hessian(const Point<dim> &,
120  const unsigned int component = 0) const override;
121 
122  private:
125  };
126 
127  } // namespace LevelSet
128 } // namespace Functions
129 
131 
132 #endif /* CE8BBB3E_B726_40A7_B963_561AE7B84973 */
const Tensor< 1, dim > normal
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:401
const Point< dim > point_in_plane
Sphere(const Point< dim > &center=Point< dim >(), const double radius=1)
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
Definition: utilities.cc:185
Tensor< 1, dim > gradient(const Point< dim > &point, const unsigned int component=0) const override
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:400
double value(const Point< dim > &point, const unsigned int component=0) const override
SymmetricTensor< 2, dim > hessian(const Point< dim > &point, const unsigned int component=0) const override