Reference documentation for deal.II version 9.3.3
\(\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_restriction.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2010 - 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_restriction_h
17#define dealii_function_restriction_h
18
20#include <deal.II/base/point.h>
22#include <deal.II/base/tensor.h>
23
25
26namespace Functions
27{
50 template <int dim>
51 class CoordinateRestriction : public Function<dim>
52 {
53 public:
62 const unsigned int direction,
63 const double coordinate_value);
64
65 double
66 value(const Point<dim> &point, const unsigned int component) const override;
67
70 const unsigned int component) const override;
71
73 hessian(const Point<dim> & point,
74 const unsigned int component) const override;
75
76 private:
77 // The higher-dimensional function that has been restricted.
79
80 // The (`dim + 1`)-coordinate direction that has been restricted.
81 const unsigned int restricted_direction;
82
83 // Value of the restricted coordinate.
84 const double coordinate_value;
85 };
86
87
88
109 template <int dim>
110 class PointRestriction : public Function<1>
111 {
112 public:
122 const unsigned int open_direction,
123 const Point<dim> & point);
124
125 double
126 value(const Point<1> &point, const unsigned int component) const override;
127
129 gradient(const Point<1> & point,
130 const unsigned int component) const override;
131
133 hessian(const Point<1> &point, const unsigned int component) const override;
134
135 private:
136 // The higher-dimensional function that has been restricted.
138
139 // The (`dim + 1`)-coordinate direction that is kept "open"
140 const unsigned int open_direction;
141
142 // The point that we have restricted the above function to.
144 };
145
146} // namespace Functions
147
148
149namespace internal
150{
165 template <int dim>
168 const unsigned int component_in_dim_plus_1,
169 const double coordinate_value);
170} // namespace internal
171
173
174#endif /* dealii_function_restriction_h */
double value(const Point< dim > &point, const unsigned int component) const override
Tensor< 1, dim > gradient(const Point< dim > &point, const unsigned int component) const override
const SmartPointer< const Function< dim+1 > > function
SymmetricTensor< 2, dim > hessian(const Point< dim > &point, const unsigned int component) const override
CoordinateRestriction(const Function< dim+1 > &function, const unsigned int direction, const double coordinate_value)
PointRestriction(const Function< dim+1 > &function, const unsigned int open_direction, const Point< dim > &point)
double value(const Point< 1 > &point, const unsigned int component) const override
Tensor< 1, 1 > gradient(const Point< 1 > &point, const unsigned int component) const override
const SmartPointer< const Function< dim+1 > > function
SymmetricTensor< 2, 1 > hessian(const Point< 1 > &point, const unsigned int component) const override
Definition: point.h:111
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:402
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:403
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
Definition: utilities.cc:188
Point< dim+1 > create_higher_dim_point(const Point< dim > &point, const unsigned int component_in_dim_plus_1, const double coordinate_value)