deal.II version GIT relicensing-2291-g668cd86249 2024-12-24 11:30:00+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: LGPL-2.1-or-later
4// Copyright (C) 2016 - 2020 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_composition_manifold_h
16#define dealii_composition_manifold_h
17
18
19/*---------------------------- composition_manifold.h ------------*/
20
21#include <deal.II/base/config.h>
22
25#include <deal.II/base/point.h>
27
29#include <deal.II/grid/tria.h>
32
33#include <memory>
34
36
67template <int dim,
68 int spacedim = dim,
69 int chartdim = dim,
70 int intermediate_dim = dim,
71 int dim1 = dim,
72 int dim2 = dim>
129
130
131/*------------------Template Implementations------------------------*/
132
133template <int dim,
134 int spacedim,
135 int chartdim,
136 int intermediate_dim,
137 int dim1,
138 int dim2>
142 : ChartManifold<dim, spacedim, chartdim>(F.get_periodicity())
143 , F(&F)
144 , G(&G)
145{
146 // We don't know what to do with a periodicity in the second manifold, so
147 // throw an assertion if the second manifold is periodic
148 Assert(G.get_periodicity().norm() == 0.0,
149 ExcMessage("The second manifold cannot be periodic."));
150}
151
152
153template <int dim,
154 int spacedim,
155 int chartdim,
156 int intermediate_dim,
157 int dim1,
158 int dim2>
159std::unique_ptr<Manifold<dim, spacedim>>
167
168
169template <int dim,
170 int spacedim,
171 int chartdim,
172 int intermediate_dim,
173 int dim1,
174 int dim2>
177 pull_back(const Point<spacedim> &space_point) const
178{
179 return F->pull_back(G->pull_back(space_point));
180}
181
182
183
184template <int dim,
185 int spacedim,
186 int chartdim,
187 int intermediate_dim,
188 int dim1,
189 int dim2>
192 push_forward(const Point<chartdim> &chart_point) const
193{
194 return G->push_forward(F->push_forward(chart_point));
195}
196
197
198
199template <int dim,
200 int spacedim,
201 int chartdim,
202 int intermediate_dim,
203 int dim1,
204 int dim2>
207 push_forward_gradient(const Point<chartdim> &chart_point) const
208{
210 F->push_forward_gradient(chart_point);
211
213 G->push_forward_gradient(F->push_forward(chart_point));
214
216
217 for (unsigned int d = 0; d < spacedim; ++d)
218 for (unsigned int c = 0; c < chartdim; ++c)
219 for (unsigned int s = 0; s < intermediate_dim; ++s)
220 DF_DG[d][c] += DG[d][s] * DF[s][c];
221
222 return DF_DG;
223}
224
225
227
228#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:498
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499
#define Assert(cond, exc)
static ::ExceptionBase & ExcMessage(std::string arg1)