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
composition_manifold.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) 2016 - 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_composition_manifold_h
14#define dealii_composition_manifold_h
15
16
17/*---------------------------- composition_manifold.h ------------*/
18
19#include <deal.II/base/config.h>
20
23#include <deal.II/base/point.h>
25
27#include <deal.II/grid/tria.h>
30
31#include <memory>
32
34
65template <int dim,
66 int spacedim = dim,
67 int chartdim = dim,
68 int intermediate_dim = dim,
69 int dim1 = dim,
70 int dim2 = dim>
127
128
129/*------------------Template Implementations------------------------*/
130
131template <int dim,
132 int spacedim,
133 int chartdim,
134 int intermediate_dim,
135 int dim1,
136 int dim2>
140 : ChartManifold<dim, spacedim, chartdim>(F.get_periodicity())
141 , F(&F)
142 , G(&G)
143{
144 // We don't know what to do with a periodicity in the second manifold, so
145 // throw an assertion if the second manifold is periodic
146 Assert(G.get_periodicity().norm() == 0.0,
147 ExcMessage("The second manifold cannot be periodic."));
148}
149
150
151template <int dim,
152 int spacedim,
153 int chartdim,
154 int intermediate_dim,
155 int dim1,
156 int dim2>
157std::unique_ptr<Manifold<dim, spacedim>>
165
166
167template <int dim,
168 int spacedim,
169 int chartdim,
170 int intermediate_dim,
171 int dim1,
172 int dim2>
175 pull_back(const Point<spacedim> &space_point) const
176{
177 return F->pull_back(G->pull_back(space_point));
178}
179
180
181
182template <int dim,
183 int spacedim,
184 int chartdim,
185 int intermediate_dim,
186 int dim1,
187 int dim2>
190 push_forward(const Point<chartdim> &chart_point) const
191{
192 return G->push_forward(F->push_forward(chart_point));
193}
194
195
196
197template <int dim,
198 int spacedim,
199 int chartdim,
200 int intermediate_dim,
201 int dim1,
202 int dim2>
205 push_forward_gradient(const Point<chartdim> &chart_point) const
206{
208 F->push_forward_gradient(chart_point);
209
211 G->push_forward_gradient(F->push_forward(chart_point));
212
214
215 for (unsigned int d = 0; d < spacedim; ++d)
216 for (unsigned int c = 0; c < chartdim; ++c)
217 for (unsigned int s = 0; s < intermediate_dim; ++s)
218 DF_DG[d][c] += DG[d][s] * DF[s][c];
219
220 return DF_DG;
221}
222
223
225
226#endif
virtual Point< chartdim > pull_back(const Point< spacedim > &space_point) const
ObserverPointer< const ChartManifold< dim2, spacedim, intermediate_dim >, CompositionManifold< dim, spacedim, chartdim, dim1, dim2, intermediate_dim > > G
ObserverPointer< const ChartManifold< dim1, intermediate_dim, chartdim >, CompositionManifold< dim, spacedim, chartdim, dim1, dim2, intermediate_dim > > F
virtual Point< spacedim > push_forward(const Point< chartdim > &chart_point) const
CompositionManifold(const ChartManifold< dim1, intermediate_dim, chartdim > &F, const ChartManifold< dim2, spacedim, intermediate_dim > &G)
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
virtual DerivativeForm< 1, chartdim, spacedim > push_forward_gradient(const Point< chartdim > &chart_point) const
Definition point.h:111
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define Assert(cond, exc)
static ::ExceptionBase & ExcMessage(std::string arg1)