Skip to content

Commit

Permalink
Deprecate Point as axis.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcfehling committed Oct 13, 2021
1 parent 70b14fb commit a406d27
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/news/changes/incompatibilities/20211011Fehling
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Changed: The 3D implementation of GridTools::rotate() with an integer
for a Certesian coordinate direction has been superseded by the version
that accepts unit vectors as rotation axes.
that accepts unit vectors as rotation axes. Further,
Physics::Transformations::Rotations::rotation_matrix_3d() now requires
a Tensor<1,3> object instead of a Point<3> as an axis.
<br>
(Marc Fehling, 2021/10/11)
20 changes: 20 additions & 0 deletions include/deal.II/physics/transformations.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ namespace Physics
Tensor<2, 3, Number>
rotation_matrix_3d(const Tensor<1, 3, Number> &axis, const Number &angle);

/**
* @copydoc Physics::Transformations::Rotations::rotation_matrix_3d()
*
* @deprecated Use the variant with a Tensor as an axis.
*/
template <typename Number>
DEAL_II_DEPRECATED_EARLY Tensor<2, 3, Number>
rotation_matrix_3d(const Point<3, Number> &axis, const Number &angle);

//@}

} // namespace Rotations
Expand Down Expand Up @@ -935,6 +944,17 @@ Physics::Transformations::Rotations::rotation_matrix_3d(



template <typename Number>
Tensor<2, 3, Number>
Physics::Transformations::Rotations::rotation_matrix_3d(
const Point<3, Number> &axis,
const Number & angle)
{
return rotation_matrix_3d(static_cast<Tensor<1, 3, Number>>(axis), angle);
}



template <int dim, typename Number>
inline Tensor<1, dim, Number>
Physics::Transformations::Contravariant::push_forward(
Expand Down

0 comments on commit a406d27

Please sign in to comment.