16 #ifndef dealii_tensor_product_manifold_h 17 #define dealii_tensor_product_manifold_h 19 #include <deal.II/base/config.h> 20 #include <deal.II/base/subscriptor.h> 21 #include <deal.II/base/std_cxx14/memory.h> 22 #include <deal.II/base/point.h> 23 #include <deal.II/grid/manifold.h> 25 DEAL_II_NAMESPACE_OPEN
62 int dim_A,
int spacedim_A,
int chartdim_A,
63 int dim_B,
int spacedim_B,
int chartdim_B>
65 public ChartManifold<dim,spacedim_A+spacedim_B,chartdim_A+chartdim_B>
72 static const unsigned int chartdim = chartdim_A+chartdim_B;
77 static const unsigned int spacedim = spacedim_A+spacedim_B;
89 virtual std::unique_ptr<Manifold<dim,spacedim_A+spacedim_B> >
90 clone()
const override;
129 namespace TensorProductManifoldImplementation
131 template <
int dim1,
int dim2>
135 for (
unsigned int d=0; d<dim1; ++d)
137 for (
unsigned int d=0; d<dim2; ++d)
142 template <
int dim1,
int dim2>
146 for (
unsigned int d=0;
d<dim1; ++
d)
148 for (
unsigned int d=0;
d<dim2; ++
d)
153 template <
int dim1,
int dim2>
156 for (
unsigned int d=0;
d<dim1; ++
d)
158 for (
unsigned int d=0;
d<dim2; ++
d)
159 p2[d] = source[dim1+d];
166 int dim_A,
int spacedim_A,
int chartdim_A,
167 int dim_B,
int spacedim_B,
int chartdim_B>
172 :
ChartManifold<dim,spacedim_A+spacedim_B,chartdim_A+chartdim_B> (
173 internal::TensorProductManifoldImplementation::concat(
174 manifold_A.get_periodicity(),
175 manifold_B.get_periodicity())),
176 manifold_A (&manifold_A),
177 manifold_B (&manifold_B)
181 int dim_A,
int spacedim_A,
int chartdim_A,
182 int dim_B,
int spacedim_B,
int chartdim_B>
183 std::unique_ptr<Manifold<dim,spacedim_A+spacedim_B> >
186 return std_cxx14::make_unique<TensorProductManifold<dim, dim_A, spacedim_A, chartdim_A, dim_B, spacedim_B, chartdim_B> >
187 (*manifold_A, *manifold_B);
191 int dim_A,
int spacedim_A,
int chartdim_A,
192 int dim_B,
int spacedim_B,
int chartdim_B>
199 internal::TensorProductManifoldImplementation::split_point(space_point, space_point_A, space_point_B);
204 return internal::TensorProductManifoldImplementation::concat(result_A, result_B);
208 int dim_A,
int spacedim_A,
int chartdim_A,
209 int dim_B,
int spacedim_B,
int chartdim_B>
216 internal::TensorProductManifoldImplementation::split_point(chart_point, chart_point_A, chart_point_B);
221 return internal::TensorProductManifoldImplementation::concat(result_A, result_B);
225 int dim_A,
int spacedim_A,
int chartdim_A,
226 int dim_B,
int spacedim_B,
int chartdim_B>
236 internal::TensorProductManifoldImplementation::split_point(chart_point, chart_point_A, chart_point_B);
239 = manifold_A->push_forward_gradient(chart_point_A);
241 = manifold_B->push_forward_gradient(chart_point_B);
245 for (
unsigned int i = 0; i<chartdim_A; ++i)
246 for (
unsigned int j = 0; j<spacedim_A; ++j)
247 result[j][i] = result_A[j][i];
248 for (
unsigned int i = 0; i<chartdim_B; ++i)
249 for (
unsigned int j = 0; j<spacedim_B; ++j)
250 result[j+spacedim_A][i+chartdim_A] = result_B[j][i];
258 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)