deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20:01+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_restriction.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2021 - 2024 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_function_restriction_h
14#define dealii_function_restriction_h
15
18#include <deal.II/base/point.h>
19#include <deal.II/base/tensor.h>
20
22
23namespace Functions
24{
47 template <int dim>
48 class CoordinateRestriction : public Function<dim>
49 {
50 public:
59 const unsigned int direction,
60 const double coordinate_value);
61
62 double
63 value(const Point<dim> &point, const unsigned int component) const override;
64
66 gradient(const Point<dim> &point,
67 const unsigned int component) const override;
68
70 hessian(const Point<dim> &point,
71 const unsigned int component) const override;
72
73 private:
74 // The higher-dimensional function that has been restricted.
76
77 // The (`dim + 1`)-coordinate direction that has been restricted.
78 const unsigned int restricted_direction;
79
80 // Value of the restricted coordinate.
81 const double coordinate_value;
82 };
83
84
85
106 template <int dim>
107 class PointRestriction : public Function<1>
108 {
109 public:
119 const unsigned int open_direction,
120 const Point<dim> &point);
121
122 double
123 value(const Point<1> &point, const unsigned int component) const override;
124
126 gradient(const Point<1> &point,
127 const unsigned int component) const override;
128
130 hessian(const Point<1> &point, const unsigned int component) const override;
131
132 private:
133 // The higher-dimensional function that has been restricted.
135
136 // The (`dim + 1`)-coordinate direction that is kept "open"
137 const unsigned int open_direction;
138
139 // The point that we have restricted the above function to.
141 };
142
143} // namespace Functions
144
145
146namespace internal
147{
162 template <int dim>
165 const unsigned int component_in_dim_plus_1,
166 const double coordinate_value);
167} // namespace internal
168
170
171#endif /* dealii_function_restriction_h */
double value(const Point< dim > &point, const unsigned int component) const override
const ObserverPointer< const Function< dim+1 > > function
Tensor< 1, dim > gradient(const Point< dim > &point, const unsigned int component) const override
SymmetricTensor< 2, dim > hessian(const Point< dim > &point, const unsigned int component) const override
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 ObserverPointer< 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:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
Point< dim+1 > create_higher_dim_point(const Point< dim > &point, const unsigned int component_in_dim_plus_1, const double coordinate_value)