Template specialisation for pTraits<complex>. More...
#include <complex.H>


Public Types | |
| typedef complex | cmptType |
| Component type. | |
| typedef scalar | magType |
| Magnitude type. | |
| typedef label | labelType |
| Equivalent type of labels used for valid component indexing. | |
Public Member Functions | |
| pTraits (const complex &val) noexcept | |
| Copy construct from primitive. | |
| pTraits (Istream &is) | |
| Read construct from Istream. | |
| operator complex () const noexcept | |
| Return the value. | |
| operator complex & () noexcept | |
| Access the value. | |
| Public Member Functions inherited from complex | |
| complex (const complex &) noexcept=default | |
| Copy construct. | |
| complex & | operator= (const complex &) noexcept=default |
| Copy assignment. | |
| complex (complex &&) noexcept=default | |
| Move construct. | |
| complex & | operator= (complex &&) noexcept=default |
| Move assignment. | |
| constexpr | complex () noexcept |
| Default construct, as zero-initialized. | |
| constexpr | complex (Foam::zero) noexcept |
| Construct zero-initialized from zero class. | |
| constexpr | complex (const scalar r) noexcept |
| Construct from real component. | |
| constexpr | complex (const scalar r, const scalar i) noexcept |
| Construct from real and imaginary parts. | |
| complex (const std::complex< float > &c) | |
| Implicit construct from std::complex. | |
| complex (const std::complex< double > &c) | |
| Implicit construct from std::complex. | |
| complex (Istream &is) | |
| Construct from Istream. | |
| constexpr scalar | real () const noexcept |
| Real part of complex number - STL naming. | |
| constexpr scalar | imag () const noexcept |
| Imaginary part of complex number - STL naming. | |
| void | real (scalar val) noexcept |
| Set real part of complex number - STL naming. | |
| void | imag (scalar val) noexcept |
| Set imaginary part of complex number - STL naming. | |
| complex | conjugate () const |
| Complex conjugate. | |
| scalar | magnitude () const |
| The magnitude (L2-norm) of complex. Called magnitude() instead mag(), which looks too much like imag(). | |
| scalar | magSqr () const |
| The L2-norm squared of complex. | |
| scalar | cmptSum () const noexcept |
| The sum of real/imag components. | |
| operator std::complex< scalar > () const | |
| Implicit conversion to std::complex. | |
| void | operator= (Foam::zero) |
| Assign zero. | |
| void | operator= (const scalar s) |
| Assign scalar (imag = zero). | |
| 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 |
| scalar | Re () const noexcept |
| Get real part of complex number. Same as real(). | |
| scalar | Im () const noexcept |
| Get imaginary part of complex number. Same as imag(). | |
| scalar & | Re () noexcept |
| Non-const access to real part. Prefer real() setter method. | |
| scalar & | Im () noexcept |
| Non-const access to imaginary part. Prefer imag() setter method. | |
Static Public Attributes | |
| static constexpr direction | dim = 3 |
| Dimensionality of space. | |
| static constexpr direction | rank = 0 |
| Rank of complex is 0. | |
| static constexpr direction | nComponents = 2 |
| Number of components in complex is 2. | |
| static const char *const | typeName |
| static const char *const | componentNames [] |
| static const complex | zero |
| complex (0,0) | |
| static const complex | one |
| complex (1,0) | |
| static const complex | min |
| complex (-VGREAT,-VGREAT) | |
| static const complex | max |
| complex (VGREAT,VGREAT) | |
| static const complex | rootMin |
| complex (-ROOTVGREAT, -ROOTVGREAT) | |
| static const complex | rootMax |
| complex (ROOTVGREAT, ROOTVGREAT) | |
Template specialisation for pTraits<complex>.
| typedef label labelType |
|
inlineexplicitnoexcept |
Copy construct from primitive.
Definition at line 361 of file complex.H.
References complex::complex(), and Foam::noexcept.

|
inlinenoexcept |
Return the value.
Definition at line 375 of file complex.H.
References complex::complex(), and Foam::noexcept.

|
inlinenoexcept |
Access the value.
Definition at line 380 of file complex.H.
References complex::complex().

|
staticconstexpr |
|
staticconstexpr |
|
static |
|
static |