PSCF v1.5.0

Element-wise vector operations on CPU arrays. More...

Functions

void Pscf::VecOp::eqV (Array< double > &a, Array< double > const &b, const int beginIdA, const int beginIdB, const int n)
 Vector assignment, a[i] = b[i] (real, slice).
void Pscf::VecOp::eqV (Array< double > &a, Array< double > const &b)
 Vector assignment, a[i] = b[i] (real).
void Pscf::VecOp::eqS (Array< double > &a, double b)
 Vector assignment, a[i] = b (real).
void Pscf::VecOp::addVV (Array< double > &a, Array< double > const &b, Array< double > const &c)
 Vector-vector addition, a[i] = b[i] + c[i] (real).
void Pscf::VecOp::addVS (Array< double > &a, Array< double > const &b, double c)
 Vector-scalar addition, a[i] = b[i] + c (real).
void Pscf::VecOp::subVV (Array< double > &a, Array< double > const &b, Array< double > const &c)
 Vector-vector subtraction, a[i] = b[i] - c[i] (real).
void Pscf::VecOp::subVS (Array< double > &a, Array< double > const &b, double c)
 Vector-scalar subtraction, a[i] = b[i] - c (real).
void Pscf::VecOp::mulVV (Array< double > &a, Array< double > const &b, Array< double > const &c)
 Vector-vector multiplication, a[i] = b[i] * c[i] (real).
void Pscf::VecOp::mulVS (Array< double > &a, Array< double > const &b, double c)
 Vector-scalar multiplication, a[i] = b[i] * c (real).
void Pscf::VecOp::divVV (Array< double > &a, Array< double > const &b, Array< double > const &c)
 Vector-vector division, a[i] = b[i] / c[i] (real).
void Pscf::VecOp::divVS (Array< double > &a, Array< double > const &b, double c)
 Vector-scalar division, a[i] = b[i] / c (real).
void Pscf::VecOp::divSV (Array< double > &a, double b, Array< double > const &c)
 Vector division, a[i] = b / c[i].
void Pscf::VecOp::addEqV (Array< double > &a, Array< double > const &b)
 Vector-vector in-place addition, a[i] += b[i] (real).
void Pscf::VecOp::addEqS (Array< double > &a, double b)
 Vector-scalar in-place addition, a[i] += b (real).
void Pscf::VecOp::subEqV (Array< double > &a, Array< double > const &b)
 Vector-vector in-place subtraction, a[i] -= b[i] (real).
void Pscf::VecOp::subEqS (Array< double > &a, double b)
 Vector-scalar subtraction in-place, a[i] -= b (real).
void Pscf::VecOp::mulEqV (Array< double > &a, Array< double > const &b)
 Vector-vector in-place multiplication, a[i] *= b[i] (real).
void Pscf::VecOp::mulEqS (Array< double > &a, double b)
 Vector-scalar in-place multiplication, a[i] *= b (real).
void Pscf::VecOp::divEqV (Array< double > &a, Array< double > const &b)
 Vector-vector in-place division, a[i] /= b[i].
void Pscf::VecOp::divEqS (Array< double > &a, double b)
 Vector-scalar in-place division, a[i] /= b.
void Pscf::VecOp::expV (Array< double > &a, Array< double > const &b)
 Vector exponentiation, a[i] = exp(b[i]) (real).
void Pscf::VecOp::expVc (Array< double > &a, Array< double > const &b, const double c)
 Exponentiation a scaled vector, a[i] = exp(b[i]*c) (real).
void Pscf::VecOp::sqV (Array< double > &a, Array< double > const &b)
 Vector element-wise square, a[i] = b[i]*b[i] (real).
void Pscf::VecOp::absV (Array< double > &a, Array< double > const &b)
 Element-wise absolute magnitude, a[i] = abs(b[i]) (real).
void Pscf::VecOp::addEqVc (Array< double > &a, Array< double > const &b, double const c)
 Add scaled vector in-place, a[i] += b[i]*c (real).
void Pscf::VecOp::eqVPair (Array< double > &a1, Array< double > &a2, Array< double > const &b)
 Vector assignment in pairs, ax[i] = b[i], x = 1, 2.
void Pscf::VecOp::mulVVPair (Array< double > &a1, Array< double > &a2, Array< double > const &b1, Array< double > const &b2, Array< double > const &c)
 Vector multiplication in pairs, ax[i] = bx[i] * s[i], x=1,2.
void Pscf::VecOp::mulEqVPair (Array< double > &a1, Array< double > &a2, Array< double > const &b)
 In-place vector multiplication in pairs, ax[i] *= b[i], x=1,2.
void Pscf::VecOp::real (Array< double > &a, Array< fftw_complex > const &b)
 Copy real part of a complex array to a real array.
void Pscf::VecOp::imag (Array< double > &a, Array< fftw_complex > const &b)
 Copy imaginary part of a complex array to a real array.
void Pscf::VecOp::eqV (Array< fftw_complex > &a, Array< fftw_complex > const &b)
 Vector assignment, a[i] = b[i] (complex).
void Pscf::VecOp::eqV (Array< fftw_complex > &a, Array< double > const &b, Array< double > const &c)
 Vector assignment, a[i] = (b[i], c[i]) (complex, real & imaginary).
