Commit Graph

14 Commits

Author SHA1 Message Date
Mark Olesen
179d9fd61d ENH: correct pow(complex, ..) functions (fixes #1638)
* Use cast for std::pow(??, z).
* No cast for std::pow(z, ??) - already properly specialized.
2020-03-19 12:31:49 +01:00
Mark Olesen
39a1191bd5 ENH: add zip/unzip functions for complexField and vector2DField 2019-11-15 11:26:45 +01:00
Andrew Heather
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
Mark Olesen
78ce269a52 ENH: add field operations for complex (#1365) 2019-07-28 21:19:43 +02:00
kuti
e42cc287de BUG: incorrect scalar/complex division (#1331)
ENH: define addition/subtraction operations for scalar and complex

- required since construct complex from scalar is explicit
- additional tests in Test-complex
2019-06-04 09:08:42 +01:00
mattijs
7945ca739c ENH: correct sumProd return type (#1086)
- previously returned scalar, but now return pTraits cmptType
  which is the same as scalarProduct / outerProduct type.
2019-02-10 14:31:35 +00:00
Mark Olesen
aab644a3fc STYLE: eliminate complex constants that are duplications of pTraits
- eg pTraits<complex>::zero, pTraits<complex>::one instead.
  This is consistent with other primitives such as scalar, label etc.
2019-05-27 18:09:43 +02:00
kuti
f8a70115fd ENH: add sign(), csign() methods for complex
- use std::hypot for complex mag() instead of long-hand version

- Detail::conj() function for complex or non-complex
2019-05-21 11:18:12 +01:00
Mark Olesen
567fced30b ENH: add pTraits<complex> (#1247) 2019-04-04 19:00:29 +02:00
Mark Olesen
37819905c2 ENH: add some function support for complexField (#1247)
- operators are still incomplete, as are dimensioned fields,
  field-fields etc.

- split complexFields into separate complexField, complexVectorField files
2019-03-29 11:57:02 +01:00
Mark Olesen
fcba64913a ENH: conversion and function improvements for complex (#1247)
- add construction from and conversion to std::complex, which allows
  easier wrapping of functions

- add Foam:: functions for complex versions of sin, cos, ...
2019-03-29 11:03:48 +01:00
Mark Olesen
1788bce0a2 ENH: changed definition of complex::one (#1247)
- was historically defined as (1 1), but it is more consistent with
  the concept of one to have a real component only.

  Now defined as (1 0):  1+0i

STYLE: remove obscure '!' operator for complex conjugate

- either use the member function or the '~' operator
2019-03-27 08:24:03 +01:00
Mark Olesen
a1999bc92c ENH: additional construct/assignment methods for complex (#1247)
- construct/assign from Zero
2019-03-25 15:17:58 +01:00