PSCF v1.4.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::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.

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 37 of file VecOp.cpp.

References Util::Array< Data >::capacity(), 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 64 of file VecOp.cpp.

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

Referenced by addVMany(), addVMany(), 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 79 of file VecOp.cpp.

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

Referenced by 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 110 of file VecOp.cpp.

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

Referenced by 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 125 of file VecOp.cpp.

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

Referenced by Pscf::Reduce::innerProduct(), mulVMany(), mulVMany(), 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 140 of file VecOp.cpp.

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

Referenced by 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 155 of file VecOp.cpp.

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

Referenced by 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 170 of file VecOp.cpp.

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

Referenced by 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 183 of file VecOp.cpp.

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

Referenced by divSV(), and Pscf::Rpg::Block< D >::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 198 of file VecOp.cpp.

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

Referenced by addEqV(), addEqV(), addEqV(), Pscf::Rp::Mixture< D, Types< D > >::allocate(), 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 211 of file VecOp.cpp.

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

Referenced by 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 225 of file VecOp.cpp.

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

Referenced by 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 238 of file VecOp.cpp.

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

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

◆ mulEqV() [1/3]

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

◆ 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 279 of file VecOp.cpp.

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

Referenced by 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 292 of file VecOp.cpp.

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

Referenced by 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 306 of file VecOp.cpp.

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

Referenced by 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 319 of file VecOp.cpp.

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

Referenced by Pscf::Rp::Solvent< D, Rpc::Types< D > >::associate(), and Pscf::Rpg::Block< D >::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 334 of file VecOp.cpp.

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

Referenced by 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 349 of file VecOp.cpp.

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

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

◆ addEqVc()

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

◆ 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 24 of file VecOpCx.cpp.

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

◆ 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 37 of file VecOpCx.cpp.

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

◆ 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 52 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 66 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 83 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 97 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 110 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 125 of file VecOpCx.cpp.

References 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 142 of file VecOpCx.cpp.

References 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 159 of file VecOpCx.cpp.

References 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 176 of file VecOpCx.cpp.

References 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 194 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 211 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 228 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 244 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 262 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 279 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 296 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 312 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 330 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 351 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 368 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 387 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 463 of file VecOpCx.cpp.

References 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 477 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 491 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 504 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 517 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 531 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 548 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 562 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 578 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 593 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 613 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 627 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 646 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 661 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 679 of file VecOpCx.cpp.

References Util::Array< Data >::capacity(), 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 698 of file VecOpCx.cpp.

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

Referenced by Pscf::Rp::MaxOrderParameter< D, T >::computePsi(), 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 714 of file VecOpCx.cpp.

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

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

◆ 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 730 of file VecOpCx.cpp.

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