void Pscf::VecOp::eqV (Array< fftw_complex > &a, Array< double > const &b)
 Vector assignment, a[i] = b[i] (mixed, real b).
void Pscf::VecOp::eqS (Array< fftw_complex > &a, fftw_complex b)
 Vector-scalar assignment, a[i] = b (complex).
void Pscf::VecOp::eqS (Array< fftw_complex > &a, double b)
 Vector-scalar assignment, a[i] = b (mixed, real scalar b).
void Pscf::VecOp::addVV (Array< fftw_complex > &a, Array< fftw_complex > const &b, Array< fftw_complex > const &c)
 Vector addition, a[i] = b[i] + c[i] (complex).
void Pscf::VecOp::addVV (Array< fftw_complex > &a, Array< fftw_complex > const &b, Array< double > const &c)
 Vector addition, a[i] = b[i] + c[i] (mixed, real array c).
void Pscf::VecOp::addVS (Array< fftw_complex > &a, Array< fftw_complex > const &b, fftw_complex c)
 Vector-scalar addition, a[i] = b[i] + c (complex).
void Pscf::VecOp::addVS (Array< fftw_complex > &a, Array< fftw_complex > const &b, double c)
 Vector-scalar addition, a[i] = b[i] + c (mixed).
void Pscf::VecOp::subVV (Array< fftw_complex > &a, Array< fftw_complex > const &b, Array< fftw_complex > const &c)
 Vector subtraction, a[i] = b[i] - c[i] (complex).
void Pscf::VecOp::subVV (Array< fftw_complex > &a, Array< fftw_complex > const &b, Array< double > const &c)
 Vector subtraction, a[i] = b[i] - c[i] (mixed, real array c).
void Pscf::VecOp::subVS (Array< fftw_complex > &a, Array< fftw_complex > const &b, fftw_complex c)
 Vector-scalar subtraction, a[i] = b[i] - c (complex).
void Pscf::VecOp::subVS (Array< fftw_complex > &a, Array< fftw_complex > const &b, double c)
 Vector-scalar subtraction, a[i] = b[i] - c (mixed, real scalar c).
void Pscf::VecOp::mulVV (Array< fftw_complex > &a, Array< fftw_complex > const &b, Array< fftw_complex > const &c)
 Vector multiplication, a[i] = b[i] * c[i] (complex).
void Pscf::VecOp::mulVV (Array< fftw_complex > &a, Array< fftw_complex > const &b, Array< double > const &c)
 Vector multiplication, a[i] = b[i] * c[i] (mixed, real array c).
void Pscf::VecOp::mulVS (Array< fftw_complex > &a, Array< fftw_complex > const &b, fftw_complex c)
 Vector-scalar multiplication, a[i] = b[i] * c (complex).
void Pscf::VecOp::mulVS (Array< fftw_complex > &a, Array< fftw_complex > const &b, double c)
 Vector-scalar multiplication, a[i] = b[i] * c (mixed, real c).
void Pscf::VecOp::divVV (Array< fftw_complex > &a, Array< fftw_complex > const &b, Array< fftw_complex > const &c)
 Vector division, a[i] = b[i] / c[i] (complex).
void Pscf::VecOp::divVV (Array< fftw_complex > &a, Array< fftw_complex > const &b, Array< double > const &c)
 Vector division, a[i] = b[i] / c[i] (mixed, real array c).
void Pscf::VecOp::divVS (Array< fftw_complex > &a, Array< fftw_complex > const &b, fftw_complex c)
 Vector-scalar division, a[i] = b[i] / c (complex).
void Pscf::VecOp::divVS (Array< fftw_complex > &a, Array< fftw_complex > const &b, double c)
 Vector-scalar division, a[i] = b[i] / c (mixed, real scalar c).
void Pscf::VecOp::addEqS (Array< fftw_complex > &a, double b)
 Vector-scalar in-place addition, a[i] += b (mixed, real scalar b).
void Pscf::VecOp::subEqV (Array< fftw_complex > &a, Array< fftw_complex > const &b)
 Vector in-place subtraction, a[i] -= b[i] (complex).
void Pscf::VecOp::subEqV (Array< fftw_complex > &a, Array< double > const &b)
 Vector in-place subtraction, a[i] -= b[i] (mixed, real array b).
void Pscf::VecOp::subEqS (Array< fftw_complex > &a, fftw_complex b)
 Vector-scalar in-place subtraction, a[i] -= b (complex).
void Pscf::VecOp::subEqS (Array< fftw_complex > &a, double b)
 Vector-scalar in-place subtraction, a[i] -= b (mixed, real b).
void Pscf::VecOp::mulEqV (Array< fftw_complex > &a, Array< fftw_complex > const &b)
 Vector in-place multiplication, a[i] *= b[i] (complex).
void Pscf::VecOp::mulEqV (Array< fftw_complex > &a, Array< double > const &b)
 Vector in-place multiplication, a[i] *= b[i] (mixed, real array b).
void Pscf::VecOp::mulEqS (Array< fftw_complex > &a, fftw_complex const &b)
 Vector-scalar in-place multiplication, a[i] *= b[i] (complex).
