]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Refactor SD test: batch_optimizer_02
authorJean-Paul Pelteret <jppelteret@gmail.com>
Tue, 12 May 2020 19:46:37 +0000 (21:46 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Tue, 12 May 2020 19:46:37 +0000 (21:46 +0200)
tests/symengine/batch_optimizer_02_1a.output
tests/symengine/batch_optimizer_02_1b.output
tests/symengine/batch_optimizer_02_2a.output
tests/symengine/batch_optimizer_02_2b.output
tests/symengine/batch_optimizer_02_3a.with_symengine_with_llvm.output
tests/symengine/batch_optimizer_02_3a.with_symengine_with_llvm.output.libc++ [deleted file]
tests/symengine/batch_optimizer_02_3b.with_symengine_with_llvm.output
tests/symengine/batch_optimizer_02_3b.with_symengine_with_llvm.output.libc++ [deleted file]
tests/symengine/sd_common_tests/batch_optimizer_02.h

index cee56ac015aff0baef96f6fe15596f4483ef5c01..fc25b8942e44593c18c236e372dd1fb41cec360e 100644 (file)
@@ -1,22 +1,6 @@
 
-DEAL:Scalar:Float::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Float::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Float:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Float:Substitution::evaluation:   s: 11.28968525  ds_dx: 2.440623999
-DEAL:Scalar:Float:Optimisation + substitution::evaluation:   s: 11.28968525  ds_dx: 2.440623999
-DEAL:Scalar:Double::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Double::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Double:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Double:Substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Scalar:Double:Optimisation + substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Tensor:Float::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Float::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Float:Substitution::substitute:   s: 733.14522057327  ds_dx: 1803.37506684305  ds_dy: 4021.22089917923 -2721.50016323639 -2073.1341017929 2076.40974260677  ds_dz: 1.67424568153838 1.97850294809826 1.97850294809826 2.6968452216256
-DEAL:Tensor:Float:Substitution::evaluation:   s: 733.1452026  ds_dx: 1803.375122  ds_dy: 4021.220947 -2721.500244 -2073.134033 2076.409668  ds_dz: 1.674245715 1.978502989 1.978502989 2.696845293
-DEAL:Tensor:Float:Optimisation + substitution::evaluation:   s: 733.1452026  ds_dx: 1803.375122  ds_dy: 4021.220947 -2721.500244 -2073.134033 2076.409668  ds_dz: 1.674245715 1.978502989 1.978502989 2.696845293
-DEAL:Tensor:Double::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Double::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Double:Substitution::substitute:   s: 733.145160811002  ds_dx: 1803.37488238402  ds_dy: 4021.22068318209 -2721.5000393195 -2073.13387957114 2076.40954281835  ds_dz: 1.67425190103199 1.97851016739326 1.97851016739326 2.69685737072857
-DEAL:Tensor:Double:Substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
-DEAL:Tensor:Double:Optimisation + substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
+DEAL:Scalar:Float::OK
+DEAL:Scalar:Double::OK
+DEAL:Tensor:Float::OK
+DEAL:Tensor:Double::OK
 DEAL::OK
index 89f476547a6841e2f2d140972894b6cb4bad7c7e..fc25b8942e44593c18c236e372dd1fb41cec360e 100644 (file)
@@ -1,22 +1,6 @@
 
-DEAL:Scalar:Float::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Float::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Float:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Float:Substitution::evaluation:   s: 11.28968525  ds_dx: 2.440623999
-DEAL:Scalar:Float:Optimisation + substitution::evaluation:   s: 11.28968525  ds_dx: 2.440623999
-DEAL:Scalar:Double::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Double::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Double:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Double:Substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Scalar:Double:Optimisation + substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Tensor:Float::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Float::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Float:Substitution::substitute:   s: 733.14522057327  ds_dx: 1803.37506684305  ds_dy: 4021.22089917923 -2721.50016323639 -2073.1341017929 2076.40974260677  ds_dz: 1.67424568153838 1.97850294809826 1.97850294809826 2.6968452216256
-DEAL:Tensor:Float:Substitution::evaluation:   s: 733.1452026  ds_dx: 1803.375122  ds_dy: 4021.220947 -2721.500244 -2073.134033 2076.409668  ds_dz: 1.674245715 1.978502989 1.978502989 2.696845293
-DEAL:Tensor:Float:Optimisation + substitution::evaluation:   s: 733.1452026  ds_dx: 1803.375122  ds_dy: 4021.220703 -2721.500000 -2073.134033 2076.409668  ds_dz: 1.674248815 1.978506565 1.978506565 2.696851254
-DEAL:Tensor:Double::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Double::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Double:Substitution::substitute:   s: 733.145160811002  ds_dx: 1803.37488238402  ds_dy: 4021.22068318209 -2721.5000393195 -2073.13387957114 2076.40954281835  ds_dz: 1.67425190103199 1.97851016739326 1.97851016739326 2.69685737072857
-DEAL:Tensor:Double:Substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
-DEAL:Tensor:Double:Optimisation + substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
+DEAL:Scalar:Float::OK
+DEAL:Scalar:Double::OK
+DEAL:Tensor:Float::OK
+DEAL:Tensor:Double::OK
 DEAL::OK
index cee56ac015aff0baef96f6fe15596f4483ef5c01..fc25b8942e44593c18c236e372dd1fb41cec360e 100644 (file)
@@ -1,22 +1,6 @@
 
-DEAL:Scalar:Float::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Float::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Float:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Float:Substitution::evaluation:   s: 11.28968525  ds_dx: 2.440623999
-DEAL:Scalar:Float:Optimisation + substitution::evaluation:   s: 11.28968525  ds_dx: 2.440623999
-DEAL:Scalar:Double::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Double::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Double:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Double:Substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Scalar:Double:Optimisation + substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Tensor:Float::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Float::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Float:Substitution::substitute:   s: 733.14522057327  ds_dx: 1803.37506684305  ds_dy: 4021.22089917923 -2721.50016323639 -2073.1341017929 2076.40974260677  ds_dz: 1.67424568153838 1.97850294809826 1.97850294809826 2.6968452216256
-DEAL:Tensor:Float:Substitution::evaluation:   s: 733.1452026  ds_dx: 1803.375122  ds_dy: 4021.220947 -2721.500244 -2073.134033 2076.409668  ds_dz: 1.674245715 1.978502989 1.978502989 2.696845293
-DEAL:Tensor:Float:Optimisation + substitution::evaluation:   s: 733.1452026  ds_dx: 1803.375122  ds_dy: 4021.220947 -2721.500244 -2073.134033 2076.409668  ds_dz: 1.674245715 1.978502989 1.978502989 2.696845293
-DEAL:Tensor:Double::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Double::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Double:Substitution::substitute:   s: 733.145160811002  ds_dx: 1803.37488238402  ds_dy: 4021.22068318209 -2721.5000393195 -2073.13387957114 2076.40954281835  ds_dz: 1.67425190103199 1.97851016739326 1.97851016739326 2.69685737072857
-DEAL:Tensor:Double:Substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
-DEAL:Tensor:Double:Optimisation + substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
+DEAL:Scalar:Float::OK
+DEAL:Scalar:Double::OK
+DEAL:Tensor:Float::OK
+DEAL:Tensor:Double::OK
 DEAL::OK
index cee56ac015aff0baef96f6fe15596f4483ef5c01..fc25b8942e44593c18c236e372dd1fb41cec360e 100644 (file)
@@ -1,22 +1,6 @@
 
-DEAL:Scalar:Float::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Float::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Float:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Float:Substitution::evaluation:   s: 11.28968525  ds_dx: 2.440623999
-DEAL:Scalar:Float:Optimisation + substitution::evaluation:   s: 11.28968525  ds_dx: 2.440623999
-DEAL:Scalar:Double::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Double::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Double:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Double:Substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Scalar:Double:Optimisation + substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Tensor:Float::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Float::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Float:Substitution::substitute:   s: 733.14522057327  ds_dx: 1803.37506684305  ds_dy: 4021.22089917923 -2721.50016323639 -2073.1341017929 2076.40974260677  ds_dz: 1.67424568153838 1.97850294809826 1.97850294809826 2.6968452216256
-DEAL:Tensor:Float:Substitution::evaluation:   s: 733.1452026  ds_dx: 1803.375122  ds_dy: 4021.220947 -2721.500244 -2073.134033 2076.409668  ds_dz: 1.674245715 1.978502989 1.978502989 2.696845293
-DEAL:Tensor:Float:Optimisation + substitution::evaluation:   s: 733.1452026  ds_dx: 1803.375122  ds_dy: 4021.220947 -2721.500244 -2073.134033 2076.409668  ds_dz: 1.674245715 1.978502989 1.978502989 2.696845293
-DEAL:Tensor:Double::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Double::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Double:Substitution::substitute:   s: 733.145160811002  ds_dx: 1803.37488238402  ds_dy: 4021.22068318209 -2721.5000393195 -2073.13387957114 2076.40954281835  ds_dz: 1.67425190103199 1.97851016739326 1.97851016739326 2.69685737072857
-DEAL:Tensor:Double:Substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
-DEAL:Tensor:Double:Optimisation + substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
+DEAL:Scalar:Float::OK
+DEAL:Scalar:Double::OK
+DEAL:Tensor:Float::OK
+DEAL:Tensor:Double::OK
 DEAL::OK
index c3a6b4eaef157cf16adb32a90f71bc2aa4ad04f6..fc25b8942e44593c18c236e372dd1fb41cec360e 100644 (file)
@@ -1,22 +1,6 @@
 
-DEAL:Scalar:Float::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Float::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Float:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Float:Substitution::evaluation:   s: 11.28968525  ds_dx: 2.440623999
-DEAL:Scalar:Float:Optimisation + substitution::evaluation:   s: 11.28968430  ds_dx: 2.440624714
-DEAL:Scalar:Double::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Double::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Double:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Double:Substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Scalar:Double:Optimisation + substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Tensor:Float::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Float::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Float:Substitution::substitute:   s: 733.14522057327  ds_dx: 1803.37506684305  ds_dy: 4021.22089917923 -2721.50016323639 -2073.1341017929 2076.40974260677  ds_dz: 1.67424568153838 1.97850294809826 1.97850294809826 2.6968452216256
-DEAL:Tensor:Float:Substitution::evaluation:   s: 733.1452026  ds_dx: 1803.375122  ds_dy: 4021.220947 -2721.500244 -2073.134033 2076.409668  ds_dz: 1.674245715 1.978502989 1.978502989 2.696845293
-DEAL:Tensor:Float:Optimisation + substitution::evaluation:   s: 733.1455078  ds_dx: 1803.375977  ds_dy: 4021.222656 -2721.501465 -2073.135010 2076.410645  ds_dz: 1.674241662 1.978498340 1.978498340 2.696837425
-DEAL:Tensor:Double::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Double::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Double:Substitution::substitute:   s: 733.145160811002  ds_dx: 1803.37488238402  ds_dy: 4021.22068318209 -2721.5000393195 -2073.13387957114 2076.40954281835  ds_dz: 1.67425190103199 1.97851016739326 1.97851016739326 2.69685737072857
-DEAL:Tensor:Double:Substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
-DEAL:Tensor:Double:Optimisation + substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
+DEAL:Scalar:Float::OK
+DEAL:Scalar:Double::OK
+DEAL:Tensor:Float::OK
+DEAL:Tensor:Double::OK
 DEAL::OK
diff --git a/tests/symengine/batch_optimizer_02_3a.with_symengine_with_llvm.output.libc++ b/tests/symengine/batch_optimizer_02_3a.with_symengine_with_llvm.output.libc++
deleted file mode 100644 (file)
index c166318..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-DEAL:Scalar:Float::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Float::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Float:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Float:Substitution::evaluation:   s: 11.28968525  ds_dx: 2.440623999
-DEAL:Scalar:Float:Optimisation + substitution::evaluation:   s: 11.28968430  ds_dx: 2.440624714
-DEAL:Scalar:Double::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Double::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Double:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Double:Substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Scalar:Double:Optimisation + substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Tensor:Float::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Float::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Float:Substitution::substitute:   s: 733.14522057327  ds_dx: 1803.37506684305  ds_dy: 4021.22089917923 -2721.50016323639 -2073.1341017929 2076.40974260677  ds_dz: 1.67424568153838 1.97850294809826 1.97850294809826 2.6968452216256
-DEAL:Tensor:Float:Substitution::evaluation:   s: 733.1452026  ds_dx: 1803.375122  ds_dy: 4021.220947 -2721.500244 -2073.134033 2076.409668  ds_dz: 1.674245715 1.978502989 1.978502989 2.696845293
-DEAL:Tensor:Float:Optimisation + substitution::evaluation:   s: 733.1455078  ds_dx: 1803.375977  ds_dy: 4021.222900 -2721.501221 -2073.135010 2076.410889  ds_dz: 1.674248934 1.978506684 1.978506684 2.696851492
-DEAL:Tensor:Double::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Double::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Double:Substitution::substitute:   s: 733.145160811002  ds_dx: 1803.37488238402  ds_dy: 4021.22068318209 -2721.5000393195 -2073.13387957114 2076.40954281835  ds_dz: 1.67425190103196 1.97851016739323 1.97851016739323 2.69685737072851
-DEAL:Tensor:Double:Substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
-DEAL:Tensor:Double:Optimisation + substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
-DEAL::OK
index 6bbe1b7f9aa32b63ec4f4302df91b6b4606f46a1..fc25b8942e44593c18c236e372dd1fb41cec360e 100644 (file)
@@ -1,22 +1,6 @@
 
-DEAL:Scalar:Float::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Float::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Float:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Float:Substitution::evaluation:   s: 11.28968525  ds_dx: 2.440623999
-DEAL:Scalar:Float:Optimisation + substitution::evaluation:   s: 11.28968525  ds_dx: 2.440624475
-DEAL:Scalar:Double::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Double::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Double:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Double:Substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Scalar:Double:Optimisation + substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Tensor:Float::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Float::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Float:Substitution::substitute:   s: 733.14522057327  ds_dx: 1803.37506684305  ds_dy: 4021.22089917923 -2721.50016323639 -2073.1341017929 2076.40974260677  ds_dz: 1.67424568153838 1.97850294809826 1.97850294809826 2.6968452216256
-DEAL:Tensor:Float:Substitution::evaluation:   s: 733.1452026  ds_dx: 1803.375122  ds_dy: 4021.220947 -2721.500244 -2073.134033 2076.409668  ds_dz: 1.674245715 1.978502989 1.978502989 2.696845293
-DEAL:Tensor:Float:Optimisation + substitution::evaluation:   s: 733.1455078  ds_dx: 1803.375977  ds_dy: 4021.222656 -2721.501465 -2073.134766 2076.410645  ds_dz: 1.674248934 1.978506684 1.978506684 2.696851492
-DEAL:Tensor:Double::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Double::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Double:Substitution::substitute:   s: 733.145160811002  ds_dx: 1803.37488238402  ds_dy: 4021.22068318209 -2721.5000393195 -2073.13387957114 2076.40954281835  ds_dz: 1.67425190103199 1.97851016739326 1.97851016739326 2.69685737072857
-DEAL:Tensor:Double:Substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
-DEAL:Tensor:Double:Optimisation + substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
+DEAL:Scalar:Float::OK
+DEAL:Scalar:Double::OK
+DEAL:Tensor:Float::OK
+DEAL:Tensor:Double::OK
 DEAL::OK
diff --git a/tests/symengine/batch_optimizer_02_3b.with_symengine_with_llvm.output.libc++ b/tests/symengine/batch_optimizer_02_3b.with_symengine_with_llvm.output.libc++
deleted file mode 100644 (file)
index c2b0526..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-DEAL:Scalar:Float::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Float::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Float:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Float:Substitution::evaluation:   s: 11.28968525  ds_dx: 2.440623999
-DEAL:Scalar:Float:Optimisation + substitution::evaluation:   s: 11.28968525  ds_dx: 2.440624237
-DEAL:Scalar:Double::symb_s: 1.5 + 1.5*y/log(x) + 2.0*x**y + sin(0.666666666666667*x*y**2)
-DEAL:Scalar:Double::symb_ds_dx: 2.0*x**(-1 + y)*y + 0.666666666666667*y**2*cos(0.666666666666667*x*y**2) - 1.5*y/(x*log(x)**2)
-DEAL:Scalar:Double:Substitution::substitute:   s: 11.2896853345375  ds_dx: 2.44062401525716
-DEAL:Scalar:Double:Substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Scalar:Double:Optimisation + substitution::evaluation:   s: 11.28968533  ds_dx: 2.440624015
-DEAL:Tensor:Float::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Float::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Float:Substitution::substitute:   s: 733.14522057327  ds_dx: 1803.37506684305  ds_dy: 4021.22089917923 -2721.50016323639 -2073.1341017929 2076.40974260677  ds_dz: 1.67424568153838 1.97850294809826 1.97850294809826 2.6968452216256
-DEAL:Tensor:Float:Substitution::evaluation:   s: 733.1452026  ds_dx: 1803.375122  ds_dy: 4021.220947 -2721.500244 -2073.134033 2076.409668  ds_dz: 1.674245715 1.978502989 1.978502989 2.696845293
-DEAL:Tensor:Float:Optimisation + substitution::evaluation:   s: 733.1455078  ds_dx: 1803.375977  ds_dy: 4021.222656 -2721.501221 -2073.134766 2076.410645  ds_dz: 1.674248934 1.978506684 1.978506684 2.696851492
-DEAL:Tensor:Double::symb_s: 1.5 + 1.5*(1.0*y_00*y_11 - 1.0*y_01*y_10)*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10)) + sin(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01))
-DEAL:Tensor:Double::symb_ds_dy: 0.0 - 1.5*y_11 + 1.5*y_11*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_00*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_11 0.0 + 1.5*y_10 - 1.5*y_10*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_10 0.0 + 1.5*y_01 - 1.5*y_01*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_01*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) - 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_01 0.0 - 1.5*y_00 + 1.5*y_00*log(1.0*(z_00**2 + 2*z_01**2 + z_11**2)/(1.0*y_00*y_11 - 1.0*y_01*y_10)) + 0.666666666666667*z_11*cos(0.666666666666667*(z_00*y_00 + z_11*y_11 + 1.0*(y_01 + y_10)*z_01)) + 2.0*x**(1.0*(1.0*y_00*y_11 - 1.0*y_01*y_10))*log(x)*y_00
-DEAL:Tensor:Double:Substitution::substitute:   s: 733.145160811002  ds_dx: 1803.37488238402  ds_dy: 4021.22068318209 -2721.5000393195 -2073.13387957114 2076.40954281835  ds_dz: 1.67425190103196 1.97851016739323 1.97851016739323 2.69685737072851
-DEAL:Tensor:Double:Substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
-DEAL:Tensor:Double:Optimisation + substitution::evaluation:   s: 733.1451608  ds_dx: 1803.374882  ds_dy: 4021.220683 -2721.500039 -2073.133880 2076.409543  ds_dz: 1.674251901 1.978510167 1.978510167 2.696857371
-DEAL::OK
index 75d73c8e5466639359f725047576a0887ff43c23..092cd8148eebcb79e3df67f45b3dc6f594681864 100644 (file)
@@ -36,6 +36,9 @@ template <typename NumberType,
 void
 test_scalar(const int n_runs, TimerOutput &timer)
 {
+  std::cout << std::string(80, '-') << std::endl;
+  std::cout << "Scalar" << std::endl;
+
   typedef SD::Expression SD_number_t;
 
   const NumberType  a = NumberType(1.5);
@@ -44,12 +47,12 @@ test_scalar(const int n_runs, TimerOutput &timer)
   timer.enter_subsection("Value calculation");
   const SD_number_t symb_s = a + NumberType(2.0) * std::pow(x, y) +
                              a * y / std::log(x) + std::sin(x * y * y / a);
-  deallog << "symb_s: " << symb_s << std::endl;
+  std::cout << "symb_s: " << symb_s << std::endl;
   timer.leave_subsection("Value calculation");
 
   timer.enter_subsection("Differentiation");
   const SD_number_t symb_ds_dx = SD::differentiate(symb_s, x);
-  deallog << "symb_ds_dx: " << symb_ds_dx << std::endl;
+  std::cout << "symb_ds_dx: " << symb_ds_dx << std::endl;
   timer.leave_subsection("Differentiation");
 
   SD::types::substitution_map sub_vals;
@@ -64,15 +67,16 @@ test_scalar(const int n_runs, TimerOutput &timer)
         const SD_number_t subs_s     = SD::substitute(symb_s, sub_vals);
         const SD_number_t subs_ds_dx = SD::substitute(symb_ds_dx, sub_vals);
         if (i == 0)
-          deallog << "substitute: "
-                  << "  s: " << subs_s << "  ds_dx: " << subs_ds_dx
-                  << std::endl;
+          std::cout << "substitute: "
+                    << "  s: " << subs_s << "  ds_dx: " << subs_ds_dx
+                    << std::endl;
 
         const NumberType val_s     = static_cast<NumberType>(subs_s);
         const NumberType val_ds_dx = static_cast<NumberType>(subs_ds_dx);
         if (i == 0)
-          deallog << "evaluation: "
-                  << "  s: " << val_s << "  ds_dx: " << val_ds_dx << std::endl;
+          std::cout << "evaluation: "
+                    << "  s: " << val_s << "  ds_dx: " << val_ds_dx
+                    << std::endl;
       }
   }
   deallog.pop();
