16 #ifndef dealii_tensor_product_manifold_h 17 #define dealii_tensor_product_manifold_h 19 #include <deal.II/base/config.h> 21 #include <deal.II/base/point.h> 22 #include <deal.II/base/std_cxx14/memory.h> 23 #include <deal.II/base/subscriptor.h> 24 #include <deal.II/base/utilities.h> 26 #include <deal.II/grid/manifold.h> 28 DEAL_II_NAMESPACE_OPEN
72 :
public ChartManifold<dim, spacedim_A + spacedim_B, chartdim_A + chartdim_B>
79 static const unsigned int chartdim = chartdim_A + chartdim_B;
84 static const unsigned int spacedim = spacedim_A + spacedim_B;
96 virtual std::unique_ptr<Manifold<dim, spacedim_A + spacedim_B>>
97 clone()
const override;
118 std::unique_ptr<const ChartManifold<dim_A, spacedim_A, chartdim_A>>
121 std::unique_ptr<const ChartManifold<dim_B, spacedim_B, chartdim_B>>
133 namespace TensorProductManifoldImplementation
135 template <
int dim1,
int dim2>
140 for (
unsigned int d = 0; d < dim1; ++d)
142 for (
unsigned int d = 0; d < dim2; ++d)
147 template <
int dim1,
int dim2>
152 for (
unsigned int d = 0;
d < dim1; ++
d)
154 for (
unsigned int d = 0;
d < dim2; ++
d)
159 template <
int dim1,
int dim2>
165 for (
unsigned int d = 0;
d < dim1; ++
d)
167 for (
unsigned int d = 0;
d < dim2; ++
d)
168 p2[d] = source[dim1 + d];
188 TensorProductManifold(
191 :
ChartManifold<dim, spacedim_A + spacedim_B, chartdim_A + chartdim_B>(
192 internal::TensorProductManifoldImplementation::concat(
193 manifold_A.get_periodicity(),
194 manifold_B.get_periodicity()))
195 , manifold_A(
Utilities::dynamic_unique_cast<
197 Manifold<dim_A, spacedim_A>>(manifold_A.clone()))
198 , manifold_B(
Utilities::dynamic_unique_cast<
200 Manifold<dim_B, spacedim_B>>(manifold_B.clone()))
210 std::unique_ptr<Manifold<dim, spacedim_A + spacedim_B>>
217 chartdim_B>::clone()
const 225 chartdim_B>>(*manifold_A,
242 chartdim_B>::chartdim>
257 chartdim_B>::spacedim> &space_point)
const 261 internal::TensorProductManifoldImplementation::split_point(space_point,
268 return internal::TensorProductManifoldImplementation::concat(result_A,
285 chartdim_B>::spacedim>
300 chartdim_B>::chartdim> &chart_point)
const 304 internal::TensorProductManifoldImplementation::split_point(chart_point,
311 return internal::TensorProductManifoldImplementation::concat(result_A,
329 chartdim_B>::chartdim,
336 chartdim_B>::spacedim>
345 push_forward_gradient(
352 chartdim_B>::chartdim> &chart_point)
const 356 internal::TensorProductManifoldImplementation::split_point(chart_point,
361 manifold_A->push_forward_gradient(chart_point_A);
363 manifold_B->push_forward_gradient(chart_point_B);
367 for (
unsigned int i = 0; i < chartdim_A; ++i)
368 for (
unsigned int j = 0; j < spacedim_A; ++j)
369 result[j][i] = result_A[j][i];
370 for (
unsigned int i = 0; i < chartdim_B; ++i)
371 for (
unsigned int j = 0; j < spacedim_B; ++j)
372 result[j + spacedim_A][i + chartdim_A] = result_B[j][i];
379 DEAL_II_NAMESPACE_CLOSE
virtual DerivativeForm< 1, chartdim, spacedim > push_forward_gradient(const Point< chartdim > &chart_point) const override
virtual Point< spacedim > push_forward(const Point< chartdim > &chart_point) const override
static const unsigned int chartdim
virtual Point< chartdim > pull_back(const Point< spacedim > &space_point) const override
Tensor product manifold of two ChartManifolds.
virtual std::unique_ptr< Manifold< dim, spacedim_A+spacedim_B > > clone() const override
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
static const unsigned int spacedim
TensorProductManifold(const ChartManifold< dim_A, spacedim_A, chartdim_A > &manifold_A, const ChartManifold< dim_B, spacedim_B, chartdim_B > &manifold_B)