Go to the documentation of this file.
47 #include <type_traits>
111 inline constexpr
complex() noexcept;
117 inline explicit constexpr
complex(
const scalar r) noexcept;
120 inline constexpr
complex(
const scalar r,
const scalar i) noexcept;
123 inline complex(
const std::complex<float>&
c);
126 inline complex(
const std::complex<double>&
c);
137 constexpr scalar
real()
const
143 constexpr scalar
imag()
const
149 inline void real(scalar val);
152 inline void imag(scalar val);
158 inline scalar
Re()
const;
161 inline scalar
Im()
const;
182 operator std::complex<scalar>()
const
184 return std::complex<scalar>(re, im);
283 static constexpr
direction nComponents = 2;
288 static const char*
const typeName;
289 static const char*
const componentNames[];
336 typename std::enable_if
338 !std::is_same<complex, T>::value,
347 typename std::enable_if
349 std::is_same<complex, T>::value,
353 return val.conjugate();
friend complex limit(const complex &c1, const complex &c2)
static const complex zero
complex (0,0)
static const complex min
complex (-VGREAT,-VGREAT)
A class for handling words, derived from Foam::string.
friend complex operator+(const complex &c1, const complex &c2)
void operator-=(const complex &c)
bool operator==(const complex &c) const
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
friend scalar mag(const complex &c)
bool operator!=(const complex &c) const
constexpr scalar imag() const
Imaginary part of complex number - STL naming.
scalar magType
Magnitude type.
label labelType
Equivalent type of labels used for valid component indexing.
friend complex sign(const complex &c)
sgn() https://en.wikipedia.org/wiki/Sign_function#Complex_signum
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
complex conjugate() const
Complex conjugate.
Istream & operator>>(Istream &, directionInfo &)
friend scalar csign(const complex &c)
csgn() https://en.wikipedia.org/wiki/Sign_function#Complex_signum
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
void operator*=(const complex &c)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
const dimensionedScalar c1
First radiation constant: default SI units: [W/m2].
friend complex operator-(const complex &c)
friend complex operator*(const complex &c1, const complex &c2)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
pTraits(const PrimitiveType &p)
Copy construct from primitive.
word name(const complex &c)
Return string representation of complex.
const friend complex & sum(const complex &c)
static const complex one
complex (1,0)
void operator+=(const complex &c)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
friend complex sqr(const complex &c)
constexpr scalar real() const
Real part of complex number - STL naming.
A complex number, similar to the C++ complex type.
const dimensionedScalar c2
Second radiation constant: default SI units: [m.K].
static const complex rootMax
complex (ROOTVGREAT, ROOTVGREAT)
A template class to specify if a data type is composed solely of Foam::scalar elements.
const friend complex & max(const complex &c1, const complex &c2)
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
static const complex max
complex (VGREAT,VGREAT)
bitSet operator~(const bitSet &bitset)
Bitset complement, returns a copy of the bitset with all its bits flipped.
static const char *const typeName
dimensionedSymmTensor sqr(const dimensionedVector &dv)
complex & operator=(const complex &)=default
Copy assignment.
std::enable_if< !std::is_same< complex, T >::value, const T & >::type conj(const T &val)
Traits class for primitives.
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
tmp< faMatrix< Type > > operator*(const areaScalarField &, const faMatrix< Type > &)
complex limit(const complex &, const complex &)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
const dimensionedScalar c
Speed of light in a vacuum.
friend scalar magSqr(const complex &c)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const friend complex & min(const complex &c1, const complex &c2)
complex cmptType
Component type.
constexpr complex() noexcept
Default construct, as zero-initialized.
scalar Re() const
Real part of complex number.
static const complex rootMin
complex (-ROOTVGREAT, -ROOTVGREAT)
void operator/=(const complex &c)
friend complex operator/(const complex &c1, const complex &c2)
scalar Im() const
Imaginary part of complex number.
A template class to specify that a data type can be considered as being contiguous in memory.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...