void Pscf::VecOp::mulEqS (Array< fftw_complex > &a, double b)
 Vector-scalar in-place multiplication, a[i] *= b (mixed real b).
void Pscf::VecOp::divEqV (Array< fftw_complex > &a, Array< fftw_complex > const &b)
 Vector in-place division, a[i] /= b[i] (complex).
void Pscf::VecOp::divEqV (Array< fftw_complex > &a, Array< double > const &b)
 Vector in-place division, a[i] /= b[i] (mixed, real array b).
void Pscf::VecOp::divEqS (Array< fftw_complex > &a, fftw_complex b)
 Vector-scalar in-place division, a[i] /= b (complex).
void Pscf::VecOp::divEqS (Array< fftw_complex > &a, double b)
 Vector-scalar in-place division, a[i] /= b (mixed, real scalar b).
void Pscf::VecOp::expV (Array< fftw_complex > &a, Array< fftw_complex > const &b)
 Vector exponentiation, a[i] = exp(b[i]) (complex).
void Pscf::VecOp::sqV (Array< fftw_complex > &a, Array< fftw_complex > const &b)
 Elementwise complex square, a[i] = b[i] * b[i] (complex).
void Pscf::VecOp::sqAbsV (Array< double > &a, Array< fftw_complex > const &b)
 Square of absolute magnitude, a[i] = |b[i]|^2 (complex).
void Pscf::VecOp::sqSqAbsV (Array< double > &a, Array< fftw_complex > const &b)
 Fourth power of absolute magnitude, a[i] = |b[i]|^4 (complex).
void Pscf::VecOp::divEqVc (Array< fftw_complex > &a, Array< double > const &b, double const c)
 Vector division in-place w/ coeff., a[i] /= (b[i] * c).

Detailed Description

Element-wise vector operations on CPU arrays.

Operations that are performed by these functions include addition, subtraction, multiplication, division, exponentiation, and assignment. The function names will, correspondingly, begin with "add", "sub", "mul", "div", "exp", or "eq" to indicate the relevant operation. Functions are also included to perform compound or in-place arithmetic operations, i.e. those that are performed using +=, -=, *=, and /= in C++. These functions have names that begin with "addEq", "subEq", "mulEq", and "divEq", respectively.

The output (the LHS of the vector operation) is always the first parameter passed to the function. The input argument(s) (on the RHS of the vector operation) may be vectors or scalars. If an argument is a vector (scalar), the function name will contain a V (S). The order in which input parameters are listed in a function interface is always the same as the order in which the corresponding symbols V and/or S appear in the function name. For example, the function addVV(A,B,C) implements vector-vector addition A[i] = B[i] + C[i], while addVS(A,B,c) implements vector-scalar addition A[i] = B[i] + c in which c is a scalar that is added to every element of B. For commutative operations involving both vectors and scalars, the vectors are listed first. So, for example, addVS exists, but addSV does not.

Some functions use the product of a vector and a scalar coefficient as an inut to a subsequent operation, such as addition of two or more such "scaled" vectors or exponentiation of a scaled vector. In the names of such functions, the symbol "Vc" is used to indicate an input vector that is multiplied by a corresponding scalar coefficient. When such a vector-scalar product is indicated, the input vector and corresponding scalar coefficient always appear next to each other as parameters in the function interface, with the vector listed before the scalar coefficient. For example, the function addVcVc(a, b1, c1, b2, c2), in which a, b1 and b2 are arrays while c1 and c2 are scalar coefficients, performs the linear combination a[i] = b1[i]*c1 + b2[i}*c2 for every value of the element index i.

Operations involving complex numbers use the complex type fftw_complex that is defined for use with the FFTW fast Fourier transform library.

Function Documentation

◆ eqV() [1/5]

void Pscf::VecOp::eqV ( Array< double > & a,
Array< double > const & b,
const int beginIdA,
const int beginIdB,
const int n )

◆ eqV() [2/5]

void Pscf::VecOp::eqV ( Array< double > & a,
Array< double > const & b )

Vector assignment, a[i] = b[i] (real).

Parameters
areal array (LHS)
breal array (RHS)

Definition at line 42 of file VecOp.cpp.

References Util::Array< Data >::capacity(), eqV(), and UTIL_CHECK.

◆ eqS() [1/3]

◆ addVV() [1/3]

void Pscf::VecOp::addVV ( Array< double > & a,
Array< double > const & b,
Array< double > const & c )

Vector-vector addition, a[i] = b[i] + c[i] (real).

Parameters
areal array (LHS)
breal array (RHS)
creal array (RHS)

Definition at line 69 of file VecOp.cpp.

References addVV(), Util::Array< Data >::capacity(), and UTIL_CHECK.

Referenced by addVMany(), addVMany(), addVV(), addVV(), addVV(), addVV(), addVV(), addVV(), addVV(), addVV(), addVV(), addVV(), addVV(), Pscf::Rp::BdMove< D, T >::bdStep(), and Pscf::Rp::LMBdStep< D, T >::step().

◆ addVS() [1/3]

void Pscf::VecOp::addVS ( Array< double > & a,
Array< double > const & b,
double c )

