Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
Vmath Namespace Reference

Functions

template<class T >
void Fill (int n, const T alpha, T *x, const int incx)
 Fill a vector with a constant value.
template void Fill (int n, const Nektar::NekDouble alpha, Nektar::NekDouble *x, const int incx)
template<class T >
ran2 (long *idum)
 Generates a number from ~Normal(0,1)
template<class T >
void FillWhiteNoise (int n, const T eps, T *x, const int incx, int outseed)
 Fills a vector with white noise.
template void FillWhiteNoise (int n, const Nektar::NekDouble eps, Nektar::NekDouble *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.
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<class T >
void Smul (int n, const T alpha, const T *x, const int incx, T *y, const int incy)
 Scalar multiply y = alpha*y.
template void Smul (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *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.
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<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.
template void Sdiv (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *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.
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<class T >
void Sadd (int n, const T alpha, const T *x, const int incx, T *y, const int incy)
 Add vector y = alpha + x.
template void Sadd (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *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.
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<class T >
void Zero (int n, T *x, const int incx)
 Zero vector.
template void Zero (int n, Nektar::NekDouble *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.
template void Neg (int n, Nektar::NekDouble *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)
template void Vsqrt (int n, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *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|
template void Vabs (int n, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *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
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<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 plus vector): z = w*x - y
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<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
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<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 plus vector): z = alpha*x - y
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<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):
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<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):
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<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)
 vvtvvtp (scalar times vector plus scalar times vector):
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<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):
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<class T >
void Gathr (int n, const T *x, const int *y, T *z)
 Gather vector z[i] = x[y[i]].
template void Gathr (int n, const Nektar::NekDouble *x, const int *y, Nektar::NekDouble *z)
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]].
template void Gathr (int n, const Nektar::NekDouble *sign, const Nektar::NekDouble *x, const int *y, Nektar::NekDouble *z)
template<class T >
void Scatr (int n, const T *x, const int *y, T *z)
 Scatter vector z[y[i]] = x[i].
