]> https://gitweb.dealii.org/ - dealii.git/commit
Physics::Elasticity::Kinematics::w: change intermediate value to 'auto' 16518/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 22 Jan 2024 18:54:24 +0000 (12:54 -0600)
committerMatthias Maier <tamiko@43-1.org>
Mon, 22 Jan 2024 18:54:24 +0000 (12:54 -0600)
commitc0c8de72a4b22b5008f92178af57e858543599f4
tree03cbdab2572a4b1e35bc97c548f5bb8453e758d3
parentcdd37c656170950f293999b9b601b097ec6db112
Physics::Elasticity::Kinematics::w: change intermediate value to 'auto'

This fixes a bug uncovered by our recent base::Tensor() cleanup: The
intermediate tensor type used for the gradient in the w() function
erroneously casts the result to a Tensor<1, dim, double> which for
example for automatic differentiation then removes the underyling AD
type:

/srv/temp/testsuite-d8F1wK0J/dealii/include/deal.II/base/tensor.h:1316:13: error: cannot convert 'const value_type' (aka 'const Sacado::Fad::Exp::GeneralFad<Sacado::Fad::Exp::DynamicStorage<double>>') to 'value_type' (aka 'double') without a conversion operator
  : values{{value_type(initializer[indices])...}}
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Passes all kinematics/physics_functions tests in the testsuite

Fixes #16517
include/deal.II/physics/elasticity/kinematics.h

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.