@@ -99,11 +103,29 @@ test_scalar(const int n_runs, TimerOutput &timer)
         const NumberType val_s     = optimizer.evaluate(symb_s);
         const NumberType val_ds_dx = optimizer.evaluate(symb_ds_dx);
         if (i == 0)
-          deallog << "evaluation: "
-                  << "  s: " << val_s << "  ds_dx: " << val_ds_dx << std::endl;
+          std::cout << "evaluation: "
+                    << "  s: " << val_s << "  ds_dx: " << val_ds_dx
+                    << std::endl;
+
+        // The result is not stable and depends on standard library, number
+        // type, optimization parameters and compiler being used. However, we
+        // also don't want to maintain a whole bunch of blesses output
+        // variants. So we set a loose tolerance here.
+        static const double tol = 1e-3;
+        {
+          const NumberType blessed_val_s     = 11.2896853345;
+          const NumberType blessed_val_ds_dx = 2.44062401526;
+
+          AssertThrow(std::abs(val_s - blessed_val_s) < tol,
+                      ExcMessage("No match for function value."));
+          AssertThrow(std::abs(val_ds_dx - blessed_val_ds_dx) < tol,
+                      ExcMessage("No match for first derivative."));
+        }
       }
   }
   deallog.pop();
+
+  deallog << "OK" << std::endl;
 }
 
 template <int dim,
