Reference documentation for deal.II version 9.6.0
\(\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_restriction.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2021 - 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_restriction_h
16#define dealii_function_restriction_h
17
19#include <deal.II/base/point.h>
21#include <deal.II/base/tensor.h>
22
24
25namespace Functions
26{
49 template <int dim>
50 class CoordinateRestriction : public Function<dim>
51 {
52 public:
61 const unsigned int direction,
62 const double coordinate_value);
63
64 double
65 value(const Point<dim> &point, const unsigned int component) const override;
66
68 gradient(const Point<dim> &point,
69 const unsigned int component) const override;
70
72 hessian(const Point<dim> &point,
73 const unsigned int component) const override;
74
75 private:
76 // The higher-dimensional function that has been restricted.
78
79 // The (`dim + 1`)-coordinate direction that has been restricted.
80 const unsigned int restricted_direction;
81
82 // Value of the restricted coordinate.
83 const double coordinate_value;
84 };
85
86
87
108 template <int dim>
109 class PointRestriction : public Function<1>
110 {
111 public:
121 const unsigned int open_direction,
122 const Point<dim> &point);
123
124 double
125 value(const Point<1> &point, const unsigned int component) const override;
126
128 gradient(const Point<1> &point,
129 const unsigned int component) const override;
130
132 hessian(const Point<1> &point, const unsigned int component) const override;
133
134 private:
135 // The higher-dimensional function that has been restricted.
137
138 // The (`dim + 1`)-coordinate direction that is kept "open"
139 const unsigned int open_direction;
140
141 // The point that we have restricted the above function to.
143 };
144
145} // namespace Functions
146
147
148namespace internal
149{
164 template <int dim>
167 const unsigned int component_in_dim_plus_1,
168 const double coordinate_value);
169} // namespace internal
170
172
173#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:503
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504
Point< dim+1 > create_higher_dim_point(const Point< dim > &point, const unsigned int component_in_dim_plus_1, const double coordinate_value)