Vector-scalar addition, a[i] = b[i] + c (real).

Parameters
areal array (LHS)
breal array (RHS)
creal scalar (RHS)

Definition at line 84 of file VecOp.cpp.

References addVS(), Util::Array< Data >::capacity(), and UTIL_CHECK.

Referenced by addVS(), addVS(), addVS(), addVS(), addVS(), addVS(), addVS(), addVS(), addVS(), addVS(), and addVS().

◆ subVV() [1/3]

void Pscf::VecOp::subVV ( Array< double > & a,
Array< double > const & b,
Array< double > const & c )

◆ subVS() [1/3]

void Pscf::VecOp::subVS ( Array< double > & a,
Array< double > const & b,
double c )

Vector-scalar subtraction, a[i] = b[i] - c (real).

Parameters
areal array (LHS)
breal array (RHS)
creal scalar (RHS)

Definition at line 115 of file VecOp.cpp.

References Util::Array< Data >::capacity(), subVS(), and UTIL_CHECK.

Referenced by subVS(), subVS(), subVS(), subVS(), subVS(), subVS(), subVS(), subVS(), subVS(), subVS(), and subVS().

◆ mulVV() [1/3]

void Pscf::VecOp::mulVV ( Array< double > & a,
Array< double > const & b,
Array< double > const & c )

Vector-vector multiplication, a[i] = b[i] * c[i] (real).

Parameters
areal array (LHS)
breal array (RHS)
creal array (RHS)

Definition at line 130 of file VecOp.cpp.

References Util::Array< Data >::capacity(), mulVV(), and UTIL_CHECK.

Referenced by Pscf::Reduce::innerProduct(), mulVMany(), mulVMany(), mulVV(), mulVV(), mulVV(), mulVV(), mulVV(), mulVV(), mulVV(), mulVV(), mulVV(), mulVV(), and mulVV().

◆ mulVS() [1/3]

void Pscf::VecOp::mulVS ( Array< double > & a,
Array< double > const & b,
double c )

Vector-scalar multiplication, a[i] = b[i] * c (real).

Parameters
areal array (LHS)
breal array (RHS)
creal scalar (RHS)

Definition at line 145 of file VecOp.cpp.

References Util::Array< Data >::capacity(), mulVS(), and UTIL_CHECK.

Referenced by mulVS(), mulVS(), mulVS(), mulVS(), mulVS(), mulVS(), mulVS(), mulVS(), mulVS(), mulVS(), and mulVS().

◆ divVV() [1/3]

void Pscf::VecOp::divVV ( Array< double > & a,
Array< double > const & b,
Array< double > const & c )

Vector-vector division, a[i] = b[i] / c[i] (real).

Parameters
areal array (LHS)
breal array (RHS)
creal array (RHS)

Definition at line 160 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divVV(), and UTIL_CHECK.

Referenced by divVV(), divVV(), divVV(), divVV(), divVV(), divVV(), and divVV().

◆ divVS() [1/3]

void Pscf::VecOp::divVS ( Array< double > & a,
Array< double > const & b,
double c )

Vector-scalar division, a[i] = b[i] / c (real).

Parameters
areal array (LHS)
breal array (RHS)
creal scalar (RHS)

Definition at line 175 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divVS(), and UTIL_CHECK.

Referenced by divVS(), divVS(), divVS(), divVS(), divVS(), divVS(), and divVS().

◆ divSV()

void Pscf::VecOp::divSV ( Array< double > & a,
double b,
Array< double > const & c )

Vector division, a[i] = b / c[i].

Parameters
areal array (LHS)
breal scalar (RHS)
creal array (RHS)

Definition at line 188 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divSV(), and UTIL_CHECK.

Referenced by divSV(), divSV(), divSV(), and Pscf::Rp::Block< D, CUT >::setupSolver().

◆ addEqV()

void Pscf::VecOp::addEqV ( Array< double > & a,
Array< double > const & b )

Vector-vector in-place addition, a[i] += b[i] (real).

Parameters
areal array (LHS)
breal array (RHS)

Definition at line 203 of file VecOp.cpp.

References addEqV(), Util::Array< Data >::capacity(), and UTIL_CHECK.

Referenced by addEqV(), addEqV(), addEqV(), addEqV(), addEqV(), addEqV(), addEqV(), addEqV(), addEqV(), and Pscf::Rp::PredCorrBdStep< D, T >::step().

◆ addEqS() [1/2]

void Pscf::VecOp::addEqS ( Array< double > & a,
double b )

Vector-scalar in-place addition, a[i] += b (real).

Parameters
areal array (LHS)
breal scalar (RHS)

Definition at line 216 of file VecOp.cpp.

References addEqS(), Util::Array< Data >::capacity(), and UTIL_CHECK.

Referenced by addEqS(), addEqS(), addEqS(), addEqS(), addEqS(), addEqS(), addEqS(), and addEqS().

◆ subEqV() [1/3]

void Pscf::VecOp::subEqV ( Array< double > & a,
Array< double > const & b )

Vector-vector in-place subtraction, a[i] -= b[i] (real).

Parameters
areal array (LHS)
breal array (RHS)

