89 return (
re*
re + im*im);
183 return c.conjugate();
194 return c.magnitude();
213 const scalar
s(
mag(
c));
214 return s < ROOTVSMALL ?
Zero :
c/
s;
227 return (
c1.magSqr() <
c2.magSqr()) ?
c1 :
c2;
233 return (
c1.magSqr() <
c2.magSqr()) ?
c2 :
c1;
250 const scalar onet = (1-t);
254 onet*a.
real() + t*
b.real(),
255 onet*a.
imag() + t*
b.imag()
266 template<
class Cmpt>
class Tensor;
351 const scalar sqrC2 =
c2.magSqr();
383 #define transFunc(func) \ 384 inline complex func(const complex& c) \ 386 return std:: func (static_cast<std::complex<scalar>>(c)); \ 411 static_cast<std::complex<scalar>
>(
x),
412 static_cast<std::complex<scalar>
>(
y)
418 #define powFuncs(type2) \ 419 inline complex pow(const complex& x, const type2 y) \ 421 return std::pow(static_cast<std::complex<scalar>>(x), y); \ 424 inline complex pow(const type2 x, const complex& y) \ 428 static_cast<std::complex<scalar>>(x), \ 429 static_cast<std::complex<scalar>>(y) \ 435 #if defined(__APPLE__) && WM_LABEL_SIZE == 64
dimensionedScalar sign(const dimensionedScalar &ds)
dimensionedScalar tanh(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)
complex pow(const double x, const complex &y)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
void operator/=(const complex &c)
bitSet operator~(const bitSet &bitset)
Bitset complement, returns a copy of the bitset with all its bits flipped.
dimensionedScalar log(const dimensionedScalar &ds)
bool operator!=(const complex &c) const
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
bool equal(const T &a, const T &b)
Compare two values for equality.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionedScalar re
Classical electron radius: default SI units: [m].
const dimensionedScalar c2
Second radiation constant: default SI units: [m.K].
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensionedScalar pow025(const dimensionedScalar &ds)
void operator+=(const complex &c)
constexpr scalar imag() const noexcept
Imaginary part of complex number - STL naming.
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
dimensionedScalar asin(const dimensionedScalar &ds)
dimensionedScalar pow5(const dimensionedScalar &ds)
dimensionedScalar acosh(const dimensionedScalar &ds)
complex & operator=(const complex &) noexcept=default
Copy assignment.
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
tmp< faMatrix< Type > > operator*(const areaScalarField::Internal &, const faMatrix< Type > &)
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
dimensionedScalar asinh(const dimensionedScalar &ds)
complex limit(const complex &c1, const complex &c2)
void operator*=(const complex &c)
dimensionedScalar atanh(const dimensionedScalar &ds)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
void operator-=(const complex &c)
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Unary negation.
dimensionedScalar sin(const dimensionedScalar &ds)
dimensioned< Type > lerp(const dimensioned< Type > &a, const dimensioned< Type > &b, const scalar t)
complex conjugate() const
Complex conjugate.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
scalar magSqr() const
The L2-norm squared of complex.
dimensionedScalar pow3(const dimensionedScalar &ds)
constexpr complex() noexcept
Default construct, as zero-initialized.
scalar cmptSum() const noexcept
The sum of real/imag components.
scalar magnitude() const
The magnitude (L2-norm) of complex. Called magnitude() instead mag(), which looks too much like imag(...
dimensionedScalar sinh(const dimensionedScalar &ds)
dimensionedScalar atan(const dimensionedScalar &ds)
const dimensionedScalar c
Speed of light in a vacuum.
dimensionedScalar pow4(const dimensionedScalar &ds)
const dimensionedScalar c1
First radiation constant: default SI units: [W/m2].
dimensionedScalar pow6(const dimensionedScalar &ds)
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
scalar csign(const complex &c)
csgn() https://en.wikipedia.org/wiki/Sign_function#Complex_signum
A complex number, similar to the C++ complex type.
transFunc(sqrt) transFunc(cbrt) transFunc(exp) transFunc(log) transFunc(log10) transFunc(sin) transFunc(cos) transFunc(tan) transFunc(asin) transFunc(acos) transFunc(atan) transFunc(sinh) transFunc(cosh) transFunc(tanh) transFunc(asinh) transFunc(acosh) transFunc(atanh) transFunc(erf) transFunc(erfc) transFunc(lgamma) transFunc(tgamma) besselFunc(j0) besselFunc(j1) besselFunc(y0) besselFunc(y1) besselFunc2(jn) besselFunc2(yn) inline Scalar &setComponent(Scalar &val
Non-const access to scalar-type (has no components)
dimensionedScalar cosh(const dimensionedScalar &ds)
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
constexpr scalar real() const noexcept
Real part of complex number - STL naming.
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))
dimensionedScalar tan(const dimensionedScalar &ds)
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
dimensionedScalar hypot(const dimensionedScalar &x, const dimensionedScalar &y)
dimensionedScalar log10(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)