* scaled, and the given point may be any point on the axis. The tolerance
* value is used to determine if a point is on the axis.
*/
- CylindricalManifold (const Point<spacedim> &direction,
+ CylindricalManifold (const Tensor<1, spacedim> &direction,
const Point<spacedim> &point_on_axis,
const double tolerance = 1e-10);
template <int dim, int spacedim>
-CylindricalManifold<dim, spacedim>::CylindricalManifold(const Point<spacedim> &direction_,
+CylindricalManifold<dim, spacedim>::CylindricalManifold(const Tensor<1, spacedim> &direction_,
const Point<spacedim> &point_on_axis_,
const double tolerance) :
ChartManifold<dim,spacedim,3>(Tensor<1,3>({0,2.*numbers::PI,0})),
GridTools::transform ((Point<dim> ( *)(const Point<dim> &))&rotate_by_xy_angle<dim>, triangulation);
- static const CylindricalManifold<dim> boundary (Point<dim>(std::cos(xy_angle), std::sin(xy_angle), 0),
- Point<dim>());
+ const Tensor<1, dim> direction {{std::cos(xy_angle), std::sin(xy_angle), 0}};
+ static const CylindricalManifold<dim> boundary (direction, /*center=*/Point<dim>());
triangulation.set_manifold (0, boundary);
triangulation.refine_global (2);
check<3> ();
}
-
-
-
template <int dim>
struct ManifoldWrapper
{
- Manifold<dim> *operator()(const Point<dim> &direction,
+ Manifold<dim> *operator()(const Tensor<1, dim> &direction,
const Point<dim> ¢er ) const;
};
template <>
Manifold<2> *
-ManifoldWrapper<2>::operator()(const Point<2> &/*direction*/,
+ManifoldWrapper<2>::operator()(const Tensor<1, 2> &/*direction*/,
const Point<2> ¢er ) const
{
return new SphericalManifold<2>(center);
template <>
Manifold<3> *
-ManifoldWrapper<3>::operator()(const Point<3> &direction,
+ManifoldWrapper<3>::operator()(const Tensor<1, 3> &direction,
const Point<3> ¢er ) const
{
return new CylindricalManifold<3>(direction, center);
template <int dim>
void test()
{
- Point<dim> direction;
+ Tensor<1, dim> direction;
direction[dim-1] = 1.;
std::shared_ptr<Manifold<dim> > cylinder_manifold
template <int dim>
struct ManifoldWrapper
{
- Manifold<dim> *operator()(const Point<dim> &direction,
+ Manifold<dim> *operator()(const Tensor<1, dim> &direction,
const Point<dim> ¢er ) const;
};
template <>
Manifold<2> *
-ManifoldWrapper<2>::operator()(const Point<2> &/*direction*/,
+ManifoldWrapper<2>::operator()(const Tensor<1, 2> &/*direction*/,
const Point<2> ¢er ) const
{
return new SphericalManifold<2>(center);
template <>
Manifold<3> *
-ManifoldWrapper<3>::operator()(const Point<3> &direction,
+ManifoldWrapper<3>::operator()(const Tensor<1, 3> &direction,
const Point<3> ¢er ) const
{
return new CylindricalManifold<3>(direction, center);
Point<dim> center;
center[0] = X_C;
center[1] = Y_C;
- Point<dim> direction;
+ Tensor<1, dim> direction;
direction[dim-1] = 1.;
std::shared_ptr<Manifold<dim> > cylinder_manifold