]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Extend test. Reindent it.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 3 Feb 2015 15:19:07 +0000 (09:19 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 3 Feb 2015 15:21:31 +0000 (09:21 -0600)
include/deal.II/base/tensor_base.h
tests/base/tensor_nondefault_constructor.cc
tests/base/tensor_nondefault_constructor.output

index db9e55b9c835676e1500e64e84c2ae980bc3dbe7..c4b5f46cab7f52f4b45a06f1017c2c39843b1988 100644 (file)
@@ -122,7 +122,7 @@ public:
    */
   template <typename OtherNumber>
   Tensor (const Tensor<0,dim,OtherNumber> &);
-  
+
   /**
    * Conversion to Number. Since rank-0 tensors are scalars, this is a natural
    * operation.
@@ -361,7 +361,7 @@ public:
    */
   template <typename OtherNumber>
   Tensor (const Tensor<1,dim,OtherNumber> &);
-  
+
   /**
    * Read access to the <tt>index</tt>th coordinate.
    *
index 6357f575c8f81f2ff1ee4c7b8d552780a75bfd7c..3c151e84ce2a5b0501f7eed9d7df849ba362bde0 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 1998 - 2014 by the deal.II authors
+// Copyright (C) 1998 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -38,34 +38,40 @@ int main ()
   
   // rank 2
   {
-       Tensor<2,dim,float> t(a);
-       Tensor<2,dim,double> dt(t), dt2;
-       dt2 = t;
-       Assert (dt2 == dt, ExcInternalError());
+    Tensor<2,dim,float> t(a);
+    Tensor<2,dim,double> dt(t), dt2;
+    dt2 = t;
+    Assert (dt2 == dt, ExcInternalError());
+    Assert (dt == dt2, ExcInternalError());
   
-       Tensor<2,dim,float> ft(dt), ft2;
-       ft2 = dt;
-       Assert (ft2 == ft, ExcInternalError());
+    Tensor<2,dim,float> ft(dt), ft2;
+    ft2 = dt;
+    Assert (ft2 == ft, ExcInternalError());
+    Assert (ft == ft2, ExcInternalError());
   
-       Tensor<2,dim,std::complex<double> > ct(dt), ct2;
-       ct2 = dt;
-       Assert (ct2 == ct, ExcInternalError());
+    Tensor<2,dim,std::complex<double> > ct(dt), ct2;
+    ct2 = dt;
+    Assert (ct2 == ct, ExcInternalError());
+    Assert (ct == ct2, ExcInternalError());
   }
   
   // rank 1
   {
-       Tensor<1,dim,float> t(b);
-       Tensor<1,dim,double> dt(t), dt2;
-       dt2 = t;
-       Assert (dt2 == dt, ExcInternalError());
+    Tensor<1,dim,float> t(b);
+    Tensor<1,dim,double> dt(t), dt2;
+    dt2 = t;
+    Assert (dt2 == dt, ExcInternalError());
+    Assert (dt == dt2, ExcInternalError());
   
-       Tensor<1,dim,float> ft(dt),ft2;
+    Tensor<1,dim,float> ft(dt),ft2;
     ft2 = dt;
     Assert (ft2 == ft, ExcInternalError());
+    Assert (ft == ft2, ExcInternalError());
   
     Tensor<1,dim,std::complex<double>> ct(dt), ct2;
     ct2 = dt;
-       Assert (ct2 == ct, ExcInternalError());
+    Assert (ct2 == ct, ExcInternalError());
+    Assert (ct == ct2, ExcInternalError());
   }
   
   deallog << "OK." << std::endl;
index 6b3ab1067582f175af2ef620452a28b5c9c732ef..56034c8fff50c1580e2061bbf2292ea2bcda2153 100644 (file)
@@ -1 +1,2 @@
+
 DEAL::OK.

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.