Reference documentation for deal.II version 9.2.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\}}\)
composition_manifold.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2016 - 2019 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_composition_manifold_h
17 #define dealii_composition_manifold_h
18 
19 
20 /*---------------------------- composition_manifold.h ------------*/
21 
22 #include <deal.II/base/config.h>
23 
25 #include <deal.II/base/point.h>
29 
30 #include <deal.II/grid/manifold.h>
31 #include <deal.II/grid/tria.h>
34 
36 
68 template <int dim,
69  int spacedim = dim,
70  int chartdim = dim,
71  int intermediate_dim = dim,
72  int dim1 = dim,
73  int dim2 = dim>
74 class CompositionManifold : public ChartManifold<dim, spacedim, chartdim>
75 {
76 public:
82 
86  virtual std::unique_ptr<Manifold<dim, spacedim>>
87  clone() const override;
88 
94  virtual Point<chartdim>
95  pull_back(const Point<spacedim> &space_point) const;
96 
97 
103  virtual Point<spacedim>
104  push_forward(const Point<chartdim> &chart_point) const;
105 
110  push_forward_gradient(const Point<chartdim> &chart_point) const;
111 
112 private:
116  SmartPointer<
119  F;
120 
121 
125  SmartPointer<
128  G;
129 };
130 
131 
132 /*------------------Template Implementations------------------------*/
133 
134 template <int dim,
135  int spacedim,
136  int chartdim,
137  int intermediate_dim,
138  int dim1,
139  int dim2>
143  : ChartManifold<dim, spacedim, chartdim>(F.get_periodicity())
144  , F(&F)
145  , G(&G)
146 {
147  // We don't know what to do with a periodicity in the second manifold, so
148  // throw an assertion if the second manifold is periodic
149  Assert(G.get_periodicity().norm() == 0.0,
150  ExcMessage("The second manifold cannot be periodic."));
151 }
152 
153 
154 template <int dim,
155  int spacedim,
156  int chartdim,
157  int intermediate_dim,
158  int dim1,
159  int dim2>
160 std::unique_ptr<Manifold<dim, spacedim>>
162  clone() const
163 {
164  return std_cxx14::make_unique<
166  *F, *G);
167 }
168 
169 
170 template <int dim,
171  int spacedim,
172  int chartdim,
173  int intermediate_dim,
174  int dim1,
175  int dim2>
178  pull_back(const Point<spacedim> &space_point) const
179 {
180  return F->pull_back(G->pull_back(space_point));
181 }
182 
183 
184 
185 template <int dim,
186  int spacedim,
187  int chartdim,
188  int intermediate_dim,
189  int dim1,
190  int dim2>
193  push_forward(const Point<chartdim> &chart_point) const
194 {
195  return G->push_forward(F->push_forward(chart_point));
196 }
197 
198 
199 
200 template <int dim,
201  int spacedim,
202  int chartdim,
203  int intermediate_dim,
204  int dim1,
205  int dim2>
208  push_forward_gradient(const Point<chartdim> &chart_point) const
209 {
211  F->push_forward_gradient(chart_point);
212 
214  G->push_forward_gradient(F->push_forward(chart_point));
215 
217 
218  for (unsigned int d = 0; d < spacedim; ++d)
219  for (unsigned int c = 0; c < chartdim; ++c)
220  for (unsigned int s = 0; s < intermediate_dim; ++s)
221  DF_DG[d][c] += DG[d][s] * DF[s][c];
222 
223  return DF_DG;
224 }
225 
226 
228 
229 #endif
Physics::Elasticity::Kinematics::F
Tensor< 2, dim, Number > F(const Tensor< 2, dim, Number > &Grad_u)
derivative_form.h
tria_accessor.h
ChartManifold
Definition: manifold.h:951
tria.h
tria_iterator.h
CompositionManifold::push_forward
virtual Point< spacedim > push_forward(const Point< chartdim > &chart_point) const
Definition: composition_manifold.h:193
Physics::Elasticity::Kinematics::d
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
CompositionManifold::G
SmartPointer< const ChartManifold< dim2, spacedim, intermediate_dim >, CompositionManifold< dim, spacedim, chartdim, dim1, dim2, intermediate_dim > > G
Definition: composition_manifold.h:128
quadrature_lib.h
CompositionManifold::push_forward_gradient
virtual DerivativeForm< 1, chartdim, spacedim > push_forward_gradient(const Point< chartdim > &chart_point) const
Definition: composition_manifold.h:208
DerivativeForm
Definition: derivative_form.h:60
CompositionManifold::pull_back
virtual Point< chartdim > pull_back(const Point< spacedim > &space_point) const
Definition: composition_manifold.h:178
StandardExceptions::ExcMessage
static ::ExceptionBase & ExcMessage(std::string arg1)
subscriptor.h
CompositionManifold::clone
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
Definition: composition_manifold.h:162
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
manifold.h
SmartPointer
Definition: smartpointer.h:68
Assert
#define Assert(cond, exc)
Definition: exceptions.h:1419
Point
Definition: point.h:111
config.h
memory.h
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
CompositionManifold
Definition: composition_manifold.h:74
CompositionManifold::CompositionManifold
CompositionManifold(const ChartManifold< dim1, intermediate_dim, chartdim > &F, const ChartManifold< dim2, spacedim, intermediate_dim > &G)
Definition: composition_manifold.h:141
CompositionManifold::F
SmartPointer< const ChartManifold< dim1, intermediate_dim, chartdim >, CompositionManifold< dim, spacedim, chartdim, dim1, dim2, intermediate_dim > > F
Definition: composition_manifold.h:119
point.h