Definition at line 230 of file VecOp.cpp.

References Util::Array< Data >::capacity(), subEqV(), and UTIL_CHECK.

Referenced by subEqV(), subEqV(), subEqV(), subEqV(), subEqV(), subEqV(), subEqV(), subEqV(), and subEqV().

◆ subEqS() [1/3]

void Pscf::VecOp::subEqS ( Array< double > & a,
double b )

Vector-scalar subtraction in-place, a[i] -= b (real).

Parameters
areal array (LHS)
breal scalar (RHS)

Definition at line 243 of file VecOp.cpp.

References Util::Array< Data >::capacity(), subEqS(), and UTIL_CHECK.

Referenced by subEqS(), subEqS(), subEqS(), subEqS(), subEqS(), subEqS(), subEqS(), subEqS(), and subEqS().

◆ mulEqV() [1/3]

◆ mulEqS() [1/3]

◆ divEqV() [1/3]

void Pscf::VecOp::divEqV ( Array< double > & a,
Array< double > const & b )

Vector-vector in-place division, a[i] /= b[i].

Parameters
areal array (LHS)
breal array (RHS)

Definition at line 284 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divEqV(), and UTIL_CHECK.

Referenced by divEqV(), divEqV(), divEqV(), divEqV(), divEqV(), divEqV(), and divEqV().

◆ divEqS() [1/3]

void Pscf::VecOp::divEqS ( Array< double > & a,
double b )

Vector-scalar in-place division, a[i] /= b.

Parameters
areal array (LHS)
breal scalar (RHS)

Definition at line 297 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divEqS(), and UTIL_CHECK.

Referenced by divEqS(), divEqS(), divEqS(), divEqS(), divEqS(), divEqS(), and divEqS().

◆ expV() [1/2]

void Pscf::VecOp::expV ( Array< double > & a,
Array< double > const & b )

Vector exponentiation, a[i] = exp(b[i]) (real).

Parameters
areal array (LHS)
breal array (RHS)

Definition at line 311 of file VecOp.cpp.

References Util::Array< Data >::capacity(), expV(), and UTIL_CHECK.

Referenced by expV(), expV(), expV(), expV(), expV(), and expV().

◆ expVc()

void Pscf::VecOp::expVc ( Array< double > & a,
Array< double > const & b,
const double c )

Exponentiation a scaled vector, a[i] = exp(b[i]*c) (real).

Parameters
areal array (LHS)
breal array (RHS)
creal scalar coefficient of b (RHS)

Definition at line 324 of file VecOp.cpp.

References Util::Array< Data >::capacity(), expVc(), and UTIL_CHECK.

Referenced by Pscf::Rp::Solvent< D, T >::compute(), expVc(), expVc(), and Pscf::Rp::Block< D, CUT >::setupSolver().

◆ sqV() [1/2]

void Pscf::VecOp::sqV ( Array< double > & a,
Array< double > const & b )

Vector element-wise square, a[i] = b[i]*b[i] (real).

Parameters
areal array (LHS)
breal array (RHS)

Definition at line 339 of file VecOp.cpp.

References Util::Array< Data >::capacity(), sqV(), and UTIL_CHECK.

Referenced by sqV(), sqV(), sqV(), sqV(), sqV(), sqV(), Pscf::Reduce::sumSq(), and Pscf::Reduce::sumSq().

◆ absV()

void Pscf::VecOp::absV ( Array< double > & a,
Array< double > const & b )

Element-wise absolute magnitude, a[i] = abs(b[i]) (real).

Parameters
areal array (LHS)
breal array (RHS)

Definition at line 354 of file VecOp.cpp.

References absV(), Util::Array< Data >::capacity(), and UTIL_CHECK.

Referenced by absV(), absV(), absV(), Pscf::Reduce::maxAbs(), and Pscf::Reduce::minAbs().

◆ addEqVc()

◆ eqVPair()

void Pscf::VecOp::eqVPair ( Array< double > & a1,
Array< double > & a2,
Array< double > const & b )

Vector assignment in pairs, ax[i] = b[i], x = 1, 2.

Parameters
a1real array 1 (LHS)
a2real array 2 (LHS)
bshared real array to be assigned to both a1 and a2

Definition at line 451 of file VecOp.cpp.

References Util::Array< Data >::capacity(), eqVPair(), and UTIL_CHECK.

Referenced by eqVPair(), and eqVPair().

◆ mulVVPair()

void Pscf::VecOp::mulVVPair ( Array< double > & a1,
Array< double > & a2,
Array< double > const & b1,
Array< double > const & b2,
Array< double > const & c )

Vector multiplication in pairs, ax[i] = bx[i] * s[i], x=1,2.

Parameters
a1real array 1 (LHS)
a2real array 2 (LHS)
b1real array 1 (RHS)
b2real array 2 (RHS)
cshared real array to multiply both b1 and b2

Definition at line 468 of file VecOp.cpp.

References Util::Array< Data >::capacity(), mulVVPair(), and UTIL_CHECK.

Referenced by mulVVPair(), mulVVPair(), and Pscf::Rp::Block< D, CUT >::stepThread().

◆ mulEqVPair()

