16 #ifndef dealii_tensor_product_manifold_h
17 #define dealii_tensor_product_manifold_h
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>(
193 manifold_A.get_periodicity(),
194 manifold_B.get_periodicity()))
197 Manifold<dim_A, spacedim_A>>(manifold_A.clone()))
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
285 chartdim_B>::spacedim>
300 chartdim_B>::chartdim> &chart_point)
const
329 chartdim_B>::chartdim,
336 chartdim_B>::spacedim>
345 push_forward_gradient(
352 chartdim_B>::chartdim> &chart_point)
const
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];