A complex number, similar to the C++ complex type. More...
Public Member Functions | |
complex (const complex &)=default | |
Copy construct. More... | |
complex & | operator= (const complex &)=default |
Copy assignment. More... | |
complex (complex &&)=default | |
Move construct. More... | |
complex & | operator= (complex &&)=default |
Move assignment. More... | |
constexpr | complex () noexcept |
Default construct, as zero-initialized. More... | |
constexpr | complex (const Foam::zero) noexcept |
Construct zero-initialized from zero class. More... | |
constexpr | complex (const scalar r) noexcept |
Construct from real component. More... | |
constexpr | complex (const scalar r, const scalar i) noexcept |
Construct from real and imaginary parts. More... | |
complex (const std::complex< float > &c) | |
Implicit construct from std::complex. More... | |
complex (const std::complex< double > &c) | |
Implicit construct from std::complex. More... | |
complex (Istream &is) | |
Construct from Istream. More... | |
constexpr scalar | real () const |
Real part of complex number - STL naming. More... | |
constexpr scalar | imag () const |
Imaginary part of complex number - STL naming. More... | |
void | real (scalar val) |
Set real part of complex number - STL naming. More... | |
void | imag (scalar val) |
Set imaginary part of complex number - STL naming. More... | |
scalar | Re () const |
Real part of complex number. More... | |
scalar | Im () const |
Imaginary part of complex number. More... | |
scalar & | Re () |
Real part of complex number. More... | |
scalar & | Im () |
Imaginary part of complex number. More... | |
complex | conjugate () const |
Complex conjugate. More... | |
operator std::complex< scalar > () const | |
Implicit conversion to std::complex. More... | |
void | operator= (const Foam::zero) |
Assign zero. More... | |
void | operator= (const scalar s) |
Assign scalar (imag = zero) More... | |
void | operator+= (const complex &c) |
void | operator+= (const scalar s) |
void | operator-= (const complex &c) |
void | operator-= (const scalar s) |
void | operator*= (const complex &c) |
void | operator*= (const scalar s) |
void | operator/= (const complex &c) |
void | operator/= (const scalar s) |
bool | operator== (const complex &c) const |
bool | operator!= (const complex &c) const |
A complex number, similar to the C++ complex type.
|
inlinenoexcept |
Default construct, as zero-initialized.
Definition at line 24 of file complexI.H.
|
inlinenoexcept |
Construct zero-initialized from zero class.
Definition at line 31 of file complexI.H.
|
inlineexplicitnoexcept |
Construct from real component.
Definition at line 38 of file complexI.H.
|
inlinenoexcept |
Construct from real and imaginary parts.
Definition at line 45 of file complexI.H.
|
inline |
Implicit construct from std::complex.
Definition at line 52 of file complexI.H.
|
inline |
Implicit construct from std::complex.
Definition at line 59 of file complexI.H.
|
inline |
|
inline |
|
inline |
Set real part of complex number - STL naming.
Definition at line 68 of file complexI.H.
References Foam::constant::atomic::re.
|
inline |
Set imaginary part of complex number - STL naming.
Definition at line 74 of file complexI.H.
|
inline |
Real part of complex number.
Definition at line 80 of file complexI.H.
References Foam::constant::atomic::re.
|
inline |
Imaginary part of complex number.
Definition at line 86 of file complexI.H.
|
inline |
Real part of complex number.
Definition at line 92 of file complexI.H.
References Foam::constant::atomic::re.
|
inline |
Imaginary part of complex number.
Definition at line 98 of file complexI.H.
|
inline |
Complex conjugate.
Definition at line 104 of file complexI.H.
References Foam::roots::complex, and Foam::constant::atomic::re.
|
inline |
|
inline |
|
inline |
Assign scalar (imag = zero)
Definition at line 119 of file complexI.H.
References Foam::constant::atomic::re, and s.
|
inline |
Definition at line 126 of file complexI.H.
References Foam::constant::universal::c, and Foam::constant::atomic::re.
|
inline |
Definition at line 133 of file complexI.H.
References Foam::constant::atomic::re, and s.
|
inline |
Definition at line 139 of file complexI.H.
References Foam::constant::universal::c, and Foam::constant::atomic::re.
|
inline |
Definition at line 146 of file complexI.H.
References Foam::constant::atomic::re, and s.
|
inline |
Definition at line 152 of file complexI.H.
References Foam::constant::universal::c.
|
inline |
Definition at line 158 of file complexI.H.
References Foam::constant::atomic::re, and s.
|
inline |
Definition at line 165 of file complexI.H.
References Foam::constant::universal::c.
|
inline |
Definition at line 171 of file complexI.H.
References Foam::constant::atomic::re, and s.
|
inline |
Definition at line 178 of file complexI.H.
References Foam::constant::universal::c, Foam::equal(), and Foam::constant::atomic::re.
|
inline |
Definition at line 184 of file complexI.H.
References Foam::constant::universal::c, and Foam::operator==().
|
friend |
Definition at line 203 of file complexI.H.
|
friend |
Definition at line 209 of file complexI.H.
Definition at line 215 of file complexI.H.
sgn() https://en.wikipedia.org/wiki/Sign_function#Complex_signum
Definition at line 221 of file complexI.H.
|
friend |
csgn() https://en.wikipedia.org/wiki/Sign_function#Complex_signum
Definition at line 228 of file complexI.H.
Definition at line 234 of file complexI.H.
Definition at line 245 of file complexI.H.
Definition at line 256 of file complexI.H.
Definition at line 262 of file complexI.H.
Definition at line 278 of file complexI.H.
Definition at line 284 of file complexI.H.
Definition at line 294 of file complexI.H.
Definition at line 300 of file complexI.H.
Definition at line 306 of file complexI.H.
Definition at line 316 of file complexI.H.
Definition at line 322 of file complexI.H.
Definition at line 328 of file complexI.H.
Definition at line 338 of file complexI.H.
Definition at line 344 of file complexI.H.
Definition at line 350 of file complexI.H.
Definition at line 362 of file complexI.H.
Definition at line 368 of file complexI.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.