void Pscf::VecOp::mulEqVPair ( Array< double > & a1,
Array< double > & a2,
Array< double > const & b )

In-place vector multiplication in pairs, ax[i] *= b[i], x=1,2.

Parameters
a1real array 1 (LHS)
a2real array 2 (LHS)
bshared real array to multiply both a1 and a2 (RHS)

Definition at line 489 of file VecOp.cpp.

References Util::Array< Data >::capacity(), mulEqVPair(), and UTIL_CHECK.

Referenced by mulEqVPair(), mulEqVPair(), and Pscf::Rp::Block< D, CUT >::stepThread().

◆ real()

void Pscf::VecOp::real ( Array< double > & a,
Array< fftw_complex > const & b )

Copy real part of a complex array to a real array.

Parameters
areal array (LHS)
bcomplex array (RHS)

Definition at line 508 of file VecOp.cpp.

References Util::Array< Data >::capacity(), real(), and UTIL_CHECK.

Referenced by real().

◆ imag()

void Pscf::VecOp::imag ( Array< double > & a,
Array< fftw_complex > const & b )

Copy imaginary part of a complex array to a real array.

Parameters
areal array (LHS)
bcomplex array (RHS)

Definition at line 521 of file VecOp.cpp.

References Util::Array< Data >::capacity(), imag(), and UTIL_CHECK.

Referenced by imag().

◆ eqV() [3/5]

void Pscf::VecOp::eqV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b )

Vector assignment, a[i] = b[i] (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)

Definition at line 536 of file VecOp.cpp.

References Util::Array< Data >::capacity(), eqV(), and UTIL_CHECK.

◆ eqV() [4/5]

void Pscf::VecOp::eqV ( Array< fftw_complex > & a,
Array< double > const & b,
Array< double > const & c )

Vector assignment, a[i] = (b[i], c[i]) (complex, real & imaginary).

Parameters
acomplex array (LHS)
breal array, real part (RHS)
creal array, imaginary part (RHS)

Definition at line 550 of file VecOp.cpp.

References Util::Array< Data >::capacity(), eqV(), and UTIL_CHECK.

◆ eqV() [5/5]

void Pscf::VecOp::eqV ( Array< fftw_complex > & a,
Array< double > const & b )

Vector assignment, a[i] = b[i] (mixed, real b).

Parameters
acomplex array (LHS)
breal array (RHS)

Definition at line 567 of file VecOp.cpp.

References Util::Array< Data >::capacity(), eqV(), and UTIL_CHECK.

◆ eqS() [2/3]

void Pscf::VecOp::eqS ( Array< fftw_complex > & a,
fftw_complex b )

Vector-scalar assignment, a[i] = b (complex).

Parameters
acomplex array (LHS)
breal scalar (RHS)

Definition at line 581 of file VecOp.cpp.

References Util::Array< Data >::capacity(), eqS(), and UTIL_CHECK.

◆ eqS() [3/3]

void Pscf::VecOp::eqS ( Array< fftw_complex > & a,
double b )

Vector-scalar assignment, a[i] = b (mixed, real scalar b).

Parameters
acomplex array (LHS)
breal scalar (RHS)

Definition at line 594 of file VecOp.cpp.

References Util::Array< Data >::capacity(), eqS(), and UTIL_CHECK.

◆ addVV() [2/3]

void Pscf::VecOp::addVV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
Array< fftw_complex > const & c )

Vector addition, a[i] = b[i] + c[i] (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
ccomplex array (RHS)

Definition at line 609 of file VecOp.cpp.

References addVV(), Util::Array< Data >::capacity(), and UTIL_CHECK.

◆ addVV() [3/3]

void Pscf::VecOp::addVV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
Array< double > const & c )

Vector addition, a[i] = b[i] + c[i] (mixed, real array c).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
creal array (RHS)

Definition at line 626 of file VecOp.cpp.

References addVV(), Util::Array< Data >::capacity(), and UTIL_CHECK.

◆ addVS() [2/3]

void Pscf::VecOp::addVS ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
fftw_complex c )

Vector-scalar addition, a[i] = b[i] + c (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
ccomplex scalar (RHS)

Definition at line 643 of file VecOp.cpp.

References addVS(), Util::Array< Data >::capacity(), and UTIL_CHECK.

◆ addVS() [3/3]

void Pscf::VecOp::addVS ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
double c )

Vector-scalar addition, a[i] = b[i] + c (mixed).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
creal scalar (RHS)

Definition at line 660 of file VecOp.cpp.

References addVS(), Util::Array< Data >::capacity(), and UTIL_CHECK.

◆ subVV() [2/3]

void Pscf::VecOp::subVV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
Array< fftw_complex > const & c )

Vector subtraction, a[i] = b[i] - c[i] (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
ccomplex array (RHS)

Definition at line 678 of file VecOp.cpp.

References Util::Array< Data >::capacity(), subVV(), and UTIL_CHECK.

◆ subVV() [3/3]

void Pscf::VecOp::subVV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
Array< double > const & c )

Vector subtraction, a[i] = b[i] - c[i] (mixed, real array c).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
creal array (RHS)

Definition at line 695 of file VecOp.cpp.

References Util::Array< Data >::capacity(), subVV(), and UTIL_CHECK.