@@ -113,10 +135,13 @@ template <int dim,
 void
 test_tensor(const int n_runs, TimerOutput &timer)
 {
-  namespace SD = Differentiation::SD;
-  typedef SD::Expression                       SD_number_t;
-  typedef Tensor<2, dim, SD_number_t>          SD_tensor_t;
-  typedef SymmetricTensor<2, dim, SD_number_t> SD_symm_tensor_t;
+  std::cout << std::string(80, '-') << std::endl;
+  std::cout << "Tensor: Dim: " << dim << std::endl;
+
+  namespace SD           = Differentiation::SD;
+  using SD_number_t      = SD::Expression;
+  using SD_tensor_t      = Tensor<2, dim, SD_number_t>;
+  using SD_symm_tensor_t = SymmetricTensor<2, dim, SD_number_t>;
 
   const NumberType       a = NumberType(1.5);
   const SD_number_t      x("x");
@@ -128,14 +153,14 @@ test_tensor(const int n_runs, TimerOutput &timer)
     a + NumberType(2.0) * std::pow(x, determinant(y)) +
     a * determinant(y) * std::log((z * z) / determinant(y)) +
     std::sin((z * symmetrize(y)) / a);
-  deallog << "symb_s: " << symb_s << std::endl;
+  std::cout << "symb_s: " << symb_s << std::endl;
   timer.leave_subsection("Value calculation");
 
   timer.enter_subsection("Differentiation");
   const SD_number_t      symb_ds_dx = SD::differentiate(symb_s, x);
   const SD_tensor_t      symb_ds_dy = SD::differentiate(symb_s, y);
   const SD_symm_tensor_t symb_ds_dz = SD::differentiate(symb_s, z);
-  deallog << "symb_ds_dy: " << symb_ds_dy << std::endl;
+  std::cout << "symb_ds_dy: " << symb_ds_dy << std::endl;
   timer.leave_subsection("Differentiation");
 
   SD::types::substitution_map sub_vals;
@@ -157,10 +182,10 @@ test_tensor(const int n_runs, TimerOutput &timer)
         const SD_symm_tensor_t subs_ds_dz =
           SD::substitute(symb_ds_dz, sub_vals);
         if (i == 0)
-          deallog << "substitute: "
-                  << "  s: " << subs_s << "  ds_dx: " << subs_ds_dx
-                  << "  ds_dy: " << subs_ds_dy << "  ds_dz: " << subs_ds_dz
-                  << std::endl;
+          std::cout << "substitute: "
+                    << "  s: " << subs_s << "  ds_dx: " << subs_ds_dx
+                    << "  ds_dy: " << subs_ds_dy << "  ds_dz: " << subs_ds_dz
+                    << std::endl;
 
         const NumberType val_s     = static_cast<NumberType>(subs_s);
         const NumberType val_ds_dx = static_cast<NumberType>(subs_ds_dx);
@@ -169,10 +194,41 @@ test_tensor(const int n_runs, TimerOutput &timer)
         const SymmetricTensor<2, dim, NumberType> val_ds_dz =
           static_cast<SymmetricTensor<2, dim, NumberType>>(subs_ds_dz);
         if (i == 0)
-          deallog << "evaluation: "
-                  << "  s: " << val_s << "  ds_dx: " << val_ds_dx
-                  << "  ds_dy: " << val_ds_dy << "  ds_dz: " << val_ds_dz
-                  << std::endl;
+          std::cout << "evaluation: "
+                    << "  s: " << val_s << "  ds_dx: " << val_ds_dx
+                    << "  ds_dy: " << val_ds_dy << "  ds_dz: " << val_ds_dz
+                    << std::endl;
+
+        // The result is not stable and depends on standard library, number
+        // type, optimization parameters and compiler being used. However, we
+        // also don't want to maintain a whole bunch of blesses output
+        // variants. So we set a loose tolerance here.
+        static const double tol = 1e-3;
+        if (dim == 2)
+          {
+            const NumberType                 blessed_val_s     = 733.145160811;
+            const NumberType                 blessed_val_ds_dx = 1803.37488238;
+            const Tensor<2, dim, NumberType> blessed_val_ds_dy(
+              {{4021.22068318, -2721.50003932},
+               {-2073.13387957, 2076.40954282}});
+            const SymmetricTensor<2, dim, NumberType> blessed_val_ds_dz =
+              symmetrize(
+                Tensor<2, dim, NumberType>({{1.67425190103, 1.97851016739},
+                                            {1.97851016739, 2.69685737073}}));
+
+            AssertThrow(std::abs(val_s - blessed_val_s) < tol,
+                        ExcMessage("No match for function value."));
+            AssertThrow(std::abs(val_ds_dx - blessed_val_ds_dx) < tol,
+                        ExcMessage("No match for first derivative."));
+            AssertThrow((val_ds_dy - blessed_val_ds_dy).norm() < tol,
+                        ExcMessage("No match for first derivative."));
+            AssertThrow((val_ds_dz - blessed_val_ds_dz).norm() < tol,
+                        ExcMessage("No match for first derivative."));
+          }
+        else
+          {
+            AssertThrow(false, ExcNotImplemented());
+          }
       }
   }
   deallog.pop();
@@ -210,13 +266,15 @@ test_tensor(const int n_runs, TimerOutput &timer)
           optimizer.evaluate(symb_ds_dz);
 
         if (i == 0)
-          deallog << "evaluation: "
-                  << "  s: " << val_s << "  ds_dx: " << val_ds_dx
-                  << "  ds_dy: " << val_ds_dy << "  ds_dz: " << val_ds_dz
-                  << std::endl;
+          std::cout << "evaluation: "
+                    << "  s: " << val_s << "  ds_dx: " << val_ds_dx
+                    << "  ds_dy: " << val_ds_dy << "  ds_dz: " << val_ds_dz
+                    << std::endl;
       }
   }
   deallog.pop();
+
+  deallog << "OK" << std::endl;
 }
 
 
@@ -228,7 +286,7 @@ run_tests(const int n_runs)
 {
   // Show the difference between a SymEngine "value" and
   // an evaluated, floating point number
-  // deallog << std::setprecision(3);
+  // deallog << std::setprecision(12);
 
   deallog.push("Scalar");
   {

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.