template void Scatr (int n, const Nektar::NekDouble *x, const int *y, Nektar::NekDouble *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].
template void Scatr (int n, const Nektar::NekDouble *sign, const Nektar::NekDouble *x, const int *y, Nektar::NekDouble *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.
template void Assmb (int n, const Nektar::NekDouble *x, const int *y, Nektar::NekDouble *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.
template void Assmb (int n, const Nektar::NekDouble *sign, const Nektar::NekDouble *x, const int *y, Nektar::NekDouble *z)
template<class T >
Vsum (int n, const T *x, const int incx)
 Subtract return sum(x)
template Nektar::NekDouble Vsum (int n, const Nektar::NekDouble *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.
template int Imax (int n, const Nektar::NekDouble *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.
template Nektar::NekDouble Vmax (int n, const Nektar::NekDouble *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.
template int Iamax (int n, const Nektar::NekDouble *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.
template Nektar::NekDouble Vamax (int n, const Nektar::NekDouble *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.
template int Imin (int n, const Nektar::NekDouble *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.
template Nektar::NekDouble Vmin (int n, const Nektar::NekDouble *x, const int incx)
template int Vmin (int n, const int *x, const int incx)
template<class T >
Dot (int n, const T *w, const T *x)
 vvtvp (vector times vector times vector): z = w*x*y
template Nektar::NekDouble Dot (int n, const Nektar::NekDouble *w, const Nektar::NekDouble *x)
template<class T >
Dot (int n, const T *w, const int incw, const T *x, const int incx)
 vvtvp (vector times vector times vector): z = w*x*y
template Nektar::NekDouble Dot (int n, const Nektar::NekDouble *w, const int incw, const Nektar::NekDouble *x, const int incx)
template<class T >
Dot2 (int n, const T *w, const T *x, const int *y)
 vvtvp (vector times vector times vector): z = w*x*y
template Nektar::NekDouble Dot2 (int n, const Nektar::NekDouble *w, const Nektar::NekDouble *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)
 vvtvp (vector times vector times vector): z = w*x*y
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<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<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<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 >
void Fill (int n, const T alpha, Array< OneD, T > &x, const int incx)
 Fill a vector with a constant value.
template<class T >
void FillWhiteNoise (int n, const T eps, Array< OneD, T > &x, const int incx, int outseed)
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.
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.
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.
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.
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.
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.
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.
template<class T >
void Zero (int n, Array< OneD, T > &x, const int incx)
 Zero vector.
template<class T >
void Neg (int n, Array< OneD, T > &x, const int incx)
 Negate x = -x.
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)
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|
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
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
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
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
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 + y*z
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
template<class T >
void Gathr (int n, const Array< OneD, const T > &x, const Array< OneD, const int > &y, Array< OneD, T > &z)
 Gather vector z[i] = x[y[i]].
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].
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.
template<class T >
Vsum (int n, const Array< OneD, const T > &x, const int incx)
 Subtract return sum(x)
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.
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.
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.
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.
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.
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.
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

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 317 of file VmathArray.hpp.

References ASSERTL1, and Assmb().

{
ASSERTL1(n <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n <= y.num_elements()+y.GetOffset(),"Array out of bounds");
Assmb(n,&x[0],&y[0],&z[0]);
}
template<class T >
void Vmath::Assmb ( int  n,
const T *  x,
const int *  y,
T *  z 
)
template void Vmath::Assmb ( int  n,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)
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 696 of file Vmath.cpp.

{
while (n--)
{
*(z + *(y++)) += *(sign++) * (*(x++));
}
}
template void Vmath::Assmb ( int  n,
const Nektar::NekDouble sign,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)
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 
)
template<class T >
T Vmath::Dot ( int  n,
const Array< OneD, const T > &  w,
const Array< OneD, const T > &  x 
)

Definition at line 391 of file VmathArray.hpp.

References ASSERTL1, and Dot().

{
ASSERTL1(n <= w.num_elements()+w.GetOffset(),"Array out of bounds");
ASSERTL1(n <= x.num_elements()+x.GetOffset(),"Array out of bounds");
return Dot(n,&w[0],&x[0]);
}
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 402 of file VmathArray.hpp.

References ASSERTL1, and Dot().

{
ASSERTL1(n*incw <= w.num_elements()+w.GetOffset(),"Array out of bounds");
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
return Dot(n,&w[0],incw,&x[0],incx);
}
template<class T >
T Vmath::Dot ( int  n,
const T *  w,
const T *  x 
)

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

Definition at line 866 of file Vmath.cpp.

Referenced by Dot(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_small(), and Nektar::SolverUtils::DriverModifiedArnoldi::EV_test().

{
T sum = 0;
while( n-- )
{
sum += (*w) * (*x);
++w;
++x;
}
return sum;
}
template Nektar::NekDouble Vmath::Dot ( int  n,
const Nektar::NekDouble w,
const Nektar::NekDouble x 
)
template<class T >
T Vmath::Dot ( int  n,
const T *  w,
const int  incw,
const T *  x,
const int  incx 
)

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

Definition at line 886 of file Vmath.cpp.

{
T sum = 0;
while( n-- )
{
sum += (*w) * (*x);
w += incw;
x += incx;
}
return sum;
}
template Nektar::NekDouble Vmath::Dot ( int  n,
const Nektar::NekDouble w,
const int  incw,
const Nektar::NekDouble x,
const int  incx 
)
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 413 of file VmathArray.hpp.

References ASSERTL1, and Dot2().

{
ASSERTL1(n <= w.num_elements()+w.GetOffset(),"Array out of bounds");
ASSERTL1(n <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n <= y.num_elements()+y.GetOffset(),"Array out of bounds");
return Dot2(n,&w[0],&x[0],&y[0]);
}
template<class T >
T Vmath::Dot2 ( int  n,
const T *  w,
const T *  x,
const int *  y 
)

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

Definition at line 906 of file Vmath.cpp.

Referenced by Nektar::MultiRegions::GlobalLinSysIterative::CalculateAnorm(), Ddot(), Nektar::MultiRegions::GlobalLinSysIterative::DoAconjugateProjection(), Nektar::MultiRegions::GlobalLinSysIterative::DoConjugateGradient(), Dot2(), DBUtils::NormGlobalVector(), and Nektar::MultiRegions::GlobalLinSysIterative::UpdateKnownSolutions().

{
T sum = 0;
while( n-- )
{
sum += (*y == 1 ? (*w) * (*x) : 0 );
++w;
++x;
++y;
}
return sum;
}
template Nektar::NekDouble Vmath::Dot2 ( int  n,
const Nektar::NekDouble w,
const Nektar::NekDouble x,
const int *  y 
)
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 
)

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

Definition at line 930 of file Vmath.cpp.

{
T sum = 0;
while( n-- )
{
sum += (*y == 1 ? (*w) * (*x) : 0.0 );
w += incw;
x += incx;
y += incy;
}
return sum;
}
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 
)
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 46 of file Vmath.cpp.

Referenced by Nektar::SpatialDomains::GeomFactors::Adjoint(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Fill(), Nektar::MultiRegions::ExpList1DHomogeneous2D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GetCoords(), Nektar::CompressibleFlowSystem::GetViscousFluxVector(), main(), Nektar::Utilities::ProcessJacobianEnergy::Process(), Nektar::SubSteppingExtrapolate::SubStepExtrapolateField(), Nektar::LocalRegions::TriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::NodalTriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::PyrExp::v_ComputeFaceNormal(), Nektar::LocalRegions::TetExp::v_ComputeFaceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeFaceNormal(), Nektar::LocalRegions::HexExp::v_ComputeFaceNormal(), Nektar::LocalRegions::PyrExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TetExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::HexExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::QuadExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::SegExp::v_ComputeVertexNormal(), Nektar::MultiRegions::DisContField2D::v_EvaluateBoundaryConditions(), Nektar::StdRegions::StdTriExp::v_FillMode(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::MultiRegions::ExpList1DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::StdRegions::StdTriExp::v_GetCoords(), Nektar::StdRegions::StdQuadExp::v_GetCoords(), Nektar::LocalRegions::TetExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::CellModelAlievPanfilov::v_SetInitialConditions(), Nektar::CellModelFitzHughNagumo::v_SetInitialConditions(), Nektar::TenTusscher06::v_SetInitialConditions(), Nektar::Fox02::v_SetInitialConditions(), Nektar::LuoRudy91::v_SetInitialConditions(), Nektar::FentonKarma::v_SetInitialConditions(), Nektar::Winslow99::v_SetInitialConditions(), Nektar::CourtemancheRamirezNattel98::v_SetInitialConditions(), and Nektar::MultiRegions::GlobalLinSysStaticCond::v_Solve().

{
while( n-- )
{
*x = alpha;
x += incx;
}
}
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 48 of file VmathArray.hpp.

References ASSERTL1, and Fill().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Out of bounds");
Fill(n,alpha,&x[0],incx);
}
template void Vmath::Fill ( int  n,
const Nektar::NekDouble  alpha,
Nektar::NekDouble x,
const int  incx 
)
template<class T >
void Vmath::FillWhiteNoise ( int  n,
const T  eps,
Array< OneD, T > &  x,
const int  incx,
int  outseed 
)

Definition at line 56 of file VmathArray.hpp.

References ASSERTL1, and FillWhiteNoise().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Out of bounds");
FillWhiteNoise(n,eps,&x[0],incx,outseed);
}
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 137 of file Vmath.cpp.

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

{
while( n-- )
{
static int iset = 0;
static T gset;
long seed = long(outseed);
T fac, rsq, v1, v2;
if (iset == 0) {
do {
v1 = 2.0 * ran2<T> (&seed) - 1.0;
v2 = 2.0 * ran2<T> (&seed) - 1.0;
rsq = v1*v1 + v2*v2;
} while (rsq >= 1.0 || rsq == 0.0);
fac = sqrt(-2.0 * log (rsq) / rsq);
gset = v1 * fac;
iset = 1;
*x = eps * v2 * fac;
} else {
iset = 0;
*x = eps * gset;
}
x += incx;
}
}
template void Vmath::FillWhiteNoise ( int  n,
const Nektar::NekDouble  eps,
Nektar::NekDouble x,
const int  incx,
int  outseed 
)
template<class T >
void Vmath::Gathr ( int  n,
const Array< OneD, const T > &  x,
const Array< OneD, const int > &  y,
Array< OneD, T > &  z 
)

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

Definition at line 296 of file VmathArray.hpp.

References ASSERTL1, and Gathr().

{
ASSERTL1(n <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(n <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Gathr(n,&x[0],&y[0],&z[0]);
}
template<class T >
void Vmath::Gathr ( int  n,
const T *  x,
const int *  y,
T *  z 
)
template void Vmath::Gathr ( int  n,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)
template<class T >
void Vmath::Gathr ( int  n,
const T *  sign,
const T *  x,
const int *  y,
T *  z 
)

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

Definition at line 642 of file Vmath.cpp.

{
while (n--)
{
*z++ = *(sign++) * (*(x + *y++));
}
return;
}
template void Vmath::Gathr ( int  n,
const Nektar::NekDouble sign,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)
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 355 of file VmathArray.hpp.

References ASSERTL1, and Iamax().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
return Iamax(n,&x[0],incx);
}
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 774 of file Vmath.cpp.

Referenced by Iamax().

{
int i, indx = ( n > 0 ) ? 0 : -1;
T xmax = *x;
T xm;
for (i = 0; i < n; i++)
{
xm = (*x > 0)? *x: -*x;
if (xm > xmax)
{
xmax = xm;
indx = i;
}
x += incx;
}
return indx;
}
template int Vmath::Iamax ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
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 338 of file VmathArray.hpp.

References ASSERTL1, and Imax().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
return Imax(n,&x[0],incx);
}
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 729 of file Vmath.cpp.

Referenced by Nektar::MultiRegions::AssemblyMapCG::CreateGraph(), Nektar::IncNavierStokes::GetCFLEstimate(), Imax(), and main().

{
int i, indx = ( n > 0 ) ? 0 : -1;
T xmax = *x;
for (i = 0; i < n; i++)
{
if (*x > xmax)
{
xmax = *x;
indx = i;
}
x += incx;
}
return indx;
}
template int Vmath::Imax ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
template int Vmath::Imax ( int  n,
const int *  x,
const int  incx 
)
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 374 of file VmathArray.hpp.

References ASSERTL1, and Imin().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
return Imin(n,&x[0],incx);
}
template<class T >
int Vmath::Imin ( int  n,
const T *  x,
const int  incx 
)
template int Vmath::Imin ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
template int Vmath::Imin ( int  n,
const int *  x,
const int  incx 
)
template<class T >
void Vmath::Neg ( int  n,
Array< OneD, T > &  x,
const int  incx 
)

Negate x = -x.

Definition at line 154 of file VmathArray.hpp.

References ASSERTL1, and Neg().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
Neg(n,&x[0],incx);
}
template<class T >
void Vmath::Neg ( int  n,
T *  x,
const int  incx 
)

Negate x = -x.

Definition at line 379 of file Vmath.cpp.

Referenced by Nektar::NonlinearSWE::AddCoriolis(), Nektar::LinearSWE::AddCoriolis(), Nektar::NonlinearPeregrine::AddCoriolis(), Nektar::LocalRegions::Expansion2D::AddHDGHelmholtzEdgeTerms(), Nektar::LocalRegions::Expansion3D::AddHDGHelmholtzFaceTerms(), Nektar::LocalRegions::Expansion2D::AddNormTraceInt(), Nektar::LocalRegions::Expansion3D::AddNormTraceInt(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::PulseWavePropagation::DoOdeRhs(), Nektar::NonlinearSWE::DoOdeRhs(), Nektar::LinearSWE::DoOdeRhs(), Nektar::UnsteadyInviscidBurger::DoOdeRhs(), Nektar::NavierStokesCFE::DoOdeRhs(), Nektar::EulerCFE::DoOdeRhs(), Nektar::UnsteadyAdvection::DoOdeRhs(), Nektar::EulerADCFE::DoOdeRhs(), Nektar::APE::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::UnsteadyAdvectionDiffusion::DoOdeRhs(), Nektar::CFLtester::DoOdeRhs(), Nektar::MultiRegions::ContField2D::LaplaceSolve(), main(), Neg(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::SubSteppingExtrapolate::SubStepAdvection(), Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::SolverUtils::AdvectionWeakDG::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::AdjointAdvection::v_Advect(), Nektar::LocalRegions::Expansion3D::v_DGDeriv(), Nektar::LocalRegions::Expansion2D::v_DGDeriv(), Nektar::SolverUtils::DiffusionLDG::v_Diffuse(), Nektar::SolverUtils::DiffusionLDGNS::v_Diffuse(), Nektar::SolverUtils::AdvectionFR::v_DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFR::v_DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFRNS::v_DivCFlux_2D_Gauss(), Nektar::EigenValuesAdvection::v_DoSolve(), Nektar::LocalRegions::Expansion1D::v_GenMatrix(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::MultiRegions::DisContField3D::v_HelmSolve(), Nektar::MultiRegions::ContField3D::v_HelmSolve(), Nektar::MultiRegions::DisContField2D::v_HelmSolve(), Nektar::MultiRegions::ContField1D::v_HelmSolve(), Nektar::MultiRegions::ContField2D::v_HelmSolve(), Nektar::MultiRegions::DisContField1D::v_HelmSolve(), Nektar::ShallowWaterSystem::v_InitObject(), Nektar::MultiRegions::ContField2D::v_LinearAdvectionDiffusionReactionSolve(), Nektar::LocalRegions::Expansion2D::v_NegateEdgeNormal(), Nektar::StdRegions::StdExpansion3D::v_NegateFaceNormal(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::SolverUtils::FilterAeroForces::v_Update(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundaryForcing(), Nektar::CompressibleFlowSystem::WallViscousBC(), Nektar::SolverUtils::EquationSystem::WeakDGAdvection(), and Nektar::SolverUtils::EquationSystem::WeakDGDiffusion().

{
while( n-- )
{
*x = -(*x);
x += incx;
}
}
template void Vmath::Neg ( int  n,
Nektar::NekDouble x,
const int  incx 
)
template<class T >
T Vmath::ran2 ( long *  idum)

Generates a number from ~Normal(0,1)

Definition at line 73 of file Vmath.cpp.

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

{
int j;
long k;
static long idum2=123456789;
static long iy=0;
static long iv[NTAB];
T temp;
if (*idum <= 0) {
if (-(*idum) < 1) *idum = 1;
else *idum = -(*idum);
idum2 = (*idum);
for (j=NTAB+7; j>=0; j--) {
k = (*idum) / IQ1;
*idum = IA1 * (*idum - k*IQ1) - k*IR1;
if (*idum < 0) *idum += IM1;
if (j < NTAB) iv[j] = *idum;
}
iy = iv[0];
}
k = (*idum) / IQ1;
*idum = IA1*(*idum - k*IQ1) - k*IR1;
if (*idum < 0) *idum += IM1;
k = idum2 / IQ2;
idum2 = IA2*(idum2 - k*IQ2) - k*IR2;
if (idum2 < 0) idum2 += IM2;
j = iy / NDIV;
iy = iv[j] - idum2;
iv[j] = *idum;
if (iy < 1) iy += IMM1;
if ((temp=AM*iy) > RNMX) return RNMX;
else return temp;
}
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 448 of file VmathArray.hpp.

References ASSERTL1, and Reverse().

{
ASSERTL1(static_cast<unsigned int>(std::abs(n*incx)) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(static_cast<unsigned int>(std::abs(n*incy)) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
Reverse(n,&x[0],incx,&y[0],incy);
}
template<class T >
void Vmath::Reverse ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)
template void Vmath::Reverse ( int  n,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)
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 124 of file VmathArray.hpp.

References ASSERTL1, and Sadd().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
Sadd(n,alpha,&x[0],incx,&y[0],incy);
}
template<class T >
void Vmath::Sadd ( int  n,
const T  alpha,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Add vector y = alpha + x.

Definition at line 298 of file Vmath.cpp.

Referenced by Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), DetermineclosePointxindex(), Nektar::MultiRegions::ExpList1DHomogeneous2D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GetCoords(), Nektar::CompressibleFlowSystem::GetViscousFluxVectorDeAlias(), Nektar::NonlinearPeregrine::LaitoneSolitaryWave(), main(), MoveOutsidePointsNnormpos(), Sadd(), Nektar::MultiRegions::ExpList1DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::SpatialDomains::TetGeom::v_GetLocCoords(), Nektar::SpatialDomains::PrismGeom::v_GetLocCoords(), Nektar::SpatialDomains::HexGeom::v_GetLocCoords(), Nektar::SpatialDomains::QuadGeom::v_GetLocCoords(), Nektar::SpatialDomains::TriGeom::v_GetLocCoords(), Nektar::FilterElectrogram::v_Initialise(), Nektar::BidomainRoth::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::StdRegions::StdTetExp::v_PhysDeriv(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), and Nektar::CourtemancheRamirezNattel98::v_Update().

{
++n;
if (incx == 1 && incy == 1)
{
while( --n )
{
*y = alpha + (*x);
++x;
++y;
}
}
else
{
while( --n )
{
*y = alpha + (*x);
x += incx;
y += incy;
}
}
}
template void Vmath::Sadd ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)
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 307 of file VmathArray.hpp.

References ASSERTL1, and Scatr().

{
ASSERTL1(n <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n <= y.num_elements()+y.GetOffset(),"Array out of bounds");
Scatr(n,&x[0],&y[0],&z[0]);
}
template<class T >
void Vmath::Scatr ( int  n,
const T *  x,
const int *  y,
T *  z 
)

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

Definition at line 656 of file Vmath.cpp.

Referenced by Nektar::MultiRegions::AssemblyMap::LocalBndToGlobal(), Nektar::MultiRegions::GlobalLinSysXxt::LocalToGlobalNoSign(), Scatr(), and Nektar::MultiRegions::AssemblyMapCG::v_LocalToGlobal().

{
while (n--)
{
*(z + *(y++)) = *(x++);
}
}
template void Vmath::Scatr ( int  n,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)
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 669 of file Vmath.cpp.

{
while (n--)
{
*(z + *(y++)) = *(sign++) * (*(x++));
}
}
template void Vmath::Scatr ( int  n,
const Nektar::NekDouble sign,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)
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 104 of file VmathArray.hpp.

References ASSERTL1, and Sdiv().

{
ASSERTL1(static_cast<unsigned int>(n*incx) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(static_cast<unsigned int>(n*incy) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
Sdiv(n,alpha,&x[0],incx,&y[0],incy);
}
template<class T >
void Vmath::Sdiv ( int  n,
const T  alpha,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)
template void Vmath::Sdiv ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)
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 84 of file VmathArray.hpp.

References ASSERTL1, and Smul().

{
ASSERTL1(static_cast<unsigned int>(n*incx) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(static_cast<unsigned int>(n*incy) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
Smul(n,alpha, &x[0],incx,&y[0],incy);
}
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*y.

Definition at line 196 of file Vmath.cpp.

Referenced by Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::SpatialDomains::GeomFactors::Adjoint(), Nektar::PulseWaveSystem::CalcCharacteristicVariables(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::LibUtilities::GaussPoints::CalculateGalerkinProjectionMatrix(), Computestreakpositions(), Nektar::CoupledLinearNS::Continuation(), Nektar::Extrapolate::CurlCurl(), Nektar::LinearisedAdvection::DFT(), Nektar::AdjointAdvection::DFT(), Diffusion::DoImplicitSolve(), Nektar::BidomainRoth::DoImplicitSolve(), Nektar::Bidomain::DoImplicitSolve(), Nektar::Monodomain::DoImplicitSolve(), Nektar::UnsteadyDiffusion::DoImplicitSolve(), Nektar::UnsteadyAdvectionDiffusion::DoImplicitSolve(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::BidomainRoth::DoOdeRhs(), Nektar::Bidomain::DoOdeRhs(), Nektar::EulerADCFE::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_small(), Nektar::CoupledLinearNS::EvaluateNewtonRHS(), Nektar::Extrapolate::EvaluatePressureBCs(), Nektar::VortexWaveInteraction::ExecuteRoll(), Extractlayerdata(), Nektar::VortexWaveInteraction::FileRelaxation(), Nektar::MultiRegions::ExpList1DHomogeneous2D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GetCoords(), Nektar::UnsteadyInviscidBurger::GetFluxVector(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::LinearSWE::GetFluxVector(), Nektar::APE::GetFluxVector(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::CompressibleFlowSystem::GetPressure(), Nektar::CompressibleFlowSystem::GetViscousFluxVector(), Nektar::CompressibleFlowSystem::GetViscousFluxVectorDeAlias(), Nektar::LocalRegions::NodalTriExp::Integral(), Nektar::LocalRegions::HexExp::IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_SumFac(), main(), Nektar::SolverUtils::FilterAverageFields::OutputAvgField(), Nektar::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::Utilities::ProcessQCriterion::Process(), Nektar::Utilities::ProcessScaleInFld::Process(), Nektar::Utilities::ProcessAddFld::Process(), Nektar::LibUtilities::NekFFTW::Reshuffle_Nek2FFTW(), Nektar::CompressibleFlowSystem::RiemannInvariantBC(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::VelocityCorrectionScheme::SetUpPressureForcing(), Smul(), Nektar::CoupledLinearNS::SolveUnsteadyStokesSystem(), Nektar::SubSteppingExtrapolate::SubStepExtrapolateField(), Nektar::CompressibleFlowSystem::SymmetryBC(), Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate(), Nektar::MultiRegions::GlobalLinSysIterative::UpdateKnownSolutions(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::LocalRegions::TriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::NodalTriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::SegExp::v_ComputeVertexNormal(), Nektar::SolverUtils::DiffusionLFR::v_DerCFlux_1D(), Nektar::SolverUtils::DiffusionLFRNS::v_DerCFlux_1D(), Nektar::SolverUtils::DiffusionLFR::v_DerCFlux_2D(), Nektar::SolverUtils::DiffusionLFRNS::v_DerCFlux_2D(), Nektar::SolverUtils::Diffusion3DHomogeneous1D::v_Diffuse(), Nektar::SolverUtils::AdvectionFR::v_DivCFlux_1D(), Nektar::MultiRegions::Preconditioner::v_DoTransformFromLowEnergy(), Nektar::SolverUtils::DriverModifiedArnoldi::v_Execute(), Nektar::StdRegions::StdQuadExp::v_GenMatrix(), Nektar::StdRegions::StdTriExp::v_GenMatrix(), Nektar::StdRegions::StdPrismExp::v_GenMatrix(), Nektar::StdRegions::StdTetExp::v_GenMatrix(), Nektar::MultiRegions::ExpList1DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::BidomainRoth::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::StdRegions::StdTriExp::v_Integral(), Nektar::LocalRegions::PrismExp::v_Integral(), Nektar::LocalRegions::SegExp::v_Integral(), Nektar::LocalRegions::TetExp::v_Integral(), Nektar::LocalRegions::PyrExp::v_Integral(), Nektar::LocalRegions::QuadExp::v_Integral(), Nektar::LocalRegions::TriExp::v_Integral(), Nektar::LocalRegions::HexExp::v_Integral(), Nektar::LocalRegions::PyrExp::v_IProductWRTBase(), Nektar::LocalRegions::SegExp::v_IProductWRTBase(), Nektar::LocalRegions::TetExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::SegExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::PrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::TriExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::QuadExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTriExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdPrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTetExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdPyrExp::v_IProductWRTDerivBase_SumFac(), Nektar::SubSteppingExtrapolate::v_MountHOPBCs(), Nektar::StdRegions::StdHexExp::v_MultiplyByStdQuadratureMetric(), Nektar::SolverUtils::DiffusionLDG::v_NumFluxforVector(), Nektar::SolverUtils::UnsteadySystem::v_NumFluxforVector(), Nektar::StdRegions::StdPrismExp::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv(), Nektar::LocalRegions::PrismExp::v_PhysDeriv(), Nektar::LocalRegions::TetExp::v_PhysDeriv(), Nektar::LocalRegions::PyrExp::v_PhysDeriv(), Nektar::LocalRegions::TriExp::v_PhysDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDeriv(), Nektar::StdRegions::StdTetExp::v_PhysDeriv(), Nektar::LocalRegions::HexExp::v_PhysDeriv(), Nektar::MultiRegions::ExpListHomogeneous2D::v_PhysDeriv(), Nektar::MultiRegions::ExpListHomogeneous1D::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv_s(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::SolverUtils::FilterAeroForces::v_Update(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO1(), Nektar::APE::WallBC(), Nektar::CompressibleFlowSystem::WallBC(), Nektar::NonlinearSWE::WallBoundary(), Nektar::LinearSWE::WallBoundary(), Nektar::NonlinearPeregrine::WallBoundary(), and Nektar::CompressibleFlowSystem::WallViscousBC().

{
++n;
if (incx == 1 && incy == 1)
{
while( --n )
{
*y = alpha * (*x);
++x;
++y;
}
}
else
{
while( --n )
{
*y = alpha * (*x);
x += incx;
y += incy;
}
}
}
template void Vmath::Smul ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)
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 281 of file VmathArray.hpp.

References ASSERTL1, and Svtsvtp().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Svtsvtp(n,alpha,&x[0],incx,beta,&y[0],incy,&z[0],incz);
}
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 
)

vvtvvtp (scalar times vector plus scalar times vector):

Svtsvtp (scalar times vector plus scalar times vector):

Definition at line 574 of file Vmath.cpp.

Referenced by main(), Svtsvtp(), Nektar::LocalRegions::PyrExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TetExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::TriExp::v_NormVectorIProductWRTBase(), Nektar::LocalRegions::QuadExp::v_NormVectorIProductWRTBase(), and Nektar::CourtemancheRamirezNattel98::v_Update().

{
while( n-- )
{
*z = alpha * (*x) + beta * (*y);
x += incx;
y += incy;
z += incz;
}
}
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 
)
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 240 of file VmathArray.hpp.

References ASSERTL1, and Svtvm().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Svtvm(n,alpha,&x[0],incx,&y[0],incy,&z[0],incz);
}
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 plus vector): z = alpha*x - y

Definition at line 501 of file Vmath.cpp.

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

{
while( n-- )
{
*z = alpha * (*x) - (*y);
x += incx;
y += incy;
z += incz;
}
}
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 
)
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 229 of file VmathArray.hpp.

References ASSERTL1, and Svtvp().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Svtvp(n,alpha,&x[0],incx,&y[0],incy,&z[0],incz);
}
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

Definition at line 468 of file Vmath.cpp.

Referenced by Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::SolverUtils::DriverSteadyState::ComputeSFD(), Nektar::MultiRegions::GlobalLinSysIterative::DoConjugateGradient(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_small(), Nektar::Extrapolate::EvaluatePressureBCs(), Nektar::VortexWaveInteraction::FileRelaxation(), Nektar::CompressibleFlowSystem::GetPressure(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), main(), Svtvp(), Nektar::CellModel::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate(), Nektar::LinearisedAdvection::UpdateBase(), Nektar::AdjointAdvection::UpdateBase(), Nektar::LocalRegions::PyrExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TetExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), 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::TriExp::v_NormVectorIProductWRTBase(), Nektar::LocalRegions::QuadExp::v_NormVectorIProductWRTBase(), Nektar::SolverUtils::DiffusionLDGNS::v_NumericalFluxO1(), Nektar::SolverUtils::DiffusionLDGNS::v_NumericalFluxO2(), Nektar::SolverUtils::DiffusionLDG::v_NumFluxforScalar(), Nektar::SolverUtils::DiffusionLFR::v_NumFluxforScalar(), Nektar::SolverUtils::DiffusionLDG::v_NumFluxforVector(), Nektar::SolverUtils::DiffusionLFR::v_NumFluxforVector(), Nektar::StdRegions::StdPrismExp::v_PhysDeriv(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), and Nektar::CourtemancheRamirezNattel98::v_Update().

{
++n;
if (incx == 1 && incy == 1 && incz == 1)
{
while( --n )
{
*z = alpha * (*x) + (*y);
++x;
++y;
++z;
}
}
else
{
while( --n )
{
*z = alpha * (*x) + (*y);
x += incx;
y += incy;
z += incz;
}
}
}
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 
)
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 197 of file VmathArray.hpp.

References ASSERTL1, and Vabs().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
Vabs(n,&x[0],incx,&y[0],incy);
}
template<class T >
void Vmath::Vabs ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

vabs: y = |x|

Definition at line 407 of file Vmath.cpp.

Referenced by DetermineclosePointxindex(), Nektar::StdRegions::StdExpansion::Linf(), Nektar::CompressibleFlowSystem::RiemannInvariantBC(), and Vabs().

{
while( n-- )
{
*y = ( *x >0)? *x:-(*x);
x += incx;
y += incy;
}
}
template void Vmath::Vabs ( int  n,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)
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 113 of file VmathArray.hpp.

References ASSERTL1, and Vadd().

{
ASSERTL1(static_cast<unsigned int>(n*incx) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(static_cast<unsigned int>(n*incy) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(static_cast<unsigned int>(n*incz) <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Vadd(n,&x[0],incx,&y[0],incy,&z[0],incz);
}
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 282 of file Vmath.cpp.

Referenced by Nektar::NekMatrix< DataType, StandardMatrixTag >::AbsMaxtoMinEigenValueRatio(), Nektar::NonlinearSWE::AddCoriolis(), Nektar::LinearSWE::AddCoriolis(), Nektar::NonlinearPeregrine::AddCoriolis(), Nektar::APE::AddSource(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::PulseWaveSystem::CalcCharacteristicVariables(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Computestreakpositions(), Nektar::CoupledLinearNS::Continuation(), Nektar::Extrapolate::CurlCurl(), Nektar::Bidomain::DoImplicitSolve(), Nektar::NonlinearSWE::DoOdeRhs(), Nektar::LinearSWE::DoOdeRhs(), Nektar::Bidomain::DoOdeRhs(), Nektar::BidomainRoth::DoOdeRhs(), Nektar::NavierStokesCFE::DoOdeRhs(), Nektar::EulerADCFE::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::UnsteadyAdvectionDiffusion::DoOdeRhs(), Nektar::MultiRegions::DisContField3D::EvaluateHDGPostProcessing(), Nektar::MultiRegions::DisContField2D::EvaluateHDGPostProcessing(), Nektar::CoupledLinearNS::EvaluateNewtonRHS(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::LinearSWE::GetFluxVector(), Nektar::APE::GetFluxVector(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::CompressibleFlowSystem::GetFluxVector(), Nektar::CompressibleFlowSystem::GetFluxVectorDeAlias(), Nektar::CompressibleFlowSystem::GetViscousFluxVector(), Nektar::CompressibleFlowSystem::GetViscousFluxVectorDeAlias(), Nektar::LocalRegions::HexExp::IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree_GenericImpl(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), main(), MoveOutsidePointsNnormpos(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::Utilities::ProcessQCriterion::Process(), Nektar::Utilities::ProcessAddFld::Process(), Nektar::CompressibleFlowSystem::RiemannInvariantBC(), Nektar::VelocityCorrectionScheme::SetUpPressureForcing(), Nektar::CoupledLinearNS::SolveSteadyNavierStokes(), Nektar::SolverUtils::AdvectionWeakDG::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::SolverUtils::Advection3DHomogeneous1D::v_Advect(), Nektar::SolverUtils::AdvectionFR::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::SolverUtils::ForcingNoise::v_Apply(), Nektar::SolverUtils::ForcingBody::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::SolverUtils::ForcingProgrammatic::v_Apply(), Nektar::LocalRegions::TetExp::v_ComputeLaplacianMetric(), Nektar::SolverUtils::DiffusionLFR::v_DerCFlux_1D(), Nektar::SolverUtils::DiffusionLFRNS::v_DerCFlux_1D(), Nektar::SolverUtils::DiffusionLFR::v_DerCFlux_2D(), Nektar::SolverUtils::DiffusionLFRNS::v_DerCFlux_2D(), Nektar::SolverUtils::DiffusionLDG::v_Diffuse(), Nektar::SolverUtils::Diffusion3DHomogeneous1D::v_Diffuse(), Nektar::SolverUtils::DiffusionLDGNS::v_Diffuse(), Nektar::SolverUtils::DiffusionLFR::v_Diffuse(), Nektar::SolverUtils::DiffusionLFRNS::v_Diffuse(), Nektar::SolverUtils::AdvectionFR::v_DivCFlux_1D(), Nektar::SolverUtils::AdvectionFR::v_DivCFlux_2D(), Nektar::SolverUtils::DiffusionLFR::v_DivCFlux_2D(), Nektar::SolverUtils::DiffusionLFRNS::v_DivCFlux_2D(), Nektar::SolverUtils::AdvectionFR::v_DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFR::v_DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFRNS::v_DivCFlux_2D_Gauss(), Nektar::MultiRegions::GlobalLinSysIterativeFull::v_DoMatrixMultiply(), Nektar::MultiRegions::PreconditionerLinearWithLowEnergy::v_DoPreconditioner(), Nektar::MultiRegions::ContField3D::v_HelmSolve(), Nektar::MultiRegions::ContField2D::v_HelmSolve(), Nektar::Bidomain::v_InitObject(), Nektar::BidomainRoth::v_InitObject(), Nektar::LocalRegions::TetExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::PrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::TriExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::QuadExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTriExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdPrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTetExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdPyrExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::PyrExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::TetExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::TriExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::QuadExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::HexExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::MultiRegions::ContField2D::v_LinearAdvectionDiffusionReactionSolve(), Nektar::SolverUtils::DiffusionLDGNS::v_NumericalFluxO2(), Nektar::SolverUtils::DiffusionLFRNS::v_NumericalFluxO2(), Nektar::SolverUtils::DiffusionLDG::v_NumFluxforVector(), Nektar::SolverUtils::DiffusionLFR::v_NumFluxforVector(), Nektar::SolverUtils::UnsteadySystem::v_NumFluxforVector(), Nektar::StdRegions::StdTetExp::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv_n(), Nektar::NonlinearSWE::v_PrimitiveToConservative(), Nektar::LinearSWE::v_PrimitiveToConservative(), Nektar::NonlinearPeregrine::v_PrimitiveToConservative(), Nektar::NavierStokesCFE::v_SetInitialConditions(), Nektar::EulerCFE::v_SetInitialConditions(), Nektar::MultiRegions::GlobalLinSysDirectFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysXxtFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysIterativeFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysPETScFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysStaticCond::v_Solve(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::SolverUtils::FilterAverageFields::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::SolverUtils::FilterAeroForces::v_Update(), Nektar::SolverUtils::FilterModalEnergy::v_Update(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO1(), Vadd(), Nektar::SolverUtils::EquationSystem::WeakAdvectionDivergenceForm(), Nektar::SolverUtils::EquationSystem::WeakAdvectionGreensDivergenceForm(), and Nektar::SolverUtils::EquationSystem::WeakDGDiffusion().

{
while( n-- )
{
*z = (*x) + (*y);
x += incx;
y += incy;
z += incz;
}
}
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 
)
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 365 of file VmathArray.hpp.

References ASSERTL1, and Vamax().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
return Vamax(n,&x[0],incx);
}
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 799 of file Vmath.cpp.

Referenced by Nektar::StdRegions::StdExpansion::Linf(), and Vamax().

{
T xmax = *x;
T xm;
while( n-- )
{
xm = (*x > 0)? *x: -*x;
if (xm > xmax)
{
xmax = xm;
}
x += incx;
}
return xmax;
}
template Nektar::NekDouble Vmath::Vamax ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
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 440 of file VmathArray.hpp.

References ASSERTL1, and Vcopy().

{
ASSERTL1(static_cast<unsigned int>(std::abs(n*incx)) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(static_cast<unsigned int>(std::abs(n*incy)) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
Vcopy(n,&x[0],incx,&y[0],incy);
}
template<typename T >
void Vmath::Vcopy ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Definition at line 1013 of file Vmath.cpp.

Referenced by Nektar::LocalRegions::Expansion2D::AddHDGHelmholtzTraceTerms(), Nektar::SpatialDomains::GeomFactors::Adjoint(), Nektar::MultiRegions::AssemblyMap::AssembleBnd(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Computestreakpositions(), Nektar::NonlinearSWE::ConservativeToPrimitive(), Nektar::LinearSWE::ConservativeToPrimitive(), Nektar::NonlinearPeregrine::ConservativeToPrimitive(), Nektar::SolverUtils::DriverArnoldi::CopyArnoldiArrayToField(), Nektar::ShallowWaterSystem::CopyBoundaryTrace(), Nektar::SolverUtils::DriverArnoldi::CopyFieldToArnoldiArray(), Nektar::SolverUtils::EquationSystem::CopyFromPhysField(), Nektar::SolverUtils::DriverArnoldi::CopyFwdToAdj(), Nektar::SolverUtils::EquationSystem::CopyToPhysField(), Nektar::StdRegions::StdExpansion::CreateGeneralMatrix(), DetermineclosePointxindex(), Nektar::LinearisedAdvection::DFT(), Nektar::AdjointAdvection::DFT(), Nektar::MultiRegions::GlobalLinSysIterative::DoAconjugateProjection(), Nektar::Bidomain::DoImplicitSolve(), Nektar::PulseWavePropagation::DoOdeProjection(), Nektar::ImageWarpingSystem::DoOdeProjection(), Nektar::NonlinearSWE::DoOdeProjection(), Nektar::LinearSWE::DoOdeProjection(), Nektar::UnsteadyInviscidBurger::DoOdeProjection(), Nektar::UnsteadyDiffusion::DoOdeProjection(), Nektar::NavierStokesCFE::DoOdeProjection(), Nektar::EulerCFE::DoOdeProjection(), Nektar::APE::DoOdeProjection(), Nektar::EulerADCFE::DoOdeProjection(), Nektar::UnsteadyAdvection::DoOdeProjection(), Nektar::NonlinearPeregrine::DoOdeProjection(), Nektar::UnsteadyAdvectionDiffusion::DoOdeProjection(), Nektar::CFLtester::DoOdeProjection(), Nektar::NavierStokesCFE::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::NekMatrix< DataType, StandardMatrixTag >::EigenSolve(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_sort(), Nektar::MultiRegions::DisContField3D::EvaluateHDGPostProcessing(), Nektar::MultiRegions::DisContField2D::EvaluateHDGPostProcessing(), Nektar::Extrapolate::EvaluatePressureBCs(), Nektar::VortexWaveInteraction::ExecuteRoll(), Extractlayerdata(), Nektar::VortexWaveInteraction::FileRelaxation(), Nektar::LibUtilities::Basis::GenBasis(), Nektar::LocalRegions::NodalTriExp::GeneralMatrixOp_MatOp(), Nektar::LocalRegions::TetExp::GeneralMatrixOp_MatOp(), GenerateNeighbourArrays(), Nektar::MultiRegions::DisContField3DHomogeneous2D::GetBoundaryToElmtMap(), Nektar::MultiRegions::DisContField3DHomogeneous1D::GetBoundaryToElmtMap(), Nektar::MultiRegions::ExpList2DHomogeneous1D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GetCoords(), Nektar::EulerCFE::GetExactIsentropicVortex(), Nektar::MultiRegions::ExpList::GetExpIndex(), Nektar::UnsteadyDiffusion::GetFluxVector(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::CompressibleFlowSystem::GetFluxVector(), Nektar::UnsteadyAdvectionDiffusion::GetFluxVectorDiff(), Nektar::LinearSWE::GetVelocityVector(), Nektar::CompressibleFlowSystem::GetViscousFluxVector(), Nektar::CompressibleFlowSystem::GetViscousFluxVectorDeAlias(), Nektar::MultiRegions::AssemblyMap::GlobalToLocalBnd(), Nektar::StdRegions::StdExpansion::H1(), Nektar::MultiRegions::ExpListHomogeneous1D::Homogeneous1DTrans(), Nektar::LinearisedAdvection::ImportFldBase(), Nektar::AdjointAdvection::ImportFldBase(), Nektar::LibUtilities::Interp1D(), Nektar::LibUtilities::Interp2D(), Nektar::LibUtilities::InterpCoeff1D(), Nektar::LibUtilities::InterpCoeff2D(), Nektar::MultiRegions::DisContField2D::L2_DGDeriv(), Nektar::NonlinearPeregrine::LaitoneSolitaryWave(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree_GenericImpl(), Nektar::MultiRegions::AssemblyMap::LocalBndToGlobal(), main(), MappingEVids(), Nektar::MultiRegions::MultiLevelBisectionReordering(), Nektar::MultiRegions::GlobalMatrix::Multiply(), Nektar::MultiRegions::ContField2D::MultiplyByInvMassMatrix(), Orderfunctionx(), Nektar::LibUtilities::PhysGalerkinProject1D(), Nektar::LibUtilities::PhysGalerkinProject2D(), Nektar::StdRegions::StdExpansion2D::PhysTensorDeriv(), Nektar::StdRegions::StdExpansion3D::PhysTensorDeriv(), PolyFit(), PolyInterp(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::Utilities::ProcessJacobianEnergy::Process(), Nektar::Utilities::ProcessAddFld::Process(), Nektar::MultiRegions::AssemblyMapDG::RealignTraceElement(), Nektar::LibUtilities::NekFFTW::Reshuffle_FFTW2Nek(), Nektar::LibUtilities::NekFFTW::Reshuffle_Nek2FFTW(), Nektar::SolverUtils::RiemannSolver::rotateFromNormal(), Nektar::SolverUtils::RiemannSolver::rotateToNormal(), Nektar::EulerCFE::SetBoundaryIsentropicVortex(), Nektar::EulerCFE::SetBoundaryRinglebFlow(), Nektar::LocalRegions::Expansion3D::SetFaceToGeomOrientation(), Nektar::EulerCFE::SetInitialIsentropicVortex(), Nektar::MultiRegions::ExpList::SetPhys(), Nektar::SubSteppingExtrapolate::SubStepProjection(), Nektar::CompressibleFlowSystem::SymmetryBC(), Diffusion::TimeIntegrate(), Nektar::CellModel::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationScheme::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::AdjointAdvection::UpdateBase(), Nektar::MultiRegions::GlobalLinSysIterative::UpdateKnownSolutions(), Nektar::VortexWaveInteraction::UpdateWaveForceMag(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::LocalRegions::Expansion3D::v_BuildInverseTransformationMatrix(), Nektar::LocalRegions::Expansion3D::v_BuildTransformationMatrix(), Nektar::StdRegions::StdPointExp::v_BwdTrans(), Nektar::StdRegions::StdHexExp::v_BwdTrans(), Nektar::StdRegions::StdQuadExp::v_BwdTrans(), Nektar::StdRegions::StdPrismExp::v_BwdTrans(), Nektar::StdRegions::StdTetExp::v_BwdTrans(), Nektar::StdRegions::StdSegExp::v_BwdTrans(), Nektar::StdRegions::StdPyrExp::v_BwdTrans(), Nektar::StdRegions::StdHexExp::v_BwdTrans_SumFacKernel(), Nektar::StdRegions::StdQuadExp::v_BwdTrans_SumFacKernel(), Nektar::LocalRegions::HexExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::QuadExp::v_ComputeLaplacianMetric(), Nektar::MultiRegions::ExpListHomogeneous2D::v_DealiasedProd(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedProd(), Nektar::SolverUtils::DiffusionLFR::v_DerCFlux_1D(), Nektar::SolverUtils::DiffusionLFRNS::v_DerCFlux_1D(), Nektar::SolverUtils::DiffusionLDG::v_Diffuse(), Nektar::SolverUtils::Diffusion3DHomogeneous1D::v_Diffuse(), Nektar::SolverUtils::DiffusionLFR::v_Diffuse(), Nektar::SolverUtils::DiffusionLFRNS::v_Diffuse(), Nektar::SolverUtils::AdvectionFR::v_DivCFlux_1D(), Nektar::SolverUtils::AdvectionFR::v_DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFR::v_DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFRNS::v_DivCFlux_2D_Gauss(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoMultiplybyInverseTransformationMatrix(), Nektar::MultiRegions::PreconditionerNull::v_DoPreconditioner(), Nektar::MultiRegions::PreconditionerLinear::v_DoPreconditionerWithNonVertOutput(), Nektar::EigenValuesAdvection::v_DoSolve(), Nektar::PulseWaveSystem::v_DoSolve(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoTransformFromLowEnergy(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoTransformToLowEnergy(), Nektar::SolverUtils::DriverModifiedArnoldi::v_Execute(), Nektar::MultiRegions::ExpList::v_ExtractCoeffsToCoeffs(), Nektar::LocalRegions::TetExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::PrismExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::HexExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::TriExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::QuadExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::SegExp::v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpListHomogeneous2D::v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpListHomogeneous1D::v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpList::v_ExtractDataToCoeffs(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_ExtractTracePhys(), Nektar::LibUtilities::NekFFTW::v_FFTBwdTrans(), Nektar::LibUtilities::NekFFTW::v_FFTFwdTrans(), Nektar::StdRegions::StdTriExp::v_FillMode(), Nektar::StdRegions::StdQuadExp::v_FillMode(), Nektar::StdRegions::StdSegExp::v_FillMode(), Nektar::StdRegions::StdHexExp::v_FillMode(), Nektar::StdRegions::StdPointExp::v_FwdTrans(), Nektar::LocalRegions::TetExp::v_FwdTrans(), Nektar::LocalRegions::PrismExp::v_FwdTrans(), Nektar::LocalRegions::PyrExp::v_FwdTrans(), Nektar::LocalRegions::SegExp::v_FwdTrans(), Nektar::LocalRegions::QuadExp::v_FwdTrans(), Nektar::LocalRegions::HexExp::v_FwdTrans(), Nektar::StdRegions::StdSegExp::v_FwdTrans(), Nektar::StdRegions::StdHexExp::v_FwdTrans(), Nektar::StdRegions::StdQuadExp::v_FwdTrans(), Nektar::StdRegions::StdPointExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdQuadExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::SegExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::QuadExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdSegExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::PrismExp::v_GeneralMatrixOp_MatOp(), Nektar::LocalRegions::HexExp::v_GeneralMatrixOp_MatOp(), Nektar::StdRegions::StdQuadExp::v_GeneralMatrixOp_MatOp(), Nektar::LocalRegions::TriExp::v_GeneralMatrixOp_MatOp(), Nektar::StdRegions::StdTriExp::v_GeneralMatrixOp_MatOp(), Nektar::LocalRegions::QuadExp::v_GeneralMatrixOp_MatOp(), Nektar::StdRegions::StdHexExp::v_GeneralMatrixOp_MatOp(), Nektar::LocalRegions::Expansion1D::v_GenMatrix(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::StdRegions::StdQuadExp::v_GenMatrix(), Nektar::StdRegions::StdTriExp::v_GenMatrix(), Nektar::StdRegions::StdPrismExp::v_GenMatrix(), Nektar::StdRegions::StdTetExp::v_GenMatrix(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::LocalRegions::QuadExp::v_GetEdgePhysVals(), Nektar::LocalRegions::TriExp::v_GetEdgePhysVals(), Nektar::LocalRegions::QuadExp::v_GetEdgeQFactors(), Nektar::LocalRegions::PyrExp::v_GetFacePhysVals(), Nektar::LocalRegions::TetExp::v_GetFacePhysVals(), Nektar::LocalRegions::PrismExp::v_GetFacePhysVals(), Nektar::LocalRegions::HexExp::v_GetFacePhysVals(), Nektar::MultiRegions::DisContField3D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField2D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetNormals(), Nektar::MultiRegions::ContField3D::v_ImposeDirichletConditions(), Nektar::MultiRegions::ContField2D::v_ImposeDirichletConditions(), Nektar::SolverUtils::FilterHistoryPoints::v_Initialise(), Nektar::StdRegions::StdPointExp::v_IProductWRTBase(), Nektar::StdRegions::StdQuadExp::v_IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdHexExp::v_IProductWRTBase_SumFacKernel(), Nektar::MultiRegions::ContField3D::v_MultiplyByInvMassMatrix(), Nektar::SolverUtils::DiffusionLFRNS::v_NumericalFluxO1(), Nektar::SolverUtils::DiffusionLFR::v_NumFluxforScalar(), Nektar::LocalRegions::HexExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdPrismExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdQuadExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTetExp::v_ReduceOrderCoeffs(), Nektar::LocalRegions::QuadExp::v_ReduceOrderCoeffs(), Nektar::LinearisedAdvection::v_SetBaseFlow(), Nektar::AdjointAdvection::v_SetBaseFlow(), Nektar::MultiRegions::GlobalLinSysXxtFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysIterativeFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysStaticCond::v_Solve(), Nektar::MultiRegions::GlobalLinSysPETSc::v_SolveLinearSystem(), Nektar::SubSteppingExtrapolate::v_SubStepSaveFields(), Nektar::MultiRegions::AssemblyMapCG::v_UniversalAssemble(), Nektar::SolverUtils::DiffusionLDG::v_WeakPenaltyforScalar(), Nektar::SolverUtils::DiffusionLFR::v_WeakPenaltyforScalar(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO1(), Vcopy(), Nektar::APE::WallBC(), Nektar::CompressibleFlowSystem::WallBC(), Nektar::NonlinearSWE::WallBoundary(), Nektar::LinearSWE::WallBoundary(), Nektar::NonlinearPeregrine::WallBoundary(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundaryContVariables(), Nektar::NonlinearPeregrine::WallBoundaryForcing(), Nektar::CompressibleFlowSystem::WallViscousBC(), Nektar::NonlinearPeregrine::WCESolve(), Nektar::SolverUtils::EquationSystem::WeakDGDiffusion(), and Nektar::SolverUtils::UnsteadySystem::WeakPenaltyforScalar().

{
if( incx ==1 && incy == 1)
{
memcpy(y,x,n*sizeof(T));
}
else
{
while( n-- )
{
*y = *x;
x += incx;
y += incy;
}
}
}
template void Vmath::Vcopy ( int  n,
const int *  x,
const int  incx,
int *  y,
const int  incy 
)
template void Vmath::Vcopy ( int  n,
const unsigned int *  x,
const int  incx,
unsigned int *  y,
const int  incy 
)
template void Vmath::Vcopy ( int  n,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)
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 93 of file VmathArray.hpp.

References ASSERTL1, and Vdiv().

{
ASSERTL1(static_cast<unsigned int>(n*incx) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(static_cast<unsigned int>(n*incy) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(static_cast<unsigned int>(n*incz) <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Vdiv(n,&x[0],incx,&y[0],incy,&z[0],incz);
}
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 
)
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 
)
template<class T >
void Vmath::Vexp ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Definition at line 107 of file Vmath.hpp.

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

{
while (n--)
{
*y = exp( *x );
x += incx;
y += incy;
}
}
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 171 of file VmathArray.hpp.

References ASSERTL1, and Vexp().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
Vexp(n, &x[0], incx, &y[0], incy);
}
template<class T >
void Vmath::Vlog ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Definition at line 95 of file Vmath.hpp.

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

{
while (n--)
{
*y = log( *x );
x += incx;
y += incy;
}
}
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 162 of file VmathArray.hpp.

References ASSERTL1, and Vlog().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
Vlog(n, &x[0], incx, &y[0], incy);
}
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 347 of file VmathArray.hpp.

References ASSERTL1, and Vmax().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
return Vmax(n,&x[0],incx);
}
template<class T >
T Vmath::Vmax ( int  n,
const T *  x,
const int  incx 
)
template Nektar::NekDouble Vmath::Vmax ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
template int Vmath::Vmax ( int  n,
const int *  x,
const int  incx 
)
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 383 of file VmathArray.hpp.

References ASSERTL1, and Vmin().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
return Vmin(n,&x[0],incx);
}
template<class T >
T Vmath::Vmin ( int  n,
const T *  x,
const int  incx 
)
template Nektar::NekDouble Vmath::Vmin ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
template int Vmath::Vmin ( int  n,
const int *  x,
const int  incx 
)
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 64 of file VmathArray.hpp.

References ASSERTL1, and Vmul().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Vmul(n,&x[0],incx,&y[0],incy,&z[0],incz);
}
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 73 of file VmathArray.hpp.

References ASSERTL1, and Vmul().

{
ASSERTL1(n*incx <= x.num_elements(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Vmul(n,x.origin(),incx,&y[0],incy,&z[0],incz);
}
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 166 of file Vmath.cpp.

Referenced by Nektar::NekMatrix< DataType, StandardMatrixTag >::AbsMaxtoMinEigenValueRatio(), Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::NonlinearSWE::AddCoriolis(), Nektar::LinearSWE::AddCoriolis(), Nektar::NonlinearPeregrine::AddCoriolis(), Nektar::LocalRegions::Expansion2D::AddEdgeBoundaryInt(), Nektar::LocalRegions::Expansion2D::AddHDGHelmholtzEdgeTerms(), Nektar::LocalRegions::Expansion3D::AddHDGHelmholtzFaceTerms(), Nektar::LocalRegions::Expansion2D::AddNormTraceInt(), Nektar::LocalRegions::Expansion3D::AddNormTraceInt(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::SolverUtils::EquationSystem::AdvectionNonConservativeForm(), Nektar::PulseWaveSystem::CalcCharacteristicVariables(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::LibUtilities::GaussPoints::CalculateGalerkinProjectionMatrix(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::BidomainRoth::DoOdeRhs(), Extractlayerdata(), Nektar::UnsteadyInviscidBurger::GetFluxVector(), Nektar::UnsteadyAdvection::GetFluxVector(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::LinearSWE::GetFluxVector(), Nektar::APE::GetFluxVector(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::CompressibleFlowSystem::GetFluxVector(), Nektar::UnsteadyAdvectionDiffusion::GetFluxVectorAdv(), Nektar::UnsteadyAdvection::GetFluxVectorDeAlias(), Nektar::CompressibleFlowSystem::GetFluxVectorDeAlias(), Nektar::CompressibleFlowSystem::GetPressure(), Nektar::CompressibleFlowSystem::GetViscousFluxVector(), Nektar::CompressibleFlowSystem::GetViscousFluxVectorDeAlias(), Nektar::StdRegions::StdExpansion::H1(), Nektar::LocalRegions::NodalTriExp::Integral(), Nektar::StdRegions::StdExpansion2D::Integral(), Nektar::LocalRegions::HexExp::IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdExpansion::L2(), Nektar::NonlinearPeregrine::LaitoneSolitaryWave(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree(), main(), Nektar::StdRegions::StdExpansion::MassMatrixOp_MatFree(), MoveOutsidePointsNnormpos(), Nektar::NekMultiplyDiagonalMatrix(), Nektar::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::Utilities::ProcessQCriterion::Process(), Nektar::LibUtilities::NekFFTW::Reshuffle_FFTW2Nek(), Nektar::LibUtilities::NekFFTW::Reshuffle_Nek2FFTW(), Nektar::CompressibleFlowSystem::RiemannInvariantBC(), Nektar::SolverUtils::RiemannSolver::rotateFromNormal(), Nektar::SolverUtils::RiemannSolver::rotateToNormal(), Nektar::IncNavierStokes::SetRadiationBoundaryForcing(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::SolverUtils::AdvectionNonConservative::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::SolverUtils::AdvectionFR::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::AdjointAdvection::v_Advect(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::LocalRegions::TriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::NodalTriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::PyrExp::v_ComputeFaceNormal(), Nektar::LocalRegions::TetExp::v_ComputeFaceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeFaceNormal(), Nektar::LocalRegions::HexExp::v_ComputeFaceNormal(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::MultiRegions::ExpListHomogeneous2D::v_DealiasedProd(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedProd(), Nektar::SolverUtils::DiffusionLDG::v_Diffuse(), Nektar::SolverUtils::DiffusionLFR::v_Diffuse(), Nektar::SolverUtils::DiffusionLFRNS::v_Diffuse(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoMultiplybyInverseTransposedTransformationMatrix(), Nektar::MultiRegions::PreconditionerDiagonal::v_DoPreconditioner(), Nektar::StdRegions::StdTriExp::v_FillMode(), Nektar::StdRegions::StdQuadExp::v_FillMode(), Nektar::StdRegions::StdHexExp::v_FillMode(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::LocalRegions::QuadExp::v_GetEdgeQFactors(), Nektar::EigenValuesAdvection::v_GetFluxVector(), Nektar::ImageWarpingSystem::v_GetFluxVector(), Nektar::CFLtester::v_GetFluxVector(), Nektar::IncNavierStokes::v_GetFluxVector(), Nektar::SpatialDomains::TetGeom::v_GetLocCoords(), Nektar::SpatialDomains::PrismGeom::v_GetLocCoords(), Nektar::SpatialDomains::HexGeom::v_GetLocCoords(), Nektar::SpatialDomains::QuadGeom::v_GetLocCoords(), Nektar::SpatialDomains::TriGeom::v_GetLocCoords(), Nektar::LocalRegions::SegExp::v_HelmholtzMatrixOp(), Nektar::BidomainRoth::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::LocalRegions::TetExp::v_Integral(), Nektar::LocalRegions::PrismExp::v_Integral(), Nektar::LocalRegions::SegExp::v_Integral(), Nektar::LocalRegions::PyrExp::v_Integral(), Nektar::LocalRegions::QuadExp::v_Integral(), Nektar::LocalRegions::TriExp::v_Integral(), Nektar::StdRegions::StdSegExp::v_Integral(), Nektar::LocalRegions::HexExp::v_Integral(), Nektar::StdRegions::StdPointExp::v_IProductWRTBase(), Nektar::LocalRegions::PyrExp::v_IProductWRTBase(), Nektar::LocalRegions::SegExp::v_IProductWRTBase(), Nektar::StdRegions::StdSegExp::v_IProductWRTBase(), Nektar::LocalRegions::TetExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::SegExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::PrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::TriExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::QuadExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTriExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdPrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTetExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdPyrExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::SegExp::v_LaplacianMatrixOp(), Nektar::LocalRegions::Expansion::v_MultiplyByQuadratureMetric(), Nektar::StdRegions::StdPyrExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdPrismExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdTetExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdQuadExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdTriExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdHexExp::v_MultiplyByStdQuadratureMetric(), Nektar::LocalRegions::SegExp::v_NormVectorIProductWRTBase(), Nektar::EigenValuesAdvection::v_NumericalFlux(), Nektar::ImageWarpingSystem::v_NumericalFlux(), Nektar::CFLtester::v_NumericalFlux(), Nektar::IncNavierStokes::v_NumericalFlux(), Nektar::SolverUtils::DiffusionLDGNS::v_NumericalFluxO1(), Nektar::SolverUtils::DiffusionLDGNS::v_NumericalFluxO2(), Nektar::SolverUtils::DiffusionLFRNS::v_NumericalFluxO2(), Nektar::SolverUtils::DiffusionLDG::v_NumFluxforScalar(), Nektar::SolverUtils::UnsteadySystem::v_NumFluxforScalar(), Nektar::SolverUtils::DiffusionLDG::v_NumFluxforVector(), Nektar::SolverUtils::DiffusionLFR::v_NumFluxforVector(), Nektar::SolverUtils::UnsteadySystem::v_NumFluxforVector(), Nektar::LocalRegions::SegExp::v_PhysDeriv(), Nektar::LocalRegions::TetExp::v_PhysDeriv(), Nektar::LocalRegions::PrismExp::v_PhysDeriv(), Nektar::LocalRegions::PyrExp::v_PhysDeriv(), Nektar::LocalRegions::TriExp::v_PhysDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDeriv(), Nektar::StdRegions::StdTetExp::v_PhysDeriv(), Nektar::LocalRegions::HexExp::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv_n(), Nektar::LocalRegions::TriExp::v_PhysDirectionalDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDirectionalDeriv(), Nektar::NonlinearSWE::v_PrimitiveToConservative(), Nektar::LinearSWE::v_PrimitiveToConservative(), Nektar::NonlinearPeregrine::v_PrimitiveToConservative(), Nektar::SolverUtils::FilterEnergyBase::v_Update(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::SolverUtils::FilterAeroForces::v_Update(), Nektar::SolverUtils::DiffusionLDG::v_WeakPenaltyforVector(), Nektar::SolverUtils::DiffusionLFR::v_WeakPenaltyforVector(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO2(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO2(), Vmul(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundaryForcing(), Nektar::StdRegions::StdExpansion::WeakDerivMatrixOp_MatFree(), Nektar::SolverUtils::EquationSystem::WeakDGDiffusion(), and Nektar::SolverUtils::UnsteadySystem::WeakPenaltyforVector().

{
++n;
if (incx == 1 && incy == 1 && incz == 1)
{
while( --n )
{
*z = (*x) * (*y);
++x;
++y;
++z;
}
}
else
{
while( --n )
{
*z = (*x) * (*y);
x += incx;
y += incy;
z += incz;
}
}
}
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 
)
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 118 of file Vmath.hpp.

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

{
while (n--)
{
*y = pow( *x, f );
x += incx;
y += incy;
}
}
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 179 of file VmathArray.hpp.

References ASSERTL1, and Vpow().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
Vpow(n, &x[0], incx, f, &y[0], incy);
}
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 188 of file VmathArray.hpp.

References ASSERTL1, and Vsqrt().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
Vsqrt(n,&x[0],incx,&y[0],incy);
}
template<class T >
void Vmath::Vsqrt ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)
template void Vmath::Vsqrt ( int  n,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)
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 600 of file Vmath.cpp.

{
while( n-- )
{
*z = alpha * (*v) + (*w) + (*x);
v += incv;
w += incw;
x += incx;
z += incz;
}
}
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 
)
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 134 of file VmathArray.hpp.

References ASSERTL1, and Vsub().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Vsub(n,&x[0],incx,&y[0],incy,&z[0],incz);
}
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 326 of file Vmath.cpp.

Referenced by Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::SubSteppingExtrapolate::AddDuDt2D(), Nektar::SubSteppingExtrapolate::AddDuDt3D(), Nektar::PulseWaveSystem::CalcCharacteristicVariables(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::NonlinearSWE::ConservativeToPrimitive(), Nektar::LinearSWE::ConservativeToPrimitive(), Nektar::NonlinearPeregrine::ConservativeToPrimitive(), Nektar::Extrapolate::CurlCurl(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::CoupledLinearNS::EvaluateNewtonRHS(), Nektar::StdRegions::StdExpansion::H1(), Nektar::StdRegions::StdExpansion::L2(), Nektar::MultiRegions::DisContField2D::L2_DGDeriv(), Nektar::StdRegions::StdExpansion::Linf(), main(), Nektar::Utilities::ProcessQCriterion::Process(), Nektar::Utilities::ProcessVorticity::Process(), Nektar::CompressibleFlowSystem::SymmetryBC(), Nektar::CellModel::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::NonlinearSWE::v_ConservativeToPrimitive(), Nektar::LinearSWE::v_ConservativeToPrimitive(), Nektar::NonlinearPeregrine::v_ConservativeToPrimitive(), Nektar::SolverUtils::DiffusionLFR::v_DerCFlux_2D(), Nektar::SolverUtils::DiffusionLFRNS::v_DerCFlux_2D(), Nektar::SolverUtils::Diffusion3DHomogeneous1D::v_Diffuse(), Nektar::SolverUtils::AdvectionFR::v_DivCFlux_2D(), Nektar::SolverUtils::DiffusionLFR::v_DivCFlux_2D(), Nektar::SolverUtils::DiffusionLFRNS::v_DivCFlux_2D(), Nektar::SolverUtils::AdvectionFR::v_DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFR::v_DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFRNS::v_DivCFlux_2D_Gauss(), Nektar::StdRegions::StdPointExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdQuadExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::SegExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::TriExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::QuadExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdTriExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdSegExp::v_FwdTrans_BndConstrained(), Nektar::SolverUtils::DiffusionLDG::v_NumFluxforVector(), Nektar::SolverUtils::UnsteadySystem::v_NumFluxforVector(), Nektar::MultiRegions::GlobalLinSysDirectFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysXxtFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysIterativeFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysPETScFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysStaticCond::v_Solve(), Nektar::SolverUtils::FilterEnergyBase::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::SolverUtils::FilterModalEnergy::v_Update(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO1(), Vsub(), Nektar::CompressibleFlowSystem::WallBC(), and Nektar::CompressibleFlowSystem::WallViscousBC().

{
++n;
if (incx == 1 && incy == 1 && incz == 1)
{
while( --n )
{
*z = (*x) - (*y);
++x;
++y;
++z;
}
}
else
{
while( --n )
{
*z = (*x) - (*y);
x += incx;
y += incy;
z += incz;
}
}
}
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 
)
template<class T >
T Vmath::Vsum ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Subtract return sum(x)

Definition at line 329 of file VmathArray.hpp.

References ASSERTL1, and Vsum().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
return Vsum(n,&x[0],incx);
}
template<class T >
T Vmath::Vsum ( int  n,
const T *  x,
const int  incx 
)
template Nektar::NekDouble Vmath::Vsum ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
template int Vmath::Vsum ( int  n,
const int *  x,
const int  incx 
)
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 251 of file VmathArray.hpp.

References ASSERTL1, and Vvtvm().

{
ASSERTL1(n*incw <= w.num_elements()+w.GetOffset(),"Array out of bounds");
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Vvtvm(n,&w[0],incw,&x[0],incx,&y[0],incy,&z[0],incz);
}
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 
)

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

Definition at line 448 of file Vmath.cpp.

Referenced by main(), Nektar::SolverUtils::RiemannSolver::rotateFromNormal(), Nektar::SolverUtils::RiemannSolver::rotateToNormal(), Vvtvm(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), and Nektar::NonlinearPeregrine::WallBoundaryForcing().

{
while( n-- )
{
*z = (*w) * (*x) - (*y);
w += incw;
x += incx;
y += incy;
z += incz;
}
}
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 
)
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 208 of file VmathArray.hpp.

References ASSERTL1, and Vvtvp().

{
ASSERTL1(n*incw <= w.num_elements()+w.GetOffset(),"Array out of bounds");
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Vvtvp(n,&w[0],incw,&x[0],incx,&y[0],incy,&z[0],incz);
}
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 218 of file VmathArray.hpp.

References ASSERTL1, and Vvtvp().

{
ASSERTL1(n*incw <= w.num_elements(),"Array out of bounds");
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Vvtvp(n,w.origin(),incw,&x[0],incx,&y[0],incy,&z[0],incz);
}
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 425 of file Vmath.cpp.

Referenced by Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::SolverUtils::EquationSystem::AdvectionNonConservativeForm(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::SpatialDomains::GeomFactors::CheckIfValid(), Nektar::SpatialDomains::GeomFactors::ComputeDerivFactors(), Nektar::SpatialDomains::GeomFactors::ComputeGmat(), Nektar::SpatialDomains::GeomFactors::ComputeJac(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::UnsteadyAdvection::GetNormalVelocity(), Nektar::UnsteadyAdvectionDiffusion::GetNormalVelocity(), Nektar::CompressibleFlowSystem::GetPressure(), Nektar::StdRegions::StdExpansion::H1(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), main(), Nektar::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::CompressibleFlowSystem::RiemannInvariantBC(), Nektar::SolverUtils::RiemannSolver::rotateFromNormal(), Nektar::SolverUtils::RiemannSolver::rotateToNormal(), Nektar::CompressibleFlowSystem::SymmetryBC(), Nektar::CellModel::TimeIntegrate(), Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::SolverUtils::AdvectionNonConservative::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::AdjointAdvection::v_Advect(), Nektar::LocalRegions::TriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::NodalTriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::PyrExp::v_ComputeFaceNormal(), Nektar::LocalRegions::TetExp::v_ComputeFaceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeFaceNormal(), Nektar::LocalRegions::HexExp::v_ComputeFaceNormal(), Nektar::LocalRegions::PyrExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TetExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::SpatialDomains::TetGeom::v_GetLocCoords(), Nektar::SpatialDomains::PrismGeom::v_GetLocCoords(), Nektar::SpatialDomains::HexGeom::v_GetLocCoords(), Nektar::SpatialDomains::QuadGeom::v_GetLocCoords(), Nektar::SpatialDomains::TriGeom::v_GetLocCoords(), Nektar::LocalRegions::SegExp::v_HelmholtzMatrixOp(), Nektar::FilterElectrogram::v_Initialise(), Nektar::LocalRegions::TetExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::SegExp::v_LaplacianMatrixOp(), Nektar::LocalRegions::PyrExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::TetExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::HexExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::SegExp::v_NormVectorIProductWRTBase(), Nektar::LocalRegions::TriExp::v_NormVectorIProductWRTBase(), Nektar::LocalRegions::QuadExp::v_NormVectorIProductWRTBase(), Nektar::EigenValuesAdvection::v_NumericalFlux(), Nektar::ImageWarpingSystem::v_NumericalFlux(), Nektar::CFLtester::v_NumericalFlux(), Nektar::IncNavierStokes::v_NumericalFlux(), Nektar::SolverUtils::DiffusionLFRNS::v_NumericalFluxO1(), Nektar::SolverUtils::DiffusionLFRNS::v_NumericalFluxO2(), Nektar::StdRegions::StdTriExp::v_PhysDeriv(), Nektar::LocalRegions::TetExp::v_PhysDeriv(), Nektar::LocalRegions::PrismExp::v_PhysDeriv(), Nektar::LocalRegions::PyrExp::v_PhysDeriv(), Nektar::LocalRegions::TriExp::v_PhysDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDeriv(), Nektar::LocalRegions::HexExp::v_PhysDeriv(), Nektar::LocalRegions::TriExp::v_PhysDirectionalDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDirectionalDeriv(), Nektar::SolverUtils::FilterEnergyBase::v_Update(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::SolverUtils::FilterAeroForces::v_Update(), Nektar::FilterElectrogram::v_Update(), Vvtvp(), Nektar::APE::WallBC(), Nektar::CompressibleFlowSystem::WallBC(), Nektar::NonlinearSWE::WallBoundary(), Nektar::LinearSWE::WallBoundary(), Nektar::NonlinearPeregrine::WallBoundary(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), and Nektar::NonlinearPeregrine::WallBoundaryForcing().

{
while( n-- )
{
*z = (*w) * (*x) + (*y);
w += incw;
x += incx;
y += incy;
z += incz;
}
}
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 
)
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 547 of file Vmath.cpp.

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

{
while( n-- )
{
*z = (*v) * (*w) - (*x) * (*y);
v += incv;
w += incw;
x += incx;
y += incy;
z += incz;
}
}
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 
)
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 + y*z

Definition at line 263 of file VmathArray.hpp.

References ASSERTL1, and Vvtvvtp().

{
ASSERTL1(n*incv <= v.num_elements()+v.GetOffset(),"Array out of bounds");
ASSERTL1(n*incw <= w.num_elements()+w.GetOffset(),"Array out of bounds");
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
Vvtvvtp(n,&v[0],incv,&w[0],incw,&x[0],incx,&y[0],incy,&z[0],incz);
}
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 
)
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 
)
template<class T >
void Vmath::Zero ( int  n,
Array< OneD, T > &  x,
const int  incx 
)

Zero vector.

Definition at line 145 of file VmathArray.hpp.

References ASSERTL1, and Zero().

{
ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
Zero(n,&x[0],incx);
}
template<class T >
void Vmath::Zero ( int  n,
T *  x,
const int  incx 
)

Zero vector.

Definition at line 356 of file Vmath.cpp.

Referenced by Nektar::MultiRegions::AssemblyMap::AssembleBnd(), Nektar::MultiRegions::PreconditionerBlock::BlockPreconditioner2D(), Nektar::MultiRegions::PreconditionerBlock::BlockPreconditioner3D(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::StdRegions::StdExpansion::CreateGeneralMatrix(), Nektar::LinearisedAdvection::DFT(), Nektar::AdjointAdvection::DFT(), Nektar::MultiRegions::GlobalLinSysIterative::DoAconjugateProjection(), Nektar::MultiRegions::GlobalLinSysIterative::DoConjugateGradient(), Nektar::NekMatrix< DataType, StandardMatrixTag >::EigenSolve(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::SolverUtils::Forcing::EvaluateFunction(), Nektar::SolverUtils::EquationSystem::EvaluateFunction(), Nektar::EulerCFE::EvaluateIsentropicVortex(), Extractlayerdata(), Nektar::UnsteadyDiffusion::GetFluxVector(), Nektar::LinearSWE::GetFluxVector(), Nektar::APE::GetFluxVector(), Nektar::CompressibleFlowSystem::GetFluxVector(), Nektar::UnsteadyAdvectionDiffusion::GetFluxVectorDiff(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::UnsteadyAdvection::GetNormalVelocity(), Nektar::UnsteadyAdvectionDiffusion::GetNormalVelocity(), Nektar::CompressibleFlowSystem::GetViscousFluxVector(), Nektar::CompressibleFlowSystem::GetViscousFluxVectorDeAlias(), Nektar::SolverUtils::EquationSystem::ImportFld(), Nektar::LinearisedAdvection::ImportFldBase(), Nektar::AdjointAdvection::ImportFldBase(), Nektar::SolverUtils::EquationSystem::ImportFldToMultiDomains(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), Nektar::CellModel::LoadCellModel(), main(), MoveOutsidePointsNnormpos(), Nektar::Utilities::ProcessSpherigon::Process(), Nektar::Utilities::ProcessQCriterion::Process(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::VelocityCorrectionScheme::SetUpPressureForcing(), Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap(), Nektar::CoupledLinearNS::SolveLinearNS(), Diffusion::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate(), Nektar::LocalRegions::Expansion1D::v_AddRobinEdgeContribution(), Nektar::LocalRegions::Expansion2D::v_AddRobinEdgeContribution(), Nektar::NoAdvection::v_Advect(), Nektar::MultiRegions::AssemblyMapCG::v_Assemble(), Nektar::LocalRegions::TriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::NodalTriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::PyrExp::v_ComputeFaceNormal(), Nektar::LocalRegions::TetExp::v_ComputeFaceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeFaceNormal(), Nektar::LocalRegions::HexExp::v_ComputeFaceNormal(), Nektar::MultiRegions::GlobalLinSysIterativeFull::v_DoMatrixMultiply(), Nektar::MultiRegions::PreconditionerLinear::v_DoPreconditionerWithNonVertOutput(), Nektar::Laplace::v_DoSolve(), Nektar::SolverUtils::EquationSystem::v_EvaluateExactSolution(), Nektar::LocalRegions::TetExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::PrismExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::HexExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::TriExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::QuadExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::SegExp::v_ExtractDataToCoeffs(), Nektar::StdRegions::StdNodalTetExp::v_FillMode(), Nektar::StdRegions::StdNodalPrismExp::v_FillMode(), Nektar::StdRegions::StdNodalTriExp::v_FillMode(), Nektar::LocalRegions::Expansion1D::v_GenMatrix(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::MultiRegions::DisContField3D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField2D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField1D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField3D::v_HelmSolve(), Nektar::MultiRegions::DisContField2D::v_HelmSolve(), Nektar::MultiRegions::DisContField1D::v_HelmSolve(), Nektar::MultiRegions::AssemblyMapCG::v_LinearSpaceMap(), Nektar::LocalRegions::SegExp::v_PhysDeriv_n(), Nektar::LocalRegions::SegExp::v_PhysDeriv_s(), Nektar::LocalRegions::HexExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdQuadExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTetExp::v_ReduceOrderCoeffs(), Nektar::LocalRegions::QuadExp::v_ReduceOrderCoeffs(), Nektar::SolverUtils::EquationSystem::v_SetInitialConditions(), Nektar::SolverUtils::FilterEnergyBase::v_Update(), Nektar::SolverUtils::FilterAeroForces::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO1(), Nektar::SolverUtils::EquationSystem::WeakAdvectionGreensDivergenceForm(), Zero(), and Nektar::SolverUtils::EquationSystem::ZeroPhysFields().

{
if(incx == 1)
{
std::memset(x,'\0', n*sizeof(T));
}
else
{
T zero = 0;
++n;
while(--n)
{
*x = zero;
x+=incx;
}
}
}
template void Vmath::Zero ( int  n,
Nektar::NekDouble x,
const int  incx 
)
template void Vmath::Zero ( int  n,
int *  x,
const int  incx 
)
template void Vmath::Zero ( int  n,
long *  x,
const int  incx 
)