◆ subVS() [2/3]

void Pscf::VecOp::subVS ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
fftw_complex c )

Vector-scalar subtraction, a[i] = b[i] - c (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
ccomplex scalar (RHS)

Definition at line 712 of file VecOp.cpp.

References Util::Array< Data >::capacity(), subVS(), and UTIL_CHECK.

◆ subVS() [3/3]

void Pscf::VecOp::subVS ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
double c )

Vector-scalar subtraction, a[i] = b[i] - c (mixed, real scalar c).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
creal scalar (RHS)

Definition at line 728 of file VecOp.cpp.

References Util::Array< Data >::capacity(), subVS(), and UTIL_CHECK.

◆ mulVV() [2/3]

void Pscf::VecOp::mulVV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
Array< fftw_complex > const & c )

Vector multiplication, a[i] = b[i] * c[i] (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
ccomplex array (RHS)

Definition at line 746 of file VecOp.cpp.

References Util::Array< Data >::capacity(), mulVV(), and UTIL_CHECK.

◆ mulVV() [3/3]

void Pscf::VecOp::mulVV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
Array< double > const & c )

Vector multiplication, a[i] = b[i] * c[i] (mixed, real array c).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
creal array (RHS)

Definition at line 763 of file VecOp.cpp.

References Util::Array< Data >::capacity(), mulVV(), and UTIL_CHECK.

◆ mulVS() [2/3]

void Pscf::VecOp::mulVS ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
fftw_complex c )

Vector-scalar multiplication, a[i] = b[i] * c (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
ccomplex scalar (RHS)

Definition at line 780 of file VecOp.cpp.

References Util::Array< Data >::capacity(), mulVS(), and UTIL_CHECK.

◆ mulVS() [3/3]

void Pscf::VecOp::mulVS ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
double c )

Vector-scalar multiplication, a[i] = b[i] * c (mixed, real c).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
creal scalar (RHS)

Definition at line 796 of file VecOp.cpp.

References Util::Array< Data >::capacity(), mulVS(), and UTIL_CHECK.

◆ divVV() [2/3]

void Pscf::VecOp::divVV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
Array< fftw_complex > const & c )

Vector division, a[i] = b[i] / c[i] (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
ccomplex array (RHS)

Definition at line 814 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divVV(), and UTIL_CHECK.

◆ divVV() [3/3]

void Pscf::VecOp::divVV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
Array< double > const & c )

Vector division, a[i] = b[i] / c[i] (mixed, real array c).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
creal array (RHS)

Definition at line 835 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divVV(), and UTIL_CHECK.

◆ divVS() [2/3]

void Pscf::VecOp::divVS ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
fftw_complex c )

Vector-scalar division, a[i] = b[i] / c (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
ccomplex scalar (RHS)

Definition at line 852 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divVS(), and UTIL_CHECK.

◆ divVS() [3/3]

void Pscf::VecOp::divVS ( Array< fftw_complex > & a,
Array< fftw_complex > const & b,
double c )

Vector-scalar division, a[i] = b[i] / c (mixed, real scalar c).

Parameters
acomplex array (LHS)
bcomplex array (RHS)
creal scalar (RHS)

Definition at line 871 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divVS(), and UTIL_CHECK.

◆ addEqS() [2/2]

void Pscf::VecOp::addEqS ( Array< fftw_complex > & a,
double b )

Vector-scalar in-place addition, a[i] += b (mixed, real scalar b).

Parameters
acomplex array (LHS)
breal scalar (RHS)

Definition at line 947 of file VecOp.cpp.

References addEqS(), Util::Array< Data >::capacity(), and UTIL_CHECK.

◆ subEqV() [2/3]

void Pscf::VecOp::subEqV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b )

Vector in-place subtraction, a[i] -= b[i] (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)

Definition at line 961 of file VecOp.cpp.

References Util::Array< Data >::capacity(), subEqV(), and UTIL_CHECK.

◆ subEqV() [3/3]

void Pscf::VecOp::subEqV ( Array< fftw_complex > & a,
Array< double > const & b )

Vector in-place subtraction, a[i] -= b[i] (mixed, real array b).

Parameters
acomplex array (LHS)
breal array (RHS)

Definition at line 975 of file VecOp.cpp.

References Util::Array< Data >::capacity(), subEqV(), and UTIL_CHECK.

◆ subEqS() [2/3]

void Pscf::VecOp::subEqS ( Array< fftw_complex > & a,
fftw_complex b )

Vector-scalar in-place subtraction, a[i] -= b (complex).

Parameters
acomplex array (LHS)
bcomplex scalar (RHS)

Definition at line 988 of file VecOp.cpp.

References Util::Array< Data >::capacity(), subEqS(), and UTIL_CHECK.

◆ subEqS() [3/3]

void Pscf::VecOp::subEqS ( Array< fftw_complex > & a,
double b )

Vector-scalar in-place subtraction, a[i] -= b (mixed, real b).

Parameters
acomplex array (LHS)
breal scalar (RHS)

Definition at line 1001 of file VecOp.cpp.

References Util::Array< Data >::capacity(), subEqS(), and UTIL_CHECK.

