From f6e60230dcc3a6cca62746a38f3c421db7db1345 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Thu, 18 Apr 2019 21:37:26 +0200 Subject: [PATCH] Add test for operations using symbolic and expressional tensors --- .../symengine_tensor_operations_02.cc | 219 +++++++++++++++ .../symengine_tensor_operations_02.output | 253 ++++++++++++++++++ 2 files changed, 472 insertions(+) create mode 100644 tests/symengine/symengine_tensor_operations_02.cc create mode 100644 tests/symengine/symengine_tensor_operations_02.output diff --git a/tests/symengine/symengine_tensor_operations_02.cc b/tests/symengine/symengine_tensor_operations_02.cc new file mode 100644 index 0000000000..c9e075a8a1 --- /dev/null +++ b/tests/symengine/symengine_tensor_operations_02.cc @@ -0,0 +1,219 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2019 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + +// Check that some of the common tensor operations can be performed with +// tensors of expressions + +#include + +#include + +#include "../tests.h" + +using namespace dealii; +namespace SD = Differentiation::SD; + +template +Tensor<2, dim, NumberType> +make_tensor(const NumberType &val) +{ + Tensor<2, dim, NumberType> out; + for (unsigned int i = 0; i < out.n_independent_components; ++i) + out[out.unrolled_to_component_indices(i)] = NumberType(i) + val; + return out; +} + +template +SymmetricTensor<2, dim, NumberType> +make_symm_tensor(const NumberType &val) +{ + SymmetricTensor<2, dim, NumberType> out; + for (unsigned int i = 0; i < out.n_independent_components; ++i) + out[out.unrolled_to_component_indices(i)] = NumberType(i) + val; + return out; +} + +template +void +test_tensor() +{ + 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; + + // --- Values --- + deallog.push("Initialize"); + SD_tensor_t a(make_tensor(NumberType(10))); + SD_tensor_t b(make_tensor(NumberType(10))); + SD_symm_tensor_t as(make_symm_tensor(NumberType(10))); + SD_symm_tensor_t bs(make_symm_tensor(NumberType(10))); + deallog << "a: " << a << std::endl; + deallog << "b: " << b << std::endl; + deallog << "as: " << as << std::endl; + deallog << "bs: " << bs << std::endl; + deallog.pop(); + + deallog.push("Relational operators 1"); + deallog << "a == b: " << (a == b) << std::endl; + deallog << "a != b: " << (a != b) << std::endl; + if (numbers::NumberTraits::is_complex == false) + deallog << "a.norm() < b.norm(): " << (a.norm() < b.norm()) << std::endl; + deallog.pop(); + + deallog.push("Set new values"); + a = make_tensor(NumberType(5)); + b = make_tensor(NumberType(9)); + as = make_symm_tensor(NumberType(5)); + bs = make_symm_tensor(NumberType(7)); + deallog << "a: " << a << std::endl; + deallog << "b: " << b << std::endl; + deallog << "as: " << as << std::endl; + deallog << "bs: " << bs << std::endl; + deallog.pop(); + // + deallog.push("Relational operators 2"); + deallog << "a == b: " << (a == b) << std::endl; + deallog << "a != b: " << (a != b) << std::endl; + if (numbers::NumberTraits::is_complex == false) + deallog << "a.norm() < b.norm(): " << (a.norm() < b.norm()) << std::endl; + deallog.pop(); + + deallog.push("Math operators"); + deallog.push("Tensor"); + deallog << "a+b: " << (a + b) << std::endl; + deallog << "a-b: " << (a - b) << std::endl; + deallog << "a*b: " << (a * b) << std::endl; + deallog.pop(); + deallog.push("SymmetricTensor"); + deallog << "as+bs: " << (as + bs) << std::endl; + deallog << "as-bs: " << (as - bs) << std::endl; + deallog << "as*bs: " << (as * bs) << std::endl; + const SD_tensor_t as_ns = as; + deallog << "as: " << as << std::endl; + deallog << "as_ns: " << as_ns << std::endl; + const SD_tensor_t as_ns2(as); + deallog << "as+b: " << (as + b) << std::endl; + deallog << "as-b: " << (as - b) << std::endl; + deallog << "as*b: " << (static_cast(as) * b) << std::endl; + deallog.pop(); + deallog.pop(); + + // --- Normal numbers --- + deallog.push("Copy constructor"); + SD_tensor_t c(a); // Copy constructor + SD_symm_tensor_t cs(as); // Copy constructor + deallog << "c: " << c << std::endl; + deallog << "cs: " << cs << std::endl; + deallog.pop(); + + deallog.push("Math operators"); // including those with arithmetic numbers + const NumberType s(2); + deallog.push("Tensor"); + c += b; + deallog << "c+=b: " << c << std::endl; + c *= s; + deallog << "c*=s: " << c << std::endl; + c -= b; + deallog << "c-=b: " << c << std::endl; + c /= s; + deallog << "c/=s: " << c << std::endl; + deallog.pop(); + deallog.push("SymmetricTensor"); + cs += bs; + deallog << "cs+=bs: " << cs << std::endl; + cs *= s; + deallog << "cs*=s: " << cs << std::endl; + cs -= bs; + deallog << "cs-=bs: " << cs << std::endl; + cs /= s; + deallog << "cs/=s: " << cs << std::endl; + deallog.pop(); + deallog.pop(); + + // --- Symbols --- + deallog.push("Symbols"); + const SD_number_t y("y"); + const SD_tensor_t x(SD::make_tensor_of_symbols<2, dim>("x")); + const SD_symm_tensor_t z(SD::make_symmetric_tensor_of_symbols<2, dim>("z")); + deallog << "x: " << x << std::endl; + deallog << "y: " << y << std::endl; + deallog << "z: " << z << std::endl; + deallog.pop(); + + deallog.push("Math operators"); // including those with arithmetic numbers + deallog.push("Tensor"); + c += x; + deallog << "c+=x: " << c << std::endl; + c *= y; + deallog << "c*=y: " << c << std::endl; + c *= s; + deallog << "c*=s: " << c << std::endl; + c -= x; + deallog << "c-=x: " << c << std::endl; + c /= y; + deallog << "c/=y: " << c << std::endl; + c /= s; + deallog << "c/=s: " << c << std::endl; + deallog.pop(); + deallog.push("SymmetricTensor"); + cs += z; + deallog << "cs+=z: " << cs << std::endl; + cs *= y; + deallog << "cs*=y: " << cs << std::endl; + cs *= s; + deallog << "cs*=s: " << cs << std::endl; + cs -= z; + deallog << "cs-=z: " << cs << std::endl; + cs /= y; + deallog << "cs/=y: " << cs << std::endl; + cs /= s; + deallog << "cs/=s: " << cs << std::endl; + deallog.pop(); + deallog.pop(); + + deallog << "OK" << std::endl; +} + + +int +main() +{ + initlog(); + + const int dim = 2; + + deallog.push("Integer"); + test_tensor(); + deallog.pop(); + + deallog.push("Float"); + test_tensor(); + deallog.pop(); + + deallog.push("Double"); + test_tensor(); + deallog.pop(); + + deallog.push("Complex float"); + test_tensor>(); + deallog.pop(); + + deallog.push("Complex double"); + test_tensor>(); + deallog.pop(); + + deallog << "OK" << std::endl; +} diff --git a/tests/symengine/symengine_tensor_operations_02.output b/tests/symengine/symengine_tensor_operations_02.output new file mode 100644 index 0000000000..03cfc71826 --- /dev/null +++ b/tests/symengine/symengine_tensor_operations_02.output @@ -0,0 +1,253 @@ + +DEAL:Integer:Initialize::a: 10 11 12 13 +DEAL:Integer:Initialize::b: 10 11 12 13 +DEAL:Integer:Initialize::as: 10 12 12 11 +DEAL:Integer:Initialize::bs: 10 12 12 11 +DEAL:Integer:Relational operators 1::a == b: 1 +DEAL:Integer:Relational operators 1::a != b: 0 +DEAL:Integer:Relational operators 1::a.norm() < b.norm(): False +DEAL:Integer:Set new values::a: 5 6 7 8 +DEAL:Integer:Set new values::b: 9 10 11 12 +DEAL:Integer:Set new values::as: 5 7 7 6 +DEAL:Integer:Set new values::bs: 7 9 9 8 +DEAL:Integer:Relational operators 2::a == b: 0 +DEAL:Integer:Relational operators 2::a != b: 1 +DEAL:Integer:Relational operators 2::a.norm() < b.norm(): sqrt(174) < sqrt(446) +DEAL:Integer:Math operators:Tensor::a+b: 14 16 18 20 +DEAL:Integer:Math operators:Tensor::a-b: -4 -4 -4 -4 +DEAL:Integer:Math operators:Tensor::a*b: 111 122 151 166 +DEAL:Integer:Math operators:SymmetricTensor::as+bs: 12 16 16 14 +DEAL:Integer:Math operators:SymmetricTensor::as-bs: -2 -2 -2 -2 +DEAL:Integer:Math operators:SymmetricTensor::as*bs: 209 +DEAL:Integer:Math operators:SymmetricTensor::as: 5 7 7 6 +DEAL:Integer:Math operators:SymmetricTensor::as_ns: 5 7 7 6 +DEAL:Integer:Math operators:SymmetricTensor::as+b: 14 17 18 18 +DEAL:Integer:Math operators:SymmetricTensor::as-b: -4 -3 -4 -6 +DEAL:Integer:Math operators:SymmetricTensor::as*b: 122 134 129 142 +DEAL:Integer:Copy constructor::c: 5 6 7 8 +DEAL:Integer:Copy constructor::cs: 5 7 7 6 +DEAL:Integer:Math operators:Tensor::c+=b: 14 16 18 20 +DEAL:Integer:Math operators:Tensor::c*=s: 28 32 36 40 +DEAL:Integer:Math operators:Tensor::c-=b: 19 22 25 28 +DEAL:Integer:Math operators:Tensor::c/=s: 19/2 11 25/2 14 +DEAL:Integer:Math operators:SymmetricTensor::cs+=bs: 12 16 16 14 +DEAL:Integer:Math operators:SymmetricTensor::cs*=s: 24 32 32 28 +DEAL:Integer:Math operators:SymmetricTensor::cs-=bs: 17 23 23 20 +DEAL:Integer:Math operators:SymmetricTensor::cs/=s: 17/2 23/2 23/2 10 +DEAL:Integer:Symbols::x: x_00 x_01 x_10 x_11 +DEAL:Integer:Symbols::y: y +DEAL:Integer:Symbols::z: z_00 z_01 z_01 z_11 +DEAL:Integer:Math operators:Tensor::c+=x: 19/2 + x_00 11 + x_01 25/2 + x_10 14 + x_11 +DEAL:Integer:Math operators:Tensor::c*=y: y*(19/2 + x_00) y*(11 + x_01) y*(25/2 + x_10) y*(14 + x_11) +DEAL:Integer:Math operators:Tensor::c*=s: 2*y*(19/2 + x_00) 2*y*(11 + x_01) 2*y*(25/2 + x_10) 2*y*(14 + x_11) +DEAL:Integer:Math operators:Tensor::c-=x: -x_00 + 2*y*(19/2 + x_00) -x_01 + 2*y*(11 + x_01) -x_10 + 2*y*(25/2 + x_10) -x_11 + 2*y*(14 + x_11) +DEAL:Integer:Math operators:Tensor::c/=y: (-x_00 + 2*y*(19/2 + x_00))/y (-x_01 + 2*y*(11 + x_01))/y (-x_10 + 2*y*(25/2 + x_10))/y (-x_11 + 2*y*(14 + x_11))/y +DEAL:Integer:Math operators:Tensor::c/=s: (1/2)*(-x_00 + 2*y*(19/2 + x_00))/y (1/2)*(-x_01 + 2*y*(11 + x_01))/y (1/2)*(-x_10 + 2*y*(25/2 + x_10))/y (1/2)*(-x_11 + 2*y*(14 + x_11))/y +DEAL:Integer:Math operators:SymmetricTensor::cs+=z: 17/2 + z_00 23/2 + z_01 23/2 + z_01 10 + z_11 +DEAL:Integer:Math operators:SymmetricTensor::cs*=y: y*(17/2 + z_00) y*(23/2 + z_01) y*(23/2 + z_01) y*(10 + z_11) +DEAL:Integer:Math operators:SymmetricTensor::cs*=s: 2*y*(17/2 + z_00) 2*y*(23/2 + z_01) 2*y*(23/2 + z_01) 2*y*(10 + z_11) +DEAL:Integer:Math operators:SymmetricTensor::cs-=z: -z_00 + 2*y*(17/2 + z_00) -z_01 + 2*y*(23/2 + z_01) -z_01 + 2*y*(23/2 + z_01) -z_11 + 2*y*(10 + z_11) +DEAL:Integer:Math operators:SymmetricTensor::cs/=y: (-z_00 + 2*y*(17/2 + z_00))/y (-z_01 + 2*y*(23/2 + z_01))/y (-z_01 + 2*y*(23/2 + z_01))/y (-z_11 + 2*y*(10 + z_11))/y +DEAL:Integer:Math operators:SymmetricTensor::cs/=s: (1/2)*(-z_00 + 2*y*(17/2 + z_00))/y (1/2)*(-z_01 + 2*y*(23/2 + z_01))/y (1/2)*(-z_01 + 2*y*(23/2 + z_01))/y (1/2)*(-z_11 + 2*y*(10 + z_11))/y +DEAL:Integer::OK +DEAL:Float:Initialize::a: 10.0 11.0 12.0 13.0 +DEAL:Float:Initialize::b: 10.0 11.0 12.0 13.0 +DEAL:Float:Initialize::as: 10.0 12.0 12.0 11.0 +DEAL:Float:Initialize::bs: 10.0 12.0 12.0 11.0 +DEAL:Float:Relational operators 1::a == b: 1 +DEAL:Float:Relational operators 1::a != b: 0 +DEAL:Float:Relational operators 1::a.norm() < b.norm(): False +DEAL:Float:Set new values::a: 5.0 6.0 7.0 8.0 +DEAL:Float:Set new values::b: 9.0 10.0 11.0 12.0 +DEAL:Float:Set new values::as: 5.0 7.0 7.0 6.0 +DEAL:Float:Set new values::bs: 7.0 9.0 9.0 8.0 +DEAL:Float:Relational operators 2::a == b: 0 +DEAL:Float:Relational operators 2::a != b: 1 +DEAL:Float:Relational operators 2::a.norm() < b.norm(): True +DEAL:Float:Math operators:Tensor::a+b: 14.0 16.0 18.0 20.0 +DEAL:Float:Math operators:Tensor::a-b: -4.0 -4.0 -4.0 -4.0 +DEAL:Float:Math operators:Tensor::a*b: 111.0 122.0 151.0 166.0 +DEAL:Float:Math operators:SymmetricTensor::as+bs: 12.0 16.0 16.0 14.0 +DEAL:Float:Math operators:SymmetricTensor::as-bs: -2.0 -2.0 -2.0 -2.0 +DEAL:Float:Math operators:SymmetricTensor::as*bs: 209.0 +DEAL:Float:Math operators:SymmetricTensor::as: 5.0 7.0 7.0 6.0 +DEAL:Float:Math operators:SymmetricTensor::as_ns: 5.0 7.0 7.0 6.0 +DEAL:Float:Math operators:SymmetricTensor::as+b: 14.0 17.0 18.0 18.0 +DEAL:Float:Math operators:SymmetricTensor::as-b: -4.0 -3.0 -4.0 -6.0 +DEAL:Float:Math operators:SymmetricTensor::as*b: 122.0 134.0 129.0 142.0 +DEAL:Float:Copy constructor::c: 5.0 6.0 7.0 8.0 +DEAL:Float:Copy constructor::cs: 5.0 7.0 7.0 6.0 +DEAL:Float:Math operators:Tensor::c+=b: 14.0 16.0 18.0 20.0 +DEAL:Float:Math operators:Tensor::c*=s: 28.0 32.0 36.0 40.0 +DEAL:Float:Math operators:Tensor::c-=b: 19.0 22.0 25.0 28.0 +DEAL:Float:Math operators:Tensor::c/=s: 9.5 11.0 12.5 14.0 +DEAL:Float:Math operators:SymmetricTensor::cs+=bs: 12.0 16.0 16.0 14.0 +DEAL:Float:Math operators:SymmetricTensor::cs*=s: 24.0 32.0 32.0 28.0 +DEAL:Float:Math operators:SymmetricTensor::cs-=bs: 17.0 23.0 23.0 20.0 +DEAL:Float:Math operators:SymmetricTensor::cs/=s: 8.5 11.5 11.5 10.0 +DEAL:Float:Symbols::x: x_00 x_01 x_10 x_11 +DEAL:Float:Symbols::y: y +DEAL:Float:Symbols::z: z_00 z_01 z_01 z_11 +DEAL:Float:Math operators:Tensor::c+=x: 9.5 + x_00 11.0 + x_01 12.5 + x_10 14.0 + x_11 +DEAL:Float:Math operators:Tensor::c*=y: y*(9.5 + x_00) y*(11.0 + x_01) y*(12.5 + x_10) y*(14.0 + x_11) +DEAL:Float:Math operators:Tensor::c*=s: 2.0*y*(9.5 + x_00) 2.0*y*(11.0 + x_01) 2.0*y*(12.5 + x_10) 2.0*y*(14.0 + x_11) +DEAL:Float:Math operators:Tensor::c-=x: -x_00 + 2.0*y*(9.5 + x_00) -x_01 + 2.0*y*(11.0 + x_01) -x_10 + 2.0*y*(12.5 + x_10) -x_11 + 2.0*y*(14.0 + x_11) +DEAL:Float:Math operators:Tensor::c/=y: (-x_00 + 2.0*y*(9.5 + x_00))/y (-x_01 + 2.0*y*(11.0 + x_01))/y (-x_10 + 2.0*y*(12.5 + x_10))/y (-x_11 + 2.0*y*(14.0 + x_11))/y +DEAL:Float:Math operators:Tensor::c/=s: 0.5*(-x_00 + 2.0*y*(9.5 + x_00))/y 0.5*(-x_01 + 2.0*y*(11.0 + x_01))/y 0.5*(-x_10 + 2.0*y*(12.5 + x_10))/y 0.5*(-x_11 + 2.0*y*(14.0 + x_11))/y +DEAL:Float:Math operators:SymmetricTensor::cs+=z: 8.5 + z_00 11.5 + z_01 11.5 + z_01 10.0 + z_11 +DEAL:Float:Math operators:SymmetricTensor::cs*=y: y*(8.5 + z_00) y*(11.5 + z_01) y*(11.5 + z_01) y*(10.0 + z_11) +DEAL:Float:Math operators:SymmetricTensor::cs*=s: 2.0*y*(8.5 + z_00) 2.0*y*(11.5 + z_01) 2.0*y*(11.5 + z_01) 2.0*y*(10.0 + z_11) +DEAL:Float:Math operators:SymmetricTensor::cs-=z: -z_00 + 2.0*y*(8.5 + z_00) -z_01 + 2.0*y*(11.5 + z_01) -z_01 + 2.0*y*(11.5 + z_01) -z_11 + 2.0*y*(10.0 + z_11) +DEAL:Float:Math operators:SymmetricTensor::cs/=y: (-z_00 + 2.0*y*(8.5 + z_00))/y (-z_01 + 2.0*y*(11.5 + z_01))/y (-z_01 + 2.0*y*(11.5 + z_01))/y (-z_11 + 2.0*y*(10.0 + z_11))/y +DEAL:Float:Math operators:SymmetricTensor::cs/=s: 0.5*(-z_00 + 2.0*y*(8.5 + z_00))/y 0.5*(-z_01 + 2.0*y*(11.5 + z_01))/y 0.5*(-z_01 + 2.0*y*(11.5 + z_01))/y 0.5*(-z_11 + 2.0*y*(10.0 + z_11))/y +DEAL:Float::OK +DEAL:Double:Initialize::a: 10.0 11.0 12.0 13.0 +DEAL:Double:Initialize::b: 10.0 11.0 12.0 13.0 +DEAL:Double:Initialize::as: 10.0 12.0 12.0 11.0 +DEAL:Double:Initialize::bs: 10.0 12.0 12.0 11.0 +DEAL:Double:Relational operators 1::a == b: 1 +DEAL:Double:Relational operators 1::a != b: 0 +DEAL:Double:Relational operators 1::a.norm() < b.norm(): False +DEAL:Double:Set new values::a: 5.0 6.0 7.0 8.0 +DEAL:Double:Set new values::b: 9.0 10.0 11.0 12.0 +DEAL:Double:Set new values::as: 5.0 7.0 7.0 6.0 +DEAL:Double:Set new values::bs: 7.0 9.0 9.0 8.0 +DEAL:Double:Relational operators 2::a == b: 0 +DEAL:Double:Relational operators 2::a != b: 1 +DEAL:Double:Relational operators 2::a.norm() < b.norm(): True +DEAL:Double:Math operators:Tensor::a+b: 14.0 16.0 18.0 20.0 +DEAL:Double:Math operators:Tensor::a-b: -4.0 -4.0 -4.0 -4.0 +DEAL:Double:Math operators:Tensor::a*b: 111.0 122.0 151.0 166.0 +DEAL:Double:Math operators:SymmetricTensor::as+bs: 12.0 16.0 16.0 14.0 +DEAL:Double:Math operators:SymmetricTensor::as-bs: -2.0 -2.0 -2.0 -2.0 +DEAL:Double:Math operators:SymmetricTensor::as*bs: 209.0 +DEAL:Double:Math operators:SymmetricTensor::as: 5.0 7.0 7.0 6.0 +DEAL:Double:Math operators:SymmetricTensor::as_ns: 5.0 7.0 7.0 6.0 +DEAL:Double:Math operators:SymmetricTensor::as+b: 14.0 17.0 18.0 18.0 +DEAL:Double:Math operators:SymmetricTensor::as-b: -4.0 -3.0 -4.0 -6.0 +DEAL:Double:Math operators:SymmetricTensor::as*b: 122.0 134.0 129.0 142.0 +DEAL:Double:Copy constructor::c: 5.0 6.0 7.0 8.0 +DEAL:Double:Copy constructor::cs: 5.0 7.0 7.0 6.0 +DEAL:Double:Math operators:Tensor::c+=b: 14.0 16.0 18.0 20.0 +DEAL:Double:Math operators:Tensor::c*=s: 28.0 32.0 36.0 40.0 +DEAL:Double:Math operators:Tensor::c-=b: 19.0 22.0 25.0 28.0 +DEAL:Double:Math operators:Tensor::c/=s: 9.5 11.0 12.5 14.0 +DEAL:Double:Math operators:SymmetricTensor::cs+=bs: 12.0 16.0 16.0 14.0 +DEAL:Double:Math operators:SymmetricTensor::cs*=s: 24.0 32.0 32.0 28.0 +DEAL:Double:Math operators:SymmetricTensor::cs-=bs: 17.0 23.0 23.0 20.0 +DEAL:Double:Math operators:SymmetricTensor::cs/=s: 8.5 11.5 11.5 10.0 +DEAL:Double:Symbols::x: x_00 x_01 x_10 x_11 +DEAL:Double:Symbols::y: y +DEAL:Double:Symbols::z: z_00 z_01 z_01 z_11 +DEAL:Double:Math operators:Tensor::c+=x: 9.5 + x_00 11.0 + x_01 12.5 + x_10 14.0 + x_11 +DEAL:Double:Math operators:Tensor::c*=y: y*(9.5 + x_00) y*(11.0 + x_01) y*(12.5 + x_10) y*(14.0 + x_11) +DEAL:Double:Math operators:Tensor::c*=s: 2.0*y*(9.5 + x_00) 2.0*y*(11.0 + x_01) 2.0*y*(12.5 + x_10) 2.0*y*(14.0 + x_11) +DEAL:Double:Math operators:Tensor::c-=x: -x_00 + 2.0*y*(9.5 + x_00) -x_01 + 2.0*y*(11.0 + x_01) -x_10 + 2.0*y*(12.5 + x_10) -x_11 + 2.0*y*(14.0 + x_11) +DEAL:Double:Math operators:Tensor::c/=y: (-x_00 + 2.0*y*(9.5 + x_00))/y (-x_01 + 2.0*y*(11.0 + x_01))/y (-x_10 + 2.0*y*(12.5 + x_10))/y (-x_11 + 2.0*y*(14.0 + x_11))/y +DEAL:Double:Math operators:Tensor::c/=s: 0.5*(-x_00 + 2.0*y*(9.5 + x_00))/y 0.5*(-x_01 + 2.0*y*(11.0 + x_01))/y 0.5*(-x_10 + 2.0*y*(12.5 + x_10))/y 0.5*(-x_11 + 2.0*y*(14.0 + x_11))/y +DEAL:Double:Math operators:SymmetricTensor::cs+=z: 8.5 + z_00 11.5 + z_01 11.5 + z_01 10.0 + z_11 +DEAL:Double:Math operators:SymmetricTensor::cs*=y: y*(8.5 + z_00) y*(11.5 + z_01) y*(11.5 + z_01) y*(10.0 + z_11) +DEAL:Double:Math operators:SymmetricTensor::cs*=s: 2.0*y*(8.5 + z_00) 2.0*y*(11.5 + z_01) 2.0*y*(11.5 + z_01) 2.0*y*(10.0 + z_11) +DEAL:Double:Math operators:SymmetricTensor::cs-=z: -z_00 + 2.0*y*(8.5 + z_00) -z_01 + 2.0*y*(11.5 + z_01) -z_01 + 2.0*y*(11.5 + z_01) -z_11 + 2.0*y*(10.0 + z_11) +DEAL:Double:Math operators:SymmetricTensor::cs/=y: (-z_00 + 2.0*y*(8.5 + z_00))/y (-z_01 + 2.0*y*(11.5 + z_01))/y (-z_01 + 2.0*y*(11.5 + z_01))/y (-z_11 + 2.0*y*(10.0 + z_11))/y +DEAL:Double:Math operators:SymmetricTensor::cs/=s: 0.5*(-z_00 + 2.0*y*(8.5 + z_00))/y 0.5*(-z_01 + 2.0*y*(11.5 + z_01))/y 0.5*(-z_01 + 2.0*y*(11.5 + z_01))/y 0.5*(-z_11 + 2.0*y*(10.0 + z_11))/y +DEAL:Double::OK +DEAL:Complex float:Initialize::a: 10.0 + 0.0*I 11.0 + 0.0*I 12.0 + 0.0*I 13.0 + 0.0*I +DEAL:Complex float:Initialize::b: 10.0 + 0.0*I 11.0 + 0.0*I 12.0 + 0.0*I 13.0 + 0.0*I +DEAL:Complex float:Initialize::as: 10.0 + 0.0*I 12.0 + 0.0*I 12.0 + 0.0*I 11.0 + 0.0*I +DEAL:Complex float:Initialize::bs: 10.0 + 0.0*I 12.0 + 0.0*I 12.0 + 0.0*I 11.0 + 0.0*I +DEAL:Complex float:Relational operators 1::a == b: 1 +DEAL:Complex float:Relational operators 1::a != b: 0 +DEAL:Complex float:Set new values::a: 5.0 + 0.0*I 6.0 + 0.0*I 7.0 + 0.0*I 8.0 + 0.0*I +DEAL:Complex float:Set new values::b: 9.0 + 0.0*I 10.0 + 0.0*I 11.0 + 0.0*I 12.0 + 0.0*I +DEAL:Complex float:Set new values::as: 5.0 + 0.0*I 7.0 + 0.0*I 7.0 + 0.0*I 6.0 + 0.0*I +DEAL:Complex float:Set new values::bs: 7.0 + 0.0*I 9.0 + 0.0*I 9.0 + 0.0*I 8.0 + 0.0*I +DEAL:Complex float:Relational operators 2::a == b: 0 +DEAL:Complex float:Relational operators 2::a != b: 1 +DEAL:Complex float:Math operators:Tensor::a+b: 14.0 + 0.0*I 16.0 + 0.0*I 18.0 + 0.0*I 20.0 + 0.0*I +DEAL:Complex float:Math operators:Tensor::a-b: -4.0 + 0.0*I -4.0 + 0.0*I -4.0 + 0.0*I -4.0 + 0.0*I +DEAL:Complex float:Math operators:Tensor::a*b: 111.0 + 0.0*I 122.0 + 0.0*I 151.0 + 0.0*I 166.0 + 0.0*I +DEAL:Complex float:Math operators:SymmetricTensor::as+bs: 12.0 + 0.0*I 16.0 + 0.0*I 16.0 + 0.0*I 14.0 + 0.0*I +DEAL:Complex float:Math operators:SymmetricTensor::as-bs: -2.0 + 0.0*I -2.0 + 0.0*I -2.0 + 0.0*I -2.0 + 0.0*I +DEAL:Complex float:Math operators:SymmetricTensor::as*bs: 209.0 + 0.0*I +DEAL:Complex float:Math operators:SymmetricTensor::as: 5.0 + 0.0*I 7.0 + 0.0*I 7.0 + 0.0*I 6.0 + 0.0*I +DEAL:Complex float:Math operators:SymmetricTensor::as_ns: 5.0 + 0.0*I 7.0 + 0.0*I 7.0 + 0.0*I 6.0 + 0.0*I +DEAL:Complex float:Math operators:SymmetricTensor::as+b: 14.0 + 0.0*I 17.0 + 0.0*I 18.0 + 0.0*I 18.0 + 0.0*I +DEAL:Complex float:Math operators:SymmetricTensor::as-b: -4.0 + 0.0*I -3.0 + 0.0*I -4.0 + 0.0*I -6.0 + 0.0*I +DEAL:Complex float:Math operators:SymmetricTensor::as*b: 122.0 + 0.0*I 134.0 + 0.0*I 129.0 + 0.0*I 142.0 + 0.0*I +DEAL:Complex float:Copy constructor::c: 5.0 + 0.0*I 6.0 + 0.0*I 7.0 + 0.0*I 8.0 + 0.0*I +DEAL:Complex float:Copy constructor::cs: 5.0 + 0.0*I 7.0 + 0.0*I 7.0 + 0.0*I 6.0 + 0.0*I +DEAL:Complex float:Math operators:Tensor::c+=b: 14.0 + 0.0*I 16.0 + 0.0*I 18.0 + 0.0*I 20.0 + 0.0*I +DEAL:Complex float:Math operators:Tensor::c*=s: 28.0 + 0.0*I 32.0 + 0.0*I 36.0 + 0.0*I 40.0 + 0.0*I +DEAL:Complex float:Math operators:Tensor::c-=b: 19.0 + 0.0*I 22.0 + 0.0*I 25.0 + 0.0*I 28.0 + 0.0*I +DEAL:Complex float:Math operators:Tensor::c/=s: 9.5 + 0.0*I 11.0 + 0.0*I 12.5 + 0.0*I 14.0 + 0.0*I +DEAL:Complex float:Math operators:SymmetricTensor::cs+=bs: 12.0 + 0.0*I 16.0 + 0.0*I 16.0 + 0.0*I 14.0 + 0.0*I +DEAL:Complex float:Math operators:SymmetricTensor::cs*=s: 24.0 + 0.0*I 32.0 + 0.0*I 32.0 + 0.0*I 28.0 + 0.0*I +DEAL:Complex float:Math operators:SymmetricTensor::cs-=bs: 17.0 + 0.0*I 23.0 + 0.0*I 23.0 + 0.0*I 20.0 + 0.0*I +DEAL:Complex float:Math operators:SymmetricTensor::cs/=s: 8.5 + 0.0*I 11.5 + 0.0*I 11.5 + 0.0*I 10.0 + 0.0*I +DEAL:Complex float:Symbols::x: x_00 x_01 x_10 x_11 +DEAL:Complex float:Symbols::y: y +DEAL:Complex float:Symbols::z: z_00 z_01 z_01 z_11 +DEAL:Complex float:Math operators:Tensor::c+=x: 9.5 + 0.0*I + x_00 11.0 + 0.0*I + x_01 12.5 + 0.0*I + x_10 14.0 + 0.0*I + x_11 +DEAL:Complex float:Math operators:Tensor::c*=y: y*(9.5 + 0.0*I + x_00) y*(11.0 + 0.0*I + x_01) y*(12.5 + 0.0*I + x_10) y*(14.0 + 0.0*I + x_11) +DEAL:Complex float:Math operators:Tensor::c*=s: (2.0 + 0.0*I)*y*(9.5 + 0.0*I + x_00) (2.0 + 0.0*I)*y*(11.0 + 0.0*I + x_01) (2.0 + 0.0*I)*y*(12.5 + 0.0*I + x_10) (2.0 + 0.0*I)*y*(14.0 + 0.0*I + x_11) +DEAL:Complex float:Math operators:Tensor::c-=x: -x_00 + (2.0 + 0.0*I)*y*(9.5 + 0.0*I + x_00) -x_01 + (2.0 + 0.0*I)*y*(11.0 + 0.0*I + x_01) -x_10 + (2.0 + 0.0*I)*y*(12.5 + 0.0*I + x_10) -x_11 + (2.0 + 0.0*I)*y*(14.0 + 0.0*I + x_11) +DEAL:Complex float:Math operators:Tensor::c/=y: (-x_00 + (2.0 + 0.0*I)*y*(9.5 + 0.0*I + x_00))/y (-x_01 + (2.0 + 0.0*I)*y*(11.0 + 0.0*I + x_01))/y (-x_10 + (2.0 + 0.0*I)*y*(12.5 + 0.0*I + x_10))/y (-x_11 + (2.0 + 0.0*I)*y*(14.0 + 0.0*I + x_11))/y +DEAL:Complex float:Math operators:Tensor::c/=s: (0.5 + 0.0*I)*(-x_00 + (2.0 + 0.0*I)*y*(9.5 + 0.0*I + x_00))/y (0.5 + 0.0*I)*(-x_01 + (2.0 + 0.0*I)*y*(11.0 + 0.0*I + x_01))/y (0.5 + 0.0*I)*(-x_10 + (2.0 + 0.0*I)*y*(12.5 + 0.0*I + x_10))/y (0.5 + 0.0*I)*(-x_11 + (2.0 + 0.0*I)*y*(14.0 + 0.0*I + x_11))/y +DEAL:Complex float:Math operators:SymmetricTensor::cs+=z: 8.5 + 0.0*I + z_00 11.5 + 0.0*I + z_01 11.5 + 0.0*I + z_01 10.0 + 0.0*I + z_11 +DEAL:Complex float:Math operators:SymmetricTensor::cs*=y: y*(8.5 + 0.0*I + z_00) y*(11.5 + 0.0*I + z_01) y*(11.5 + 0.0*I + z_01) y*(10.0 + 0.0*I + z_11) +DEAL:Complex float:Math operators:SymmetricTensor::cs*=s: (2.0 + 0.0*I)*y*(8.5 + 0.0*I + z_00) (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01) (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01) (2.0 + 0.0*I)*y*(10.0 + 0.0*I + z_11) +DEAL:Complex float:Math operators:SymmetricTensor::cs-=z: -z_00 + (2.0 + 0.0*I)*y*(8.5 + 0.0*I + z_00) -z_01 + (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01) -z_01 + (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01) -z_11 + (2.0 + 0.0*I)*y*(10.0 + 0.0*I + z_11) +DEAL:Complex float:Math operators:SymmetricTensor::cs/=y: (-z_00 + (2.0 + 0.0*I)*y*(8.5 + 0.0*I + z_00))/y (-z_01 + (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01))/y (-z_01 + (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01))/y (-z_11 + (2.0 + 0.0*I)*y*(10.0 + 0.0*I + z_11))/y +DEAL:Complex float:Math operators:SymmetricTensor::cs/=s: (0.5 + 0.0*I)*(-z_00 + (2.0 + 0.0*I)*y*(8.5 + 0.0*I + z_00))/y (0.5 + 0.0*I)*(-z_01 + (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01))/y (0.5 + 0.0*I)*(-z_01 + (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01))/y (0.5 + 0.0*I)*(-z_11 + (2.0 + 0.0*I)*y*(10.0 + 0.0*I + z_11))/y +DEAL:Complex float::OK +DEAL:Complex double:Initialize::a: 10.0 + 0.0*I 11.0 + 0.0*I 12.0 + 0.0*I 13.0 + 0.0*I +DEAL:Complex double:Initialize::b: 10.0 + 0.0*I 11.0 + 0.0*I 12.0 + 0.0*I 13.0 + 0.0*I +DEAL:Complex double:Initialize::as: 10.0 + 0.0*I 12.0 + 0.0*I 12.0 + 0.0*I 11.0 + 0.0*I +DEAL:Complex double:Initialize::bs: 10.0 + 0.0*I 12.0 + 0.0*I 12.0 + 0.0*I 11.0 + 0.0*I +DEAL:Complex double:Relational operators 1::a == b: 1 +DEAL:Complex double:Relational operators 1::a != b: 0 +DEAL:Complex double:Set new values::a: 5.0 + 0.0*I 6.0 + 0.0*I 7.0 + 0.0*I 8.0 + 0.0*I +DEAL:Complex double:Set new values::b: 9.0 + 0.0*I 10.0 + 0.0*I 11.0 + 0.0*I 12.0 + 0.0*I +DEAL:Complex double:Set new values::as: 5.0 + 0.0*I 7.0 + 0.0*I 7.0 + 0.0*I 6.0 + 0.0*I +DEAL:Complex double:Set new values::bs: 7.0 + 0.0*I 9.0 + 0.0*I 9.0 + 0.0*I 8.0 + 0.0*I +DEAL:Complex double:Relational operators 2::a == b: 0 +DEAL:Complex double:Relational operators 2::a != b: 1 +DEAL:Complex double:Math operators:Tensor::a+b: 14.0 + 0.0*I 16.0 + 0.0*I 18.0 + 0.0*I 20.0 + 0.0*I +DEAL:Complex double:Math operators:Tensor::a-b: -4.0 + 0.0*I -4.0 + 0.0*I -4.0 + 0.0*I -4.0 + 0.0*I +DEAL:Complex double:Math operators:Tensor::a*b: 111.0 + 0.0*I 122.0 + 0.0*I 151.0 + 0.0*I 166.0 + 0.0*I +DEAL:Complex double:Math operators:SymmetricTensor::as+bs: 12.0 + 0.0*I 16.0 + 0.0*I 16.0 + 0.0*I 14.0 + 0.0*I +DEAL:Complex double:Math operators:SymmetricTensor::as-bs: -2.0 + 0.0*I -2.0 + 0.0*I -2.0 + 0.0*I -2.0 + 0.0*I +DEAL:Complex double:Math operators:SymmetricTensor::as*bs: 209.0 + 0.0*I +DEAL:Complex double:Math operators:SymmetricTensor::as: 5.0 + 0.0*I 7.0 + 0.0*I 7.0 + 0.0*I 6.0 + 0.0*I +DEAL:Complex double:Math operators:SymmetricTensor::as_ns: 5.0 + 0.0*I 7.0 + 0.0*I 7.0 + 0.0*I 6.0 + 0.0*I +DEAL:Complex double:Math operators:SymmetricTensor::as+b: 14.0 + 0.0*I 17.0 + 0.0*I 18.0 + 0.0*I 18.0 + 0.0*I +DEAL:Complex double:Math operators:SymmetricTensor::as-b: -4.0 + 0.0*I -3.0 + 0.0*I -4.0 + 0.0*I -6.0 + 0.0*I +DEAL:Complex double:Math operators:SymmetricTensor::as*b: 122.0 + 0.0*I 134.0 + 0.0*I 129.0 + 0.0*I 142.0 + 0.0*I +DEAL:Complex double:Copy constructor::c: 5.0 + 0.0*I 6.0 + 0.0*I 7.0 + 0.0*I 8.0 + 0.0*I +DEAL:Complex double:Copy constructor::cs: 5.0 + 0.0*I 7.0 + 0.0*I 7.0 + 0.0*I 6.0 + 0.0*I +DEAL:Complex double:Math operators:Tensor::c+=b: 14.0 + 0.0*I 16.0 + 0.0*I 18.0 + 0.0*I 20.0 + 0.0*I +DEAL:Complex double:Math operators:Tensor::c*=s: 28.0 + 0.0*I 32.0 + 0.0*I 36.0 + 0.0*I 40.0 + 0.0*I +DEAL:Complex double:Math operators:Tensor::c-=b: 19.0 + 0.0*I 22.0 + 0.0*I 25.0 + 0.0*I 28.0 + 0.0*I +DEAL:Complex double:Math operators:Tensor::c/=s: 9.5 + 0.0*I 11.0 + 0.0*I 12.5 + 0.0*I 14.0 + 0.0*I +DEAL:Complex double:Math operators:SymmetricTensor::cs+=bs: 12.0 + 0.0*I 16.0 + 0.0*I 16.0 + 0.0*I 14.0 + 0.0*I +DEAL:Complex double:Math operators:SymmetricTensor::cs*=s: 24.0 + 0.0*I 32.0 + 0.0*I 32.0 + 0.0*I 28.0 + 0.0*I +DEAL:Complex double:Math operators:SymmetricTensor::cs-=bs: 17.0 + 0.0*I 23.0 + 0.0*I 23.0 + 0.0*I 20.0 + 0.0*I +DEAL:Complex double:Math operators:SymmetricTensor::cs/=s: 8.5 + 0.0*I 11.5 + 0.0*I 11.5 + 0.0*I 10.0 + 0.0*I +DEAL:Complex double:Symbols::x: x_00 x_01 x_10 x_11 +DEAL:Complex double:Symbols::y: y +DEAL:Complex double:Symbols::z: z_00 z_01 z_01 z_11 +DEAL:Complex double:Math operators:Tensor::c+=x: 9.5 + 0.0*I + x_00 11.0 + 0.0*I + x_01 12.5 + 0.0*I + x_10 14.0 + 0.0*I + x_11 +DEAL:Complex double:Math operators:Tensor::c*=y: y*(9.5 + 0.0*I + x_00) y*(11.0 + 0.0*I + x_01) y*(12.5 + 0.0*I + x_10) y*(14.0 + 0.0*I + x_11) +DEAL:Complex double:Math operators:Tensor::c*=s: (2.0 + 0.0*I)*y*(9.5 + 0.0*I + x_00) (2.0 + 0.0*I)*y*(11.0 + 0.0*I + x_01) (2.0 + 0.0*I)*y*(12.5 + 0.0*I + x_10) (2.0 + 0.0*I)*y*(14.0 + 0.0*I + x_11) +DEAL:Complex double:Math operators:Tensor::c-=x: -x_00 + (2.0 + 0.0*I)*y*(9.5 + 0.0*I + x_00) -x_01 + (2.0 + 0.0*I)*y*(11.0 + 0.0*I + x_01) -x_10 + (2.0 + 0.0*I)*y*(12.5 + 0.0*I + x_10) -x_11 + (2.0 + 0.0*I)*y*(14.0 + 0.0*I + x_11) +DEAL:Complex double:Math operators:Tensor::c/=y: (-x_00 + (2.0 + 0.0*I)*y*(9.5 + 0.0*I + x_00))/y (-x_01 + (2.0 + 0.0*I)*y*(11.0 + 0.0*I + x_01))/y (-x_10 + (2.0 + 0.0*I)*y*(12.5 + 0.0*I + x_10))/y (-x_11 + (2.0 + 0.0*I)*y*(14.0 + 0.0*I + x_11))/y +DEAL:Complex double:Math operators:Tensor::c/=s: (0.5 + 0.0*I)*(-x_00 + (2.0 + 0.0*I)*y*(9.5 + 0.0*I + x_00))/y (0.5 + 0.0*I)*(-x_01 + (2.0 + 0.0*I)*y*(11.0 + 0.0*I + x_01))/y (0.5 + 0.0*I)*(-x_10 + (2.0 + 0.0*I)*y*(12.5 + 0.0*I + x_10))/y (0.5 + 0.0*I)*(-x_11 + (2.0 + 0.0*I)*y*(14.0 + 0.0*I + x_11))/y +DEAL:Complex double:Math operators:SymmetricTensor::cs+=z: 8.5 + 0.0*I + z_00 11.5 + 0.0*I + z_01 11.5 + 0.0*I + z_01 10.0 + 0.0*I + z_11 +DEAL:Complex double:Math operators:SymmetricTensor::cs*=y: y*(8.5 + 0.0*I + z_00) y*(11.5 + 0.0*I + z_01) y*(11.5 + 0.0*I + z_01) y*(10.0 + 0.0*I + z_11) +DEAL:Complex double:Math operators:SymmetricTensor::cs*=s: (2.0 + 0.0*I)*y*(8.5 + 0.0*I + z_00) (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01) (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01) (2.0 + 0.0*I)*y*(10.0 + 0.0*I + z_11) +DEAL:Complex double:Math operators:SymmetricTensor::cs-=z: -z_00 + (2.0 + 0.0*I)*y*(8.5 + 0.0*I + z_00) -z_01 + (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01) -z_01 + (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01) -z_11 + (2.0 + 0.0*I)*y*(10.0 + 0.0*I + z_11) +DEAL:Complex double:Math operators:SymmetricTensor::cs/=y: (-z_00 + (2.0 + 0.0*I)*y*(8.5 + 0.0*I + z_00))/y (-z_01 + (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01))/y (-z_01 + (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01))/y (-z_11 + (2.0 + 0.0*I)*y*(10.0 + 0.0*I + z_11))/y +DEAL:Complex double:Math operators:SymmetricTensor::cs/=s: (0.5 + 0.0*I)*(-z_00 + (2.0 + 0.0*I)*y*(8.5 + 0.0*I + z_00))/y (0.5 + 0.0*I)*(-z_01 + (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01))/y (0.5 + 0.0*I)*(-z_01 + (2.0 + 0.0*I)*y*(11.5 + 0.0*I + z_01))/y (0.5 + 0.0*I)*(-z_11 + (2.0 + 0.0*I)*y*(10.0 + 0.0*I + z_11))/y +DEAL:Complex double::OK +DEAL::OK -- 2.39.5