#1639 Data Type conversion bug in dune-localfunctions
Metadata
Property | Value |
---|---|
Reported by | Timo Betcke (timo.betcke@gmail.com) |
Reported at | May 7, 2015 12:58 |
Type | Bug Report |
Version | 2.3 |
Operating System | Unspecified / All |
Last edited by | Oliver Sander (oliver.sander@tu-dresden.de) |
Last edited at | May 9, 2015 08:47 |
Closed by | Oliver Sander (oliver.sander@tu-dresden.de) |
Closed at | May 9, 2015 08:47 |
Closed in version | Unknown |
Resolution | Fixed |
Comment | dune-localfunctions commit 727cc72dc550a7ae1aa71abd134983abe324575a |
|
Description
Dear All,
we encountered an issue in dune-localfunctions. An example is the command
product *= 1.0/(pos[i]-pos[alpha]);
in lagrange/pk2d/pk2dlocalbasis.hh. If pos is a an array of type complex a compiler error appears since 1.0 is a double and multiplication of complex with double is not defined.
This can be easily fixed by changing it to
product *= D(1)/(pos[i]-pos[alpha]);
which converts the 1 into the correct data type.
The attached patch fixes the problem in pk2dlocalbasis.hh and raviartthomas02dlocalbasis.hh. It is well possible that other files are also effected. But we can't test as they are not used in our codes.
Best wishes
Timo