◆ mulEqV() [2/3]

void Pscf::VecOp::mulEqV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b )

Vector in-place multiplication, a[i] *= b[i] (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)

Definition at line 1015 of file VecOp.cpp.

References Util::Array< Data >::capacity(), mulEqV(), and UTIL_CHECK.

◆ mulEqV() [3/3]

void Pscf::VecOp::mulEqV ( Array< fftw_complex > & a,
Array< double > const & b )

Vector in-place multiplication, a[i] *= b[i] (mixed, real array b).

Parameters
acomplex array (LHS)
breal array (RHS)

Definition at line 1032 of file VecOp.cpp.

References Util::Array< Data >::capacity(), mulEqV(), and UTIL_CHECK.

◆ mulEqS() [2/3]

void Pscf::VecOp::mulEqS ( Array< fftw_complex > & a,
fftw_complex const & b )

Vector-scalar in-place multiplication, a[i] *= b[i] (complex).

Parameters
acomplex array (LHS)
bcomplex scalar (RHS)

Definition at line 1046 of file VecOp.cpp.

References Util::Array< Data >::capacity(), mulEqS(), and UTIL_CHECK.

◆ mulEqS() [3/3]

void Pscf::VecOp::mulEqS ( Array< fftw_complex > & a,
double b )

Vector-scalar in-place multiplication, a[i] *= b (mixed real b).

Parameters
acomplex array (LHS)
breal scalar (RHS)

Definition at line 1062 of file VecOp.cpp.

References Util::Array< Data >::capacity(), mulEqS(), and UTIL_CHECK.

◆ divEqV() [2/3]

void Pscf::VecOp::divEqV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b )

Vector in-place division, a[i] /= b[i] (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)

Definition at line 1077 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divEqV(), and UTIL_CHECK.

◆ divEqV() [3/3]

void Pscf::VecOp::divEqV ( Array< fftw_complex > & a,
Array< double > const & b )

Vector in-place division, a[i] /= b[i] (mixed, real array b).

Parameters
acomplex array (LHS)
breal array (RHS)

Definition at line 1097 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divEqV(), and UTIL_CHECK.

◆ divEqS() [2/3]

void Pscf::VecOp::divEqS ( Array< fftw_complex > & a,
fftw_complex b )

Vector-scalar in-place division, a[i] /= b (complex).

Parameters
acomplex array (LHS)
bcomplex scalar (RHS)

Definition at line 1111 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divEqS(), and UTIL_CHECK.

◆ divEqS() [3/3]

void Pscf::VecOp::divEqS ( Array< fftw_complex > & a,
double b )

Vector-scalar in-place division, a[i] /= b (mixed, real scalar b).

Parameters
acomplex array (LHS)
breal scalar (RHS)

Definition at line 1130 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divEqS(), and UTIL_CHECK.

◆ expV() [2/2]

void Pscf::VecOp::expV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b )

Vector exponentiation, a[i] = exp(b[i]) (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)

Definition at line 1145 of file VecOp.cpp.

References Util::Array< Data >::capacity(), expV(), and UTIL_CHECK.

◆ sqV() [2/2]

void Pscf::VecOp::sqV ( Array< fftw_complex > & a,
Array< fftw_complex > const & b )

Elementwise complex square, a[i] = b[i] * b[i] (complex).

Parameters
acomplex array (LHS)
bcomplex array (RHS)

Definition at line 1163 of file VecOp.cpp.

References Util::Array< Data >::capacity(), sqV(), and UTIL_CHECK.

◆ sqAbsV()

void Pscf::VecOp::sqAbsV ( Array< double > & a,
Array< fftw_complex > const & b )

Square of absolute magnitude, a[i] = |b[i]|^2 (complex).

Parameters
areal array (LHS)
bcomplex array (RHS)

Definition at line 1182 of file VecOp.cpp.

References Util::Array< Data >::capacity(), sqAbsV(), and UTIL_CHECK.

Referenced by Pscf::Rp::MaxOrderParameter< D, T >::compute(), sqAbsV(), sqAbsV(), sqAbsV(), and Pscf::Reduce::sumSqAbs().

◆ sqSqAbsV()

void Pscf::VecOp::sqSqAbsV ( Array< double > & a,
Array< fftw_complex > const & b )

Fourth power of absolute magnitude, a[i] = |b[i]|^4 (complex).

Parameters
areal array (LHS)
bcomplex array (RHS)

Definition at line 1198 of file VecOp.cpp.

References Util::Array< Data >::capacity(), sqSqAbsV(), and UTIL_CHECK.

Referenced by Pscf::Rp::FourthOrderParameter< D, T >::compute(), sqSqAbsV(), and sqSqAbsV().

◆ divEqVc()

void Pscf::VecOp::divEqVc ( Array< fftw_complex > & a,
Array< double > const & b,
double const c )

Vector division in-place w/ coeff., a[i] /= (b[i] * c).

Parameters
acomplex array (LHS)
breal array (RHS)
cinput scalar (RHS)

Definition at line 1214 of file VecOp.cpp.

References Util::Array< Data >::capacity(), divEqVc(), and UTIL_CHECK.

Referenced by divEqVc(), and divEqVc().