]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Reintroduce deprecated cross_product for 2d
authorMatthias Maier <tamiko@43-1.org>
Fri, 25 Sep 2015 22:12:24 +0000 (17:12 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 25 Sep 2015 22:13:01 +0000 (17:13 -0500)
include/deal.II/base/tensor_deprecated.h

index 9d8c5687d34d5a5344ebd9db83bd80b32bb318c2..07bbad08b5c57bcc6de64b5d0bea941aa38b04be 100644 (file)
@@ -148,10 +148,24 @@ typename ProductType<Number,OtherNumber>::type
 contract (const Tensor<1,dim,Number> &src1,
           const Tensor<1,dim,OtherNumber> &src2) DEAL_II_DEPRECATED;
 
+
+/**
+ * The cross-product of one vector in 2d. This is just a rotation by 90
+ * degrees.
+ *
+ * @deprecated Use the function cross_product_2d that returns the value.
+ * @relates Tensor
+ */
+template <int dim, typename Number>
+inline
+void
+cross_product (Tensor<1,dim,Number>       &dst,
+               const Tensor<1,dim,Number> &src) DEAL_II_DEPRECATED;
+
 /**
  * The cross-product of 2 vectors in 3d.
  *
- * @deprecated Use the cross_product function that returns the value.
+ * @deprecated Use the function cross_product_3d that returns the value.
  * @relates Tensor
  */
 template <int dim, typename Number>
@@ -442,6 +456,15 @@ contract (const Tensor<1,dim,Number> &src1,
   return res;
 }
 
+template <int dim, typename Number>
+inline
+void
+cross_product (Tensor<1,dim,Number>       &dst,
+               const Tensor<1,dim,Number> &src)
+{
+  dst = cross_product_2d(src);
+}
+
 template <int dim, typename Number>
 inline
 void
@@ -449,7 +472,7 @@ cross_product (Tensor<1,dim,Number>       &dst,
                const Tensor<1,dim,Number> &src1,
                const Tensor<1,dim,Number> &src2)
 {
-  dst = cross_product(src1, src2);
+  dst = cross_product_3d(src1, src2);
 }
 
 template <int rank_1, int rank_2, int dim, typename Number>

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.