Nektar++
Namespaces | Functions
Vmath Namespace Reference

Namespaces

 SIMD
 

Functions

template<class T >
void Fill (int n, const T alpha, T *x, const int incx)
 Fill a vector with a constant value. More...
 
template void Fill (int n, const Nektar::NekDouble alpha, Nektar::NekDouble *x, const int incx)
 
template void Fill (int n, const Nektar::NekSingle alpha, Nektar::NekSingle *x, const int incx)
 
template<class T >
ran2 (long *idum)
 Generates a number from ~Normal(0,1) More...
 
template<class T >
void FillWhiteNoise (int n, const T eps, T *x, const int incx, int outseed)
 Fills a vector with white noise. More...
 
template void FillWhiteNoise (int n, const Nektar::NekDouble eps, Nektar::NekDouble *x, const int incx, int outseed)
 
template void FillWhiteNoise (int n, const Nektar::NekSingle eps, Nektar::NekSingle *x, const int incx, int outseed)
 
template<class T >
void Vmul (int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
 Multiply vector z = x*y. More...
 
template void Vmul (int n, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template void Vmul (int n, const Nektar::NekSingle *x, const int incx, const Nektar::NekSingle *y, const int incy, Nektar::NekSingle *z, const int incz)
 
template<class T >
void Smul (int n, const T alpha, const T *x, const int incx, T *y, const int incy)
 Scalar multiply y = alpha*x. More...
 
template void Smul (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *y, const int incy)
 
template void Smul (int n, const Nektar::NekSingle alpha, const Nektar::NekSingle *x, const int incx, Nektar::NekSingle *y, const int incy)
 
template<class T >
void Vdiv (int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
 Multiply vector z = x/y. More...
 
template void Vdiv (int n, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template void Vdiv (int n, const Nektar::NekSingle *x, const int incx, const Nektar::NekSingle *y, const int incy, Nektar::NekSingle *z, const int incz)
 
template<class T >
void Sdiv (int n, const T alpha, const T *x, const int incx, T *y, const int incy)
 Scalar multiply y = alpha/y. More...
 
template void Sdiv (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *y, const int incy)
 
template void Sdiv (int n, const Nektar::NekSingle alpha, const Nektar::NekSingle *x, const int incx, Nektar::NekSingle *y, const int incy)
 
template<class T >
void Vadd (int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
 Add vector z = x+y. More...
 
template void Vadd (int n, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template void Vadd (int n, const Nektar::NekSingle *x, const int incx, const Nektar::NekSingle *y, const int incy, Nektar::NekSingle *z, const int incz)
 
template<class T >
void Sadd (int n, const T alpha, const T *x, const int incx, T *y, const int incy)
 Add scalar y = alpha + x. More...
 
template void Sadd (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *y, const int incy)
 
template void Sadd (int n, const Nektar::NekSingle alpha, const Nektar::NekSingle *x, const int incx, Nektar::NekSingle *y, const int incy)
 
template<class T >
void Vsub (int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
 Subtract vector z = x-y. More...
 
template void Vsub (int n, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template void Vsub (int n, const Nektar::NekSingle *x, const int incx, const Nektar::NekSingle *y, const int incy, Nektar::NekSingle *z, const int incz)
 
template<class T >
void Ssub (int n, const T alpha, const T *x, const int incx, T *y, const int incy)
 Substract vector y = alpha - x. More...
 
template void Ssub (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *y, const int incy)
 
template void Ssub (int n, const Nektar::NekSingle alpha, const Nektar::NekSingle *x, const int incx, Nektar::NekSingle *y, const int incy)
 
template<class T >
void Zero (int n, T *x, const int incx)
 Zero vector. More...
 
template void Zero (int n, Nektar::NekDouble *x, const int incx)
 
template void Zero (int n, Nektar::NekSingle *x, const int incx)
 
template void Zero (int n, int *x, const int incx)
 
template void Zero (int n, long *x, const int incx)
 
template<class T >
void Neg (int n, T *x, const int incx)
 Negate x = -x. More...
 
template void Neg (int n, Nektar::NekDouble *x, const int incx)
 
template void Neg (int n, Nektar::NekSingle *x, const int incx)
 
template<class T >
void Vsqrt (int n, const T *x, const int incx, T *y, const int incy)
 sqrt y = sqrt(x) More...
 
template void Vsqrt (int n, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *y, const int incy)
 
template void Vsqrt (int n, const Nektar::NekSingle *x, const int incx, Nektar::NekSingle *y, const int incy)
 
template<class T >
void Vabs (int n, const T *x, const int incx, T *y, const int incy)
 vabs: y = |x| More...
 
template void Vabs (int n, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *y, const int incy)
 
template void Vabs (int n, const Nektar::NekSingle *x, const int incx, Nektar::NekSingle *y, const int incy)
 
template<class T >
void Vvtvp (int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
 vvtvp (vector times vector plus vector): z = w*x + y More...
 
template void Vvtvp (int n, const Nektar::NekDouble *w, const int incw, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template void Vvtvp (int n, const Nektar::NekSingle *w, const int incw, const Nektar::NekSingle *x, const int incx, const Nektar::NekSingle *y, const int incy, Nektar::NekSingle *z, const int incz)
 
template<class T >
void Vvtvm (int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
 vvtvm (vector times vector minus vector): z = w*x - y More...
 
template void Vvtvm (int n, const Nektar::NekDouble *w, const int incw, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template void Vvtvm (int n, const Nektar::NekSingle *w, const int incw, const Nektar::NekSingle *x, const int incx, const Nektar::NekSingle *y, const int incy, Nektar::NekSingle *z, const int incz)
 
template<class T >
void Svtvp (int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
 svtvp (scalar times vector plus vector): z = alpha*x + y More...
 
template void Svtvp (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template void Svtvp (int n, const Nektar::NekSingle alpha, const Nektar::NekSingle *x, const int incx, const Nektar::NekSingle *y, const int incy, Nektar::NekSingle *z, const int incz)
 
template<class T >
void Svtvm (int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
 svtvp (scalar times vector minus vector): z = alpha*x - y More...
 
template void Svtvm (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template void Svtvm (int n, const Nektar::NekSingle alpha, const Nektar::NekSingle *x, const int incx, const Nektar::NekSingle *y, const int incy, Nektar::NekSingle *z, const int incz)
 
template<class T >
void Vvtvvtp (int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
 vvtvvtp (vector times vector plus vector times vector): More...
 
template void Vvtvvtp (int n, const Nektar::NekDouble *v, int incv, const Nektar::NekDouble *w, int incw, const Nektar::NekDouble *x, int incx, const Nektar::NekDouble *y, int incy, Nektar::NekDouble *z, int incz)
 
template void Vvtvvtp (int n, const Nektar::NekSingle *v, int incv, const Nektar::NekSingle *w, int incw, const Nektar::NekSingle *x, int incx, const Nektar::NekSingle *y, int incy, Nektar::NekSingle *z, int incz)
 
template<class T >
void Vvtvvtm (int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
 vvtvvtm (vector times vector minus vector times vector): More...
 
template void Vvtvvtm (int n, const Nektar::NekDouble *v, int incv, const Nektar::NekDouble *w, int incw, const Nektar::NekDouble *x, int incx, const Nektar::NekDouble *y, int incy, Nektar::NekDouble *z, int incz)
 
template void Vvtvvtm (int n, const Nektar::NekSingle *v, int incv, const Nektar::NekSingle *w, int incw, const Nektar::NekSingle *x, int incx, const Nektar::NekSingle *y, int incy, Nektar::NekSingle *z, int incz)
 
template<class T >
void Svtsvtp (int n, const T alpha, const T *x, int incx, const T beta, const T *y, int incy, T *z, int incz)
 svtvvtp (scalar times vector plus scalar times vector): More...
 
template void Svtsvtp (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, int incx, const Nektar::NekDouble beta, const Nektar::NekDouble *y, int incy, Nektar::NekDouble *z, int incz)
 
template void Svtsvtp (int n, const Nektar::NekSingle alpha, const Nektar::NekSingle *x, int incx, const Nektar::NekSingle beta, const Nektar::NekSingle *y, int incy, Nektar::NekSingle *z, int incz)
 
template<class T >
void Vstvpp (int n, const T alpha, const T *v, int incv, const T *w, int incw, const T *x, int incx, T *z, int incz)
 Vstvpp (scalar times vector plus vector plus vector): More...
 
template void Vstvpp (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *v, int incv, const Nektar::NekDouble *w, int incw, const Nektar::NekDouble *x, int incx, Nektar::NekDouble *z, int incz)
 
template void Vstvpp (int n, const Nektar::NekSingle alpha, const Nektar::NekSingle *v, int incv, const Nektar::NekSingle *w, int incw, const Nektar::NekSingle *x, int incx, Nektar::NekSingle *z, int incz)
 
template<class T >
void Gathr (int n, const T *sign, const T *x, const int *y, T *z)
 Gather vector z[i] = sign[i]*x[y[i]]. More...
 
template void Gathr (int n, const Nektar::NekDouble *sign, const Nektar::NekDouble *x, const int *y, Nektar::NekDouble *z)
 
template void Gathr (int n, const Nektar::NekSingle *sign, const Nektar::NekSingle *x, const int *y, Nektar::NekSingle *z)
 
template<class T >
void Scatr (int n, const T *x, const int *y, T *z)
 Scatter vector z[y[i]] = x[i]. More...
 
template void Scatr (int n, const Nektar::NekDouble *x, const int *y, Nektar::NekDouble *z)
 
template void Scatr (int n, const Nektar::NekSingle *x, const int *y, Nektar::NekSingle *z)
 
template<class T >
void Scatr (int n, const T *sign, const T *x, const int *y, T *z)
 Scatter vector z[y[i]] = sign[i]*x[i]. More...
 
template void Scatr (int n, const Nektar::NekDouble *sign, const Nektar::NekDouble *x, const int *y, Nektar::NekDouble *z)
 
template void Scatr (int n, const Nektar::NekSingle *sign, const Nektar::NekSingle *x, const int *y, Nektar::NekSingle *z)
 
template<class T >
void Assmb (int n, const T *x, const int *y, T *z)
 Assemble z[y[i]] += x[i]; z should be zero'd first. More...
 
template void Assmb (int n, const Nektar::NekDouble *x, const int *y, Nektar::NekDouble *z)
 
template void Assmb (int n, const Nektar::NekSingle *x, const int *y, Nektar::NekSingle *z)
 
template<class T >
void Assmb (int n, const T *sign, const T *x, const int *y, T *z)
 Assemble z[y[i]] += sign[i]*x[i]; z should be zero'd first. More...
 
template void Assmb (int n, const Nektar::NekDouble *sign, const Nektar::NekDouble *x, const int *y, Nektar::NekDouble *z)
 
template void Assmb (int n, const Nektar::NekSingle *sign, const Nektar::NekSingle *x, const int *y, Nektar::NekSingle *z)
 
template<class T >
Vsum (int n, const T *x, const int incx)
 Subtract return sum(x) More...
 
template Nektar::NekDouble Vsum (int n, const Nektar::NekDouble *x, const int incx)
 
template Nektar::NekSingle Vsum (int n, const Nektar::NekSingle *x, const int incx)
 
template int Vsum (int n, const int *x, const int incx)
 
template<class T >
int Imax (int n, const T *x, const int incx)
 Return the index of the maximum element in x. More...
 
template int Imax (int n, const Nektar::NekDouble *x, const int incx)
 
template int Imax (int n, const Nektar::NekSingle *x, const int incx)
 
template int Imax (int n, const int *x, const int incx)
 
template<class T >
Vmax (int n, const T *x, const int incx)
 Return the maximum element in x – called vmax to avoid conflict with max. More...
 
template Nektar::NekDouble Vmax (int n, const Nektar::NekDouble *x, const int incx)
 
template Nektar::NekSingle Vmax (int n, const Nektar::NekSingle *x, const int incx)
 
template int Vmax (int n, const int *x, const int incx)
 
template<class T >
int Iamax (int n, const T *x, const int incx)
 Return the index of the maximum absolute element in x. More...
 
template int Iamax (int n, const Nektar::NekDouble *x, const int incx)
 
template int Iamax (int n, const Nektar::NekSingle *x, const int incx)
 
template<class T >
Vamax (int n, const T *x, const int incx)
 Return the maximum absolute element in x called vamax to avoid conflict with max. More...
 
template Nektar::NekDouble Vamax (int n, const Nektar::NekDouble *x, const int incx)
 
template Nektar::NekSingle Vamax (int n, const Nektar::NekSingle *x, const int incx)
 
template<class T >
int Imin (int n, const T *x, const int incx)
 Return the index of the minimum element in x. More...
 
template int Imin (int n, const Nektar::NekDouble *x, const int incx)
 
template int Imin (int n, const Nektar::NekSingle *x, const int incx)
 
template int Imin (int n, const int *x, const int incx)
 
template<class T >
Vmin (int n, const T *x, const int incx)
 Return the minimum element in x - called vmin to avoid conflict with min. More...
 
template Nektar::NekDouble Vmin (int n, const Nektar::NekDouble *x, const int incx)
 
template Nektar::NekSingle Vmin (int n, const Nektar::NekSingle *x, const int incx)
 
template int Vmin (int n, const int *x, const int incx)
 
template<class T >
int Nnan (int n, const T *x, const int incx)
 Return number of NaN elements of x. More...
 
template int Nnan (int n, const Nektar::NekDouble *x, const int incx)
 
template int Nnan (int n, const Nektar::NekSingle *x, const int incx)
 
template int Nnan (int n, const int *x, const int incx)
 
template<class T >
Dot (int n, const T *w, const T *x)
 dot (vector times vector): z = w*x More...
 
template Nektar::NekDouble Dot (int n, const Nektar::NekDouble *w, const Nektar::NekDouble *x)
 
template Nektar::NekSingle Dot (int n, const Nektar::NekSingle *w, const Nektar::NekSingle *x)
 
template<class T >
Dot (int n, const T *w, const int incw, const T *x, const int incx)
 dot (vector times vector): z = w*x More...
 
template Nektar::NekDouble Dot (int n, const Nektar::NekDouble *w, const int incw, const Nektar::NekDouble *x, const int incx)
 
template Nektar::NekSingle Dot (int n, const Nektar::NekSingle *w, const int incw, const Nektar::NekSingle *x, const int incx)
 
template<class T >
Dot2 (int n, const T *w, const T *x, const int *y)
 dot2 (vector times vector times vector): z = w*x*y More...
 
template Nektar::NekDouble Dot2 (int n, const Nektar::NekDouble *w, const Nektar::NekDouble *x, const int *y)
 
template Nektar::NekSingle Dot2 (int n, const Nektar::NekSingle *w, const Nektar::NekSingle *x, const int *y)
 
template<class T >
Dot2 (int n, const T *w, const int incw, const T *x, const int incx, const int *y, const int incy)
 dot2 (vector times vector times vector): z = w*x*y More...
 
template Nektar::NekDouble Dot2 (int n, const Nektar::NekDouble *w, const int incw, const Nektar::NekDouble *x, const int incx, const int *y, const int incy)
 
template Nektar::NekSingle Dot2 (int n, const Nektar::NekSingle *w, const int incw, const Nektar::NekSingle *x, const int incx, const int *y, const int incy)
 
template<typename T >
void Vcopy (int n, const T *x, const int incx, T *y, const int incy)
 
template void Vcopy (int n, const int *x, const int incx, int *y, const int incy)
 
template void Vcopy (int n, const unsigned int *x, const int incx, unsigned int *y, const int incy)
 
template void Vcopy (int n, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *y, const int incy)
 
template void Vcopy (int n, const Nektar::NekSingle *x, const int incx, Nektar::NekSingle *y, const int incy)
 
template<class T >
void Reverse (int n, const T *x, const int incx, T *y, const int incy)
 
template void Reverse (int n, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *y, const int incy)
 
template void Reverse (int n, const Nektar::NekSingle *x, const int incx, Nektar::NekSingle *y, const int incy)
 
template<class T >
void Vlog (int n, const T *x, const int incx, T *y, const int incy)
 
template<class T >
void Vexp (int n, const T *x, const int incx, T *y, const int incy)
 
template<class T >
void Vpow (int n, const T *x, const int incx, const T f, T *y, const int incy)
 
template<class T , class I , typename = typename std::enable_if<std::is_floating_point<T>::value && std::is_integral<I>::value>::type>
void Gathr (I n, const T *x, const I *y, T *z)
 Gather vector z[i] = x[y[i]]. More...
 
template<class T >
void Fill (int n, const T alpha, Array< OneD, T > &x, const int incx)
 Fill a vector with a constant value. More...
 
template<class T >
void FillWhiteNoise (int n, const T eps, Array< OneD, T > &x, const int incx, int outseed=9999)
 
template<class T >
void Vmul (int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 Multiply vector z = x*y. More...
 
template<class T >
void Vmul (int n, const Array< TwoD, NekDouble >::const_reference &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 
template<class T >
void Smul (int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 Scalar multiply y = alpha*y. More...
 
template<class T >
void Vdiv (int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 Multiply vector z = x/y. More...
 
template<class T >
void Sdiv (int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 Scalar multiply y = alpha/y. More...
 
template<class T >
void Vadd (int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 Add vector z = x+y. More...
 
template<class T >
void Sadd (int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 Add vector y = alpha + x. More...
 
template<class T >
void Vsub (int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 Subtract vector z = x-y. More...
 
template<class T >
void Ssub (int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 Add vector y = alpha - x. More...
 
template<class T >
void Zero (int n, Array< OneD, T > &x, const int incx)
 Zero vector. More...
 
template<class T >
void Neg (int n, Array< OneD, T > &x, const int incx)
 Negate x = -x. More...
 
template<class T >
void Vlog (int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 
template<class T >
void Vexp (int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 
template<class T >
void Vpow (int n, const Array< OneD, const T > &x, const int incx, const T f, Array< OneD, T > &y, const int incy)
 
template<class T >
void Vsqrt (int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 sqrt y = sqrt(x) More...
 
template<class T >
void Vabs (int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 vabs: y = |x| More...
 
template<class T >
void Vvtvp (int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 vvtvp (vector times vector plus vector): z = w*x + y More...
 
template<class T >
void Vvtvp (int n, const Array< TwoD, NekDouble >::const_reference &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 
template<class T >
void Svtvp (int n, const T alpha, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 svtvp (scalar times vector plus vector): z = alpha*x + y More...
 
template<class T >
void Svtvm (int n, const T alpha, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 svtvp (scalar times vector plus vector): z = alpha*x + y More...
 
template<class T >
void Vvtvm (int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 vvtvm (vector times vector minus vector): z = w*x - y More...
 
template<class T >
void Vvtvvtp (int n, const Array< OneD, const T > &v, int incv, const Array< OneD, const T > &w, int incw, const Array< OneD, const T > &x, int incx, const Array< OneD, const T > &y, int incy, Array< OneD, T > &z, int incz)
 vvtvvtp (vector times vector plus vector times vector): z = v*w + x*y More...
 
template<class T >
void Vvtvvtm (int n, const Array< OneD, const T > &v, int incv, const Array< OneD, const T > &w, int incw, const Array< OneD, const T > &x, int incx, const Array< OneD, const T > &y, int incy, Array< OneD, T > &z, int incz)
 vvtvvtm (vector times vector minus vector times vector): z = v*w - x*y More...
 
template<class T >
void Svtsvtp (int n, const T alpha, const Array< OneD, const T > &x, const int incx, const T beta, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 svtsvtp (scalar times vector plus scalar times vector): z = alpha*x + beta*y More...
 
template<class T , class I , typename = typename std::enable_if<std::is_floating_point<T>::value && std::is_integral<I>::value>::type>
void Gathr (I n, const Array< OneD, const T > &x, const Array< OneD, I > &y, Array< OneD, T > &z)
 Gather vector z[i] = x[y[i]]. More...
 
template<class T >
void Scatr (int n, const Array< OneD, const T > &x, const Array< OneD, const int > &y, Array< OneD, T > &z)
 Scatter vector z[y[i]] = x[i]. More...
 
template<class T >
void Assmb (int n, const Array< OneD, T > &x, const Array< OneD, int > &y, Array< OneD, T > &z)
 Assemble z[y[i]] += x[i]; z should be zero'd first. More...
 
template<class T >
Vsum (int n, const Array< OneD, const T > &x, const int incx)
 Subtract return sum(x) More...
 
template<class T >
int Imax (int n, const Array< OneD, const T > &x, const int incx)
 Return the index of the maximum element in x. More...
 
template<class T >
Vmax (int n, const Array< OneD, const T > &x, const int incx)
 Return the maximum element in x – called vmax to avoid conflict with max. More...
 
template<class T >
int Iamax (int n, const Array< OneD, const T > &x, const int incx)
 Return the index of the maximum absolute element in x. More...
 
template<class T >
Vamax (int n, const Array< OneD, const T > &x, const int incx)
 Return the maximum absolute element in x called vamax to avoid conflict with max. More...
 
template<class T >
int Imin (int n, const Array< OneD, const T > &x, const int incx)
 Return the index of the minimum element in x. More...
 
template<class T >
Vmin (int n, const Array< OneD, const T > &x, const int incx)
 Return the minimum element in x - called vmin to avoid conflict with min. More...
 
template<class T >
int Nnan (int n, const Array< OneD, const T > &x, const int incx)
 Return number of NaN elements of x. More...
 
template<class T >
Dot (int n, const Array< OneD, const T > &w, const Array< OneD, const T > &x)
 
template<class T >
Dot (int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx)
 
template<class T >
Dot2 (int n, const Array< OneD, const T > &w, const Array< OneD, const T > &x, const Array< OneD, const int > &y)
 
template<class T >
Ddot (int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const int > &y, const int incy)
 
template<class T >
void Vcopy (int n, const Array< OneD, const T > &x, int incx, Array< OneD, T > &y, int const incy)
 
template<class T >
void Reverse (int n, const Array< OneD, const T > &x, int incx, Array< OneD, T > &y, int const incy)
 

Function Documentation

◆ Assmb() [1/7]

template<class T >
void Vmath::Assmb ( int  n,
const Array< OneD, T > &  x,
const Array< OneD, int > &  y,
Array< OneD, T > &  z 
)

Assemble z[y[i]] += x[i]; z should be zero'd first.

Definition at line 460 of file VmathArray.hpp.

462 {
463  ASSERTL1(n <= x.size() + x.GetOffset(), "Array out of bounds");
464  ASSERTL1(n <= y.size() + y.GetOffset(), "Array out of bounds");
465 
466  Assmb(n, &x[0], &y[0], &z[0]);
467 }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:249
void Assmb(int n, const Array< OneD, T > &x, const Array< OneD, int > &y, Array< OneD, T > &z)
Assemble z[y[i]] += x[i]; z should be zero'd first.
Definition: VmathArray.hpp:460

References ASSERTL1, and Assmb().

◆ Assmb() [2/7]

template void Vmath::Assmb ( int  n,
const Nektar::NekDouble sign,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)

◆ Assmb() [3/7]

template void Vmath::Assmb ( int  n,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)

◆ Assmb() [4/7]

template void Vmath::Assmb ( int  n,
const Nektar::NekSingle sign,
const Nektar::NekSingle x,
const int *  y,
Nektar::NekSingle z 
)

◆ Assmb() [5/7]

template void Vmath::Assmb ( int  n,
const Nektar::NekSingle x,
const int *  y,
Nektar::NekSingle z 
)

◆ Assmb() [6/7]

template<class T >
void Vmath::Assmb ( int  n,
const T *  sign,
const T *  x,
const int *  y,
T *  z 
)

Assemble z[y[i]] += sign[i]*x[i]; z should be zero'd first.

Definition at line 877 of file Vmath.cpp.

878 {
879  while (n--)
880  {
881  *(z + *(y++)) += *(sign++) * (*(x++));
882  }
883 }
#define sign(a, b)
return the sign(b)*a
Definition: Polylib.cpp:49

References sign.

◆ Assmb() [7/7]

template<class T >
void Vmath::Assmb ( int  n,
const T *  x,
const int *  y,
T *  z 
)

◆ Ddot()

template<class T >
T Vmath::Ddot ( int  n,
const Array< OneD, const T > &  w,
const int  incw,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const int > &  y,
const int  incy 
)

Definition at line 577 of file VmathArray.hpp.

580 {
581  ASSERTL1(n * incw <= w.size() + w.GetOffset(), "Array out of bounds");
582  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
583  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
584 
585  return Dot2(n, &w[0], incw, &x[0], incx, &y[0], incy);
586 }
T Dot2(int n, const Array< OneD, const T > &w, const Array< OneD, const T > &x, const Array< OneD, const int > &y)
Definition: VmathArray.hpp:565

References ASSERTL1, and Dot2().

◆ Dot() [1/8]

template<class T >
T Vmath::Dot ( int  n,
const Array< OneD, const T > &  w,
const Array< OneD, const T > &  x 
)

Definition at line 544 of file VmathArray.hpp.

545 {
546  ASSERTL1(n <= w.size() + w.GetOffset(), "Array out of bounds");
547  ASSERTL1(n <= x.size() + x.GetOffset(), "Array out of bounds");
548 
549  return Dot(n, &w[0], &x[0]);
550 }
T Dot(int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx)
Definition: VmathArray.hpp:554

References ASSERTL1, and Dot().

◆ Dot() [2/8]

template<class T >
T Vmath::Dot ( int  n,
const Array< OneD, const T > &  w,
const int  incw,
const Array< OneD, const T > &  x,
const int  incx 
)

Definition at line 554 of file VmathArray.hpp.

556 {
557  ASSERTL1(n * incw <= w.size() + w.GetOffset(), "Array out of bounds");
558  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
559 
560  return Dot(n, &w[0], incw, &x[0], incx);
561 }

References ASSERTL1, and Dot().

◆ Dot() [3/8]

template Nektar::NekDouble Vmath::Dot ( int  n,
const Nektar::NekDouble w,
const int  incw,
const Nektar::NekDouble x,
const int  incx 
)

◆ Dot() [4/8]

template Nektar::NekDouble Vmath::Dot ( int  n,
const Nektar::NekDouble w,
const Nektar::NekDouble x 
)

◆ Dot() [5/8]

template Nektar::NekSingle Vmath::Dot ( int  n,
const Nektar::NekSingle w,
const int  incw,
const Nektar::NekSingle x,
const int  incx 
)

◆ Dot() [6/8]

template Nektar::NekSingle Vmath::Dot ( int  n,
const Nektar::NekSingle w,
const Nektar::NekSingle x 
)

◆ Dot() [7/8]

template<class T >
T Vmath::Dot ( int  n,
const T *  w,
const int  incw,
const T *  x,
const int  incx 
)

dot (vector times vector): z = w*x

vvtvp (vector times vector times vector): z = w*x*y

Definition at line 1122 of file Vmath.cpp.

1123 {
1124  T sum = 0;
1125 
1126  while (n--)
1127  {
1128  sum += (*w) * (*x);
1129  w += incw;
1130  x += incx;
1131  }
1132  return sum;
1133 }

◆ Dot() [8/8]

template<class T >
T Vmath::Dot ( int  n,
const T *  w,
const T *  x 
)

◆ Dot2() [1/7]

template<class T >
T Vmath::Dot2 ( int  n,
const Array< OneD, const T > &  w,
const Array< OneD, const T > &  x,
const Array< OneD, const int > &  y 
)

Definition at line 565 of file VmathArray.hpp.

567 {
568  ASSERTL1(n <= w.size() + w.GetOffset(), "Array out of bounds");
569  ASSERTL1(n <= x.size() + x.GetOffset(), "Array out of bounds");
570  ASSERTL1(n <= y.size() + y.GetOffset(), "Array out of bounds");
571 
572  return Dot2(n, &w[0], &x[0], &y[0]);
573 }

References ASSERTL1, and Dot2().

◆ Dot2() [2/7]

template Nektar::NekDouble Vmath::Dot2 ( int  n,
const Nektar::NekDouble w,
const int  incw,
const Nektar::NekDouble x,
const int  incx,
const int *  y,
const int  incy 
)

◆ Dot2() [3/7]

template Nektar::NekDouble Vmath::Dot2 ( int  n,
const Nektar::NekDouble w,
const Nektar::NekDouble x,
const int *  y 
)

◆ Dot2() [4/7]

template Nektar::NekSingle Vmath::Dot2 ( int  n,
const Nektar::NekSingle w,
const int  incw,
const Nektar::NekSingle x,
const int  incx,
const int *  y,
const int  incy 
)

◆ Dot2() [5/7]

template Nektar::NekSingle Vmath::Dot2 ( int  n,
const Nektar::NekSingle w,
const Nektar::NekSingle x,
const int *  y 
)

◆ Dot2() [6/7]

template<class T >
T Vmath::Dot2 ( int  n,
const T *  w,
const int  incw,
const T *  x,
const int  incx,
const int *  y,
const int  incy 
)

dot2 (vector times vector times vector): z = w*x*y

vvtvp (vector times vector times vector): z = w*x*y

Definition at line 1172 of file Vmath.cpp.

1174 {
1175  T sum = 0;
1176 
1177  while (n--)
1178  {
1179  sum += (*y == 1 ? (*w) * (*x) : 0.0);
1180  w += incw;
1181  x += incx;
1182  y += incy;
1183  }
1184  return sum;
1185 }

◆ Dot2() [7/7]

template<class T >
T Vmath::Dot2 ( int  n,
const T *  w,
const T *  x,
const int *  y 
)

dot2 (vector times vector times vector): z = w*x*y

vvtvp (vector times vector times vector): z = w*x*y

Definition at line 1147 of file Vmath.cpp.

1148 {
1149  T sum = 0;
1150 
1151  while (n--)
1152  {
1153  sum += (*y == 1 ? (*w) * (*x) : 0);
1154  ++w;
1155  ++x;
1156  ++y;
1157  }
1158  return sum;
1159 }

Referenced by Ddot(), Nektar::LibUtilities::NekLinSysIterGMRES::DoArnoldi(), Nektar::LibUtilities::NekLinSysIterCG::DoConjugateGradient(), Nektar::LibUtilities::NekLinSysIterGMRES::DoGMRES(), Nektar::LibUtilities::NekLinSysIterGMRES::DoGmresRestart(), Nektar::MultiRegions::GlobalLinSysIterative::DoProjection(), Dot2(), Nektar::LibUtilities::NekLinSysIter::Set_Rhs_Magnitude(), Nektar::MultiRegions::GlobalLinSysIterative::Set_Rhs_Magnitude(), and Nektar::MultiRegions::GlobalLinSysIterative::UpdateKnownSolutions().

◆ Fill() [1/4]

template void Vmath::Fill ( int  n,
const Nektar::NekDouble  alpha,
Nektar::NekDouble x,
const int  incx 
)

◆ Fill() [2/4]

template void Vmath::Fill ( int  n,
const Nektar::NekSingle  alpha,
Nektar::NekSingle x,
const int  incx 
)

◆ Fill() [3/4]

template<class T >
void Vmath::Fill ( int  n,
const T  alpha,
Array< OneD, T > &  x,
const int  incx 
)

Fill a vector with a constant value.

Definition at line 49 of file VmathArray.hpp.

50 {
51 
52  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Out of bounds");
53 
54  Fill(n, alpha, &x[0], incx);
55 }
void Fill(int n, const T alpha, Array< OneD, T > &x, const int incx)
Fill a vector with a constant value.
Definition: VmathArray.hpp:49

References ASSERTL1, and Fill().

◆ Fill() [4/4]

template<class T >
void Vmath::Fill ( int  n,
const T  alpha,
T *  x,
const int  incx 
)

Fill a vector with a constant value.

Definition at line 45 of file Vmath.cpp.

46 {
47  while (n--)
48  {
49  *x = alpha;
50  x += incx;
51  }
52 }

Referenced by Nektar::CFSImplicit::AddMatNSBlkDiagVol(), Nektar::SpatialDomains::GeomFactors::Adjoint(), Nektar::SolverUtils::RiemannSolver::CalcFluxJacobian(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), Nektar::MultiRegions::LocTraceToTraceMap::CalcLocTracePhysToTraceIDMap_2D(), Nektar::MultiRegions::LocTraceToTraceMap::CalcLocTracePhysToTraceIDMap_3D(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::SpatialDomains::GeomFactors::ComputeMovingFrames(), Nektar::SpatialDomains::GeomFactors::ComputePrincipleDirection(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Nektar::MMFSWE::EvaluateWaterDepth(), Fill(), Nektar::CFSImplicit::Fill1DArrayOfBlkDiagonalMat(), Nektar::SolverUtils::Diffusion::GetDivCurl(), Nektar::NavierStokesCFE::GetDivCurlFromDvelT(), Nektar::Collections::CoalescedGeomData::GetJacWithStdWeights(), Nektar::SolverUtils::DiffusionIP::GetPenaltyFactorConst(), Nektar::FieldUtils::ProcessQualityMetric::GetQ(), Nektar::VariableConverter::GetSensor(), Nektar::FieldUtils::ProcessWSS::GetViscosity(), main(), Nektar::SolverUtils::DriverArnoldi::MaskInit(), Nektar::PreconCfsBRJ::MinusOffDiag2Rhs(), Nektar::CFSImplicit::MultiplyElmtInvMassPlusSource(), Nektar::NekMatrix< DataType, StandardMatrixTag >::operator=(), Nektar::FieldUtils::OutputVtk::OutputFromExpLowOrder(), Nektar::NavierStokesCFE::SpecialBndTreat(), Nektar::SubSteppingExtrapolate::SubStepExtrapolateField(), Nektar::VelocityCorrectionScheme::SVVVarDiffCoeff(), Nektar::SolverUtils::AdvectionWeakDG::v_AdvectCoeffs(), Nektar::LocalRegions::HexExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::PyrExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::QuadExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::NodalTriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::QuadExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::HexExp::v_ComputeTraceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeTraceNormal(), Nektar::LocalRegions::PyrExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TetExp::v_ComputeTraceNormal(), Nektar::LocalRegions::SegExp::v_ComputeTraceNormal(), Nektar::LinearElasticSystem::v_DoSolve(), Nektar::MultiRegions::DisContField::v_EvaluateBoundaryConditions(), Nektar::MultiRegions::DisContField::v_FillBwdWithBwdWeight(), Nektar::StdRegions::StdTriExp::v_FillMode(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::StdRegions::StdQuadExp::v_GetCoords(), Nektar::StdRegions::StdTriExp::v_GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::v_GetCoords(), Nektar::IncNavierStokes::v_GetDensity(), Nektar::NavierStokesImplicitCFE::v_GetFluxDerivJacDirctn(), Nektar::GlobalMapping::MappingTranslation::v_GetJacobian(), Nektar::GlobalMapping::MappingXofZ::v_GetJacobian(), Nektar::GlobalMapping::MappingXYofZ::v_GetJacobian(), Nektar::MMFDiffusion::v_InitObject(), Nektar::DiffusionLDGNS::v_InitObject(), Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::FieldUtils::ProcessAddCompositeID::v_Process(), Nektar::FieldUtils::ProcessCFL::v_Process(), Nektar::FieldUtils::ProcessJacobianEnergy::v_Process(), Nektar::FieldUtils::ProcessNumModes::v_Process(), Nektar::CellModelAlievPanfilov::v_SetInitialConditions(), Nektar::CourtemancheRamirezNattel98::v_SetInitialConditions(), Nektar::FentonKarma::v_SetInitialConditions(), Nektar::CellModelFitzHughNagumo::v_SetInitialConditions(), Nektar::Fox02::v_SetInitialConditions(), Nektar::LuoRudy91::v_SetInitialConditions(), Nektar::TenTusscher06::v_SetInitialConditions(), Nektar::Winslow99::v_SetInitialConditions(), Nektar::LocalRegions::HexExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PrismExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PyrExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::QuadExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TetExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TriExp::v_SVVLaplacianFilter(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_WriteVtkPieceHeader(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_WriteVtkPieceHeader(), and Nektar::AcousticSystem::WhiteNoiseBC().

◆ FillWhiteNoise() [1/4]

template void Vmath::FillWhiteNoise ( int  n,
const Nektar::NekDouble  eps,
Nektar::NekDouble x,
const int  incx,
int  outseed 
)

◆ FillWhiteNoise() [2/4]

template void Vmath::FillWhiteNoise ( int  n,
const Nektar::NekSingle  eps,
Nektar::NekSingle x,
const int  incx,
int  outseed 
)

◆ FillWhiteNoise() [3/4]

template<class T >
void Vmath::FillWhiteNoise ( int  n,
const T  eps,
Array< OneD, T > &  x,
const int  incx,
int  outseed = 9999 
)

Definition at line 58 of file VmathArray.hpp.

60 {
61  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Out of bounds");
62 
63  FillWhiteNoise(n, eps, &x[0], incx, outseed);
64 }
void FillWhiteNoise(int n, const T eps, Array< OneD, T > &x, const int incx, int outseed=9999)
Definition: VmathArray.hpp:58

References ASSERTL1, and FillWhiteNoise().

◆ FillWhiteNoise() [4/4]

template<class T >
void Vmath::FillWhiteNoise ( int  n,
const T  eps,
T *  x,
const int  incx,
int  outseed 
)

Fills a vector with white noise.

Definition at line 155 of file Vmath.cpp.

156 {
157 #ifdef NEKTAR_USE_THREAD_SAFETY
158  // Protect the static vars here and in ran2
159  boost::mutex::scoped_lock l(mutex);
160 #endif
161 
162  // Define static variables for generating random numbers
163  static int iset = 0;
164  static T gset;
165  static long seed = 0;
166 
167  // Bypass seed if outseed was specified
168  if (outseed != 9999)
169  {
170  seed = long(outseed);
171  }
172 
173  while (n--)
174  {
175  T fac, rsq, v1, v2;
176 
177  if (iset == 0)
178  {
179  do
180  {
181  v1 = 2.0 * ran2<T>(&seed) - 1.0;
182  v2 = 2.0 * ran2<T>(&seed) - 1.0;
183  rsq = v1 * v1 + v2 * v2;
184  } while (rsq >= 1.0 || rsq == 0.0);
185  fac = sqrt(-2.0 * log(rsq) / rsq);
186  gset = v1 * fac;
187  iset = 1;
188  *x = eps * v2 * fac;
189  }
190  else
191  {
192  iset = 0;
193  *x = eps * gset;
194  }
195  x += incx;
196  }
197 }
scalarT< T > log(scalarT< T > in)
Definition: scalar.hpp:303
scalarT< T > sqrt(scalarT< T > in)
Definition: scalar.hpp:294

References tinysimd::log(), and tinysimd::sqrt().

Referenced by FillWhiteNoise(), Nektar::SolverUtils::ForcingNoise::v_Apply(), Nektar::SolverUtils::DriverModifiedArnoldi::v_Execute(), Nektar::SolverUtils::ForcingNoise::v_InitObject(), and Nektar::CompressibleFlowSystem::v_SetInitialConditions().

◆ Gathr() [1/5]

template<class T , class I , typename = typename std::enable_if<std::is_floating_point<T>::value && std::is_integral<I>::value>::type>
void Vmath::Gathr ( n,
const Array< OneD, const T > &  x,
const Array< OneD, I > &  y,
Array< OneD, T > &  z 
)

Gather vector z[i] = x[y[i]].

Definition at line 434 of file VmathArray.hpp.

436 {
437  ASSERTL1(n <= y.size() + y.GetOffset(), "Array out of bounds");
438  ASSERTL1(n <= z.size() + z.GetOffset(), "Array out of bounds");
439 
440 #ifdef NEKTAR_ENABLE_SIMD_VMATH
441  SIMD::Gathr(n, &x[0], &y[0], &z[0]);
442 #else
443  Gathr(n, &x[0], &y[0], &z[0]);
444 #endif
445 }
void Gathr(I n, const Array< OneD, const T > &x, const Array< OneD, I > &y, Array< OneD, T > &z)
Gather vector z[i] = x[y[i]].
Definition: VmathArray.hpp:434

References ASSERTL1, Vmath::SIMD::Gathr(), and Gathr().

◆ Gathr() [2/5]

template<class T , class I , typename = typename std::enable_if<std::is_floating_point<T>::value && std::is_integral<I>::value>::type>
void Vmath::Gathr ( n,
const T *  x,
const I *  y,
T *  z 
)

Gather vector z[i] = x[y[i]].

Definition at line 217 of file Vmath.hpp.

218 {
219  while (n--)
220  {
221  *z++ = *(x + *y++);
222  }
223  return;
224 }

◆ Gathr() [3/5]

template void Vmath::Gathr ( int  n,
const Nektar::NekDouble sign,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)

◆ Gathr() [4/5]

template void Vmath::Gathr ( int  n,
const Nektar::NekSingle sign,
const Nektar::NekSingle x,
const int *  y,
Nektar::NekSingle z 
)

◆ Gathr() [5/5]

template<class T >
void Vmath::Gathr ( int  n,
const T *  sign,
const T *  x,
const int *  y,
T *  z 
)

◆ Iamax() [1/4]

template<class T >
int Vmath::Iamax ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Return the index of the maximum absolute element in x.

Definition at line 499 of file VmathArray.hpp.

500 {
501  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
502 
503  return Iamax(n, &x[0], incx);
504 }
int Iamax(int n, const Array< OneD, const T > &x, const int incx)
Return the index of the maximum absolute element in x.
Definition: VmathArray.hpp:499

References ASSERTL1, and Iamax().

◆ Iamax() [2/4]

template int Vmath::Iamax ( int  n,
const Nektar::NekDouble x,
const int  incx 
)

◆ Iamax() [3/4]

template int Vmath::Iamax ( int  n,
const Nektar::NekSingle x,
const int  incx 
)

◆ Iamax() [4/4]

template<class T >
int Vmath::Iamax ( int  n,
const T *  x,
const int  incx 
)

Return the index of the maximum absolute element in x.

Definition at line 971 of file Vmath.cpp.

972 {
973 
974  int i, indx = (n > 0) ? 0 : -1;
975  T xmax = *x;
976  T xm;
977 
978  for (i = 0; i < n; i++)
979  {
980  xm = (*x > 0) ? *x : -*x;
981  if (xm > xmax)
982  {
983  xmax = xm;
984  indx = i;
985  }
986  x += incx;
987  }
988 
989  return indx;
990 }

Referenced by Iamax().

◆ Imax() [1/5]

template<class T >
int Vmath::Imax ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Return the index of the maximum element in x.

Definition at line 481 of file VmathArray.hpp.

482 {
483  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
484 
485  return Imax(n, &x[0], incx);
486 }
int Imax(int n, const Array< OneD, const T > &x, const int incx)
Return the index of the maximum element in x.
Definition: VmathArray.hpp:481

References ASSERTL1, and Imax().

◆ Imax() [2/5]

template int Vmath::Imax ( int  n,
const int *  x,
const int  incx 
)

◆ Imax() [3/5]

template int Vmath::Imax ( int  n,
const Nektar::NekDouble x,
const int  incx 
)

◆ Imax() [4/5]

template int Vmath::Imax ( int  n,
const Nektar::NekSingle x,
const int  incx 
)

◆ Imax() [5/5]

template<class T >
int Vmath::Imax ( int  n,
const T *  x,
const int  incx 
)

Return the index of the maximum element in x.

Definition at line 918 of file Vmath.cpp.

919 {
920 
921  int i, indx = (n > 0) ? 0 : -1;
922  T xmax = *x;
923 
924  for (i = 0; i < n; i++)
925  {
926  if (*x > xmax)
927  {
928  xmax = *x;
929  indx = i;
930  }
931  x += incx;
932  }
933 
934  return indx;
935 }

Referenced by Nektar::MultiRegions::AssemblyMapCG::CreateGraph(), Nektar::SolverUtils::AdvectionSystem::GetCFLEstimate(), Imax(), main(), Nektar::SolverUtils::MMFSystem::SetUpMovingFrames(), and Nektar::FieldUtils::ProcessInterpPointDataToFld::v_Process().

◆ Imin() [1/5]

template<class T >
int Vmath::Imin ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Return the index of the minimum element in x.

Definition at line 517 of file VmathArray.hpp.

518 {
519  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
520 
521  return Imin(n, &x[0], incx);
522 }
int Imin(int n, const Array< OneD, const T > &x, const int incx)
Return the index of the minimum element in x.
Definition: VmathArray.hpp:517

References ASSERTL1, and Imin().

◆ Imin() [2/5]

template int Vmath::Imin ( int  n,
const int *  x,
const int  incx 
)

◆ Imin() [3/5]

template int Vmath::Imin ( int  n,
const Nektar::NekDouble x,
const int  incx 
)

◆ Imin() [4/5]

template int Vmath::Imin ( int  n,
const Nektar::NekSingle x,
const int  incx 
)

◆ Imin() [5/5]

template<class T >
int Vmath::Imin ( int  n,
const T *  x,
const int  incx 
)

Return the index of the minimum element in x.

Definition at line 1023 of file Vmath.cpp.

1024 {
1025 
1026  int i, indx = (n > 0) ? 0 : -1;
1027  T xmin = *x;
1028 
1029  for (i = 0; i < n; i++)
1030  {
1031  if (*x < xmin)
1032  {
1033  xmin = *x;
1034  indx = i;
1035  }
1036  x += incx;
1037  }
1038 
1039  return indx;
1040 }

Referenced by DetermineclosePointxindex(), Nektar::PulseWaveSystem::GetCommArray(), Imin(), MappingEVids(), MoveOutsidePointsNnormpos(), Orderfunctionx(), Nektar::Collections::CollectionOptimisation::SetWithTimings(), Nektar::VortexWaveInteraction::UpdateAlpha(), Nektar::VortexWaveInteraction::UpdateWaveForceMag(), Nektar::SpatialDomains::Geometry2D::v_GetLocCoords(), Nektar::SpatialDomains::Geometry3D::v_GetLocCoords(), and Nektar::FieldUtils::ProcessInterpPointDataToFld::v_Process().

◆ Neg() [1/4]

template<class T >
void Vmath::Neg ( int  n,
Array< OneD, T > &  x,
const int  incx 
)

Negate x = -x.

Definition at line 212 of file VmathArray.hpp.

213 {
214  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
215 
216  Neg(n, &x[0], incx);
217 }
void Neg(int n, Array< OneD, T > &x, const int incx)
Negate x = -x.
Definition: VmathArray.hpp:212

References ASSERTL1, and Neg().

◆ Neg() [2/4]

template void Vmath::Neg ( int  n,
Nektar::NekDouble x,
const int  incx 
)

◆ Neg() [3/4]

template void Vmath::Neg ( int  n,
Nektar::NekSingle x,
const int  incx 
)

◆ Neg() [4/4]

template<class T >
void Vmath::Neg ( int  n,
T *  x,
const int  incx 
)

Negate x = -x.

Definition at line 518 of file Vmath.cpp.

519 {
520  while (n--)
521  {
522  *x = -(*x);
523  x += incx;
524  }
525 }

Referenced by Nektar::MMFMaxwell::AddCoriolis(), Nektar::MMFSWE::AddCoriolis(), Nektar::LinearSWE::AddCoriolis(), Nektar::NonlinearPeregrine::AddCoriolis(), Nektar::NonlinearSWE::AddCoriolis(), Nektar::SolverUtils::MMFSystem::AdddedtMaxwell(), Nektar::MMFSWE::AddDivForGradient(), Nektar::MMFMaxwell::AddGreenDerivCompensate(), Nektar::MMFMaxwell::AddPML(), Nektar::MMFSWE::AddRotation(), Nektar::MultiRegions::GJPStabilisation::Apply(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::MMFMaxwell::Checkpoint_EDFluxOutput(), Nektar::MMFSWE::Checkpoint_Output_Cartesian(), Nektar::SpatialDomains::GeomFactors::ComputeMovingFrames(), Nektar::MMFSWE::ComputeVorticity(), Nektar::SolverUtils::MMFSystem::CopyBoundaryTrace(), Nektar::SolverUtils::AdvectionFR::DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFR::DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFRNS::DivCFlux_2D_Gauss(), Nektar::AcousticSystem::DoOdeRhs(), Nektar::CFLtester::DoOdeRhs(), Nektar::MMFAdvection::DoOdeRhs(), Nektar::UnsteadyAdvection::DoOdeRhs(), Nektar::UnsteadyAdvectionDiffusion::DoOdeRhs(), Nektar::UnsteadyInviscidBurger::DoOdeRhs(), Nektar::UnsteadyViscousBurgers::DoOdeRhs(), Nektar::CompressibleFlowSystem::DoOdeRhs(), Nektar::MMFDiffusion::DoOdeRhs(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::PulseWavePropagation::DoOdeRhs(), Nektar::LinearSWE::DoOdeRhs(), Nektar::MMFSWE::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::NonlinearSWE::DoOdeRhs(), Nektar::CFSImplicit::DoOdeRhsCoeff(), Nektar::FieldUtils::ProcessBodyFittedVelocity::GenPntwiseBodyFittedCoordSys(), Nektar::SolverUtils::Diffusion::GetDivCurl(), Nektar::SolverUtils::MMFSystem::GramSchumitz(), Nektar::MultiRegions::ContField::LaplaceSolve(), main(), Nektar::VCSMapping::MappingAccelerationCorrection(), Nektar::VCSMapping::MappingAdvectionCorrection(), Neg(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::IncNavierStokes::SetZeroNormalVelocity(), Nektar::UnsteadyAdvectionDiffusion::SubStepAdvection(), Nektar::SubSteppingExtrapolate::SubStepAdvection(), Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::AdjointAdvection::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::SolverUtils::AdvectionWeakDG::v_AdvectCoeffs(), Nektar::WallViscousBC::v_Apply(), Nektar::MultiRegions::ExpList::v_CurlCurl(), Nektar::LocalRegions::Expansion2D::v_DGDeriv(), Nektar::LocalRegions::Expansion3D::v_DGDeriv(), Nektar::SolverUtils::DiffusionLDG::v_DiffuseCalcDerivative(), Nektar::DiffusionLDGNS::v_DiffuseCalcDerivative(), Nektar::SolverUtils::DiffusionLDG::v_DiffuseCoeffs(), Nektar::DiffusionLDGNS::v_DiffuseCoeffs(), Nektar::SolverUtils::DiffusionIP::v_DiffuseCoeffs(), Nektar::EigenValuesAdvection::v_DoSolve(), Nektar::LocalRegions::Expansion1D::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::MultiRegions::ContField::v_HelmSolve(), Nektar::MultiRegions::DisContField::v_HelmSolve(), Nektar::MMFMaxwell::v_InitObject(), Nektar::ShallowWaterSystem::v_InitObject(), Nektar::ForcingQuasi1D::v_InitObject(), Nektar::MultiRegions::ContField::v_LinearAdvectionDiffusionReactionSolve(), Nektar::FieldUtils::ProcessWallNormalData::v_Process(), Nektar::FieldUtils::ProcessWSS::v_Process(), Nektar::VCSMapping::v_SolvePressure(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::MMFSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundaryForcing(), Nektar::MMFAdvection::WeakDGDirectionalAdvection(), Nektar::MMFMaxwell::WeakDGMaxwellDirDeriv(), and Nektar::MMFSWE::WeakDGSWEDirDeriv().

◆ Nnan() [1/5]

template<class T >
int Vmath::Nnan ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Return number of NaN elements of x.

Definition at line 535 of file VmathArray.hpp.

536 {
537  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
538 
539  return Nnan(n, &x[0], incx);
540 }
int Nnan(int n, const Array< OneD, const T > &x, const int incx)
Return number of NaN elements of x.
Definition: VmathArray.hpp:535

References ASSERTL1, and Nnan().

◆ Nnan() [2/5]

template int Vmath::Nnan ( int  n,
const int *  x,
const int  incx 
)

◆ Nnan() [3/5]

template int Vmath::Nnan ( int  n,
const Nektar::NekDouble x,
const int  incx 
)

◆ Nnan() [4/5]

template int Vmath::Nnan ( int  n,
const Nektar::NekSingle x,
const int  incx 
)

◆ Nnan() [5/5]

template<class T >
int Vmath::Nnan ( int  n,
const T *  x,
const int  incx 
)

Return number of NaN elements of x.

Definition at line 1076 of file Vmath.cpp.

1077 {
1078 
1079  int nNan = 0;
1080 
1081  while (n--)
1082  {
1083  if (*x != *x)
1084  {
1085  nNan++;
1086  }
1087  x += incx;
1088  }
1089 
1090  return nNan;
1091 }

Referenced by Nnan(), and Nektar::SolverUtils::UnsteadySystem::v_DoSolve().

◆ ran2()

template<class T >
T Vmath::ran2 ( long *  idum)

Generates a number from ~Normal(0,1)

Definition at line 75 of file Vmath.cpp.

83 {
84  int j;
85  long k;
86  static long idum2 = 123456789;
87  static long iy = 0;
88  static long iv[NTAB];
89  T temp;
90 
91  if (*idum <= 0)
92  {
93  if (-(*idum) < 1)
94  *idum = 1;
95  else
96  *idum = -(*idum);
97  idum2 = (*idum);
98  for (j = NTAB + 7; j >= 0; j--)
99  {
100  k = (*idum) / IQ1;
101  *idum = IA1 * (*idum - k * IQ1) - k * IR1;
102  if (*idum < 0)
103  *idum += IM1;
104  if (j < NTAB)
105  iv[j] = *idum;
106  }
107  iy = iv[0];
108  }
109 
110  k = (*idum) / IQ1;
111  *idum = IA1 * (*idum - k * IQ1) - k * IR1;
112  if (*idum < 0)
113  *idum += IM1;
114 
115  k = idum2 / IQ2;
116  idum2 = IA2 * (idum2 - k * IQ2) - k * IR2;
117  if (idum2 < 0)
118  idum2 += IM2;
119 
120  j = iy / NDIV;
121  iy = iv[j] - idum2;
122  iv[j] = *idum;
123  if (iy < 1)
124  iy += IMM1;
125 
126  if ((temp = AM * iy) > RNMX)
127  return RNMX;
128  else
129  return temp;
130 }
#define NTAB
Definition: Vmath.cpp:69
#define IA2
Definition: Vmath.cpp:64
#define IR2
Definition: Vmath.cpp:68
#define NDIV
Definition: Vmath.cpp:70
#define IA1
Definition: Vmath.cpp:63
#define IM1
Definition: Vmath.cpp:59
#define IR1
Definition: Vmath.cpp:67
#define IMM1
Definition: Vmath.cpp:62
#define IQ1
Definition: Vmath.cpp:65
#define RNMX
Definition: Vmath.cpp:72
#define IQ2
Definition: Vmath.cpp:66
#define AM
Definition: Vmath.cpp:61
#define IM2
Definition: Vmath.cpp:60

References AM, IA1, IA2, IM1, IM2, IMM1, IQ1, IQ2, IR1, IR2, NDIV, NTAB, and RNMX.

◆ Reverse() [1/4]

template<class T >
void Vmath::Reverse ( int  n,
const Array< OneD, const T > &  x,
int  incx,
Array< OneD, T > &  y,
int const  incy 
)

Definition at line 605 of file VmathArray.hpp.

607 {
608  ASSERTL1(static_cast<unsigned int>(std::abs(n * incx)) <=
609  x.size() + x.GetOffset(),
610  "Array out of bounds");
611  ASSERTL1(static_cast<unsigned int>(std::abs(n * incy)) <=
612  y.size() + y.GetOffset(),
613  "Array out of bounds");
614 
615  Reverse(n, &x[0], incx, &y[0], incy);
616 }
void Reverse(int n, const Array< OneD, const T > &x, int incx, Array< OneD, T > &y, int const incy)
Definition: VmathArray.hpp:605
scalarT< T > abs(scalarT< T > in)
Definition: scalar.hpp:298

References tinysimd::abs(), ASSERTL1, and Reverse().

◆ Reverse() [2/4]

template void Vmath::Reverse ( int  n,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)

◆ Reverse() [3/4]

template void Vmath::Reverse ( int  n,
const Nektar::NekSingle x,
const int  incx,
Nektar::NekSingle y,
const int  incy 
)

◆ Reverse() [4/4]

template<class T >
void Vmath::Reverse ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Definition at line 1286 of file Vmath.cpp.

1287 {
1288  int i;
1289  T store;
1290 
1291  // Perform element by element swaps in case x and y reference the same
1292  // array.
1293  int nloop = n / 2;
1294 
1295  // copy value in case of n is odd number
1296  y[nloop] = x[nloop];
1297 
1298  const T *x_end = x + (n - 1) * incx;
1299  T *y_end = y + (n - 1) * incy;
1300  for (i = 0; i < nloop; ++i)
1301  {
1302  store = *x_end;
1303  *y_end = *x;
1304  *y = store;
1305  x += incx;
1306  y += incy;
1307  x_end -= incx;
1308  y_end -= incy;
1309  }
1310 }

Referenced by Nektar::SolverUtils::DiffusionLFR::DerCFlux_2D(), Nektar::SolverUtils::DiffusionLFRNS::DerCFlux_2D(), Nektar::SolverUtils::AdvectionFR::DivCFlux_2D(), Nektar::SolverUtils::DiffusionLFR::DivCFlux_2D(), Nektar::SolverUtils::DiffusionLFRNS::DivCFlux_2D(), Nektar::SolverUtils::AdvectionFR::DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFR::DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFRNS::DivCFlux_2D_Gauss(), Reverse(), Nektar::LocalRegions::NodalTriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::QuadExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::QuadExp::v_GetTracePhysVals(), Nektar::LocalRegions::TriExp::v_GetTracePhysVals(), Nektar::LocalRegions::QuadExp::v_GetTraceQFactors(), and Nektar::FieldUtils::ProcessSurfDistance::v_Process().

◆ Sadd() [1/4]

template void Vmath::Sadd ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)

◆ Sadd() [2/4]

template void Vmath::Sadd ( int  n,
const Nektar::NekSingle  alpha,
const Nektar::NekSingle x,
const int  incx,
Nektar::NekSingle y,
const int  incy 
)

◆ Sadd() [3/4]

template<class T >
void Vmath::Sadd ( int  n,
const T  alpha,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

Add vector y = alpha + x.

Definition at line 168 of file VmathArray.hpp.

170 {
171 
172  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
173  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
174 
175  Sadd(n, alpha, &x[0], incx, &y[0], incy);
176 }
void Sadd(int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
Add vector y = alpha + x.
Definition: VmathArray.hpp:168

References ASSERTL1, and Sadd().

◆ Sadd() [4/4]

template<class T >
void Vmath::Sadd ( int  n,
const T  alpha,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Add scalar y = alpha + x.

Add vector y = alpha + x.

Definition at line 384 of file Vmath.cpp.

386 {
387  ++n;
388  if (incx == 1 && incy == 1)
389  {
390  while (--n)
391  {
392  *y = alpha + (*x);
393  ++x;
394  ++y;
395  }
396  }
397  else
398  {
399  while (--n)
400  {
401  *y = alpha + (*x);
402  x += incx;
403  y += incy;
404  }
405  }
406 }

Referenced by Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::SolverUtils::FilterAeroForces::CalculateForces(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::MMFSWE::Checkpoint_Output_Cartesian(), Nektar::MMFSWE::ComputeEnergy(), DetermineclosePointxindex(), Nektar::MMFDiffusion::DoOdeRhs(), Nektar::ForcingMovingBody::InitialiseCableModel(), Nektar::NonlinearPeregrine::LaitoneSolitaryWave(), main(), MoveOutsidePointsNnormpos(), Nektar::CFSImplicit::NumCalcRiemFluxJac(), Sadd(), Nektar::FieldUtils::ProcessEquiSpacedOutput::SetHomogeneousConnectivity(), Nektar::IncNavierStokes::SetMRFWallBCs(), Nektar::FilterMovingBody::UpdateForce(), Nektar::LEE::v_AddLinTerm(), Nektar::SolverUtils::DriverArpack::v_Execute(), Nektar::SolverUtils::MMFSystem::v_GenerateSummary(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::v_GetCoords(), Nektar::GlobalMapping::MappingTranslation::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::SpatialDomains::Geometry2D::v_GetLocCoords(), Nektar::SpatialDomains::Geometry3D::v_GetLocCoords(), Nektar::GlobalMapping::MappingTranslation::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetMetricTensor(), Nektar::FilterElectrogram::v_Initialise(), Nektar::BidomainRoth::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::MMFMaxwell::v_InitObject(), Nektar::SolverUtils::ForcingMovingReferenceFrame::v_InitObject(), Nektar::GlobalMapping::MappingXofXZ::v_LowerIndex(), Nektar::GlobalMapping::MappingXofZ::v_LowerIndex(), Nektar::FieldUtils::OutputTecplot::v_OutputFromExp(), Nektar::StdRegions::StdTriExp::v_PhysDeriv(), Nektar::StdRegions::StdTetExp::v_PhysDeriv(), Nektar::SolverUtils::ForcingMovingReferenceFrame::v_PreApply(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofZ::v_RaiseIndex(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), and Nektar::CellModelFitzHughNagumo::v_Update().

◆ Scatr() [1/7]

template<class T >
void Vmath::Scatr ( int  n,
const Array< OneD, const T > &  x,
const Array< OneD, const int > &  y,
Array< OneD, T > &  z 
)

Scatter vector z[y[i]] = x[i].

Definition at line 449 of file VmathArray.hpp.

451 {
452  ASSERTL1(n <= x.size() + x.GetOffset(), "Array out of bounds");
453  ASSERTL1(n <= y.size() + y.GetOffset(), "Array out of bounds");
454 
455  Scatr(n, &x[0], &y[0], &z[0]);
456 }
void Scatr(int n, const Array< OneD, const T > &x, const Array< OneD, const int > &y, Array< OneD, T > &z)
Scatter vector z[y[i]] = x[i].
Definition: VmathArray.hpp:449

References ASSERTL1, and Scatr().

◆ Scatr() [2/7]

template void Vmath::Scatr ( int  n,
const Nektar::NekDouble sign,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)

◆ Scatr() [3/7]

template void Vmath::Scatr ( int  n,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)

◆ Scatr() [4/7]

template void Vmath::Scatr ( int  n,
const Nektar::NekSingle sign,
const Nektar::NekSingle x,
const int *  y,
Nektar::NekSingle z 
)

◆ Scatr() [5/7]

template void Vmath::Scatr ( int  n,
const Nektar::NekSingle x,
const int *  y,
Nektar::NekSingle z 
)

◆ Scatr() [6/7]

template<class T >
void Vmath::Scatr ( int  n,
const T *  sign,
const T *  x,
const int *  y,
T *  z 
)

Scatter vector z[y[i]] = sign[i]*x[i].

Definition at line 837 of file Vmath.cpp.

838 {
839  while (n--)
840  {
841  if (*sign)
842  {
843  *(z + *(y++)) = *(sign++) * (*(x++));
844  }
845  else
846  {
847  x++;
848  y++;
849  sign++;
850  }
851  }
852 }

References sign.

◆ Scatr() [7/7]

template<class T >
void Vmath::Scatr ( int  n,
const T *  x,
const int *  y,
T *  z 
)

◆ Sdiv() [1/4]

template void Vmath::Sdiv ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)

◆ Sdiv() [2/4]

template void Vmath::Sdiv ( int  n,
const Nektar::NekSingle  alpha,
const Nektar::NekSingle x,
const int  incx,
Nektar::NekSingle y,
const int  incy 
)

◆ Sdiv() [3/4]

template<class T >
void Vmath::Sdiv ( int  n,
const T  alpha,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

Scalar multiply y = alpha/y.

Definition at line 131 of file VmathArray.hpp.

133 {
134  ASSERTL1(static_cast<unsigned int>(n * incx) <= x.size() + x.GetOffset(),
135  "Array out of bounds");
136  ASSERTL1(static_cast<unsigned int>(n * incy) <= y.size() + y.GetOffset(),
137  "Array out of bounds");
138 
139  Sdiv(n, alpha, &x[0], incx, &y[0], incy);
140 }
void Sdiv(int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
Scalar multiply y = alpha/y.
Definition: VmathArray.hpp:131

References ASSERTL1, and Sdiv().

◆ Sdiv() [4/4]

template<class T >
void Vmath::Sdiv ( int  n,
const T  alpha,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

◆ Smul() [1/4]

template void Vmath::Smul ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)

◆ Smul() [2/4]

template void Vmath::Smul ( int  n,
const Nektar::NekSingle  alpha,
const Nektar::NekSingle x,
const int  incx,
Nektar::NekSingle y,
const int  incy 
)

◆ Smul() [3/4]

template<class T >
void Vmath::Smul ( int  n,
const T  alpha,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

Scalar multiply y = alpha*y.

Definition at line 102 of file VmathArray.hpp.

104 {
105  ASSERTL1(static_cast<unsigned int>(n * incx) <= x.size() + x.GetOffset(),
106  "Array out of bounds");
107  ASSERTL1(static_cast<unsigned int>(n * incy) <= y.size() + y.GetOffset(),
108  "Array out of bounds");
109 
110  Smul(n, alpha, &x[0], incx, &y[0], incy);
111 }
void Smul(int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
Scalar multiply y = alpha*y.
Definition: VmathArray.hpp:102

References ASSERTL1, and Smul().

◆ Smul() [4/4]

template<class T >
void Vmath::Smul ( int  n,
const T  alpha,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Scalar multiply y = alpha*x.

Scalar multiply y = alpha*y.

Definition at line 248 of file Vmath.cpp.

250 {
251  ++n;
252  if (incx == 1 && incy == 1)
253  {
254  while (--n)
255  {
256  *y = alpha * (*x);
257  ++x;
258  ++y;
259  }
260  }
261  else
262  {
263  while (--n)
264  {
265  *y = alpha * (*x);
266  x += incx;
267  y += incy;
268  }
269  }
270 }

Referenced by Nektar::MMFSWE::AddElevationEffect(), Nektar::Extrapolate::AddPressureToOutflowBCs(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::SpatialDomains::GeomFactors::Adjoint(), Nektar::DiffusionLDGNS::ApplyBCsO1(), Nektar::VCSMapping::ApplyIncNSMappingForcing(), Nektar::LinearElasticSystem::BuildLaplacianIJMatrix(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::SolverUtils::DiffusionIP::CalcTraceSymFlux(), Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::SolverUtils::FilterAeroForces::CalculateForces(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::LibUtilities::GaussPoints::CalculateGalerkinProjectionMatrix(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::MMFMaxwell::Checkpoint_EnergyOutput(), Nektar::MMFSWE::Checkpoint_Output_Cartesian(), Nektar::MMFSWE::ComputeEnergy(), Nektar::MMFSWE::ComputeEnstrophy(), Computestreakpositions(), Nektar::CoupledLinearNS::Continuation(), Nektar::SolverUtils::DiffusionLFR::DerCFlux_1D(), Nektar::SolverUtils::DiffusionLFRNS::DerCFlux_1D(), Nektar::SolverUtils::DiffusionLFR::DerCFlux_2D(), Nektar::SolverUtils::DiffusionLFRNS::DerCFlux_2D(), Nektar::SolverUtils::AdvectionFR::DivCFlux_1D(), Nektar::LibUtilities::NekLinSysIterGMRES::DoArnoldi(), Nektar::LibUtilities::NekLinSysIterGMRES::DoGmresRestart(), Diffusion::DoImplicitSolve(), Nektar::UnsteadyAdvectionDiffusion::DoImplicitSolve(), Nektar::UnsteadyDiffusion::DoImplicitSolve(), Nektar::UnsteadyReactionDiffusion::DoImplicitSolve(), Nektar::UnsteadyViscousBurgers::DoImplicitSolve(), Nektar::Bidomain::DoImplicitSolve(), Nektar::BidomainRoth::DoImplicitSolve(), Nektar::Monodomain::DoImplicitSolve(), Nektar::MMFDiffusion::DoImplicitSolve(), Nektar::Bidomain::DoOdeRhs(), Nektar::BidomainRoth::DoOdeRhs(), Nektar::CompressibleFlowSystem::DoOdeRhs(), Nektar::MMFDiffusion::DoOdeRhs(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::CFSImplicit::DoOdeRhsCoeff(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_small(), Nektar::Extrapolate::EvaluateBDFArray(), Nektar::CoupledLinearNS::EvaluateNewtonRHS(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Nektar::VortexWaveInteraction::ExecuteRoll(), Nektar::Extrapolate::ExtrapolateArray(), Nektar::VortexWaveInteraction::FileRelaxation(), Nektar::FieldUtils::ProcessPhiFromFile::FindShortestDist(), Nektar::FieldUtils::ProcessBodyFittedVelocity::GenPntwiseBodyFittedCoordSys(), Nektar::MultiRegions::ExpList::GetDiagMatIpwrtBase(), Nektar::VariableConverter::GetDynamicEnergy(), Nektar::UnsteadyDiffusion::GetFluxVector(), Nektar::UnsteadyInviscidBurger::GetFluxVector(), Nektar::LinearSWE::GetFluxVector(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::UnsteadyAdvectionDiffusion::GetFluxVectorDiff(), Nektar::UnsteadyViscousBurgers::GetFluxVectorDiff(), Nektar::SolverUtils::MMFSystem::GetMaxwellFlux2D(), Nektar::VariableConverter::GetMuAv(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::FieldUtils::ProcessWSS::GetViscosity(), Nektar::NavierStokesCFE::GetViscosityAndThermalCondFromTemp(), Nektar::MultiRegions::GJPStabilisation::GJPStabilisation(), Nektar::ForcingMovingBody::InitialiseCableModel(), Nektar::LocalRegions::NodalTriExp::Integral(), Nektar::FieldUtils::ProcessWallNormalData::isInProjectedArea2D(), Nektar::FieldUtils::ProcessWallNormalData::isInProjectedArea3D(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree(), main(), Nektar::CFSImplicit::MatrixMultiplyMatrixFreeCoeff(), Nektar::CFSImplicit::MultiplyElmtInvMassPlusSource(), Nektar::CFSImplicit::NumCalcRiemFluxJac(), Nektar::SolverUtils::DiffusionLDG::NumFluxforVector(), Nektar::Collections::IProductWRTDerivBase_StdMat::operator()(), Nektar::Collections::IProductWRTDerivBase_IterPerExp::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Seg::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Quad::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tri::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Hex::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tet::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Prism::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Pyr::operator()(), Nektar::Collections::Helmholtz_IterPerExp::operator()(), Nektar::Collections::IProductWRTBase_StdMat::operator()(), Nektar::Collections::PhysDeriv_IterPerExp::operator()(), Nektar::Collections::PhysDeriv_SumFac_Seg::operator()(), Nektar::Collections::PhysDeriv_SumFac_Quad::operator()(), Nektar::Collections::PhysDeriv_SumFac_Tri::operator()(), Nektar::Collections::PhysDeriv_SumFac_Hex::operator()(), Nektar::Collections::PhysDeriv_SumFac_Tet::operator()(), Nektar::Collections::PhysDeriv_SumFac_Prism::operator()(), Nektar::Collections::PhysDeriv_SumFac_Pyr::operator()(), Nektar::SolverUtils::FilterFieldConvert::OutputField(), Nektar::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::PrepareLocalSchurComplement(), Nektar::PressureMachTemperatureBC::PressureMachTemperatureBC(), Nektar::FieldUtils::ProcessWallNormalData::ProjectPoint(), Nektar::FieldUtils::ProcessWallNormalData::ProjectVertices(), Nektar::SolverUtils::CouplingCwipi::ReceiveCwipi(), Nektar::LibUtilities::NekFFTW::Reshuffle_Nek2FFTW(), Nektar::IncNavierStokes::SetMRFWallBCs(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::IncNavierStokes::SetWomersleyBoundary(), Smul(), Nektar::CoupledLinearNS::SolveUnsteadyStokesSystem(), Nektar::SubSteppingExtrapolate::SubStepExtrapolateField(), Nektar::SolverUtils::UnsteadySystem::SVVVarDiffCoeff(), Nektar::MMFMaxwell::TestMaxwellSphere(), Nektar::LibUtilities::TimeIntegrationAlgorithmGLM::TimeIntegrate(), Nektar::FilterMovingBody::UpdateForce(), Nektar::SmoothedProfileMethod::UpdateForcing(), Nektar::MultiRegions::GlobalLinSysIterative::UpdateKnownSolutions(), Nektar::Extrapolate::v_AccelerationBDF(), Nektar::StandardExtrapolate::v_AccelerationBDF(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::LocalRegions::HexExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::NodalTriExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::PrismExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::PyrExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::QuadExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::TetExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::TriExp::v_AlignVectorToCollapsedDir(), Nektar::SymmetryBC::v_Apply(), Nektar::WallBC::v_Apply(), Nektar::ForcingAxiSymmetric::v_Apply(), Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_ComputeInitialGuess(), Nektar::LibUtilities::ImplicitTimeIntegrationSchemeSDC::v_ComputeInitialGuess(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::NodalTriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::QuadExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::SegExp::v_ComputeTraceNormal(), Nektar::MappingExtrapolate::v_CorrectPressureBCs(), Nektar::MultiRegions::ExpList::v_CurlCurl(), Nektar::SolverUtils::Diffusion3DHomogeneous1D::v_Diffuse(), Nektar::PreconCfsBRJ::v_DoPreconCfs(), Nektar::LinearElasticSystem::v_DoSolve(), Nektar::SolverUtils::DriverModifiedArnoldi::v_Execute(), Nektar::StdRegions::StdHexExp::v_GenMatrix(), Nektar::StdRegions::StdPrismExp::v_GenMatrix(), Nektar::StdRegions::StdQuadExp::v_GenMatrix(), Nektar::StdRegions::StdTetExp::v_GenMatrix(), Nektar::StdRegions::StdTriExp::v_GenMatrix(), Nektar::NonSmoothShockCapture::v_GetArtificialViscosity(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::v_GetCoords(), Nektar::AcousticSystem::v_GetMaxStdVelocity(), Nektar::CompressibleFlowSystem::v_GetMaxStdVelocity(), Nektar::NavierStokesCFE::v_GetViscousFluxVector(), Nektar::NavierStokesCFEAxisym::v_GetViscousFluxVector(), Nektar::NavierStokesCFE::v_GetViscousFluxVectorDeAlias(), Nektar::MultiRegions::ContField::v_HelmSolve(), Nektar::MultiRegions::DisContField::v_HelmSolve(), Nektar::SolverUtils::FilterFieldConvert::v_Initialise(), Nektar::BidomainRoth::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::IterativeElasticSystem::v_InitObject(), Nektar::MMFMaxwell::v_InitObject(), Nektar::SolverUtils::DiffusionIP::v_InitObject(), Nektar::LocalRegions::HexExp::v_Integral(), Nektar::LocalRegions::PrismExp::v_Integral(), Nektar::LocalRegions::PyrExp::v_Integral(), Nektar::LocalRegions::QuadExp::v_Integral(), Nektar::LocalRegions::SegExp::v_Integral(), Nektar::LocalRegions::TetExp::v_Integral(), Nektar::LocalRegions::TriExp::v_Integral(), Nektar::StdRegions::StdTriExp::v_Integral(), Nektar::LocalRegions::SegExp::v_IProductWRTBase(), Nektar::LocalRegions::SegExp::v_IProductWRTDerivBase(), Nektar::StdRegions::StdPrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdPyrExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTetExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTriExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::TriExp::v_IProductWRTDirectionalDerivBase_SumFac(), Nektar::SubSteppingExtrapolate::v_MountHOPBCs(), Nektar::WeakPressureExtrapolate::v_MountHOPBCs(), Nektar::StdRegions::StdHexExp::v_MultiplyByStdQuadratureMetric(), Nektar::LocalRegions::HexExp::v_PhysDeriv(), Nektar::LocalRegions::PrismExp::v_PhysDeriv(), Nektar::LocalRegions::PyrExp::v_PhysDeriv(), Nektar::LocalRegions::TetExp::v_PhysDeriv(), Nektar::MultiRegions::ExpListHomogeneous1D::v_PhysDeriv(), Nektar::MultiRegions::ExpListHomogeneous2D::v_PhysDeriv(), Nektar::StdRegions::StdPrismExp::v_PhysDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDeriv(), Nektar::LocalRegions::TriExp::v_PhysDeriv(), Nektar::StdRegions::StdTriExp::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv(), Nektar::StdRegions::StdTetExp::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv_s(), Nektar::FieldUtils::ProcessAddFld::v_Process(), Nektar::FieldUtils::ProcessBodyFittedVelocity::v_Process(), Nektar::FieldUtils::ProcessC0Projection::v_Process(), Nektar::FieldUtils::ProcessCombineAvg::v_Process(), Nektar::FieldUtils::ProcessInterpField::v_Process(), Nektar::FieldUtils::ProcessInterpPoints::v_Process(), Nektar::FieldUtils::ProcessMultiShear::v_Process(), Nektar::FieldUtils::ProcessQCriterion::v_Process(), Nektar::FieldUtils::ProcessScaleInFld::v_Process(), Nektar::FieldUtils::ProcessWallNormalData::v_Process(), Nektar::FieldUtils::ProcessWSS::v_Process(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_ResidualEval(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_SDCIterationLoop(), Nektar::LibUtilities::ImplicitTimeIntegrationSchemeSDC::v_SDCIterationLoop(), Nektar::VelocityCorrectionScheme::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VCSWeakPressure::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SolvePressure(), Nektar::VCSMapping::v_SolveViscous(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), Nektar::GlobalMapping::Mapping::v_VelocityLaplacian(), Nektar::AcousticSystem::WallBC(), Nektar::LinearSWE::WallBoundary(), Nektar::NonlinearPeregrine::WallBoundary(), Nektar::NonlinearSWE::WallBoundary(), and Nektar::SolverUtils::DiffusionLFRNS::WeakPenaltyO1().

◆ Ssub() [1/4]

template void Vmath::Ssub ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)

◆ Ssub() [2/4]

template void Vmath::Ssub ( int  n,
const Nektar::NekSingle  alpha,
const Nektar::NekSingle x,
const int  incx,
Nektar::NekSingle y,
const int  incy 
)

◆ Ssub() [3/4]

template<class T >
void Vmath::Ssub ( int  n,
const T  alpha,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

Add vector y = alpha - x.

Definition at line 193 of file VmathArray.hpp.

195 {
196 
197  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
198  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
199 
200  Ssub(n, alpha, &x[0], incx, &y[0], incy);
201 }
void Ssub(int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
Add vector y = alpha - x.
Definition: VmathArray.hpp:193

References ASSERTL1, and Ssub().

◆ Ssub() [4/4]

template<class T >
void Vmath::Ssub ( int  n,
const T  alpha,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Substract vector y = alpha - x.

Add vector y = alpha - x.

Definition at line 458 of file Vmath.cpp.

460 {
461  ++n;
462  if (incx == 1 && incy == 1)
463  {
464  while (--n)
465  {
466  *y = alpha - (*x);
467  ++x;
468  ++y;
469  }
470  }
471  else
472  {
473  while (--n)
474  {
475  *y = alpha - (*x);
476  x += incx;
477  y += incy;
478  }
479  }
480 }

Referenced by Ssub().

◆ Svtsvtp() [1/4]

template void Vmath::Svtsvtp ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
int  incx,
const Nektar::NekDouble  beta,
const Nektar::NekDouble y,
int  incy,
Nektar::NekDouble z,
int  incz 
)

◆ Svtsvtp() [2/4]

template void Vmath::Svtsvtp ( int  n,
const Nektar::NekSingle  alpha,
const Nektar::NekSingle x,
int  incx,
const Nektar::NekSingle  beta,
const Nektar::NekSingle y,
int  incy,
Nektar::NekSingle z,
int  incz 
)

◆ Svtsvtp() [3/4]

template<class T >
void Vmath::Svtsvtp ( int  n,
const T  alpha,
const Array< OneD, const T > &  x,
const int  incx,
const T  beta,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

svtsvtp (scalar times vector plus scalar times vector): z = alpha*x + beta*y

Definition at line 417 of file VmathArray.hpp.

420 {
421  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
422  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
423  ASSERTL1(n * incz <= z.size() + z.GetOffset(), "Array out of bounds");
424 
425  Svtsvtp(n, alpha, &x[0], incx, beta, &y[0], incy, &z[0], incz);
426 }
@ beta
Gauss Radau pinned at x=-1,.
Definition: PointsType.h:61
void Svtsvtp(int n, const T alpha, const Array< OneD, const T > &x, const int incx, const T beta, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
svtsvtp (scalar times vector plus scalar times vector): z = alpha*x + beta*y
Definition: VmathArray.hpp:417

References ASSERTL1, Nektar::LibUtilities::beta, and Svtsvtp().

◆ Svtsvtp() [4/4]

template<class T >
void Vmath::Svtsvtp ( int  n,
const T  alpha,
const T *  x,
int  incx,
const T  beta,
const T *  y,
int  incy,
T *  z,
int  incz 
)

◆ Svtvm() [1/4]

template void Vmath::Svtvm ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)

◆ Svtvm() [2/4]

template void Vmath::Svtvm ( int  n,
const Nektar::NekSingle  alpha,
const Nektar::NekSingle x,
const int  incx,
const Nektar::NekSingle y,
const int  incy,
Nektar::NekSingle z,
const int  incz 
)

◆ Svtvm() [3/4]

template<class T >
void Vmath::Svtvm ( int  n,
const T  alpha,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

svtvp (scalar times vector plus vector): z = alpha*x + y

Definition at line 326 of file VmathArray.hpp.

329 {
330  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
331  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
332  ASSERTL1(n * incz <= z.size() + z.GetOffset(), "Array out of bounds");
333 
334  Svtvm(n, alpha, &x[0], incx, &y[0], incy, &z[0], incz);
335 }
void Svtvm(int n, const T alpha, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
svtvp (scalar times vector plus vector): z = alpha*x + y
Definition: VmathArray.hpp:326

References ASSERTL1, and Svtvm().

◆ Svtvm() [4/4]

template<class T >
void Vmath::Svtvm ( int  n,
const T  alpha,
const T *  x,
const int  incx,
const T *  y,
const int  incy,
T *  z,
const int  incz 
)

svtvp (scalar times vector minus vector): z = alpha*x - y

Svtvm (scalar times vector minus vector): z = alpha*x - y.

Definition at line 664 of file Vmath.cpp.

666 {
667  while (n--)
668  {
669  *z = alpha * (*x) - (*y);
670  x += incx;
671  y += incy;
672  z += incz;
673  }
674 }

Referenced by Nektar::Extrapolate::CalcOutflowBCs(), Nektar::MMFDiffusion::DoOdeRhs(), Svtvm(), Nektar::FieldUtils::ProcessQCriterion::v_Process(), Nektar::SolverUtils::FilterReynoldsStresses::v_ProcessSample(), and Nektar::CourtemancheRamirezNattel98::v_Update().

◆ Svtvp() [1/4]

template void Vmath::Svtvp ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)

◆ Svtvp() [2/4]

template void Vmath::Svtvp ( int  n,
const Nektar::NekSingle  alpha,
const Nektar::NekSingle x,
const int  incx,
const Nektar::NekSingle y,
const int  incy,
Nektar::NekSingle z,
const int  incz 
)

◆ Svtvp() [3/4]

template<class T >
void Vmath::Svtvp ( int  n,
const T  alpha,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

svtvp (scalar times vector plus vector): z = alpha*x + y

Definition at line 313 of file VmathArray.hpp.

316 {
317  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
318  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
319  ASSERTL1(n * incz <= z.size() + z.GetOffset(), "Array out of bounds");
320 
321  Svtvp(n, alpha, &x[0], incx, &y[0], incy, &z[0], incz);
322 }
void Svtvp(int n, const T alpha, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
svtvp (scalar times vector plus vector): z = alpha*x + y
Definition: VmathArray.hpp:313

References ASSERTL1, and Svtvp().

◆ Svtvp() [4/4]

template<class T >
void Vmath::Svtvp ( int  n,
const T  alpha,
const T *  x,
const int  incx,
const T *  y,
const int  incy,
T *  z,
const int  incz 
)

svtvp (scalar times vector plus vector): z = alpha*x + y

Svtvp (scalar times vector plus vector): z = alpha*x + y.

Definition at line 622 of file Vmath.cpp.

625 {
626  ++n;
627  if (incx == 1 && incy == 1 && incz == 1)
628  {
629  while (--n)
630  {
631  *z = alpha * (*x) + (*y);
632  ++x;
633  ++y;
634  ++z;
635  }
636  }
637  else
638  {
639  while (--n)
640  {
641  *z = alpha * (*x) + (*y);
642  x += incx;
643  y += incy;
644  z += incz;
645  }
646  }
647 }

Referenced by Nektar::Extrapolate::AddDuDt(), Nektar::SolverUtils::ForcingMovingReferenceFrame::addRotation(), Nektar::Extrapolate::AddVelBC(), Nektar::MultiRegions::GJPStabilisation::Apply(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::LocalRegions::Expansion::ComputeGmatcdotMF(), Nektar::MMFMaxwell::ComputeRadCloak(), Nektar::SolverUtils::DriverSteadyState::ComputeSFD(), Nektar::LocalRegions::Expansion2D::CreateMatrix(), Nektar::LocalRegions::Expansion3D::CreateMatrix(), Nektar::LibUtilities::NekLinSysIterGMRES::DoArnoldi(), Nektar::LibUtilities::NekLinSysIterCG::DoConjugateGradient(), Nektar::LibUtilities::NekLinSysIterGMRES::DoGMRES(), Nektar::LibUtilities::NekLinSysIterGMRES::DoGmresRestart(), Nektar::MMFDiffusion::DoOdeRhs(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_small(), Nektar::Extrapolate::EvaluateBDFArray(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Nektar::Extrapolate::ExtrapolateArray(), Nektar::VortexWaveInteraction::FileRelaxation(), Nektar::MultiRegions::ExpList::GetMatIpwrtDeriveBase(), Nektar::FieldUtils::ProcessCFL::GetMaxStdVelocity(), Nektar::Extrapolate::GetMaxStdVelocity(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocEdgesToTraceTranspose(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocFacesToTraceTranspose(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), main(), Nektar::CFSImplicit::MatrixMultiplyMatrixFreeCoeff(), Nektar::CFSImplicit::NonlinSysEvaluatorCoeff(), Nektar::SolverUtils::MMFSystem::NumericalMaxwellFluxTE(), Nektar::SolverUtils::MMFSystem::NumericalMaxwellFluxTM(), Nektar::SolverUtils::DiffusionLFR::NumFluxforScalar(), Nektar::SolverUtils::DiffusionLFR::NumFluxforVector(), Nektar::Collections::IProductWRTDerivBase_StdMat::operator()(), Nektar::Collections::IProductWRTDerivBase_IterPerExp::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Seg::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Quad::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tri::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Hex::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tet::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Prism::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Pyr::operator()(), Nektar::Collections::Helmholtz_IterPerExp::operator()(), Nektar::Collections::PhysDeriv_StdMat::operator()(), Nektar::Collections::PhysDeriv_IterPerExp::operator()(), Nektar::Collections::PhysDeriv_SumFac_Quad::operator()(), Nektar::Collections::PhysDeriv_SumFac_Tri::operator()(), Nektar::Collections::PhysDeriv_SumFac_Hex::operator()(), Nektar::Collections::PhysDeriv_SumFac_Tet::operator()(), Nektar::Collections::PhysDeriv_SumFac_Prism::operator()(), Nektar::Collections::PhysDeriv_SumFac_Pyr::operator()(), Nektar::RiemannInvariantBC::RiemannInvariantBC(), Nektar::IncNavierStokes::SetMRFDomainVelBCs(), Nektar::IncNavierStokes::SetMRFWallBCs(), Nektar::VelocityCorrectionScheme::SolveUnsteadyStokesSystem(), Svtvp(), Nektar::CellModel::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationAlgorithmGLM::TimeIntegrate(), Nektar::LinearisedAdvection::UpdateBase(), Nektar::LibUtilities::TimeIntegrationSchemeSDC::UpdateIntegratedResidual(), Nektar::Extrapolate::v_AccelerationBDF(), Nektar::StandardExtrapolate::v_AccelerationBDF(), Nektar::SubSteppingExtrapolateWeakPressure::v_AddNormVelOnOBC(), Nektar::WeakPressureExtrapolate::v_AddNormVelOnOBC(), Nektar::SolverUtils::ForcingBody::v_Apply(), Nektar::SolverUtils::ForcingBody::v_ApplyCoeff(), Nektar::LibUtilities::ExplicitTimeIntegrationSchemeSDC::v_ComputeInitialGuess(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_ComputeInitialGuess(), Nektar::LocalRegions::PyrExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::PreconCfsBRJ::v_DoPreconCfs(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::AcousticSystem::v_GetMaxStdVelocity(), Nektar::CompressibleFlowSystem::v_GetMaxStdVelocity(), Nektar::StdRegions::StdExpansion2D::v_HelmholtzMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion3D::v_HelmholtzMatrixOp_MatFree(), Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::StandardExtrapolate::v_MountHOPBCs(), Nektar::LocalRegions::QuadExp::v_NormVectorIProductWRTBase(), Nektar::LocalRegions::TriExp::v_NormVectorIProductWRTBase(), Nektar::StdRegions::StdPrismExp::v_PhysDeriv(), Nektar::LocalRegions::TriExp::v_PhysDirectionalDeriv(), Nektar::FieldUtils::ProcessCombineAvg::v_Process(), Nektar::FieldUtils::ProcessQCriterion::v_Process(), Nektar::FieldUtils::ProcessScalGrad::v_Process(), Nektar::LibUtilities::ExplicitTimeIntegrationSchemeSDC::v_SDCIterationLoop(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_SDCIterationLoop(), Nektar::LibUtilities::ImplicitTimeIntegrationSchemeSDC::v_SDCIterationLoop(), Nektar::LibUtilities::TimeIntegrationSchemeGEM::v_TimeIntegrate(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), and Nektar::CellModelFitzHughNagumo::v_Update().

◆ Vabs() [1/4]

template<class T >
void Vmath::Vabs ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

vabs: y = |x|

Definition at line 262 of file VmathArray.hpp.

264 {
265  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
266  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
267 
268  Vabs(n, &x[0], incx, &y[0], incy);
269 }
void Vabs(int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
vabs: y = |x|
Definition: VmathArray.hpp:262

References ASSERTL1, and Vabs().

◆ Vabs() [2/4]

template void Vmath::Vabs ( int  n,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)

◆ Vabs() [3/4]

template void Vmath::Vabs ( int  n,
const Nektar::NekSingle x,
const int  incx,
Nektar::NekSingle y,
const int  incy 
)

◆ Vabs() [4/4]

template<class T >
void Vmath::Vabs ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

◆ Vadd() [1/4]

template<class T >
void Vmath::Vadd ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

Add vector z = x+y.

Definition at line 144 of file VmathArray.hpp.

147 {
148  ASSERTL1(static_cast<unsigned int>(n * incx) <= x.size() + x.GetOffset(),
149  "Array out of bounds");
150  ASSERTL1(static_cast<unsigned int>(n * incy) <= y.size() + y.GetOffset(),
151  "Array out of bounds");
152  ASSERTL1(static_cast<unsigned int>(n * incz) <= z.size() + z.GetOffset(),
153  "Array out of bounds");
154 
155 #ifdef NEKTAR_ENABLE_SIMD_VMATH
156  boost::ignore_unused(incx, incy, incz);
157  ASSERTL1(incx == 1, "Simd vmath requires inc = 1");
158  ASSERTL1(incy == 1, "Simd vmath requires inc = 1");
159  ASSERTL1(incz == 1, "Simd vmath requires inc = 1");
160  SIMD::Vadd(n, &x[0], &y[0], &z[0]);
161 #else
162  Vadd(n, &x[0], incx, &y[0], incy, &z[0], incz);
163 #endif
164 }
void Vadd(int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
Add vector z = x+y.
Definition: VmathArray.hpp:144

References ASSERTL1, Vmath::SIMD::Vadd(), and Vadd().

◆ Vadd() [2/4]

template void Vmath::Vadd ( int  n,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)

◆ Vadd() [3/4]

template void Vmath::Vadd ( int  n,
const Nektar::NekSingle x,
const int  incx,
const Nektar::NekSingle y,
const int  incy,
Nektar::NekSingle z,
const int  incz 
)

◆ Vadd() [4/4]

template<class T >
void Vmath::Vadd ( int  n,
const T *  x,
const int  incx,
const T *  y,
const int  incy,
T *  z,
const int  incz 
)

Add vector z = x+y.

Definition at line 359 of file Vmath.cpp.

361 {
362  while (n--)
363  {
364  *z = (*x) + (*y);
365  x += incx;
366  y += incy;
367  z += incz;
368  }
369 }

Referenced by Nektar::NekMatrix< DataType, StandardMatrixTag >::AbsMaxtoMinEigenValueRatio(), Nektar::MMFMaxwell::AddCoriolis(), Nektar::MMFSWE::AddCoriolis(), Nektar::LinearSWE::AddCoriolis(), Nektar::NonlinearPeregrine::AddCoriolis(), Nektar::NonlinearSWE::AddCoriolis(), Nektar::SolverUtils::MMFSystem::AdddedtMaxwell(), Nektar::MMFSWE::AddDivForGradient(), Nektar::MMFSWE::AddElevationEffect(), Nektar::MMFMaxwell::AddGreenDerivCompensate(), Nektar::MultiRegions::LocTraceToTraceMap::AddLocTracesToField(), Nektar::CFSImplicit::AddMatNSBlkDiagVol(), Nektar::MMFMaxwell::AddPML(), Nektar::Extrapolate::AddPressureToOutflowBCs(), Nektar::MultiRegions::ExpList::AddRightIPTBaseMatrix(), Nektar::MultiRegions::ExpList::AddRightIPTPhysDerivBase(), Nektar::MMFSWE::AddRotation(), Nektar::SolverUtils::DiffusionIP::AddSymmFluxIntegralToCoeff(), Nektar::SolverUtils::Diffusion::AddSymmFluxIntegralToOffDiag(), Nektar::SolverUtils::DiffusionIP::AddSymmFluxIntegralToPhys(), Nektar::SolverUtils::Advection::AddTraceJacToMat(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::MultiRegions::GJPStabilisation::Apply(), Nektar::DiffusionLDGNS::ApplyBCsO1(), Nektar::VCSMapping::ApplyIncNSMappingForcing(), Nektar::MultiRegions::PreconditionerBlock::BlockPreconditionerCG(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::SolverUtils::DiffusionIP::CalcTraceNumFlux(), Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::SolverUtils::FilterAeroForces::CalculateForces(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::MMFMaxwell::Checkpoint_TotalFieldOutput(), Nektar::MMFMaxwell::Checkpoint_TotPlotOutput(), Nektar::SolverUtils::MMFSystem::ComputeDivCurlMF(), Nektar::MMFSWE::ComputeEnergy(), Nektar::MMFSWE::ComputeEnstrophy(), Nektar::MMFSWE::ComputeMass(), Computestreakpositions(), Nektar::MMFMaxwell::ComputeSurfaceCurrent(), Nektar::MMFSWE::ComputeVorticity(), Nektar::CoupledLinearNS::Continuation(), Nektar::SolverUtils::DiffusionLFR::DerCFlux_1D(), Nektar::SolverUtils::DiffusionLFRNS::DerCFlux_1D(), Nektar::SolverUtils::DiffusionLFR::DerCFlux_2D(), Nektar::SolverUtils::DiffusionLFRNS::DerCFlux_2D(), Nektar::SolverUtils::AdvectionFR::DivCFlux_1D(), Nektar::SolverUtils::AdvectionFR::DivCFlux_2D(), Nektar::SolverUtils::DiffusionLFR::DivCFlux_2D(), Nektar::SolverUtils::DiffusionLFRNS::DivCFlux_2D(), Nektar::SolverUtils::AdvectionFR::DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFR::DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFRNS::DivCFlux_2D_Gauss(), Nektar::LibUtilities::NekLinSysIterGMRES::DoGmresRestart(), Nektar::Bidomain::DoImplicitSolve(), Nektar::UnsteadyAdvectionDiffusion::DoOdeRhs(), Nektar::UnsteadyViscousBurgers::DoOdeRhs(), Nektar::Bidomain::DoOdeRhs(), Nektar::BidomainRoth::DoOdeRhs(), Nektar::MMFDiffusion::DoOdeRhs(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::MMFMaxwell::DoOdeRhs(), Nektar::LinearSWE::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::NonlinearSWE::DoOdeRhs(), Nektar::MMFAdvection::EvaluateAdvectionVelocity(), Nektar::MultiRegions::DisContField::EvaluateHDGPostProcessing(), Nektar::CoupledLinearNS::EvaluateNewtonRHS(), Nektar::FieldUtils::ProcessBodyFittedVelocity::GenPntwiseBodyFittedCoordSys(), Nektar::SolverUtils::Diffusion::GetDivCurl(), Nektar::VariableConverter::GetEnthalpy(), Nektar::LinearSWE::GetFluxVector(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::CompressibleFlowSystem::GetFluxVectorDeAlias(), Nektar::MultiRegions::ExpList::GetMatIpwrtDeriveBase(), Nektar::VariableConverter::GetMuAv(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::MMFSWE::GetSWEFluxVector(), Nektar::NavierStokesCFE::GetViscosityAndThermalCondFromTemp(), Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree_GenericImpl(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), main(), Nektar::VCSMapping::MappingAccelerationCorrection(), MoveOutsidePointsNnormpos(), Nektar::CFSImplicit::MultiplyElmtInvMassPlusSource(), Nektar::SolverUtils::DiffusionLFRNS::NumericalFluxO2(), Nektar::DiffusionLDGNS::NumericalFluxO2(), Nektar::SolverUtils::DiffusionLFR::NumFluxforVector(), Nektar::SolverUtils::DiffusionLDG::NumFluxforVector(), Nektar::Collections::IProductWRTDerivBase_IterPerExp::operator()(), Nektar::Collections::IProductWRTDerivBase_NoCollection::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Quad::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tri::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Hex::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tet::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Prism::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Pyr::operator()(), Nektar::Collections::Helmholtz_IterPerExp::operator()(), Nektar::PressureMachTemperatureBC::PressureMachTemperatureBC(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::MMFSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::FieldUtils::ProcessWallNormalData::ProjectPoint(), Nektar::FieldUtils::ProcessWallNormalData::ProjectVertices(), Nektar::SmoothedProfileMethod::SetUpCorrectionPressure(), Nektar::SolverUtils::MMFSystem::SetUpMovingFrames(), Nektar::SmoothedProfileMethod::SolveCorrectedVelocity(), Nektar::CoupledLinearNS::SolveSteadyNavierStokes(), Nektar::FilterMovingBody::UpdateForce(), Nektar::GlobalMapping::UpdateGeometry(), Nektar::LEE::v_AddLinTerm(), Nektar::SolverUtils::AdvectionWeakDG::v_AddVolumJacToMat(), Nektar::SolverUtils::AdvectionFR::v_Advect(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::SolverUtils::Advection3DHomogeneous1D::v_Advect(), Nektar::LocalRegions::NodalTriExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::PrismExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::PyrExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::TriExp::v_AlignVectorToCollapsedDir(), Nektar::WallViscousBC::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::SolverUtils::ForcingBody::v_Apply(), Nektar::SolverUtils::ForcingNoise::v_Apply(), Nektar::SolverUtils::ForcingProgrammatic::v_Apply(), Nektar::ForcingAxiSymmetric::v_Apply(), Nektar::ForcingQuasi1D::v_Apply(), Nektar::ForcingMovingBody::v_Apply(), Nektar::ForcingStabilityCoupledLNS::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_ApplyCoeff(), Nektar::SolverUtils::ForcingBody::v_ApplyCoeff(), Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_ComputeInitialGuess(), Nektar::GlobalMapping::MappingXofZ::v_ContravarToCartesian(), Nektar::MappingExtrapolate::v_CorrectPressureBCs(), Nektar::GlobalMapping::MappingXofXZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::Mapping::v_CurlCurlField(), Nektar::MultiRegions::ExpListHomogeneous2D::v_DealiasedDotProd(), Nektar::SolverUtils::DiffusionLFRNS::v_Diffuse(), Nektar::SolverUtils::Diffusion3DHomogeneous1D::v_Diffuse(), Nektar::SolverUtils::DiffusionLFR::v_Diffuse(), Nektar::GlobalMapping::Mapping::v_Divergence(), Nektar::ArtificialDiffusion::v_DoArtificialDiffusion(), Nektar::ArtificialDiffusion::v_DoArtificialDiffusionCoeff(), Nektar::NavierStokesCFE::v_DoDiffusion(), Nektar::NavierStokesCFEAxisym::v_DoDiffusion(), Nektar::NavierStokesImplicitCFE::v_DoDiffusionCoeff(), Nektar::MultiRegions::PreconditionerLinearWithLowEnergy::v_DoPreconditioner(), Nektar::LinearElasticSystem::v_DoSolve(), Nektar::MMFMaxwell::v_DoSolve(), Nektar::NonSmoothShockCapture::v_GetArtificialViscosity(), Nektar::APE::v_GetFluxVector(), Nektar::LEE::v_GetFluxVector(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetMetricTensor(), Nektar::NavierStokesCFE::v_GetViscousFluxVector(), Nektar::NavierStokesCFEAxisym::v_GetViscousFluxVector(), Nektar::NavierStokesCFE::v_GetViscousFluxVectorDeAlias(), Nektar::GlobalMapping::Mapping::v_gradgradU(), Nektar::Bidomain::v_InitObject(), Nektar::BidomainRoth::v_InitObject(), Nektar::SolverUtils::DiffusionIP::v_InitObject(), Nektar::LocalRegions::TetExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::HexExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::PrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::PyrExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::QuadExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::TriExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdPrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdPyrExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTetExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTriExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::HexExp::v_IProductWRTDirectionalDerivBase_SumFac(), Nektar::LocalRegions::TriExp::v_IProductWRTDirectionalDerivBase_SumFac(), Nektar::LocalRegions::HexExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::QuadExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::TriExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::MMFSWE::v_LinfError(), Nektar::GlobalMapping::MappingXofXZ::v_LowerIndex(), Nektar::GlobalMapping::MappingXofZ::v_LowerIndex(), Nektar::StdRegions::StdTetExp::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv_n(), Nektar::SolverUtils::ForcingMovingReferenceFrame::v_PreApply(), Nektar::LinearSWE::v_PrimitiveToConservative(), Nektar::NonlinearPeregrine::v_PrimitiveToConservative(), Nektar::NonlinearSWE::v_PrimitiveToConservative(), Nektar::FieldUtils::ProcessAddFld::v_Process(), Nektar::FieldUtils::ProcessBodyFittedVelocity::v_Process(), Nektar::FieldUtils::ProcessCombineAvg::v_Process(), Nektar::FieldUtils::ProcessMultiShear::v_Process(), Nektar::FieldUtils::ProcessQCriterion::v_Process(), Nektar::FieldUtils::ProcessVelocityDivergence::v_Process(), Nektar::FieldUtils::ProcessWSS::v_Process(), Nektar::SolverUtils::FilterBodyFittedVelocity::v_ProcessSample(), Nektar::SolverUtils::FilterAverageFields::v_ProcessSample(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_ResidualEval(), Nektar::LibUtilities::ExplicitTimeIntegrationSchemeSDC::v_SDCIterationLoop(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_SDCIterationLoop(), Nektar::LibUtilities::ImplicitTimeIntegrationSchemeSDC::v_SDCIterationLoop(), Nektar::CompressibleFlowSystem::v_SetInitialConditions(), Nektar::VelocityCorrectionScheme::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::MultiRegions::GlobalLinSysIterativeFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysPETScFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysStaticCond::v_Solve(), Nektar::MultiRegions::GlobalLinSysXxtFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysDirectFull::v_Solve(), Nektar::VCSMapping::v_SolvePressure(), Nektar::SmoothedProfileMethod::v_SolveUnsteadyStokesSystem(), Nektar::VCSMapping::v_SolveViscous(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::SolverUtils::FilterModalEnergy::v_Update(), Nektar::GlobalMapping::Mapping::v_UpdateBCs(), Nektar::GlobalMapping::Mapping::v_VelocityLaplacian(), Vadd(), Nektar::MMFAdvection::WeakDGDirectionalAdvection(), Nektar::MMFMaxwell::WeakDGMaxwellDirDeriv(), Nektar::MMFSWE::WeakDGSWEDirDeriv(), Nektar::StdRegions::StdExpansion::WeakDirectionalDerivMatrixOp_MatFree(), and Nektar::SolverUtils::DiffusionLFRNS::WeakPenaltyO1().

◆ Vamax() [1/4]

template<class T >
T Vmath::Vamax ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Return the maximum absolute element in x called vamax to avoid conflict with max.

Definition at line 508 of file VmathArray.hpp.

509 {
510  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
511 
512  return Vamax(n, &x[0], incx);
513 }
T Vamax(int n, const Array< OneD, const T > &x, const int incx)
Return the maximum absolute element in x called vamax to avoid conflict with max.
Definition: VmathArray.hpp:508

References ASSERTL1, and Vamax().

◆ Vamax() [2/4]

template Nektar::NekDouble Vmath::Vamax ( int  n,
const Nektar::NekDouble x,
const int  incx 
)

◆ Vamax() [3/4]

template Nektar::NekSingle Vmath::Vamax ( int  n,
const Nektar::NekSingle x,
const int  incx 
)

◆ Vamax() [4/4]

template<class T >
T Vmath::Vamax ( int  n,
const T *  x,
const int  incx 
)

Return the maximum absolute element in x called vamax to avoid conflict with max.

Definition at line 999 of file Vmath.cpp.

1000 {
1001 
1002  T xmax = *x;
1003  T xm;
1004 
1005  while (n--)
1006  {
1007  xm = (*x > 0) ? *x : -*x;
1008  if (xm > xmax)
1009  {
1010  xmax = xm;
1011  }
1012  x += incx;
1013  }
1014  return xmax;
1015 }

Referenced by Nektar::MMFSWE::EvaluateWaterDepth(), Nektar::MMFSWE::LaxFriedrichFlux(), Nektar::StdRegions::StdExpansion::Linf(), Nektar::MMFSWE::TestVorticityComputation(), Nektar::MMFMaxwell::v_DoSolve(), Nektar::MMFSWE::v_LinfError(), and Vamax().

◆ Vcopy() [1/6]

template<class T >
void Vmath::Vcopy ( int  n,
const Array< OneD, const T > &  x,
int  incx,
Array< OneD, T > &  y,
int const  incy 
)

Definition at line 591 of file VmathArray.hpp.

593 {
594  ASSERTL1(static_cast<unsigned int>(std::abs(n * incx)) <=
595  x.size() + x.GetOffset(),
596  "Array out of bounds");
597  ASSERTL1(static_cast<unsigned int>(std::abs(n * incy)) <=
598  y.size() + y.GetOffset(),
599  "Array out of bounds");
600 
601  Vcopy(n, &x[0], incx, &y[0], incy);
602 }
void Vcopy(int n, const Array< OneD, const T > &x, int incx, Array< OneD, T > &y, int const incy)
Definition: VmathArray.hpp:591

References tinysimd::abs(), ASSERTL1, and Vcopy().

◆ Vcopy() [2/6]

template void Vmath::Vcopy ( int  n,
const int *  x,
const int  incx,
int *  y,
const int  incy 
)

◆ Vcopy() [3/6]

template void Vmath::Vcopy ( int  n,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)

◆ Vcopy() [4/6]

template void Vmath::Vcopy ( int  n,
const Nektar::NekSingle x,
const int  incx,
Nektar::NekSingle y,
const int  incy 
)

◆ Vcopy() [5/6]

template<typename T >
void Vmath::Vcopy ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Definition at line 1255 of file Vmath.cpp.

1256 {
1257  if (incx == 1 && incy == 1)
1258  {
1259  memcpy(y, x, n * sizeof(T));
1260  }
1261  else
1262  {
1263  while (n--)
1264  {
1265  *y = *x;
1266  x += incx;
1267  y += incy;
1268  }
1269  }
1270 }

Referenced by Nektar::LocalRegions::Expansion2D::AddHDGHelmholtzTraceTerms(), Nektar::CFSImplicit::AddMatNSBlkDiagVol(), Nektar::MultiRegions::ExpList::AddRightIPTBaseMatrix(), Nektar::MultiRegions::ExpList::AddRightIPTPhysDerivBase(), Nektar::SolverUtils::ForcingMovingReferenceFrame::addRotation(), Nektar::MultiRegions::ExpList::AddTraceJacToElmtJac(), Nektar::SolverUtils::Advection::AddTraceJacToMat(), Nektar::SpatialDomains::GeomFactors::Adjoint(), Nektar::DiffusionLDGNS::ApplyBCsO1(), Nektar::VariableConverter::ApplyC0Smooth(), Nektar::VCSMapping::ApplyIncNSMappingForcing(), Nektar::SolverUtils::DiffusionLDG::ApplyScalarBCs(), Nektar::MultiRegions::AssemblyMap::AssembleBnd(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::SolverUtils::ForcingAbsorption::CalculateForcing(), Nektar::LibUtilities::NodalTriEvenlySpaced::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTriFekete::CalculateInterpMatrix(), Nektar::LibUtilities::NodalPrismElec::CalculateInterpMatrix(), Nektar::LibUtilities::NodalPrismEvenlySpaced::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTetEvenlySpaced::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTriElec::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTetElec::CalculateInterpMatrix(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::SolverUtils::MMFSystem::CheckMovingFrames(), Nektar::MMFSWE::Checkpoint_Output_Cartesian(), Nektar::SolverUtils::UnsteadySystem::CheckSteadyState(), Nektar::MMFSWE::Compute_demdt_cdot_ek(), Nektar::SolverUtils::MMFSystem::ComputeCurl(), Nektar::SolverUtils::MMFSystem::Computedemdxicdote(), Nektar::SolverUtils::MMFSystem::ComputeDivCurlMF(), Nektar::SolverUtils::MMFSystem::ComputeMFtrace(), Nektar::SpatialDomains::GeomFactors::ComputeMovingFrames(), Nektar::SolverUtils::MMFSystem::ComputencdotMF(), Nektar::MMFMaxwell::ComputeRadCloak(), Computestreakpositions(), Nektar::LinearSWE::ConservativeToPrimitive(), Nektar::MMFSWE::ConservativeToPrimitive(), Nektar::NonlinearPeregrine::ConservativeToPrimitive(), Nektar::NonlinearSWE::ConservativeToPrimitive(), Nektar::GlobalMapping::Mapping::ContravarFromCartesian(), Nektar::GlobalMapping::Mapping::ContravarToCartesian(), Nektar::SolverUtils::DriverArnoldi::CopyArnoldiArrayToField(), Nektar::SolverUtils::MMFSystem::CopyBoundaryTrace(), Nektar::AcousticSystem::CopyBoundaryTrace(), Nektar::ShallowWaterSystem::CopyBoundaryTrace(), Nektar::SolverUtils::DriverArnoldi::CopyFieldToArnoldiArray(), Nektar::SolverUtils::EquationSystem::CopyFromPhysField(), Nektar::SolverUtils::DriverArnoldi::CopyFwdToAdj(), Nektar::Extrapolate::CopyPressureHBCsToPbndExp(), Nektar::SolverUtils::EquationSystem::CopyToPhysField(), Nektar::GlobalMapping::Mapping::CovarFromCartesian(), Nektar::GlobalMapping::Mapping::CovarToCartesian(), Nektar::StdRegions::StdExpansion::CreateGeneralMatrix(), Nektar::SolverUtils::DiffusionLFR::DerCFlux_1D(), Nektar::SolverUtils::DiffusionLFRNS::DerCFlux_1D(), Nektar::SolverUtils::MMFSystem::DeriveCrossProductMF(), DetermineclosePointxindex(), Nektar::LinearisedAdvection::DFT(), Nektar::SolverUtils::AdvectionFR::DivCFlux_1D(), Nektar::SolverUtils::AdvectionFR::DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFR::DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFRNS::DivCFlux_2D_Gauss(), Nektar::SolverUtils::UnsteadySystem::DoDummyProjection(), Nektar::LibUtilities::NekLinSysIterGMRES::DoGmresRestart(), Nektar::Bidomain::DoImplicitSolve(), Nektar::MultiRegions::GlobalLinSysPETSc::DoNekppOperation(), Nektar::LibUtilities::NekSysOperators::DoNekSysPrecon(), Nektar::PreconCfs::DoNullPrecon(), Nektar::AcousticSystem::DoOdeProjection(), Nektar::CFLtester::DoOdeProjection(), Nektar::MMFAdvection::DoOdeProjection(), Nektar::UnsteadyAdvection::DoOdeProjection(), Nektar::UnsteadyAdvectionDiffusion::DoOdeProjection(), Nektar::UnsteadyDiffusion::DoOdeProjection(), Nektar::UnsteadyInviscidBurger::DoOdeProjection(), Nektar::UnsteadyViscousBurgers::DoOdeProjection(), Nektar::CompressibleFlowSystem::DoOdeProjection(), Nektar::Dummy::DoOdeProjection(), Nektar::ImageWarpingSystem::DoOdeProjection(), Nektar::MMFMaxwell::DoOdeProjection(), Nektar::PulseWavePropagation::DoOdeProjection(), Nektar::LinearSWE::DoOdeProjection(), Nektar::NonlinearPeregrine::DoOdeProjection(), Nektar::NonlinearSWE::DoOdeProjection(), Nektar::MMFMaxwell::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::MultiRegions::GlobalLinSysIterative::DoProjection(), Nektar::NekMatrix< DataType, StandardMatrixTag >::EigenSolve(), Nektar::CFSImplicit::ElmtVarInvMtrx(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_sort(), Nektar::SolverUtils::SessionFunction::Evaluate(), Nektar::IncNavierStokes::EvaluateAdvectionTerms(), Nektar::MMFAdvection::EvaluateAdvectionVelocity(), Nektar::MultiRegions::DisContField::EvaluateHDGPostProcessing(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Nektar::VortexWaveInteraction::ExecuteRoll(), Nektar::VortexWaveInteraction::FileRelaxation(), Nektar::MultiRegions::LocTraceToTraceMap::FindElmtNeighbors(), Nektar::LibUtilities::Basis::GenBasis(), Nektar::LocalRegions::NodalTriExp::GeneralMatrixOp_MatOp(), Nektar::LocalRegions::TetExp::GeneralMatrixOp_MatOp(), Nektar::MultiRegions::ExpList::GenerateElementVector(), GenerateNeighbourArrays(), Nektar::FieldUtils::ProcessBodyFittedVelocity::GenPntwiseBodyFittedCoordSys(), Nektar::Collections::CoalescedGeomData::GetDerivFactors(), Nektar::SolverUtils::Diffusion::GetDivCurl(), Nektar::MultiRegions::ExpList::GetExpIndex(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::CFSImplicit::GetFluxVectorJacDirElmt(), Nektar::Collections::CoalescedGeomData::GetJac(), Nektar::Collections::CoalescedGeomData::GetJacWithStdWeights(), Nektar::FieldUtils::ProcessMapping::GetMapping(), Nektar::SolverUtils::MMFSystem::GetMaxwellFlux1D(), Nektar::LocalRegions::Expansion::GetMF(), Nektar::FieldUtils::ProcessBodyFittedVelocity::GetVelAndConvertToCartSys(), Nektar::FieldUtils::ProcessCFL::GetVelocity(), Nektar::FieldUtils::ProcessVelocityDivergence::GetVelocity(), Nektar::FieldUtils::ProcessVorticity::GetVelocity(), Nektar::FieldUtils::ProcessWSS::GetVelocity(), Nektar::LinearSWE::GetVelocityVector(), Nektar::FieldUtils::ProcessWSS::GetViscosity(), Nektar::MultiRegions::AssemblyMap::GlobalToLocalBnd(), Nektar::StdRegions::StdExpansion::H1(), Nektar::Collections::HexIProduct(), Nektar::MultiRegions::ExpListHomogeneous1D::Homogeneous1DTrans(), Nektar::LinearisedAdvection::ImportFldBase(), Nektar::ForcingMovingBody::InitialiseCableModel(), Nektar::SolverUtils::UnsteadySystem::InitializeSteadyState(), Nektar::LibUtilities::Interp1D(), Nektar::LibUtilities::Interp2D(), Nektar::LibUtilities::InterpCoeff1D(), Nektar::LibUtilities::InterpCoeff2D(), Nektar::FieldUtils::Interpolator< T >::InterpExp1ToExp2(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocEdgesToTrace(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocEdgesToTraceTranspose(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocFacesToTrace(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocFacesToTraceTranspose(), Nektar::MultiRegions::LocTraceToTraceMap::InterpTraceToLocEdges(), Nektar::MultiRegions::LocTraceToTraceMap::InterpTraceToLocFaces(), Nektar::Collections::IProductWRTDerivBase_StdMat::IProductWRTDerivBase_StdMat(), Nektar::MultiRegions::ExpList::IProductWRTDirectionalDerivBase(), Nektar::MultiRegions::DisContField::L2_DGDeriv(), Nektar::NonlinearPeregrine::LaitoneSolitaryWave(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree_GenericImpl(), Nektar::MultiRegions::AssemblyMap::LocalBndToGlobal(), Nektar::GlobalMapping::Mapping::LowerIndex(), main(), MappingEVids(), Nektar::MultiRegions::GlobalMatrix::Multiply(), Nektar::CFSImplicit::MultiplyElmtInvMassPlusSource(), Nektar::ForcingMovingBody::Newmark_betaSolver(), Nektar::CFSImplicit::NumCalcRiemFluxJac(), Nektar::SolverUtils::DiffusionLFRNS::NumericalFluxO1(), Nektar::DiffusionLDGNS::NumericalFluxO2(), Nektar::SolverUtils::DiffusionLFR::NumFluxforScalar(), Nektar::SolverUtils::DiffusionLDG::NumFluxforScalar(), Nektar::SolverUtils::DiffusionLDG::NumFluxforVector(), Nektar::Collections::IProductWRTDerivBase_MatrixFree::operator()(), Nektar::Collections::BwdTrans_SumFac_Seg::operator()(), Nektar::Collections::BwdTrans_SumFac_Quad::operator()(), Nektar::Collections::BwdTrans_SumFac_Hex::operator()(), Nektar::Collections::IProductWRTBase_MatrixFree::operator()(), Nektar::Collections::BwdTrans_MatrixFree::operator()(), Nektar::Collections::Helmholtz_MatrixFree::operator()(), Nektar::Collections::PhysDeriv_MatrixFree::operator()(), Orderfunctionx(), Nektar::FieldUtils::OutputVtk::OutputFromExpLowOrder(), Nektar::Collections::PhysDeriv_StdMat::PhysDeriv_StdMat(), Nektar::LibUtilities::PhysGalerkinProject1D(), Nektar::LibUtilities::PhysGalerkinProject2D(), Nektar::StdRegions::StdExpansion2D::PhysTensorDeriv(), Nektar::StdRegions::StdExpansion3D::PhysTensorDeriv(), PolyFit(), PolyInterp(), Nektar::PressureInflowFileBC::PressureInflowFileBC(), Nektar::PressureMachTemperatureBC::PressureMachTemperatureBC(), Nektar::PressureOutflowBC::PressureOutflowBC(), Nektar::PressureOutflowNonReflectiveBC::PressureOutflowNonReflectiveBC(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::MMFSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::MMFMaxwell::Printout_SurfaceCurrent(), Nektar::FieldUtils::ProcessGrad::ProcessMappingFld(), Nektar::Collections::QuadIProduct(), Nektar::GlobalMapping::Mapping::RaiseIndex(), Nektar::MultiRegions::AssemblyMapDG::RealignTraceElement(), Nektar::LibUtilities::NekFFTW::Reshuffle_FFTW2Nek(), Nektar::LibUtilities::NekFFTW::Reshuffle_Nek2FFTW(), Nektar::SolverUtils::RiemannSolver::rotateFromNormal(), Nektar::SolverUtils::RiemannSolver::rotateToNormal(), Nektar::LocalRegions::Expansion3D::SetFaceToGeomOrientation(), Nektar::FieldUtils::ProcessEquiSpacedOutput::SetHomogeneousConnectivity(), Nektar::MultiRegions::ExpList::SetPhys(), Nektar::LibUtilities::NekNonlinSys::SetRefResidual(), Nektar::LibUtilities::NekLinSysIter::setUniversalUniqueMap(), Nektar::MultiRegions::LocTraceToTraceMap::Setup(), Nektar::NavierStokesCFE::SpecialBndTreat(), Nektar::StagnationInflowBC::StagnationInflowBC(), Nektar::UnsteadyAdvectionDiffusion::SubStepProjection(), Nektar::SubSteppingExtrapolate::SubStepProjection(), Diffusion::TimeIntegrate(), Nektar::CellModel::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationAlgorithmGLM::TimeIntegrate(), Nektar::LibUtilities::Transposition::TransposeXtoYZ(), Nektar::LibUtilities::Transposition::TransposeXYtoZ(), Nektar::LibUtilities::Transposition::TransposeYZtoX(), Nektar::LibUtilities::Transposition::TransposeYZtoZY(), Nektar::LibUtilities::Transposition::TransposeZtoXY(), Nektar::LibUtilities::Transposition::TransposeZYtoYZ(), Nektar::MultiRegions::AssemblyMap::UniversalAssembleBnd(), Nektar::VortexWaveInteraction::UpdateAlpha(), Nektar::LinearisedAdvection::UpdateBase(), Nektar::MultiRegions::GlobalLinSysIterative::UpdateKnownSolutions(), Nektar::VortexWaveInteraction::UpdateWaveForceMag(), Nektar::LocalRegions::HexExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::PrismExp::v_AlignVectorToCollapsedDir(), Nektar::IsentropicVortexBC::v_Apply(), Nektar::PressureMachTemperatureBC::v_Apply(), Nektar::RinglebFlowBC::v_Apply(), Nektar::SymmetryBC::v_Apply(), Nektar::WallBC::v_Apply(), Nektar::WallViscousBC::v_Apply(), Nektar::ForcingMovingBody::v_Apply(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelCovar(), Nektar::LocalRegions::Expansion3D::v_BuildInverseTransformationMatrix(), Nektar::LocalRegions::Expansion3D::v_BuildTransformationMatrix(), Nektar::MultiRegions::ExpList::v_BwdTrans(), Nektar::StdRegions::StdHexExp::v_BwdTrans(), Nektar::StdRegions::StdPointExp::v_BwdTrans(), Nektar::StdRegions::StdPrismExp::v_BwdTrans(), Nektar::StdRegions::StdPyrExp::v_BwdTrans(), Nektar::StdRegions::StdQuadExp::v_BwdTrans(), Nektar::StdRegions::StdSegExp::v_BwdTrans(), Nektar::StdRegions::StdTetExp::v_BwdTrans(), Nektar::StdRegions::StdHexExp::v_BwdTrans_SumFacKernel(), Nektar::StdRegions::StdQuadExp::v_BwdTrans_SumFacKernel(), Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs(), Nektar::LocalRegions::HexExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::QuadExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::NodalTriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::QuadExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::HexExp::v_ComputeTraceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeTraceNormal(), Nektar::LocalRegions::PyrExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TetExp::v_ComputeTraceNormal(), Nektar::GlobalMapping::MappingTranslation::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingTranslation::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarToCartesian(), Nektar::MappingExtrapolate::v_CorrectPressureBCs(), Nektar::GlobalMapping::MappingTranslation::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingTranslation::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarToCartesian(), Nektar::GlobalMapping::Mapping::v_CurlCurlField(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedDotProd(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedProd(), Nektar::MultiRegions::ExpListHomogeneous2D::v_DealiasedProd(), Nektar::SolverUtils::DiffusionLFRNS::v_Diffuse(), Nektar::SolverUtils::Diffusion3DHomogeneous1D::v_Diffuse(), Nektar::SolverUtils::DiffusionLFR::v_Diffuse(), Nektar::MultiRegions::PreconditionerNull::v_DoPreconditioner(), Nektar::MultiRegions::PreconditionerLinear::v_DoPreconditionerWithNonVertOutput(), Nektar::EigenValuesAdvection::v_DoSolve(), Nektar::IterativeElasticSystem::v_DoSolve(), Nektar::LinearElasticSystem::v_DoSolve(), Nektar::MMFMaxwell::v_DoSolve(), Nektar::PulseWaveSystem::v_DoSolve(), Nektar::IsentropicVortex::v_EvaluateExactSolution(), Nektar::SolverUtils::DriverModifiedArnoldi::v_Execute(), Nektar::LocalRegions::HexExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::PrismExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::PyrExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::QuadExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::SegExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::TetExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::TriExp::v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpList::v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpListHomogeneous1D::v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpListHomogeneous2D::v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpList::v_ExtractPhysToBndElmt(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_ExtractTracePhys(), Nektar::LibUtilities::NekFFTW::v_FFTBwdTrans(), Nektar::LibUtilities::NekFFTW::v_FFTFwdTrans(), Nektar::MultiRegions::DisContField::v_FillBwdWithBoundCond(), Nektar::StdRegions::StdQuadExp::v_FillMode(), Nektar::StdRegions::StdHexExp::v_FillMode(), Nektar::StdRegions::StdSegExp::v_FillMode(), Nektar::StdRegions::StdTriExp::v_FillMode(), Nektar::LocalRegions::HexExp::v_FwdTrans(), Nektar::LocalRegions::PrismExp::v_FwdTrans(), Nektar::LocalRegions::PyrExp::v_FwdTrans(), Nektar::LocalRegions::QuadExp::v_FwdTrans(), Nektar::LocalRegions::SegExp::v_FwdTrans(), Nektar::LocalRegions::TetExp::v_FwdTrans(), Nektar::MultiRegions::ExpList2DHomogeneous2D::v_FwdTrans(), Nektar::StdRegions::StdHexExp::v_FwdTrans(), Nektar::StdRegions::StdPointExp::v_FwdTrans(), Nektar::StdRegions::StdQuadExp::v_FwdTrans(), Nektar::StdRegions::StdSegExp::v_FwdTrans(), Nektar::LocalRegions::QuadExp::v_FwdTransBndConstrained(), Nektar::LocalRegions::SegExp::v_FwdTransBndConstrained(), Nektar::StdRegions::StdQuadExp::v_FwdTransBndConstrained(), Nektar::StdRegions::StdSegExp::v_FwdTransBndConstrained(), Nektar::StdRegions::StdHexExp::v_GenMatrix(), Nektar::StdRegions::StdPrismExp::v_GenMatrix(), Nektar::StdRegions::StdQuadExp::v_GenMatrix(), Nektar::StdRegions::StdSegExp::v_GenMatrix(), Nektar::StdRegions::StdTetExp::v_GenMatrix(), Nektar::StdRegions::StdTriExp::v_GenMatrix(), Nektar::LocalRegions::Expansion1D::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::MultiRegions::DisContField::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::ExpList::v_GetBoundaryNormals(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBoundaryNormals(), Nektar::GlobalMapping::Mapping::v_GetCartesianCoordinates(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::GlobalMapping::Mapping::v_GetCoordVelocity(), Nektar::NavierStokesImplicitCFE::v_GetFluxDerivJacDirctn(), Nektar::NavierStokesImplicitCFE::v_GetFluxDerivJacDirctnElmt(), Nektar::GlobalMapping::MappingGeneral::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingGeneral::v_GetJacobian(), Nektar::GlobalMapping::MappingXofXZ::v_GetJacobian(), Nektar::GlobalMapping::MappingGeneral::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetMetricTensor(), Nektar::MultiRegions::ExpList::v_GetMovingFrames(), Nektar::IncNavierStokes::v_GetMovingFrameVelocities(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetNormals(), Nektar::LocalRegions::QuadExp::v_GetTracePhysVals(), Nektar::LocalRegions::TriExp::v_GetTracePhysVals(), Nektar::LocalRegions::QuadExp::v_GetTraceQFactors(), Nektar::NavierStokesCFE::v_GetViscousFluxVector(), Nektar::NavierStokesCFEAxisym::v_GetViscousFluxVector(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_InitializeScheme(), Nektar::LibUtilities::TimeIntegrationSchemeGEM::v_InitializeScheme(), Nektar::LibUtilities::TimeIntegrationSchemeSDC::v_InitializeScheme(), Nektar::MMFDiffusion::v_InitObject(), Nektar::IterativeElasticSystem::v_InitObject(), Nektar::GlobalMapping::Mapping::v_InitObject(), Nektar::DiffusionLDGNS::v_InitObject(), Nektar::StdRegions::StdPointExp::v_IProductWRTBase(), Nektar::StdRegions::StdHexExp::v_IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdQuadExp::v_IProductWRTBase_SumFacKernel(), Nektar::MMFSWE::v_LinfError(), Nektar::GlobalMapping::MappingTranslation::v_LowerIndex(), Nektar::GlobalMapping::MappingXofXZ::v_LowerIndex(), Nektar::GlobalMapping::MappingXofZ::v_LowerIndex(), Nektar::LibUtilities::NekSys::v_NekSysInitialGuess(), Nektar::FieldUtils::OutputTecplot::v_OutputFromExp(), Nektar::MultiRegions::ExpList::v_PhysDirectionalDeriv(), Nektar::SolverUtils::Forcing::v_PreApply(), Nektar::SolverUtils::ForcingMovingReferenceFrame::v_PreApply(), Nektar::FieldUtils::OutputFileBase::v_Process(), Nektar::FieldUtils::ProcessAddFld::v_Process(), Nektar::FieldUtils::ProcessBodyFittedVelocity::v_Process(), Nektar::FieldUtils::ProcessC0Projection::v_Process(), Nektar::FieldUtils::ProcessCFL::v_Process(), Nektar::FieldUtils::ProcessGrad::v_Process(), Nektar::FieldUtils::ProcessHomogeneousStretch::v_Process(), Nektar::FieldUtils::ProcessJacobianEnergy::v_Process(), Nektar::FieldUtils::ProcessL2Criterion::v_Process(), Nektar::FieldUtils::ProcessMapping::v_Process(), Nektar::FieldUtils::ProcessNumModes::v_Process(), Nektar::FieldUtils::ProcessPointDataToFld::v_Process(), Nektar::FieldUtils::ProcessQCriterion::v_Process(), Nektar::FieldUtils::ProcessQualityMetric::v_Process(), Nektar::FieldUtils::ProcessVelocityDivergence::v_Process(), Nektar::FieldUtils::ProcessVorticity::v_Process(), Nektar::FieldUtils::ProcessWSS::v_Process(), Nektar::SolverUtils::FilterFieldConvert::v_ProcessSample(), Nektar::SolverUtils::FilterMaxMinFields::v_ProcessSample(), Nektar::GlobalMapping::MappingTranslation::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofZ::v_RaiseIndex(), Nektar::SolverUtils::CouplingCwipi::v_Receive(), Nektar::SolverUtils::CouplingFile::v_Receive(), Nektar::LocalRegions::HexExp::v_ReduceOrderCoeffs(), Nektar::LocalRegions::QuadExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdPrismExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdPyrExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdQuadExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdSegExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTetExp::v_ReduceOrderCoeffs(), Nektar::APE::v_RiemannInvariantBC(), Nektar::LEE::v_RiemannInvariantBC(), Nektar::LibUtilities::ExplicitTimeIntegrationSchemeSDC::v_SDCIterationLoop(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_SDCIterationLoop(), Nektar::LinearisedAdvection::v_SetBaseFlow(), Nektar::IsentropicVortex::v_SetInitialConditions(), Nektar::IncNavierStokes::v_SetMovingFrameVelocities(), Nektar::LibUtilities::NekNonlinSysNewton::v_SetupNekNonlinSystem(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SetUpViscousForcing(), Nektar::MultiRegions::GlobalLinSysPETSc::v_SolveLinearSystem(), Nektar::VCSMapping::v_SolvePressure(), Nektar::LibUtilities::NekLinSysIterFixedpointJacobi::v_SolveSystem(), Nektar::LibUtilities::NekNonlinSysNewton::v_SolveSystem(), Nektar::VCSMapping::v_SolveViscous(), Nektar::SubSteppingExtrapolate::v_SubStepSaveFields(), Nektar::LibUtilities::TimeIntegrationSchemeGEM::v_TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationSchemeSDC::v_TimeIntegrate(), Nektar::MultiRegions::AssemblyMapCG::v_UniversalAssemble(), Nektar::GlobalMapping::Mapping::v_UpdateBCs(), Nektar::GlobalMapping::Mapping::v_UpdateMapping(), Nektar::GlobalMapping::Mapping::v_VelocityLaplacian(), Nektar::FieldUtils::OutputTecplot::v_WriteTecplotConnectivity(), Nektar::FieldUtils::OutputTecplotBinary::v_WriteTecplotConnectivity(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_WriteVtkPieceHeader(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_WriteVtkPieceHeader(), Vcopy(), Nektar::AcousticSystem::WallBC(), Nektar::LinearSWE::WallBoundary(), Nektar::NonlinearPeregrine::WallBoundary(), Nektar::NonlinearSWE::WallBoundary(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::MMFSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundaryContVariables(), Nektar::NonlinearPeregrine::WallBoundaryForcing(), Nektar::NonlinearPeregrine::WCESolve(), Nektar::SolverUtils::DiffusionLFR::WeakPenaltyforScalar(), Nektar::SolverUtils::DiffusionLFRNS::WeakPenaltyO1(), and Nektar::AcousticSystem::WhiteNoiseBC().

◆ Vcopy() [6/6]

template void Vmath::Vcopy ( int  n,
const unsigned int *  x,
const int  incx,
unsigned int *  y,
const int  incy 
)

◆ Vdiv() [1/4]

template<class T >
void Vmath::Vdiv ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

Multiply vector z = x/y.

Definition at line 115 of file VmathArray.hpp.

118 {
119  ASSERTL1(static_cast<unsigned int>(n * incx) <= x.size() + x.GetOffset(),
120  "Array out of bounds");
121  ASSERTL1(static_cast<unsigned int>(n * incy) <= y.size() + y.GetOffset(),
122  "Array out of bounds");
123  ASSERTL1(static_cast<unsigned int>(n * incz) <= z.size() + z.GetOffset(),
124  "Array out of bounds");
125 
126  Vdiv(n, &x[0], incx, &y[0], incy, &z[0], incz);
127 }
void Vdiv(int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
Multiply vector z = x/y.
Definition: VmathArray.hpp:115

References ASSERTL1, and Vdiv().

◆ Vdiv() [2/4]

template void Vmath::Vdiv ( int  n,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)

◆ Vdiv() [3/4]

template void Vmath::Vdiv ( int  n,
const Nektar::NekSingle x,
const int  incx,
const Nektar::NekSingle y,
const int  incy,
Nektar::NekSingle z,
const int  incz 
)

◆ Vdiv() [4/4]

template<class T >
void Vmath::Vdiv ( int  n,
const T *  x,
const int  incx,
const T *  y,
const int  incy,
T *  z,
const int  incz 
)

Multiply vector z = x/y.

Definition at line 284 of file Vmath.cpp.

286 {
287  ++n;
288  if (incx == 1 && incy == 1)
289  {
290  while (--n)
291  {
292  *z = (*x) / (*y);
293  ++x;
294  ++y;
295  ++z;
296  }
297  }
298  else
299  {
300  while (--n)
301  {
302  *z = (*x) / (*y);
303  x += incx;
304  y += incy;
305  z += incz;
306  }
307  }
308 }

Referenced by Nektar::DiffusionLDGNS::ApplyBCsO1(), Nektar::VariableConverter::ApplyC0Smooth(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::SpatialDomains::GeomFactors::ComputeDerivFactors(), Nektar::MMFSWE::ComputeEnstrophy(), Nektar::SpatialDomains::GeomFactors::ComputeGmat(), Nektar::LinearSWE::ConservativeToPrimitive(), Nektar::MMFSWE::ConservativeToPrimitive(), Nektar::NonlinearPeregrine::ConservativeToPrimitive(), Nektar::NonlinearSWE::ConservativeToPrimitive(), Nektar::MMFDiffusion::DoOdeRhs(), Nektar::MMFMaxwell::DoOdeRhs(), Nektar::VariableConverter::GetDynamicEnergy(), Nektar::VariableConverter::GetEnthalpy(), Nektar::VariableConverter::GetInternalEnergy(), Nektar::VariableConverter::GetMach(), Nektar::FieldUtils::ProcessVelocityDivergence::GetVelocity(), Nektar::FieldUtils::ProcessVorticity::GetVelocity(), Nektar::FieldUtils::ProcessWSS::GetVelocity(), Nektar::VariableConverter::GetVelocityVector(), Nektar::NonlinearPeregrine::GetVelocityVector(), Nektar::NonlinearSWE::GetVelocityVector(), Nektar::FieldUtils::ProcessWSS::GetViscosity(), Nektar::SolverUtils::MMFSystem::GramSchumitz(), main(), Nektar::VCSMapping::MappingPressureCorrection(), Nektar::LEE::v_AddLinTerm(), Nektar::SolverUtils::AdvectionFR::v_Advect(), Nektar::PressureInflowFileBC::v_Apply(), Nektar::PressureOutflowBC::v_Apply(), Nektar::PressureOutflowNonReflectiveBC::v_Apply(), Nektar::RiemannInvariantBC::v_Apply(), Nektar::ForcingAxiSymmetric::v_Apply(), Nektar::ForcingQuasi1D::v_Apply(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelCovar(), Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs(), Nektar::LinearSWE::v_ConservativeToPrimitive(), Nektar::NonlinearPeregrine::v_ConservativeToPrimitive(), Nektar::NonlinearSWE::v_ConservativeToPrimitive(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarToCartesian(), Nektar::SolverUtils::DiffusionLFRNS::v_Diffuse(), Nektar::SolverUtils::DiffusionLFR::v_Diffuse(), Nektar::GlobalMapping::Mapping::v_Divergence(), Nektar::LocalRegions::Expansion::v_DivideByQuadratureMetric(), Nektar::APE::v_GetFluxVector(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), Nektar::SolverUtils::Diffusion::v_GetPrimVar(), Nektar::ForcingQuasi1D::v_InitObject(), Nektar::SolverUtils::DiffusionIP::v_InitObject(), Nektar::LocalRegions::SegExp::v_PhysDeriv_s(), Nektar::FieldUtils::ProcessMultiShear::v_Process(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SetUpViscousForcing(), Nektar::LocalRegions::HexExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PrismExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PyrExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::QuadExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TetExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TriExp::v_SVVLaplacianFilter(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Vdiv(), Nektar::SpatialDomains::GeomFactors::VectorNormalise(), Nektar::MMFSWE::WallBoundary2D(), and Nektar::SolverUtils::DiffusionLFRNS::WeakPenaltyO1().

◆ Vexp() [1/2]

template<class T >
void Vmath::Vexp ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

Definition at line 230 of file VmathArray.hpp.

232 {
233  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
234  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
235 
236  Vexp(n, &x[0], incx, &y[0], incy);
237 }
void Vexp(int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
Definition: VmathArray.hpp:230

References ASSERTL1, and Vexp().

◆ Vexp() [2/2]

template<class T >
void Vmath::Vexp ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Definition at line 125 of file Vmath.hpp.

126 {
127  while (n--)
128  {
129  *y = exp(*x);
130  x += incx;
131  y += incy;
132  }
133 }

Referenced by Nektar::CellModel::TimeIntegrate(), Nektar::CourtemancheRamirezNattel98::v_Update(), and Vexp().

◆ Vlog() [1/2]

template<class T >
void Vmath::Vlog ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

Definition at line 220 of file VmathArray.hpp.

222 {
223  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
224  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
225 
226  Vlog(n, &x[0], incx, &y[0], incy);
227 }
void Vlog(int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
Definition: VmathArray.hpp:220

References ASSERTL1, and Vlog().

◆ Vlog() [2/2]

template<class T >
void Vmath::Vlog ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Definition at line 114 of file Vmath.hpp.

115 {
116  while (n--)
117  {
118  *y = log(*x);
119  x += incx;
120  y += incy;
121  }
122 }

References tinysimd::log().

Referenced by Nektar::CourtemancheRamirezNattel98::v_Update(), and Vlog().

◆ Vmax() [1/5]

template<class T >
T Vmath::Vmax ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Return the maximum element in x – called vmax to avoid conflict with max.

Definition at line 490 of file VmathArray.hpp.

491 {
492  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
493 
494  return Vmax(n, &x[0], incx);
495 }
T Vmax(int n, const Array< OneD, const T > &x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max.
Definition: VmathArray.hpp:490

References ASSERTL1, and Vmax().

◆ Vmax() [2/5]

template int Vmath::Vmax ( int  n,
const int *  x,
const int  incx 
)

◆ Vmax() [3/5]

template Nektar::NekDouble Vmath::Vmax ( int  n,
const Nektar::NekDouble x,
const int  incx 
)

◆ Vmax() [4/5]

template Nektar::NekSingle Vmath::Vmax ( int  n,
const Nektar::NekSingle x,
const int  incx 
)

◆ Vmax() [5/5]

template<class T >
T Vmath::Vmax ( int  n,
const T *  x,
const int  incx 
)

Return the maximum element in x – called vmax to avoid conflict with max.

Definition at line 945 of file Vmath.cpp.

946 {
947 
948  T xmax = *x;
949 
950  while (n--)
951  {
952  if (*x > xmax)
953  {
954  xmax = *x;
955  }
956  x += incx;
957  }
958 
959  return xmax;
960 }

Referenced by Nektar::NekMatrix< DataType, StandardMatrixTag >::AbsMaxtoMinEigenValueRatio(), Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::SolverUtils::UnsteadySystem::CheckSteadyState(), Computestreakpositions(), Nektar::SolverUtils::MMFSystem::ComputeZimYim(), Nektar::CoupledLocalToGlobalC0ContMap::CoupledLocalToGlobalC0ContMap(), EnforceRotationalSymmetry(), ExpandVertices(), Nektar::MMFMaxwell::GenerateSigmaPML(), Nektar::PulseWaveSystem::GetCommArray(), Nektar::FieldUtils::ProcessCFL::GetMaxStdVelocity(), Nektar::Extrapolate::GetMaxStdVelocity(), Nektar::VariableConverter::GetMuAv(), Nektar::VortexWaveInteraction::GetReflectionIndex(), Nektar::MultiRegions::ExpList::Linf(), main(), MappingEVids(), MoveOutsidePointsNnormpos(), Orderfunctionx(), Nektar::MMFDiffusion::PlanePhiWave(), Nektar::NonSmoothShockCapture::v_GetArtificialViscosity(), Nektar::CompressibleFlowSystem::v_GetTimeStep(), Nektar::MMFMaxwell::v_InitObject(), Nektar::FieldUtils::ProcessInterpField::v_Process(), Nektar::FieldUtils::ProcessInterpPoints::v_Process(), Nektar::FieldUtils::ProcessJacobianEnergy::v_Process(), Nektar::FilterBenchmark::v_Update(), Nektar::FieldUtils::OutputTecplotBinary::v_WriteTecplotZone(), and Vmax().

◆ Vmin() [1/5]

template<class T >
T Vmath::Vmin ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Return the minimum element in x - called vmin to avoid conflict with min.

Definition at line 526 of file VmathArray.hpp.

527 {
528  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
529 
530  return Vmin(n, &x[0], incx);
531 }
T Vmin(int n, const Array< OneD, const T > &x, const int incx)
Return the minimum element in x - called vmin to avoid conflict with min.
Definition: VmathArray.hpp:526

References ASSERTL1, and Vmin().

◆ Vmin() [2/5]

template int Vmath::Vmin ( int  n,
const int *  x,
const int  incx 
)

◆ Vmin() [3/5]

template Nektar::NekDouble Vmath::Vmin ( int  n,
const Nektar::NekDouble x,
const int  incx 
)

◆ Vmin() [4/5]

template Nektar::NekSingle Vmath::Vmin ( int  n,
const Nektar::NekSingle x,
const int  incx 
)

◆ Vmin() [5/5]

template<class T >
T Vmath::Vmin ( int  n,
const T *  x,
const int  incx 
)

◆ Vmul() [1/5]

template<class T >
void Vmath::Vmul ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

Multiply vector z = x*y.

Definition at line 68 of file VmathArray.hpp.

71 {
72  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
73  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
74  ASSERTL1(n * incz <= z.size() + z.GetOffset(), "Array out of bounds");
75 
76 #ifdef NEKTAR_ENABLE_SIMD_VMATH
77  boost::ignore_unused(incx, incy, incz);
78  ASSERTL1(incx == 1, "Simd vmath requires inc = 1");
79  ASSERTL1(incy == 1, "Simd vmath requires inc = 1");
80  ASSERTL1(incz == 1, "Simd vmath requires inc = 1");
81  SIMD::Vmul(n, &x[0], &y[0], &z[0]);
82 #else
83  Vmul(n, &x[0], incx, &y[0], incy, &z[0], incz);
84 #endif
85 }
void Vmul(int n, const Array< TwoD, NekDouble >::const_reference &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
Definition: VmathArray.hpp:88

References ASSERTL1, Vmath::SIMD::Vmul(), and Vmul().

◆ Vmul() [2/5]

template<class T >
void Vmath::Vmul ( int  n,
const Array< TwoD, NekDouble >::const_reference &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

Definition at line 88 of file VmathArray.hpp.

91 {
92  ASSERTL1(n * incx <= x.size(), "Array out of bounds");
93  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
94  ASSERTL1(n * incz <= z.size() + z.GetOffset(), "Array out of bounds");
95 
96  Vmul(n, x.origin(), incx, &y[0], incy, &z[0], incz);
97 }

References ASSERTL1, and Vmul().

◆ Vmul() [3/5]

template void Vmath::Vmul ( int  n,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)

◆ Vmul() [4/5]

template void Vmath::Vmul ( int  n,
const Nektar::NekSingle x,
const int  incx,
const Nektar::NekSingle y,
const int  incy,
Nektar::NekSingle z,
const int  incz 
)

◆ Vmul() [5/5]

template<class T >
void Vmath::Vmul ( int  n,
const T *  x,
const int  incx,
const T *  y,
const int  incy,
T *  z,
const int  incz 
)

Multiply vector z = x*y.

Definition at line 209 of file Vmath.cpp.

211 {
212  ++n;
213  if (incx == 1 && incy == 1 && incz == 1)
214  {
215  while (--n)
216  {
217  *z = (*x) * (*y);
218  ++x;
219  ++y;
220  ++z;
221  }
222  }
223  else
224  {
225  while (--n)
226  {
227  *z = (*x) * (*y);
228  x += incx;
229  y += incy;
230  z += incz;
231  }
232  }
233 }

Referenced by Nektar::NekMatrix< DataType, StandardMatrixTag >::AbsMaxtoMinEigenValueRatio(), Nektar::UnsteadyAdvectionDiffusion::AddAdvectionPenaltyFlux(), Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::MMFMaxwell::AddCoriolis(), Nektar::MMFSWE::AddCoriolis(), Nektar::LinearSWE::AddCoriolis(), Nektar::NonlinearPeregrine::AddCoriolis(), Nektar::NonlinearSWE::AddCoriolis(), Nektar::SolverUtils::MMFSystem::AdddedtMaxwell(), Nektar::MMFSWE::AddDivForGradient(), Nektar::LocalRegions::Expansion2D::AddEdgeBoundaryInt(), Nektar::MMFSWE::AddElevationEffect(), Nektar::MMFMaxwell::AddGreenDerivCompensate(), Nektar::LocalRegions::Expansion2D::AddHDGHelmholtzEdgeTerms(), Nektar::LocalRegions::Expansion3D::AddHDGHelmholtzFaceTerms(), Nektar::LocalRegions::Expansion2D::AddNormTraceInt(), Nektar::LocalRegions::Expansion3D::AddNormTraceInt(), Nektar::MMFMaxwell::AddPML(), Nektar::Extrapolate::AddPressureToOutflowBCs(), Nektar::MMFSWE::AddRotation(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::MultiRegions::GJPStabilisation::Apply(), Nektar::DiffusionLDGNS::ApplyBCsO1(), Nektar::DiffusionLDGNS::ApplyBCsO2(), Nektar::SolverUtils::DiffusionLDG::ApplyVectorBCs(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::FilterAeroForcesSPM::CalculateForces(), Nektar::SolverUtils::FilterAeroForces::CalculateForces(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::SolverUtils::ForcingAbsorption::CalculateForcing(), Nektar::LibUtilities::GaussPoints::CalculateGalerkinProjectionMatrix(), Nektar::GlobalMapping::MappingXYofXY::CalculateMetricTensor(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::SolverUtils::MMFSystem::CartesianToMovingframes(), Nektar::MMFMaxwell::Checkpoint_EDFluxOutput(), Nektar::MMFMaxwell::Checkpoint_EnergyOutput(), Nektar::MMFSWE::Checkpoint_Output_Cartesian(), Nektar::MMFMaxwell::Checkpoint_PlotOutput(), Nektar::MMFMaxwell::Checkpoint_TotPlotOutput(), Nektar::MMFSWE::Compute_demdt_cdot_ek(), Nektar::MMFSWE::ComputeEnergy(), Nektar::MMFSWE::ComputeEnstrophy(), Nektar::BidomainRoth::DoOdeRhs(), Nektar::MMFDiffusion::DoOdeRhs(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::MMFMaxwell::DoOdeRhs(), Nektar::MMFAdvection::EvaluateAdvectionVelocity(), Nektar::SolverUtils::Diffusion::GetDivCurl(), Nektar::ArtificialDiffusion::GetFluxVector(), Nektar::CFLtester::GetFluxVector(), Nektar::EigenValuesAdvection::GetFluxVector(), Nektar::MMFAdvection::GetFluxVector(), Nektar::UnsteadyAdvection::GetFluxVector(), Nektar::UnsteadyInviscidBurger::GetFluxVector(), Nektar::ImageWarpingSystem::GetFluxVector(), Nektar::LinearSWE::GetFluxVector(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::UnsteadyAdvectionDiffusion::GetFluxVectorAdv(), Nektar::UnsteadyViscousBurgers::GetFluxVectorAdv(), Nektar::UnsteadyAdvection::GetFluxVectorDeAlias(), Nektar::CompressibleFlowSystem::GetFluxVectorDeAlias(), Nektar::VariableConverter::GetMach(), Nektar::FieldUtils::ProcessCFL::GetMaxStdVelocity(), Nektar::Extrapolate::GetMaxStdVelocity(), Nektar::MMFSWE::GetSWEFluxVector(), Nektar::FieldUtils::ProcessWSS::GetViscosity(), Nektar::SolverUtils::MMFSystem::GramSchumitz(), Nektar::StdRegions::StdExpansion::H1(), Nektar::Collections::HexIProduct(), Nektar::LocalRegions::NodalTriExp::Integral(), Nektar::StdRegions::StdExpansion2D::Integral(), Nektar::FieldUtils::ProcessInnerProduct::IProduct(), Nektar::StdRegions::StdExpansion::L2(), Nektar::NonlinearPeregrine::LaitoneSolitaryWave(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree(), main(), Nektar::StdRegions::StdExpansion::MassMatrixOp_MatFree(), MoveOutsidePointsNnormpos(), Nektar::NekMultiplyDiagonalMatrix(), Nektar::DiffusionLDGNS::NumericalFluxO1(), Nektar::SolverUtils::DiffusionLFRNS::NumericalFluxO2(), Nektar::DiffusionLDGNS::NumericalFluxO2(), Nektar::SolverUtils::DiffusionLDG::NumFluxforScalar(), Nektar::SolverUtils::DiffusionLFR::NumFluxforVector(), Nektar::SolverUtils::DiffusionLDG::NumFluxforVector(), Nektar::Collections::IProductWRTDerivBase_StdMat::operator()(), Nektar::Collections::IProductWRTDerivBase_IterPerExp::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Seg::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Quad::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tri::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Hex::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tet::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Prism::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Pyr::operator()(), Nektar::Collections::Helmholtz_IterPerExp::operator()(), Nektar::Collections::IProductWRTBase_StdMat::operator()(), Nektar::Collections::IProductWRTBase_IterPerExp::operator()(), Nektar::Collections::IProductWRTBase_SumFac_Seg::operator()(), Nektar::Collections::PhysDeriv_IterPerExp::operator()(), Nektar::Collections::PhysDeriv_SumFac_Seg::operator()(), Nektar::Collections::PhysDeriv_SumFac_Quad::operator()(), Nektar::Collections::PhysDeriv_SumFac_Tri::operator()(), Nektar::Collections::PhysDeriv_SumFac_Hex::operator()(), Nektar::Collections::PhysDeriv_SumFac_Tet::operator()(), Nektar::Collections::PhysDeriv_SumFac_Prism::operator()(), Nektar::Collections::PhysDeriv_SumFac_Pyr::operator()(), Nektar::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::PressureMachTemperatureBC::PressureMachTemperatureBC(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::MMFSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::Collections::PrismIProduct(), Nektar::Collections::PyrIProduct(), Nektar::Collections::QuadIProduct(), Nektar::LibUtilities::NekFFTW::Reshuffle_FFTW2Nek(), Nektar::LibUtilities::NekFFTW::Reshuffle_Nek2FFTW(), Nektar::SolverUtils::RiemannSolver::rotateFromNormal(), Nektar::SolverUtils::RiemannSolver::rotateToNormal(), Nektar::IncNavierStokes::SetMRFDomainVelBCs(), Nektar::IncNavierStokes::SetMRFWallBCs(), Nektar::IncNavierStokes::SetRadiationBoundaryForcing(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::SolverUtils::MMFSystem::SetUpMovingFrames(), Nektar::SolverUtils::UnsteadySystem::SVVVarDiffCoeff(), Nektar::VelocityCorrectionScheme::SVVVarDiffCoeff(), Nektar::Collections::TetIProduct(), Nektar::Collections::TriIProduct(), Nektar::FilterMovingBody::UpdateForce(), Nektar::SmoothedProfileMethod::UpdateForcing(), Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::LEE::v_AddLinTerm(), Nektar::SolverUtils::AdvectionNonConservative::v_Advect(), Nektar::SolverUtils::AdvectionFR::v_Advect(), Nektar::AdjointAdvection::v_Advect(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::LocalRegions::HexExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::NodalTriExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::PrismExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::PyrExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::QuadExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::TetExp::v_AlignVectorToCollapsedDir(), Nektar::LocalRegions::TriExp::v_AlignVectorToCollapsedDir(), Nektar::ForcingAxiSymmetric::v_Apply(), Nektar::ForcingQuasi1D::v_Apply(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXYofXY::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXYofZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXofZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXYofXY::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXYofZ::v_ApplyChristoffelCovar(), Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::NodalTriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::QuadExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::HexExp::v_ComputeTraceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeTraceNormal(), Nektar::LocalRegions::PyrExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TetExp::v_ComputeTraceNormal(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarToCartesian(), Nektar::MappingExtrapolate::v_CorrectPressureBCs(), Nektar::GlobalMapping::MappingXofXZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarToCartesian(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedProd(), Nektar::MultiRegions::ExpListHomogeneous2D::v_DealiasedProd(), Nektar::SolverUtils::DiffusionLFRNS::v_Diffuse(), Nektar::SolverUtils::DiffusionLFR::v_Diffuse(), Nektar::GlobalMapping::Mapping::v_Divergence(), Nektar::MultiRegions::PreconditionerDiagonal::v_DoPreconditioner(), Nektar::MultiRegions::PreconditionerLinearWithLowEnergy::v_DoPreconditioner(), Nektar::MMFMaxwell::v_DoSolve(), Nektar::GlobalMapping::MappingXofXZ::v_DotGradJacobian(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoTransformBasisToLowEnergy(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoTransformCoeffsFromLowEnergy(), Nektar::MultiRegions::DisContField::v_EvaluateBoundaryConditions(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_EvaluateBoundaryConditions(), Nektar::SolverUtils::DriverAdaptive::v_Execute(), Nektar::SolverUtils::DriverModifiedArnoldi::v_Execute(), Nektar::StdRegions::StdQuadExp::v_FillMode(), Nektar::StdRegions::StdHexExp::v_FillMode(), Nektar::StdRegions::StdTriExp::v_FillMode(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::NavierStokesCFE::v_GetFluxPenalty(), Nektar::APE::v_GetFluxVector(), Nektar::LEE::v_GetFluxVector(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), Nektar::SpatialDomains::Geometry2D::v_GetLocCoords(), Nektar::SpatialDomains::Geometry3D::v_GetLocCoords(), Nektar::AcousticSystem::v_GetMaxStdVelocity(), Nektar::CompressibleFlowSystem::v_GetMaxStdVelocity(), Nektar::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::LocalRegions::QuadExp::v_GetTraceQFactors(), Nektar::NavierStokesCFE::v_GetViscousFluxVector(), Nektar::NavierStokesCFEAxisym::v_GetViscousFluxVector(), Nektar::NavierStokesCFE::v_GetViscousFluxVectorDeAlias(), Nektar::LocalRegions::SegExp::v_HelmholtzMatrixOp(), Nektar::BidomainRoth::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::MMFAdvection::v_InitObject(), Nektar::SolverUtils::DiffusionIP::v_InitObject(), Nektar::LocalRegions::HexExp::v_Integral(), Nektar::LocalRegions::PrismExp::v_Integral(), Nektar::LocalRegions::PyrExp::v_Integral(), Nektar::LocalRegions::QuadExp::v_Integral(), Nektar::LocalRegions::SegExp::v_Integral(), Nektar::LocalRegions::TetExp::v_Integral(), Nektar::LocalRegions::TriExp::v_Integral(), Nektar::StdRegions::StdSegExp::v_Integral(), Nektar::LocalRegions::SegExp::v_IProductWRTBase(), Nektar::StdRegions::StdPointExp::v_IProductWRTBase(), Nektar::StdRegions::StdSegExp::v_IProductWRTBase(), Nektar::StdRegions::StdSegExp::v_IProductWRTBase_SumFac(), Nektar::LocalRegions::SegExp::v_IProductWRTDerivBase(), Nektar::StdRegions::StdPrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdPyrExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTetExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTriExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::HexExp::v_IProductWRTDirectionalDerivBase_SumFac(), Nektar::LocalRegions::TriExp::v_IProductWRTDirectionalDerivBase_SumFac(), Nektar::MMFSWE::v_L2Error(), Nektar::LocalRegions::SegExp::v_LaplacianMatrixOp(), Nektar::MMFSWE::v_LinfError(), Nektar::GlobalMapping::MappingXofXZ::v_LowerIndex(), Nektar::GlobalMapping::MappingXofZ::v_LowerIndex(), Nektar::LocalRegions::Expansion::v_MultiplyByQuadratureMetric(), Nektar::StdRegions::StdHexExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdPrismExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdPyrExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdQuadExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdSegExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdTetExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdTriExp::v_MultiplyByStdQuadratureMetric(), Nektar::LocalRegions::SegExp::v_NormVectorIProductWRTBase(), Nektar::LocalRegions::HexExp::v_PhysDeriv(), Nektar::LocalRegions::PrismExp::v_PhysDeriv(), Nektar::LocalRegions::PyrExp::v_PhysDeriv(), Nektar::LocalRegions::TetExp::v_PhysDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDeriv(), Nektar::LocalRegions::TriExp::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv(), Nektar::StdRegions::StdTetExp::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv_n(), Nektar::LocalRegions::HexExp::v_PhysDirectionalDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDirectionalDeriv(), Nektar::LocalRegions::TriExp::v_PhysDirectionalDeriv(), Nektar::LinearSWE::v_PrimitiveToConservative(), Nektar::NonlinearPeregrine::v_PrimitiveToConservative(), Nektar::NonlinearSWE::v_PrimitiveToConservative(), Nektar::FieldUtils::ProcessBodyFittedVelocity::v_Process(), Nektar::FieldUtils::ProcessCombineAvg::v_Process(), Nektar::FieldUtils::ProcessMultiShear::v_Process(), Nektar::FieldUtils::ProcessQCriterion::v_Process(), Nektar::FieldUtils::ProcessWSS::v_Process(), Nektar::SolverUtils::FilterBodyFittedVelocity::v_ProcessSample(), Nektar::SolverUtils::FilterReynoldsStresses::v_ProcessSample(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofZ::v_RaiseIndex(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SolvePressure(), Nektar::VelocityCorrectionScheme::v_SolveViscous(), Nektar::SolverUtils::UnsteadySystem::v_SteadyStateResidual(), Nektar::CompressibleFlowSystem::v_SteadyStateResidual(), Nektar::LocalRegions::HexExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PrismExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PyrExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::QuadExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TetExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TriExp::v_SVVLaplacianFilter(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), Nektar::SolverUtils::FilterEnergy::v_Update(), Nektar::GlobalMapping::MappingXofZ::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXYofXY::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXYofZ::v_UpdateGeomInfo(), Nektar::LocalRegions::Expansion1D::v_VectorFlux(), Nektar::LocalRegions::Expansion2D::v_VectorFlux(), Nektar::SolverUtils::MMFSystem::VectorCrossProd(), Nektar::SpatialDomains::GeomFactors::VectorCrossProd(), Vmul(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::MMFSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundaryForcing(), Nektar::StdRegions::StdExpansion::WeakDerivMatrixOp_MatFree(), Nektar::MMFAdvection::WeakDGDirectionalAdvection(), Nektar::StdRegions::StdExpansion::WeakDirectionalDerivMatrixOp_MatFree(), Nektar::SolverUtils::DiffusionLFR::WeakPenaltyforVector(), Nektar::SolverUtils::DiffusionLFRNS::WeakPenaltyO1(), and Nektar::SolverUtils::DiffusionLFRNS::WeakPenaltyO2().

◆ Vpow() [1/2]

template<class T >
void Vmath::Vpow ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
const T  f,
Array< OneD, T > &  y,
const int  incy 
)

Definition at line 240 of file VmathArray.hpp.

242 {
243  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
244  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
245 
246  Vpow(n, &x[0], incx, f, &y[0], incy);
247 }
void Vpow(int n, const Array< OneD, const T > &x, const int incx, const T f, Array< OneD, T > &y, const int incy)
Definition: VmathArray.hpp:240

References ASSERTL1, and Vpow().

◆ Vpow() [2/2]

template<class T >
void Vmath::Vpow ( int  n,
const T *  x,
const int  incx,
const T  f,
T *  y,
const int  incy 
)

Definition at line 136 of file Vmath.hpp.

137 {
138  while (n--)
139  {
140  *y = pow(*x, f);
141  x += incx;
142  y += incy;
143  }
144 }

Referenced by Nektar::CourtemancheRamirezNattel98::v_Update(), and Vpow().

◆ Vsqrt() [1/4]

template<class T >
void Vmath::Vsqrt ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

sqrt y = sqrt(x)

Definition at line 251 of file VmathArray.hpp.

253 {
254  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
255  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
256 
257  Vsqrt(n, &x[0], incx, &y[0], incy);
258 }
void Vsqrt(int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
sqrt y = sqrt(x)
Definition: VmathArray.hpp:251

References ASSERTL1, and Vsqrt().

◆ Vsqrt() [2/4]

template void Vmath::Vsqrt ( int  n,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)

◆ Vsqrt() [3/4]

template void Vmath::Vsqrt ( int  n,
const Nektar::NekSingle x,
const int  incx,
Nektar::NekSingle y,
const int  incy 
)

◆ Vsqrt() [4/4]

template<class T >
void Vmath::Vsqrt ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

sqrt y = sqrt(x)

Definition at line 534 of file Vmath.cpp.

535 {
536  while (n--)
537  {
538  *y = sqrt(*x);
539  x += incx;
540  y += incy;
541  }
542 }

References tinysimd::sqrt().

Referenced by Nektar::SolverUtils::MMFSystem::AdddedtMaxwell(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::SolverUtils::MMFSystem::CheckMovingFrames(), Nektar::MMFMaxwell::Checkpoint_EnergyOutput(), Nektar::SpatialDomains::GeomFactors::ComputeDerivFactors(), Nektar::SpatialDomains::GeomFactors::ComputeJac(), Nektar::VariableConverter::GetAbsoluteVelocity(), Nektar::VariableConverter::GetMach(), main(), Nektar::SolverUtils::UnsteadySystem::SVVVarDiffCoeff(), Nektar::VelocityCorrectionScheme::SVVVarDiffCoeff(), Nektar::LocalRegions::NodalTriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::QuadExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::HexExp::v_ComputeTraceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeTraceNormal(), Nektar::LocalRegions::PyrExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TetExp::v_ComputeTraceNormal(), Nektar::SolverUtils::MMFSystem::v_GenerateSummary(), Nektar::FilterElectrogram::v_Initialise(), Nektar::MMFSWE::v_L2Error(), Nektar::MMFSWE::v_LinfError(), Nektar::FieldUtils::ProcessMultiShear::v_Process(), Nektar::FieldUtils::ProcessSurfDistance::v_Process(), Nektar::FieldUtils::ProcessWSS::v_Process(), Nektar::LocalRegions::HexExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PrismExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PyrExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::QuadExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TetExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TriExp::v_SVVLaplacianFilter(), Nektar::SolverUtils::MMFSystem::VectorAvgMagnitude(), Nektar::SpatialDomains::GeomFactors::VectorNormalise(), and Vsqrt().

◆ Vstvpp() [1/3]

template void Vmath::Vstvpp ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble v,
int  incv,
const Nektar::NekDouble w,
int  incw,
const Nektar::NekDouble x,
int  incx,
Nektar::NekDouble z,
int  incz 
)

◆ Vstvpp() [2/3]

template void Vmath::Vstvpp ( int  n,
const Nektar::NekSingle  alpha,
const Nektar::NekSingle v,
int  incv,
const Nektar::NekSingle w,
int  incw,
const Nektar::NekSingle x,
int  incx,
Nektar::NekSingle z,
int  incz 
)

◆ Vstvpp() [3/3]

template<class T >
void Vmath::Vstvpp ( int  n,
const T  alpha,
const T *  v,
int  incv,
const T *  w,
int  incw,
const T *  x,
int  incx,
T *  z,
int  incz 
)

Vstvpp (scalar times vector plus vector plus vector):

Definition at line 777 of file Vmath.cpp.

779 {
780  while (n--)
781  {
782  *z = alpha * (*v) + (*w) + (*x);
783  v += incv;
784  w += incw;
785  x += incx;
786  z += incz;
787  }
788 }

◆ Vsub() [1/4]

template<class T >
void Vmath::Vsub ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

Subtract vector z = x-y.

Definition at line 180 of file VmathArray.hpp.

183 {
184  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
185  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
186  ASSERTL1(n * incz <= z.size() + z.GetOffset(), "Array out of bounds");
187 
188  Vsub(n, &x[0], incx, &y[0], incy, &z[0], incz);
189 }
void Vsub(int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
Subtract vector z = x-y.
Definition: VmathArray.hpp:180

References ASSERTL1, and Vsub().

◆ Vsub() [2/4]

template void Vmath::Vsub ( int  n,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)

◆ Vsub() [3/4]

template void Vmath::Vsub ( int  n,
const Nektar::NekSingle x,
const int  incx,
const Nektar::NekSingle y,
const int  incy,
Nektar::NekSingle z,
const int  incz 
)

◆ Vsub() [4/4]

template<class T >
void Vmath::Vsub ( int  n,
const T *  x,
const int  incx,
const T *  y,
const int  incy,
T *  z,
const int  incz 
)

Subtract vector z = x-y.

Definition at line 419 of file Vmath.cpp.

421 {
422  ++n;
423  if (incx == 1 && incy == 1 && incz == 1)
424  {
425  while (--n)
426  {
427  *z = (*x) - (*y);
428  ++x;
429  ++y;
430  ++z;
431  }
432  }
433  else
434  {
435  while (--n)
436  {
437  *z = (*x) - (*y);
438  x += incx;
439  y += incy;
440  z += incz;
441  }
442  }
443 }

Referenced by Nektar::UnsteadyAdvectionDiffusion::AddAdvectionPenaltyFlux(), Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::MMFMaxwell::AddPML(), Nektar::MultiRegions::GJPStabilisation::Apply(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::CFSImplicit::CalcTraceNumericalFlux(), Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::FilterAeroForcesSPM::CalculateForces(), Nektar::SolverUtils::ForcingAbsorption::CalculateForcing(), Nektar::FieldUtils::ProcessPhiFromFile::CheckHit(), Nektar::SolverUtils::MMFSystem::ComputeCurl(), Nektar::MMFSWE::ComputeEnergy(), Nektar::MMFMaxwell::ComputeMaterialMicroWaveCloak(), Nektar::MMFMaxwell::ComputeRadCloak(), Nektar::LinearSWE::ConservativeToPrimitive(), Nektar::MMFSWE::ConservativeToPrimitive(), Nektar::NonlinearPeregrine::ConservativeToPrimitive(), Nektar::NonlinearSWE::ConservativeToPrimitive(), Nektar::SolverUtils::DiffusionLFR::DerCFlux_2D(), Nektar::SolverUtils::DiffusionLFRNS::DerCFlux_2D(), Nektar::SolverUtils::AdvectionFR::DivCFlux_2D(), Nektar::SolverUtils::DiffusionLFR::DivCFlux_2D(), Nektar::SolverUtils::DiffusionLFRNS::DivCFlux_2D(), Nektar::SolverUtils::AdvectionFR::DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFR::DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFRNS::DivCFlux_2D_Gauss(), Nektar::MMFMaxwell::DoOdeRhs(), Nektar::MMFAdvection::EvaluateAdvectionVelocity(), Nektar::CoupledLinearNS::EvaluateNewtonRHS(), Nektar::MMFMaxwell::GenerateSigmaPML(), Nektar::VariableConverter::GetInternalEnergy(), Nektar::VariableConverter::GetSensor(), Nektar::FieldUtils::ProcessWSS::GetViscosity(), Nektar::StdRegions::StdExpansion::H1(), Nektar::StdRegions::StdExpansion::L2(), Nektar::MultiRegions::DisContField::L2_DGDeriv(), Nektar::SolverUtils::MMFSystem::LaxFriedrichMaxwellFlux1D(), Nektar::StdRegions::StdExpansion::Linf(), main(), Nektar::VCSMapping::MappingPressureCorrection(), Nektar::CFSImplicit::MatrixMultiplyMatrixFreeCoeff(), Nektar::CFSImplicit::NonlinSysEvaluatorCoeff(), Nektar::CFSImplicit::NumCalcRiemFluxJac(), Nektar::SolverUtils::DiffusionLDG::NumFluxforVector(), Nektar::SmoothedProfileMethod::SolveCorrectedVelocity(), Nektar::MMFSWE::TestVorticityComputation(), Nektar::CellModel::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationAlgorithmGLM::TimeIntegrate(), Nektar::SmoothedProfileMethod::UpdateForcing(), Nektar::SolverUtils::MMFSystem::UpwindMaxwellFlux1D(), Nektar::ForcingAxiSymmetric::v_Apply(), Nektar::ForcingMovingBody::v_Apply(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_ComputeInitialGuess(), Nektar::LibUtilities::ImplicitTimeIntegrationSchemeSDC::v_ComputeInitialGuess(), Nektar::LinearSWE::v_ConservativeToPrimitive(), Nektar::NonlinearPeregrine::v_ConservativeToPrimitive(), Nektar::NonlinearSWE::v_ConservativeToPrimitive(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarFromCartesian(), Nektar::MappingExtrapolate::v_CorrectPressureBCs(), Nektar::GlobalMapping::MappingXofXZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarToCartesian(), Nektar::MultiRegions::ExpList::v_CurlCurl(), Nektar::GlobalMapping::Mapping::v_CurlCurlField(), Nektar::SolverUtils::Diffusion3DHomogeneous1D::v_Diffuse(), Nektar::SolverUtils::DriverAdaptive::v_Execute(), Nektar::LocalRegions::QuadExp::v_FwdTransBndConstrained(), Nektar::LocalRegions::SegExp::v_FwdTransBndConstrained(), Nektar::LocalRegions::TriExp::v_FwdTransBndConstrained(), Nektar::StdRegions::StdQuadExp::v_FwdTransBndConstrained(), Nektar::StdRegions::StdSegExp::v_FwdTransBndConstrained(), Nektar::StdRegions::StdTriExp::v_FwdTransBndConstrained(), Nektar::NavierStokesCFE::v_GetFluxPenalty(), Nektar::NavierStokesCFEAxisym::v_GetViscousFluxVector(), Nektar::GlobalMapping::Mapping::v_gradgradU(), Nektar::SolverUtils::DiffusionIP::v_InitObject(), Nektar::MMFSWE::v_L2Error(), Nektar::MMFSWE::v_LinfError(), Nektar::NavierStokesImplicitCFE::v_MinusDiffusionFluxJacPoint(), Nektar::FieldUtils::ProcessCombineAvg::v_Process(), Nektar::FieldUtils::ProcessDisplacement::v_Process(), Nektar::FieldUtils::ProcessQCriterion::v_Process(), Nektar::FieldUtils::ProcessStreamFunction::v_Process(), Nektar::FieldUtils::ProcessSurfDistance::v_Process(), Nektar::FieldUtils::ProcessVorticity::v_Process(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofZ::v_RaiseIndex(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_ResidualEval(), Nektar::LibUtilities::IMEXTimeIntegrationSchemeSDC::v_SDCIterationLoop(), Nektar::LibUtilities::ImplicitTimeIntegrationSchemeSDC::v_SDCIterationLoop(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::MultiRegions::GlobalLinSysIterativeFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysPETScFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysStaticCond::v_Solve(), Nektar::MultiRegions::GlobalLinSysXxtFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysDirectFull::v_Solve(), Nektar::VCSMapping::v_SolvePressure(), Nektar::LibUtilities::NekLinSysIterFixedpointJacobi::v_SolveSystem(), Nektar::LibUtilities::NekNonlinSysNewton::v_SolveSystem(), Nektar::SolverUtils::UnsteadySystem::v_SteadyStateResidual(), Nektar::LibUtilities::TimeIntegrationSchemeGEM::v_TimeIntegrate(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), Nektar::SolverUtils::FilterEnergy::v_Update(), Nektar::SolverUtils::FilterModalEnergy::v_Update(), Nektar::GlobalMapping::Mapping::v_VelocityLaplacian(), Nektar::FieldUtils::ProcessPhiFromFile::Vector2edge(), Vsub(), and Nektar::SolverUtils::DiffusionLFRNS::WeakPenaltyO1().

◆ Vsum() [1/5]

template<class T >
T Vmath::Vsum ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Subtract return sum(x)

Definition at line 472 of file VmathArray.hpp.

473 {
474  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
475 
476  return Vsum(n, &x[0], incx);
477 }
T Vsum(int n, const Array< OneD, const T > &x, const int incx)
Subtract return sum(x)
Definition: VmathArray.hpp:472

References ASSERTL1, and Vsum().

◆ Vsum() [2/5]

template int Vmath::Vsum ( int  n,
const int *  x,
const int  incx 
)

◆ Vsum() [3/5]

template Nektar::NekDouble Vmath::Vsum ( int  n,
const Nektar::NekDouble x,
const int  incx 
)

◆ Vsum() [4/5]

template Nektar::NekSingle Vmath::Vsum ( int  n,
const Nektar::NekSingle x,
const int  incx 
)

◆ Vsum() [5/5]

template<class T >
T Vmath::Vsum ( int  n,
const T *  x,
const int  incx 
)

◆ Vvtvm() [1/4]

template<class T >
void Vmath::Vvtvm ( int  n,
const Array< OneD, const T > &  w,
const int  incw,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

vvtvm (vector times vector minus vector): z = w*x - y

Definition at line 339 of file VmathArray.hpp.

343 {
344  ASSERTL1(n * incw <= w.size() + w.GetOffset(), "Array out of bounds");
345  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
346  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
347  ASSERTL1(n * incz <= z.size() + z.GetOffset(), "Array out of bounds");
348 
349 #ifdef NEKTAR_ENABLE_SIMD_VMATH
350  boost::ignore_unused(incw, incx, incy, incz);
351  ASSERTL1(incw == 1, "Simd vmath requires inc = 1");
352  ASSERTL1(incx == 1, "Simd vmath requires inc = 1");
353  ASSERTL1(incy == 1, "Simd vmath requires inc = 1");
354  ASSERTL1(incz == 1, "Simd vmath requires inc = 1");
355  SIMD::Vvtvm(n, &w[0], &x[0], &y[0], &z[0]);
356 #else
357  Vvtvm(n, &w[0], incw, &x[0], incx, &y[0], incy, &z[0], incz);
358 #endif
359 }
void Vvtvm(int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
vvtvm (vector times vector minus vector): z = w*x - y
Definition: VmathArray.hpp:339

References ASSERTL1, Vmath::SIMD::Vvtvm(), and Vvtvm().

◆ Vvtvm() [2/4]

template void Vmath::Vvtvm ( int  n,
const Nektar::NekDouble w,
const int  incw,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)

◆ Vvtvm() [3/4]

template void Vmath::Vvtvm ( int  n,
const Nektar::NekSingle w,
const int  incw,
const Nektar::NekSingle x,
const int  incx,
const Nektar::NekSingle y,
const int  incy,
Nektar::NekSingle z,
const int  incz 
)

◆ Vvtvm() [4/4]

template<class T >
void Vmath::Vvtvm ( int  n,
const T *  w,
const int  incw,
const T *  x,
const int  incx,
const T *  y,
const int  incy,
T *  z,
const int  incz 
)

◆ Vvtvp() [1/5]

template<class T >
void Vmath::Vvtvp ( int  n,
const Array< OneD, const T > &  w,
const int  incw,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

vvtvp (vector times vector plus vector): z = w*x + y

Definition at line 275 of file VmathArray.hpp.

279 {
280  ASSERTL1(n * incw <= w.size() + w.GetOffset(), "Array out of bounds");
281  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
282  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
283  ASSERTL1(n * incz <= z.size() + z.GetOffset(), "Array out of bounds");
284 
285 #ifdef NEKTAR_ENABLE_SIMD_VMATH
286  boost::ignore_unused(incw, incx, incy, incz);
287  ASSERTL1(incw == 1, "Simd vmath requires inc = 1");
288  ASSERTL1(incx == 1, "Simd vmath requires inc = 1");
289  ASSERTL1(incy == 1, "Simd vmath requires inc = 1");
290  ASSERTL1(incz == 1, "Simd vmath requires inc = 1");
291  SIMD::Vvtvp(n, &w[0], &x[0], &y[0], &z[0]);
292 #else
293  Vvtvp(n, &w[0], incw, &x[0], incx, &y[0], incy, &z[0], incz);
294 #endif
295 }
void Vvtvp(int n, const Array< TwoD, NekDouble >::const_reference &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
Definition: VmathArray.hpp:298

References ASSERTL1, Vmath::SIMD::Vvtvp(), and Vvtvp().

◆ Vvtvp() [2/5]

template<class T >
void Vmath::Vvtvp ( int  n,
const Array< TwoD, NekDouble >::const_reference &  w,
const int  incw,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

Definition at line 298 of file VmathArray.hpp.

302 {
303  ASSERTL1(n * incw <= w.size(), "Array out of bounds");
304  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
305  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
306  ASSERTL1(n * incz <= z.size() + z.GetOffset(), "Array out of bounds");
307 
308  Vvtvp(n, w.origin(), incw, &x[0], incx, &y[0], incy, &z[0], incz);
309 }

References ASSERTL1, and Vvtvp().

◆ Vvtvp() [3/5]

template void Vmath::Vvtvp ( int  n,
const Nektar::NekDouble w,
const int  incw,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)

◆ Vvtvp() [4/5]

template void Vmath::Vvtvp ( int  n,
const Nektar::NekSingle w,
const int  incw,
const Nektar::NekSingle x,
const int  incx,
const Nektar::NekSingle y,
const int  incy,
Nektar::NekSingle z,
const int  incz 
)

◆ Vvtvp() [5/5]

template<class T >
void Vmath::Vvtvp ( int  n,
const T *  w,
const int  incw,
const T *  x,
const int  incx,
const T *  y,
const int  incy,
T *  z,
const int  incz 
)

vvtvp (vector times vector plus vector): z = w*x + y

Definition at line 574 of file Vmath.cpp.

576 {
577  while (n--)
578  {
579  *z = (*w) * (*x) + (*y);
580  w += incw;
581  x += incx;
582  y += incy;
583  z += incz;
584  }
585 }

Referenced by Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::SolverUtils::MMFSystem::AdddedtMaxwell(), Nektar::MMFMaxwell::AddPML(), Nektar::MMFSWE::AddRotation(), Nektar::MultiRegions::GJPStabilisation::Apply(), Nektar::DiffusionLDGNS::ApplyBCsO1(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::SolverUtils::FilterAeroForces::CalculateForces(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::GlobalMapping::MappingXYofXY::CalculateMetricTensor(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::SolverUtils::MMFSystem::CartesianToMovingframes(), Nektar::SpatialDomains::GeomFactors::CheckIfValid(), Nektar::SolverUtils::MMFSystem::CheckMovingFrames(), Nektar::MMFMaxwell::Checkpoint_EnergyOutput(), Nektar::MMFSWE::Checkpoint_Output_Cartesian(), Nektar::MMFMaxwell::Checkpoint_PlotOutput(), Nektar::MMFMaxwell::Checkpoint_TotPlotOutput(), Nektar::MMFSWE::Compute_demdt_cdot_ek(), Nektar::SolverUtils::MMFSystem::Computedemdxicdote(), Nektar::SpatialDomains::GeomFactors::ComputeDerivFactors(), Nektar::SolverUtils::MMFSystem::ComputeDivCurlMF(), Nektar::MMFSWE::ComputeEnergy(), Nektar::MMFMaxwell::ComputeEnergyDensity(), Nektar::SpatialDomains::GeomFactors::ComputeGmat(), Nektar::LocalRegions::Expansion::ComputeGmatcdotMF(), Nektar::SpatialDomains::GeomFactors::ComputeJac(), Nektar::SpatialDomains::GeomFactors::ComputeMovingFrames(), Nektar::MMFAdvection::ComputeNablaCdotVelocity(), Nektar::MMFSWE::ComputeNablaCdotVelocity(), Nektar::MMFMaxwell::ComputeSurfaceCurrent(), Nektar::MMFAdvection::ComputeveldotMF(), Nektar::MMFSWE::ComputeVorticity(), Nektar::MMFMaxwell::DoOdeRhs(), Nektar::VariableConverter::GetAbsoluteVelocity(), Nektar::VariableConverter::GetDynamicEnergy(), Nektar::VariableConverter::GetMach(), Nektar::FieldUtils::ProcessCFL::GetMaxStdVelocity(), Nektar::Extrapolate::GetMaxStdVelocity(), Nektar::LocalRegions::Expansion2D::GetnEdgecdotMF(), Nektar::LocalRegions::Expansion3D::GetnFacecdotMF(), Nektar::UnsteadyAdvectionDiffusion::GetNormalVel(), Nektar::CFLtester::GetNormalVelocity(), Nektar::EigenValuesAdvection::GetNormalVelocity(), Nektar::MMFAdvection::GetNormalVelocity(), Nektar::UnsteadyAdvection::GetNormalVelocity(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::ImageWarpingSystem::GetNormalVelocity(), Nektar::UnsteadyViscousBurgers::GetNormalVelocity(), Nektar::SolverUtils::MMFSystem::GramSchumitz(), Nektar::StdRegions::StdExpansion::H1(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), main(), Nektar::VCSMapping::MappingAccelerationCorrection(), Nektar::VCSMapping::MappingAdvectionCorrection(), Nektar::SolverUtils::DiffusionLFRNS::NumericalFluxO1(), Nektar::SolverUtils::DiffusionLFRNS::NumericalFluxO2(), Nektar::DiffusionLDGNS::NumericalFluxO2(), Nektar::Collections::IProductWRTDerivBase_StdMat::operator()(), Nektar::Collections::IProductWRTDerivBase_IterPerExp::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Seg::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Quad::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tri::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Hex::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tet::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Prism::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Pyr::operator()(), Nektar::Collections::Helmholtz_IterPerExp::operator()(), Nektar::Collections::PhysDeriv_StdMat::operator()(), Nektar::Collections::PhysDeriv_IterPerExp::operator()(), Nektar::Collections::PhysDeriv_SumFac_Quad::operator()(), Nektar::Collections::PhysDeriv_SumFac_Tri::operator()(), Nektar::Collections::PhysDeriv_SumFac_Hex::operator()(), Nektar::Collections::PhysDeriv_SumFac_Tet::operator()(), Nektar::Collections::PhysDeriv_SumFac_Prism::operator()(), Nektar::Collections::PhysDeriv_SumFac_Pyr::operator()(), Nektar::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::SolverUtils::RiemannSolver::rotateFromNormal(), Nektar::SolverUtils::RiemannSolver::rotateToNormal(), Nektar::IncNavierStokes::SetZeroNormalVelocity(), Nektar::NavierStokesCFE::SpecialBndTreat(), Nektar::SolverUtils::UnsteadySystem::SVVVarDiffCoeff(), Nektar::VelocityCorrectionScheme::SVVVarDiffCoeff(), Nektar::CellModel::TimeIntegrate(), Nektar::FilterMovingBody::UpdateForce(), Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::LEE::v_AddLinTerm(), Nektar::SolverUtils::AdvectionNonConservative::v_Advect(), Nektar::AdjointAdvection::v_Advect(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::PressureInflowFileBC::v_Apply(), Nektar::PressureOutflowBC::v_Apply(), Nektar::PressureOutflowNonReflectiveBC::v_Apply(), Nektar::RiemannInvariantBC::v_Apply(), Nektar::SymmetryBC::v_Apply(), Nektar::WallBC::v_Apply(), Nektar::GlobalMapping::MappingGeneral::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXYofXY::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingGeneral::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXYofXY::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXYofZ::v_ApplyChristoffelCovar(), Nektar::LocalRegions::PyrExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::NodalTriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::QuadExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::HexExp::v_ComputeTraceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeTraceNormal(), Nektar::LocalRegions::PyrExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TetExp::v_ComputeTraceNormal(), Nektar::GlobalMapping::MappingGeneral::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingGeneral::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingGeneral::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingGeneral::v_CovarToCartesian(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedDotProd(), Nektar::GlobalMapping::Mapping::v_DotGradJacobian(), Nektar::GlobalMapping::MappingXofXZ::v_DotGradJacobian(), Nektar::SolverUtils::MMFSystem::v_GenerateSummary(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::APE::v_GetFluxVector(), Nektar::LEE::v_GetFluxVector(), Nektar::SpatialDomains::Geometry2D::v_GetLocCoords(), Nektar::SpatialDomains::Geometry3D::v_GetLocCoords(), Nektar::AcousticSystem::v_GetMaxStdVelocity(), Nektar::CompressibleFlowSystem::v_GetMaxStdVelocity(), Nektar::NavierStokesCFE::v_GetViscousFluxVector(), Nektar::NavierStokesCFEAxisym::v_GetViscousFluxVector(), Nektar::NavierStokesCFE::v_GetViscousFluxVectorDeAlias(), Nektar::LocalRegions::SegExp::v_HelmholtzMatrixOp(), Nektar::FilterElectrogram::v_Initialise(), Nektar::MMFDiffusion::v_InitObject(), Nektar::MMFSWE::v_L2Error(), Nektar::LocalRegions::SegExp::v_LaplacianMatrixOp(), Nektar::LocalRegions::HexExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::GlobalMapping::Mapping::v_LowerIndex(), Nektar::LocalRegions::SegExp::v_NormVectorIProductWRTBase(), Nektar::LocalRegions::QuadExp::v_NormVectorIProductWRTBase(), Nektar::LocalRegions::TriExp::v_NormVectorIProductWRTBase(), Nektar::LocalRegions::HexExp::v_PhysDeriv(), Nektar::LocalRegions::PrismExp::v_PhysDeriv(), Nektar::LocalRegions::PyrExp::v_PhysDeriv(), Nektar::LocalRegions::TetExp::v_PhysDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDeriv(), Nektar::LocalRegions::TriExp::v_PhysDeriv(), Nektar::StdRegions::StdTriExp::v_PhysDeriv(), Nektar::LocalRegions::HexExp::v_PhysDirectionalDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDirectionalDeriv(), Nektar::LocalRegions::TriExp::v_PhysDirectionalDeriv(), Nektar::FieldUtils::ProcessMultiShear::v_Process(), Nektar::FieldUtils::ProcessQCriterion::v_Process(), Nektar::FieldUtils::ProcessScalGrad::v_Process(), Nektar::FieldUtils::ProcessSurfDistance::v_Process(), Nektar::FieldUtils::ProcessWSS::v_Process(), Nektar::GlobalMapping::Mapping::v_RaiseIndex(), Nektar::APE::v_RiemannInvariantBC(), Nektar::LEE::v_RiemannInvariantBC(), Nektar::VelocityCorrectionScheme::v_SolveViscous(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::SolverUtils::FilterEnergy::v_Update(), Nektar::FilterElectrogram::v_Update(), Nektar::LocalRegions::Expansion1D::v_VectorFlux(), Nektar::LocalRegions::Expansion2D::v_VectorFlux(), Nektar::SolverUtils::MMFSystem::VectorAvgMagnitude(), Nektar::SolverUtils::MMFSystem::VectorDotProd(), Nektar::SpatialDomains::GeomFactors::VectorNormalise(), Vvtvp(), Nektar::AcousticSystem::WallBC(), Nektar::LinearSWE::WallBoundary(), Nektar::NonlinearPeregrine::WallBoundary(), Nektar::NonlinearSWE::WallBoundary(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::MMFSWE::WallBoundary2D(), and Nektar::NonlinearPeregrine::WallBoundaryForcing().

◆ Vvtvvtm() [1/4]

template<class T >
void Vmath::Vvtvvtm ( int  n,
const Array< OneD, const T > &  v,
int  incv,
const Array< OneD, const T > &  w,
int  incw,
const Array< OneD, const T > &  x,
int  incx,
const Array< OneD, const T > &  y,
int  incy,
Array< OneD, T > &  z,
int  incz 
)

vvtvvtm (vector times vector minus vector times vector): z = v*w - x*y

Definition at line 390 of file VmathArray.hpp.

395 {
396  ASSERTL1(n * incv <= v.size() + v.GetOffset(), "Array out of bounds");
397  ASSERTL1(n * incw <= w.size() + w.GetOffset(), "Array out of bounds");
398  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
399  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
400  ASSERTL1(n * incz <= z.size() + z.GetOffset(), "Array out of bounds");
401 
402 #ifdef NEKTAR_ENABLE_SIMD_VMATH
403  boost::ignore_unused(incv, incw, incx, incy, incz);
404  ASSERTL1(incw == 1, "Simd vmath requires inc = 1");
405  ASSERTL1(incx == 1, "Simd vmath requires inc = 1");
406  ASSERTL1(incy == 1, "Simd vmath requires inc = 1");
407  ASSERTL1(incz == 1, "Simd vmath requires inc = 1");
408  SIMD::Vvtvvtm(n, &v[0], &w[0], &x[0], &y[0], &z[0]);
409 #else
410  Vvtvvtm(n, &v[0], incv, &w[0], incw, &x[0], incx, &y[0], incy, &z[0], incz);
411 #endif
412 }
void Vvtvvtm(int n, const Array< OneD, const T > &v, int incv, const Array< OneD, const T > &w, int incw, const Array< OneD, const T > &x, int incx, const Array< OneD, const T > &y, int incy, Array< OneD, T > &z, int incz)
vvtvvtm (vector times vector minus vector times vector): z = v*w - x*y
Definition: VmathArray.hpp:390

References ASSERTL1, Vmath::SIMD::Vvtvvtm(), and Vvtvvtm().

◆ Vvtvvtm() [2/4]

template void Vmath::Vvtvvtm ( int  n,
const Nektar::NekDouble v,
int  incv,
const Nektar::NekDouble w,
int  incw,
const Nektar::NekDouble x,
int  incx,
const Nektar::NekDouble y,
int  incy,
Nektar::NekDouble z,
int  incz 
)

◆ Vvtvvtm() [3/4]

template void Vmath::Vvtvvtm ( int  n,
const Nektar::NekSingle v,
int  incv,
const Nektar::NekSingle w,
int  incw,
const Nektar::NekSingle x,
int  incx,
const Nektar::NekSingle y,
int  incy,
Nektar::NekSingle z,
int  incz 
)

◆ Vvtvvtm() [4/4]

template<class T >
void Vmath::Vvtvvtm ( int  n,
const T *  v,
int  incv,
const T *  w,
int  incw,
const T *  x,
int  incx,
const T *  y,
int  incy,
T *  z,
int  incz 
)

vvtvvtm (vector times vector minus vector times vector):

Definition at line 721 of file Vmath.cpp.

723 {
724  while (n--)
725  {
726  *z = (*v) * (*w) - (*x) * (*y);
727  v += incv;
728  w += incw;
729  x += incx;
730  y += incy;
731  z += incz;
732  }
733 }

Referenced by Nektar::SpatialDomains::GeomFactors::Adjoint(), Nektar::SpatialDomains::GeomFactors::CheckIfValid(), and Vvtvvtm().

◆ Vvtvvtp() [1/4]

template<class T >
void Vmath::Vvtvvtp ( int  n,
const Array< OneD, const T > &  v,
int  incv,
const Array< OneD, const T > &  w,
int  incw,
const Array< OneD, const T > &  x,
int  incx,
const Array< OneD, const T > &  y,
int  incy,
Array< OneD, T > &  z,
int  incz 
)

vvtvvtp (vector times vector plus vector times vector): z = v*w + x*y

Definition at line 363 of file VmathArray.hpp.

368 {
369  ASSERTL1(n * incv <= v.size() + v.GetOffset(), "Array out of bounds");
370  ASSERTL1(n * incw <= w.size() + w.GetOffset(), "Array out of bounds");
371  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
372  ASSERTL1(n * incy <= y.size() + y.GetOffset(), "Array out of bounds");
373  ASSERTL1(n * incz <= z.size() + z.GetOffset(), "Array out of bounds");
374 
375 #ifdef NEKTAR_ENABLE_SIMD_VMATH
376  boost::ignore_unused(incv, incw, incx, incy, incz);
377  ASSERTL1(incw == 1, "Simd vmath requires inc = 1");
378  ASSERTL1(incx == 1, "Simd vmath requires inc = 1");
379  ASSERTL1(incy == 1, "Simd vmath requires inc = 1");
380  ASSERTL1(incz == 1, "Simd vmath requires inc = 1");
381  SIMD::Vvtvvtp(n, &v[0], &w[0], &x[0], &y[0], &z[0]);
382 #else
383  Vvtvvtp(n, &v[0], incv, &w[0], incw, &x[0], incx, &y[0], incy, &z[0], incz);
384 #endif
385 }
void Vvtvvtp(int n, const Array< OneD, const T > &v, int incv, const Array< OneD, const T > &w, int incw, const Array< OneD, const T > &x, int incx, const Array< OneD, const T > &y, int incy, Array< OneD, T > &z, int incz)
vvtvvtp (vector times vector plus vector times vector): z = v*w + x*y
Definition: VmathArray.hpp:363

References ASSERTL1, Vmath::SIMD::Vvtvvtp(), and Vvtvvtp().

◆ Vvtvvtp() [2/4]

template void Vmath::Vvtvvtp ( int  n,
const Nektar::NekDouble v,
int  incv,
const Nektar::NekDouble w,
int  incw,
const Nektar::NekDouble x,
int  incx,
const Nektar::NekDouble y,
int  incy,
Nektar::NekDouble z,
int  incz 
)

◆ Vvtvvtp() [3/4]

template void Vmath::Vvtvvtp ( int  n,
const Nektar::NekSingle v,
int  incv,
const Nektar::NekSingle w,
int  incw,
const Nektar::NekSingle x,
int  incx,
const Nektar::NekSingle y,
int  incy,
Nektar::NekSingle z,
int  incz 
)

◆ Vvtvvtp() [4/4]

template<class T >
void Vmath::Vvtvvtp ( int  n,
const T *  v,
int  incv,
const T *  w,
int  incw,
const T *  x,
int  incx,
const T *  y,
int  incy,
T *  z,
int  incz 
)

◆ Zero() [1/6]

template<class T >
void Vmath::Zero ( int  n,
Array< OneD, T > &  x,
const int  incx 
)

Zero vector.

Definition at line 204 of file VmathArray.hpp.

205 {
206  ASSERTL1(n * incx <= x.size() + x.GetOffset(), "Array out of bounds");
207 
208  Zero(n, &x[0], incx);
209 }
void Zero(int n, Array< OneD, T > &x, const int incx)
Zero vector.
Definition: VmathArray.hpp:204

References ASSERTL1, and Zero().

◆ Zero() [2/6]

template void Vmath::Zero ( int  n,
int *  x,
const int  incx 
)

◆ Zero() [3/6]

template void Vmath::Zero ( int  n,
long *  x,
const int  incx 
)

◆ Zero() [4/6]

template void Vmath::Zero ( int  n,
Nektar::NekDouble x,
const int  incx 
)

◆ Zero() [5/6]

template void Vmath::Zero ( int  n,
Nektar::NekSingle x,
const int  incx 
)

◆ Zero() [6/6]

template<class T >
void Vmath::Zero ( int  n,
T *  x,
const int  incx 
)

Zero vector.

Definition at line 492 of file Vmath.cpp.

493 {
494  if (incx == 1)
495  {
496  std::memset(x, '\0', n * sizeof(T));
497  }
498  else
499  {
500  T zero = 0;
501  ++n;
502  while (--n)
503  {
504  *x = zero;
505  x += incx;
506  }
507  }
508 }

Referenced by Nektar::CFSImplicit::AddMatNSBlkDiagVol(), Nektar::SolverUtils::DiffusionIP::AddSecondDerivToTrace(), Nektar::SolverUtils::DiffusionIP::AddSymmFluxIntegralToCoeff(), Nektar::SolverUtils::Diffusion::AddSymmFluxIntegralToOffDiag(), Nektar::SolverUtils::DiffusionIP::AddSymmFluxIntegralToPhys(), Nektar::MultiRegions::ExpList::AddTraceJacToElmtJac(), Nektar::MultiRegions::GJPStabilisation::Apply(), Nektar::DiffusionLDGNS::ApplyBCsO1(), Nektar::DiffusionLDGNS::ApplyBCsO2(), Nektar::SolverUtils::DiffusionIP::ApplyFluxBndConds(), Nektar::SolverUtils::DiffusionLDG::ApplyVectorBCs(), Nektar::MultiRegions::AssemblyMap::AssembleBnd(), Nektar::SolverUtils::DiffusionIP::CalcTraceNumFlux(), Nektar::MMFMaxwell::Checkpoint_EnergyOutput(), Nektar::MMFAdvection::ComputeNablaCdotVelocity(), Nektar::MMFSWE::ComputeNablaCdotVelocity(), Nektar::CoupledAssemblyMap::CoupledAssemblyMap(), Nektar::StdRegions::StdExpansion::CreateGeneralMatrix(), Nektar::LinearisedAdvection::DFT(), Nektar::LibUtilities::NekLinSysIterCG::DoConjugateGradient(), Nektar::LibUtilities::NekLinSysIterGMRES::DoGMRES(), Nektar::UnsteadyReactionDiffusion::DoOdeRhs(), Nektar::Dummy::DoOdeRhs(), Nektar::MultiRegions::GlobalLinSysIterative::DoProjection(), Nektar::NekMatrix< DataType, StandardMatrixTag >::EigenSolve(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::GlobalMapping::Mapping::EvaluateFunction(), Nektar::IsentropicVortexBC::EvaluateIsentropicVortex(), Nektar::IsentropicVortex::EvaluateIsentropicVortex(), Nektar::MMFSWE::EvaluateWaterDepth(), ExpList_LoadField(), Nektar::SolverUtils::CouplingCwipi::ExtrapolateFields(), Nektar::VariableConverter::GetAbsoluteVelocity(), Nektar::SolverUtils::Diffusion::GetDivCurl(), Nektar::VariableConverter::GetDynamicEnergy(), Nektar::MultiRegions::ExpList::GetElmtNormalLength(), Nektar::LinearSWE::GetFluxVector(), Nektar::SolverUtils::MMFSystem::GetIncidentField(), Nektar::MultiRegions::ExpList::GetMatIpwrtDeriveBase(), Nektar::FieldUtils::ProcessCFL::GetMaxStdVelocity(), Nektar::Extrapolate::GetMaxStdVelocity(), Nektar::SolverUtils::MMFSystem::GetMaxwellFlux1D(), Nektar::SolverUtils::MMFSystem::GetMaxwellFlux2D(), Nektar::UnsteadyAdvectionDiffusion::GetNormalVel(), Nektar::CFLtester::GetNormalVelocity(), Nektar::EigenValuesAdvection::GetNormalVelocity(), Nektar::MMFAdvection::GetNormalVelocity(), Nektar::UnsteadyAdvection::GetNormalVelocity(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::ImageWarpingSystem::GetNormalVelocity(), Nektar::UnsteadyViscousBurgers::GetNormalVelocity(), Nektar::SolverUtils::EquationSystem::ImportFld(), Nektar::SolverUtils::EquationSystem::ImportFldToMultiDomains(), Nektar::Collections::IProductWRTDerivBase_StdMat::IProductWRTDerivBase_StdMat(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), Nektar::CellModel::LoadCellModel(), main(), Nektar::VCSMapping::MappingAccelerationCorrection(), Nektar::VCSMapping::MappingAdvectionCorrection(), Nektar::PreconCfsBRJ::MinusOffDiag2Rhs(), MoveOutsidePointsNnormpos(), Nektar::Collections::BwdTrans_SumFac_Prism::operator()(), Nektar::Collections::BwdTrans_SumFac_Pyr::operator()(), Nektar::Collections::PhysDeriv_StdMat::operator()(), Nektar::Collections::PhysDeriv_IterPerExp::operator()(), Nektar::MultiRegions::AssemblyMap::PatchAssemble(), Nektar::Collections::PhysDeriv_StdMat::PhysDeriv_StdMat(), Nektar::FieldUtils::Iso::SeparateRegions(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::PulseWaveSystem::SetUpDomainInterfaces(), Nektar::VelocityCorrectionScheme::SetupFlowrate(), Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap(), Nektar::CoupledLinearNS::SolveLinearNS(), Nektar::NavierStokesCFE::SpecialBndTreat(), Nektar::LocalRegions::Expansion::StdDerivBaseOnTraceMat(), Diffusion::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationAlgorithmGLM::TimeIntegrate(), Nektar::LinearisedAdvection::UpdateBase(), Nektar::FilterMovingBody::UpdateForce(), Nektar::LibUtilities::TimeIntegrationSchemeSDC::UpdateIntegratedResidual(), Nektar::LEE::v_AddLinTerm(), Nektar::NoAdvection::v_Advect(), Nektar::WallBC::v_Apply(), Nektar::WallViscousBC::v_Apply(), Nektar::MultiRegions::AssemblyMapCG::v_Assemble(), Nektar::NavierStokesImplicitCFE::v_CalcMuDmuDT(), Nektar::LocalRegions::NodalTriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::QuadExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::HexExp::v_ComputeTraceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeTraceNormal(), Nektar::LocalRegions::PyrExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TetExp::v_ComputeTraceNormal(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedDotProd(), Nektar::MultiRegions::ExpListHomogeneous2D::v_DealiasedDotProd(), Nektar::GlobalMapping::Mapping::v_Divergence(), Nektar::MultiRegions::PreconditionerLinear::v_DoPreconditionerWithNonVertOutput(), Nektar::Laplace::v_DoSolve(), Nektar::Projection::v_DoSolve(), Nektar::SteadyAdvectionDiffusion::v_DoSolve(), Nektar::GlobalMapping::MappingTranslation::v_DotGradJacobian(), Nektar::GlobalMapping::MappingXofZ::v_DotGradJacobian(), Nektar::GlobalMapping::MappingXYofZ::v_DotGradJacobian(), Nektar::SolverUtils::EquationSystem::v_EvaluateExactSolution(), Nektar::LocalRegions::HexExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::PrismExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::QuadExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::SegExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::TetExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::TriExp::v_ExtractDataToCoeffs(), Nektar::MultiRegions::DisContField::v_ExtractTracePhys(), Nektar::StdRegions::StdNodalPrismExp::v_FillMode(), Nektar::StdRegions::StdNodalTetExp::v_FillMode(), Nektar::StdRegions::StdNodalTriExp::v_FillMode(), Nektar::LocalRegions::Expansion1D::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::NavierStokesImplicitCFE::v_GetFluxDerivJacDirctnElmt(), Nektar::APE::v_GetFluxVector(), Nektar::MultiRegions::DisContField::v_GetFwdBwdTracePhys(), Nektar::NavierStokesCFE::v_GetViscousFluxVector(), Nektar::NavierStokesCFEAxisym::v_GetViscousFluxVector(), Nektar::NavierStokesCFE::v_GetViscousFluxVectorDeAlias(), Nektar::MultiRegions::DisContField::v_HelmSolve(), Nektar::GlobalMapping::Mapping::v_InitObject(), Nektar::MultiRegions::AssemblyMapCG::v_LinearSpaceMap(), Nektar::LocalRegions::SegExp::v_PhysDeriv_n(), Nektar::LocalRegions::SegExp::v_PhysDeriv_s(), Nektar::FieldUtils::ProcessC0Projection::v_Process(), Nektar::FieldUtils::ProcessHomogeneousStretch::v_Process(), Nektar::FieldUtils::ProcessInterpField::v_Process(), Nektar::FieldUtils::ProcessInterpPoints::v_Process(), Nektar::FieldUtils::ProcessMultiShear::v_Process(), Nektar::FieldUtils::ProcessScalGrad::v_Process(), Nektar::FieldUtils::ProcessSurfDistance::v_Process(), Nektar::FieldUtils::ProcessWSS::v_Process(), Nektar::SolverUtils::FilterBodyFittedVelocity::v_ProcessSample(), Nektar::LocalRegions::HexExp::v_ReduceOrderCoeffs(), Nektar::LocalRegions::QuadExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdQuadExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdSegExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTetExp::v_ReduceOrderCoeffs(), Nektar::MMFDiffusion::v_SetInitialConditions(), Nektar::SolverUtils::EquationSystem::v_SetInitialConditions(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VelocityCorrectionScheme::v_SetUpViscousForcing(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::SolverUtils::FilterEnergy::v_Update(), Nektar::SolverUtils::DiffusionLFRNS::WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::WeakPenaltyO2(), Zero(), and Nektar::SolverUtils::EquationSystem::ZeroPhysFields().