Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
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. More...
 
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) More...
 
template<class T >
void FillWhiteNoise (int n, const T eps, T *x, const int incx, int outseed)
 Fills a vector with white noise. More...
 
template void FillWhiteNoise (int n, const Nektar::NekDouble eps, Nektar::NekDouble *x, const int incx, int outseed)
 
template<class T >
void Vmul (int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
 Multiply vector z = x*y. More...
 
template void Vmul (int n, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template<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. More...
 
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. More...
 
template void Vdiv (int n, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template<class T >
void Sdiv (int n, const T alpha, const T *x, const int incx, T *y, const int incy)
 Scalar multiply y = alpha/y. More...
 
template void Sdiv (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *y, const int incy)
 
template<class T >
void Vadd (int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
 Add vector z = x+y. More...
 
template void Vadd (int n, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template<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. More...
 
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. More...
 
template void Vsub (int n, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template<class T >
void Zero (int n, T *x, const int incx)
 Zero vector. More...
 
template void Zero (int n, Nektar::NekDouble *x, const int incx)
 
template void Zero (int n, int *x, const int incx)
 
template void Zero (int n, long *x, const int incx)
 
template<class T >
void Neg (int n, T *x, const int incx)
 Negate x = -x. More...
 
template void Neg (int n, Nektar::NekDouble *x, const int incx)
 
template<class T >
void Vsqrt (int n, const T *x, const int incx, T *y, const int incy)
 sqrt y = sqrt(x) More...
 
template void Vsqrt (int n, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *y, const int incy)
 
template<class T >
void Vabs (int n, const T *x, const int incx, T *y, const int incy)
 vabs: y = |x| More...
 
template void Vabs (int n, const Nektar::NekDouble *x, const int incx, Nektar::NekDouble *y, const int incy)
 
template<class T >
void Vvtvp (int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
 vvtvp (vector times vector plus vector): z = w*x + y More...
 
template void Vvtvp (int n, const Nektar::NekDouble *w, const int incw, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template<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 More...
 
template void Vvtvm (int n, const Nektar::NekDouble *w, const int incw, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template<class T >
void Svtvp (int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
 svtvp (scalar times vector plus vector): z = alpha*x + y More...
 
template void Svtvp (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template<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 More...
 
template void Svtvm (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, const int incx, const Nektar::NekDouble *y, const int incy, Nektar::NekDouble *z, const int incz)
 
template<class T >
void Vvtvvtp (int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
 vvtvvtp (vector times vector plus vector times vector): More...
 
template void Vvtvvtp (int n, const Nektar::NekDouble *v, int incv, const Nektar::NekDouble *w, int incw, const Nektar::NekDouble *x, int incx, const Nektar::NekDouble *y, int incy, Nektar::NekDouble *z, int incz)
 
template<class T >
void Vvtvvtm (int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
 vvtvvtm (vector times vector minus vector times vector): More...
 
template void Vvtvvtm (int n, const Nektar::NekDouble *v, int incv, const Nektar::NekDouble *w, int incw, const Nektar::NekDouble *x, int incx, const Nektar::NekDouble *y, int incy, Nektar::NekDouble *z, int incz)
 
template<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): More...
 
template void Svtsvtp (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *x, int incx, const Nektar::NekDouble beta, const Nektar::NekDouble *y, int incy, Nektar::NekDouble *z, int incz)
 
template<class T >
void Vstvpp (int n, const T alpha, const T *v, int incv, const T *w, int incw, const T *x, int incx, T *z, int incz)
 Vstvpp (scalar times vector plus vector plus vector): More...
 
template void Vstvpp (int n, const Nektar::NekDouble alpha, const Nektar::NekDouble *v, int incv, const Nektar::NekDouble *w, int incw, const Nektar::NekDouble *x, int incx, Nektar::NekDouble *z, int incz)
 
template<class T >
void Gathr (int n, const T *x, const int *y, T *z)
 Gather vector z[i] = x[y[i]]. More...
 
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]]. More...
 
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]. More...
 
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]. More...
 
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. More...
 
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. More...
 
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) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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 >
int Nnan (int n, const T *x, const int incx)
 Return number of NaN elements of x. More...
 
template int Nnan (int n, const Nektar::NekDouble *x, const int incx)
 
template int Nnan (int n, const float *x, const int incx)
 
template int Nnan (int n, const int *x, const int incx)
 
template<class T >
Dot (int n, const T *w, const T *x)
 vvtvp (vector times vector times vector): z = w*x*y More...
 
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 More...
 
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 More...
 
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 More...
 
template Nektar::NekDouble Dot2 (int n, const Nektar::NekDouble *w, const int incw, const Nektar::NekDouble *x, const int incx, const int *y, const int incy)
 
template<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. More...
 
template<class T >
void FillWhiteNoise (int n, const T eps, Array< OneD, T > &x, const int incx, int outseed=9999)
 
template<class T >
void Vmul (int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 Multiply vector z = x*y. More...
 
template<class T >
void Vmul (int n, const Array< TwoD, NekDouble >::const_reference &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 
template<class T >
void Smul (int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 Scalar multiply y = alpha*y. More...
 
template<class T >
void Vdiv (int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 Multiply vector z = x/y. More...
 
template<class T >
void Sdiv (int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 Scalar multiply y = alpha/y. More...
 
template<class T >
void Vadd (int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 Add vector z = x+y. More...
 
template<class T >
void Sadd (int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 Add vector y = alpha + x. More...
 
template<class T >
void Vsub (int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 Subtract vector z = x-y. More...
 
template<class T >
void Zero (int n, Array< OneD, T > &x, const int incx)
 Zero vector. More...
 
template<class T >
void Neg (int n, Array< OneD, T > &x, const int incx)
 Negate x = -x. More...
 
template<class T >
void Vlog (int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 
template<class T >
void Vexp (int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 
template<class T >
void Vpow (int n, const Array< OneD, const T > &x, const int incx, const T f, Array< OneD, T > &y, const int incy)
 
template<class T >
void Vsqrt (int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 sqrt y = sqrt(x) More...
 
template<class T >
void Vabs (int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
 vabs: y = |x| More...
 
template<class T >
void Vvtvp (int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 vvtvp (vector times vector plus vector): z = w*x + y More...
 
template<class T >
void Vvtvp (int n, const Array< TwoD, NekDouble >::const_reference &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 
template<class T >
void Svtvp (int n, const T alpha, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 svtvp (scalar times vector plus vector): z = alpha*x + y More...
 
template<class T >
void Svtvm (int n, const T alpha, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 svtvp (scalar times vector plus vector): z = alpha*x + y More...
 
template<class T >
void Vvtvm (int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 vvtvm (vector times vector minus vector): z = w*x - y More...
 
template<class T >
void Vvtvvtp (int n, const Array< OneD, const T > &v, int incv, const Array< OneD, const T > &w, int incw, const Array< OneD, const T > &x, int incx, const Array< OneD, const T > &y, int incy, Array< OneD, T > &z, int incz)
 vvtvvtp (vector times vector plus vector times vector): z = v*w + y*z More...
 
template<class T >
void Svtsvtp (int n, const T alpha, const Array< OneD, const T > &x, const int incx, const T beta, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
 svtsvtp (scalar times vector plus scalar times vector): z = alpha*x + beta*y More...
 
template<class T >
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]]. More...
 
template<class T >
void Scatr (int n, const Array< OneD, const T > &x, const Array< OneD, const int > &y, Array< OneD, T > &z)
 Scatter vector z[y[i]] = x[i]. More...
 
template<class T >
void Assmb (int n, const Array< OneD, T > &x, const Array< OneD, int > &y, Array< OneD, T > &z)
 Assemble z[y[i]] += x[i]; z should be zero'd first. More...
 
template<class T >
Vsum (int n, const Array< OneD, const T > &x, const int incx)
 Subtract return sum(x) More...
 
template<class T >
int Imax (int n, const Array< OneD, const T > &x, const int incx)
 Return the index of the maximum element in x. More...
 
template<class T >
Vmax (int n, const Array< OneD, const T > &x, const int incx)
 Return the maximum element in x – called vmax to avoid conflict with max. More...
 
template<class T >
int Iamax (int n, const Array< OneD, const T > &x, const int incx)
 Return the index of the maximum absolute element in x. More...
 
template<class T >
Vamax (int n, const Array< OneD, const T > &x, const int incx)
 Return the maximum absolute element in x called vamax to avoid conflict with max. More...
 
template<class T >
int Imin (int n, const Array< OneD, const T > &x, const int incx)
 Return the index of the minimum element in x. More...
 
template<class T >
Vmin (int n, const Array< OneD, const T > &x, const int incx)
 Return the minimum element in x - called vmin to avoid conflict with min. More...
 
template<class T >
int Nnan (int n, const Array< OneD, const T > &x, const int incx)
 Return number of NaN elements of x. More...
 
template<class T >
Dot (int n, const Array< OneD, const T > &w, const Array< OneD, const T > &x)
 
template<class T >
Dot (int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx)
 
template<class T >
Dot2 (int n, const Array< OneD, const T > &w, const Array< OneD, const T > &x, const Array< OneD, const int > &y)
 
template<class T >
Ddot (int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const int > &y, const int incy)
 
template<class T >
void Vcopy (int n, const Array< OneD, const T > &x, int incx, Array< OneD, T > &y, int const incy)
 
template<class T >
void Reverse (int n, const Array< OneD, const T > &x, int incx, Array< OneD, T > &y, int const incy)
 

Variables

static boost::mutex mutex
 

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

References ASSERTL1, and Assmb().

320  {
321  ASSERTL1(n <= x.num_elements()+x.GetOffset(),"Array out of bounds");
322  ASSERTL1(n <= y.num_elements()+y.GetOffset(),"Array out of bounds");
323 
324  Assmb(n,&x[0],&y[0],&z[0]);
325  }
void Assmb(int n, const Array< OneD, T > &x, const Array< OneD, int > &y, Array< OneD, T > &z)
Assemble z[y[i]] += x[i]; z should be zero'd first.
Definition: VmathArray.hpp:319
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 722 of file Vmath.cpp.

724  {
725  while (n--)
726  {
727  *(z + *(y++)) += *(sign++) * (*(x++));
728  }
729  }
#define sign(a, b)
return the sign(b)*a
Definition: Polylib.cpp:27
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 
)

Definition at line 436 of file VmathArray.hpp.

References ASSERTL1, and Dot2().

Referenced by Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_small(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocEdgesToTrace(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocFacesToTrace(), Nektar::Collections::TetIProduct(), Nektar::SolverUtils::DriverModifiedArnoldi::v_Execute(), Nektar::LocalRegions::QuadExp::v_GetEdgeInterpVals(), Nektar::LocalRegions::SegExp::v_GetVertexPhysVals(), Nektar::StdRegions::StdTriExp::v_IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdQuadExp::v_IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdPrismExp::v_IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdTetExp::v_IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdExpansion0D::v_PhysEvaluate(), Nektar::StdRegions::StdExpansion1D::v_PhysEvaluate(), Nektar::StdRegions::StdExpansion2D::v_PhysEvaluate(), and Nektar::StdRegions::StdExpansion3D::v_PhysEvaluate().

440  {
441  ASSERTL1(n*incw <= w.num_elements()+w.GetOffset(),"Array out of bounds");
442  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
443  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
444 
445  return Dot2(n,&w[0],incw,&x[0],incx,&y[0],incy);
446  }
T Dot2(int n, const Array< OneD, const T > &w, const Array< OneD, const T > &x, const Array< OneD, const int > &y)
Definition: VmathArray.hpp:423
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
template<class T >
T Vmath::Dot ( int  n,
const Array< OneD, const T > &  w,
const Array< OneD, const T > &  x 
)

Definition at line 401 of file VmathArray.hpp.

References ASSERTL1, and Dot().

404  {
405  ASSERTL1(n <= w.num_elements()+w.GetOffset(),"Array out of bounds");
406  ASSERTL1(n <= x.num_elements()+x.GetOffset(),"Array out of bounds");
407 
408  return Dot(n,&w[0],&x[0]);
409  }
T Dot(int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx)
Definition: VmathArray.hpp:412
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 412 of file VmathArray.hpp.

References ASSERTL1, and Dot().

415  {
416  ASSERTL1(n*incw <= w.num_elements()+w.GetOffset(),"Array out of bounds");
417  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
418 
419  return Dot(n,&w[0],incw,&x[0],incx);
420  }
T Dot(int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx)
Definition: VmathArray.hpp:412
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 914 of file Vmath.cpp.

Referenced by Nektar::IncNavierStokes::CalcSteadyState(), Dot(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_small(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_test(), and Nektar::NekMeshUtils::BLMesh::Proximity().

917  {
918  T sum = 0;
919 
920  while( n-- )
921  {
922  sum += (*w) * (*x);
923  ++w;
924  ++x;
925  }
926  return sum;
927  }
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 934 of file Vmath.cpp.

937  {
938  T sum = 0;
939 
940  while( n-- )
941  {
942  sum += (*w) * (*x);
943  w += incw;
944  x += incx;
945  }
946  return sum;
947  }
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 423 of file VmathArray.hpp.

References ASSERTL1, and Dot2().

427  {
428  ASSERTL1(n <= w.num_elements()+w.GetOffset(),"Array out of bounds");
429  ASSERTL1(n <= x.num_elements()+x.GetOffset(),"Array out of bounds");
430  ASSERTL1(n <= y.num_elements()+y.GetOffset(),"Array out of bounds");
431 
432  return Dot2(n,&w[0],&x[0],&y[0]);
433  }
T Dot2(int n, const Array< OneD, const T > &w, const Array< OneD, const T > &x, const Array< OneD, const int > &y)
Definition: VmathArray.hpp:423
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 954 of file Vmath.cpp.

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

958  {
959  T sum = 0;
960 
961  while( n-- )
962  {
963  sum += (*y == 1 ? (*w) * (*x) : 0 );
964  ++w;
965  ++x;
966  ++y;
967  }
968  return sum;
969  }
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 978 of file Vmath.cpp.

982  {
983  T sum = 0;
984 
985  while( n-- )
986  {
987  sum += (*y == 1 ? (*w) * (*x) : 0.0 );
988  w += incw;
989  x += incx;
990  y += incy;
991  }
992  return sum;
993  }
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(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Fill(), Nektar::MultiRegions::ExpList1DHomogeneous2D::GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GetCoords(), Nektar::Collections::CoalescedGeomData::GetDerivFactors(), Nektar::Collections::CoalescedGeomData::GetJac(), Nektar::Collections::CoalescedGeomData::GetJacWithStdWeights(), GetQ(), Nektar::FieldUtils::ProcessQualityMetric::GetQ(), Nektar::NavierStokesCFE::GetViscousFluxVector(), Nektar::NavierStokesCFE::GetViscousFluxVectorDeAlias(), Nektar::LinearisedAdvection::ImportFldBase(), main(), Nektar::FieldUtils::ProcessJacobianEnergy::Process(), Nektar::FieldUtils::ProcessNumModes::Process(), Nektar::FieldUtils::ProcessAddCompositeID::Process(), Nektar::SubSteppingExtrapolate::SubStepExtrapolateField(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::TriExp::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::LinearElasticSystem::v_DoSolve(), 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::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::StdRegions::StdTriExp::v_GetCoords(), Nektar::StdRegions::StdQuadExp::v_GetCoords(), Nektar::GlobalMapping::MappingXofZ::v_GetJacobian(), Nektar::GlobalMapping::MappingXYofZ::v_GetJacobian(), Nektar::GlobalMapping::MappingTranslation::v_GetJacobian(), Nektar::LocalRegions::TetExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::CellModelAlievPanfilov::v_SetInitialConditions(), Nektar::CellModelFitzHughNagumo::v_SetInitialConditions(), Nektar::Fox02::v_SetInitialConditions(), Nektar::TenTusscher06::v_SetInitialConditions(), Nektar::LuoRudy91::v_SetInitialConditions(), Nektar::FentonKarma::v_SetInitialConditions(), Nektar::CourtemancheRamirezNattel98::v_SetInitialConditions(), Nektar::Winslow99::v_SetInitialConditions(), Nektar::MultiRegions::GlobalLinSysStaticCond::v_Solve(), Nektar::LocalRegions::TetExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PrismExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::HexExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TriExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::QuadExp::v_SVVLaplacianFilter(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_WriteVtkPieceHeader(), and Nektar::MultiRegions::ExpList3DHomogeneous1D::v_WriteVtkPieceHeader().

47  {
48  while( n-- )
49  {
50  *x = alpha;
51  x += incx;
52  }
53  }
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().

49  {
50 
51  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Out of bounds");
52 
53  Fill(n,alpha,&x[0],incx);
54  }
void Fill(int n, const T alpha, Array< OneD, T > &x, const int incx)
Fill a vector with a constant value.
Definition: VmathArray.hpp:48
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 = 9999 
)

Definition at line 56 of file VmathArray.hpp.

References ASSERTL1, and FillWhiteNoise().

59  {
60  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Out of bounds");
61 
62  FillWhiteNoise(n,eps,&x[0],incx,outseed);
63  }
void FillWhiteNoise(int n, const T eps, Array< OneD, T > &x, const int incx, int outseed=9999)
Definition: VmathArray.hpp:56
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 138 of file Vmath.cpp.

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

140  {
141  // Protect the static vars here and in ran2
142  boost::mutex::scoped_lock l(mutex);
143 
144  // Define static variables for generating random numbers
145  static int iset = 0;
146  static T gset;
147  static long seed = 0;
148 
149  // Bypass seed if outseed was specified
150  if( outseed != 9999)
151  {
152  seed = long(outseed);
153  }
154 
155  while( n-- )
156  {
157  T fac, rsq, v1, v2;
158 
159  if (iset == 0)
160  {
161  do
162  {
163  v1 = 2.0 * ran2<T> (&seed) - 1.0;
164  v2 = 2.0 * ran2<T> (&seed) - 1.0;
165  rsq = v1*v1 + v2*v2;
166  } while (rsq >= 1.0 || rsq == 0.0);
167  fac = sqrt(-2.0 * log (rsq) / rsq);
168  gset = v1 * fac;
169  iset = 1;
170  *x = eps * v2 * fac;
171  }
172  else
173  {
174  iset = 0;
175  *x = eps * gset;
176  }
177  x += incx;
178  }
179  }
static boost::mutex mutex
Definition: Vmath.cpp:134
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 298 of file VmathArray.hpp.

References ASSERTL1, and Gathr().

299  {
300 
301  ASSERTL1(n <= y.num_elements()+y.GetOffset(),"Array out of bounds");
302  ASSERTL1(n <= z.num_elements()+z.GetOffset(),"Array out of bounds");
303 
304  Gathr(n,&x[0],&y[0],&z[0]);
305 
306  }
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]].
Definition: VmathArray.hpp:298
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 659 of file Vmath.cpp.

661  {
662  while (n--)
663  {
664  *z++ = *(sign++) * (*(x + *y++));
665  }
666  return;
667  }
#define sign(a, b)
return the sign(b)*a
Definition: Polylib.cpp:27
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 357 of file VmathArray.hpp.

References ASSERTL1, and Iamax().

358  {
359  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
360 
361  return Iamax(n,&x[0],incx);
362 
363  }
int Iamax(int n, const Array< OneD, const T > &x, const int incx)
Return the index of the maximum absolute element in x.
Definition: VmathArray.hpp:357
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 800 of file Vmath.cpp.

Referenced by Iamax().

801  {
802 
803  int i, indx = ( n > 0 ) ? 0 : -1;
804  T xmax = *x;
805  T xm;
806 
807  for (i = 0; i < n; i++)
808  {
809  xm = (*x > 0)? *x: -*x;
810  if (xm > xmax)
811  {
812  xmax = xm;
813  indx = i;
814  }
815  x += incx;
816  }
817 
818  return indx;
819  }
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 340 of file VmathArray.hpp.

References ASSERTL1, and Imax().

341  {
342  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
343 
344  return Imax(n,&x[0],incx);
345  }
int Imax(int n, const Array< OneD, const T > &x, const int incx)
Return the index of the maximum element in x.
Definition: VmathArray.hpp:340
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 755 of file Vmath.cpp.

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

756  {
757 
758  int i, indx = ( n > 0 ) ? 0 : -1;
759  T xmax = *x;
760 
761  for (i = 0; i < n; i++)
762  {
763  if (*x > xmax)
764  {
765  xmax = *x;
766  indx = i;
767  }
768  x += incx;
769  }
770 
771  return indx;
772  }
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 376 of file VmathArray.hpp.

References ASSERTL1, and Imin().

377  {
378  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
379 
380  return Imin(n,&x[0],incx);
381  }
int Imin(int n, const Array< OneD, const T > &x, const int incx)
Return the index of the minimum element in x.
Definition: VmathArray.hpp:376
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
template<class T >
int Vmath::Imin ( int  n,
const T *  x,
const int  incx 
)

Return the index of the minimum element in x.

Definition at line 847 of file Vmath.cpp.

Referenced by DetermineclosePointxindex(), Imin(), main(), MappingEVids(), MoveOutsidePointsNnormpos(), Orderfunctionx(), Nektar::Collections::CollectionOptimisation::SetWithTimings(), Nektar::VortexWaveInteraction::UpdateAlpha(), Nektar::VortexWaveInteraction::UpdateWaveForceMag(), Nektar::SpatialDomains::TetGeom::v_GetLocCoords(), Nektar::SpatialDomains::PrismGeom::v_GetLocCoords(), Nektar::SpatialDomains::HexGeom::v_GetLocCoords(), Nektar::SpatialDomains::QuadGeom::v_GetLocCoords(), and Nektar::SpatialDomains::TriGeom::v_GetLocCoords().

848  {
849 
850  int i, indx = ( n > 0 ) ? 0 : -1;
851  T xmin = *x;
852 
853  for(i = 0;i < n;i++)
854  {
855  if( *x < xmin )
856  {
857  xmin = *x;
858  indx = i;
859  }
860  x += incx;
861  }
862 
863  return indx;
864  }
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 156 of file VmathArray.hpp.

References ASSERTL1, and Neg().

157  {
158  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
159 
160  Neg(n,&x[0],incx);
161 
162  }
void Neg(int n, Array< OneD, T > &x, const int incx)
Negate x = -x.
Definition: VmathArray.hpp:156
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
template<class T >
void Vmath::Neg ( int  n,
T *  x,
const int  incx 
)

Negate x = -x.

Definition at line 396 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::UnsteadyInviscidBurger::DoOdeRhs(), Nektar::LinearSWE::DoOdeRhs(), Nektar::UnsteadyAdvection::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::APE::DoOdeRhs(), Nektar::UnsteadyAdvectionDiffusion::DoOdeRhs(), Nektar::CFLtester::DoOdeRhs(), Nektar::UnsteadyViscousBurgers::DoOdeRhs(), Nektar::CompressibleFlowSystem::DoOdeRhs(), Nektar::MultiRegions::ContField2D::LaplaceSolve(), main(), Nektar::VCSMapping::MappingAccelerationCorrection(), Nektar::VCSMapping::MappingAdvectionCorrection(), Neg(), Nektar::FieldUtils::ProcessWSS::Process(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::IncNavierStokes::SetZeroNormalVelocity(), Nektar::SubSteppingExtrapolate::SubStepAdvection(), Nektar::UnsteadyAdvectionDiffusion::SubStepAdvection(), Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::SolverUtils::AdvectionWeakDG::v_Advect(), Nektar::AdjointAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::WallViscousBC::v_Apply(), Nektar::MultiRegions::ExpList::v_CurlCurl(), 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::LinearElasticSystem::v_DoSolve(), Nektar::LocalRegions::Expansion1D::v_GenMatrix(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), Nektar::MultiRegions::ContField3D::v_HelmSolve(), Nektar::MultiRegions::DisContField3D::v_HelmSolve(), Nektar::MultiRegions::ContField1D::v_HelmSolve(), Nektar::MultiRegions::DisContField2D::v_HelmSolve(), Nektar::MultiRegions::ContField2D::v_HelmSolve(), Nektar::MultiRegions::DisContField1D::v_HelmSolve(), Nektar::ShallowWaterSystem::v_InitObject(), Nektar::MultiRegions::ContField3D::v_LinearAdvectionDiffusionReactionSolve(), Nektar::MultiRegions::ContField2D::v_LinearAdvectionDiffusionReactionSolve(), Nektar::LocalRegions::Expansion2D::v_NegateEdgeNormal(), Nektar::StdRegions::StdExpansion3D::v_NegateFaceNormal(), Nektar::VCSMapping::v_SolvePressure(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundaryForcing(), Nektar::SolverUtils::EquationSystem::WeakDGAdvection(), and Nektar::SolverUtils::EquationSystem::WeakDGDiffusion().

397  {
398  while( n-- )
399  {
400  *x = -(*x);
401  x += incx;
402  }
403  }
template void Vmath::Neg ( int  n,
Nektar::NekDouble x,
const int  incx 
)
template<class T >
int Vmath::Nnan ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Return number of NaN elements of x.

Definition at line 393 of file VmathArray.hpp.

References ASSERTL1, and Nnan().

394  {
395  ASSERTL1(n * incx <= x.num_elements() + x.GetOffset(), "Array out of bounds");
396 
397  return Nnan(n, &x[0], incx);
398  }
int Nnan(int n, const Array< OneD, const T > &x, const int incx)
Return number of NaN elements of x.
Definition: VmathArray.hpp:393
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
template<class T >
int Vmath::Nnan ( int  n,
const T *  x,
const int  incx 
)

Return number of NaN elements of x.

Definition at line 892 of file Vmath.cpp.

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

893  {
894 
895  int nNan = 0;
896 
897  while (n--)
898  {
899  if (*x != *x)
900  {
901  nNan++;
902  }
903  x += incx;
904  }
905 
906  return nNan;
907  }
template int Vmath::Nnan ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
template int Vmath::Nnan ( int  n,
const float *  x,
const int  incx 
)
template int Vmath::Nnan ( int  n,
const int *  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.

81  {
82  int j;
83  long k;
84  static long idum2=123456789;
85  static long iy=0;
86  static long iv[NTAB];
87  T temp;
88 
89  if (*idum <= 0) {
90  if (-(*idum) < 1) *idum = 1;
91  else *idum = -(*idum);
92  idum2 = (*idum);
93  for (j=NTAB+7; j>=0; j--) {
94  k = (*idum) / IQ1;
95  *idum = IA1 * (*idum - k*IQ1) - k*IR1;
96  if (*idum < 0) *idum += IM1;
97  if (j < NTAB) iv[j] = *idum;
98  }
99  iy = iv[0];
100  }
101 
102  k = (*idum) / IQ1;
103  *idum = IA1*(*idum - k*IQ1) - k*IR1;
104  if (*idum < 0) *idum += IM1;
105 
106  k = idum2 / IQ2;
107  idum2 = IA2*(idum2 - k*IQ2) - k*IR2;
108  if (idum2 < 0) idum2 += IM2;
109 
110  j = iy / NDIV;
111  iy = iv[j] - idum2;
112  iv[j] = *idum;
113  if (iy < 1) iy += IMM1;
114 
115  if ((temp=AM*iy) > RNMX) return RNMX;
116  else return temp;
117  }
#define IMM1
Definition: Vmath.cpp:60
#define IM1
Definition: Vmath.cpp:57
#define IM2
Definition: Vmath.cpp:58
#define AM
Definition: Vmath.cpp:59
#define IQ1
Definition: Vmath.cpp:63
#define IR1
Definition: Vmath.cpp:65
#define IQ2
Definition: Vmath.cpp:64
#define NTAB
Definition: Vmath.cpp:67
#define IR2
Definition: Vmath.cpp:66
#define IA2
Definition: Vmath.cpp:62
#define IA1
Definition: Vmath.cpp:61
#define RNMX
Definition: Vmath.cpp:70
#define NDIV
Definition: Vmath.cpp:68
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 458 of file VmathArray.hpp.

References ASSERTL1, and Reverse().

459  {
460  ASSERTL1(static_cast<unsigned int>(std::abs(n*incx)) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
461  ASSERTL1(static_cast<unsigned int>(std::abs(n*incy)) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
462 
463  Reverse(n,&x[0],incx,&y[0],incy);
464  }
void Reverse(int n, const Array< OneD, const T > &x, int incx, Array< OneD, T > &y, int const incy)
Definition: VmathArray.hpp:458
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 126 of file VmathArray.hpp.

References ASSERTL1, and Sadd().

127  {
128 
129  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
130  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
131 
132  Sadd(n,alpha,&x[0],incx,&y[0],incy);
133  }
void Sadd(int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
Add vector y = alpha + x.
Definition: VmathArray.hpp:126
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 315 of file Vmath.cpp.

Referenced by Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), DetermineclosePointxindex(), Nektar::MultiRegions::ExpList1DHomogeneous2D::GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GetCoords(), Nektar::ForcingMovingBody::InitialiseCableModel(), Nektar::NonlinearPeregrine::LaitoneSolitaryWave(), main(), MoveOutsidePointsNnormpos(), Sadd(), Nektar::FieldUtils::ProcessEquiSpacedOutput::SetHomogeneousConnectivity(), Nektar::FilterMovingBody::UpdateForce(), Nektar::SolverUtils::DriverArpack::v_Execute(), Nektar::Utilities::ProcessCurve::v_GenerateEdgeNodes(), Nektar::MultiRegions::ExpList1DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingTranslation::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), 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::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingTranslation::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetMetricTensor(), Nektar::FilterElectrogram::v_Initialise(), Nektar::BidomainRoth::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::GlobalMapping::MappingXofXZ::v_LowerIndex(), Nektar::GlobalMapping::MappingXofZ::v_LowerIndex(), Nektar::StdRegions::StdTriExp::v_PhysDeriv(), Nektar::StdRegions::StdTetExp::v_PhysDeriv(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofZ::v_RaiseIndex(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), and Nektar::CourtemancheRamirezNattel98::v_Update().

317  {
318  ++n;
319  if (incx == 1 && incy == 1)
320  {
321  while( --n )
322  {
323  *y = alpha + (*x);
324  ++x;
325  ++y;
326  }
327  }
328  else
329  {
330  while( --n )
331  {
332  *y = alpha + (*x);
333  x += incx;
334  y += incy;
335  }
336  }
337  }
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 309 of file VmathArray.hpp.

References ASSERTL1, and Scatr().

310  {
311  ASSERTL1(n <= x.num_elements()+x.GetOffset(),"Array out of bounds");
312  ASSERTL1(n <= y.num_elements()+y.GetOffset(),"Array out of bounds");
313 
314  Scatr(n,&x[0],&y[0],&z[0]);
315  }
void Scatr(int n, const Array< OneD, const T > &x, const Array< OneD, const int > &y, Array< OneD, T > &z)
Scatter vector z[y[i]] = x[i].
Definition: VmathArray.hpp:309
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
template<class T >
void Vmath::Scatr ( int  n,
const T *  x,
const int *  y,
T *  z 
)
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 686 of file Vmath.cpp.

688  {
689  while (n--)
690  {
691  if(*sign)
692  {
693  *(z + *(y++)) = *(sign++) * (*(x++));
694  }
695  else
696  {
697  x++;
698  y++;
699  sign++;
700  }
701  }
702  }
#define sign(a, b)
return the sign(b)*a
Definition: Polylib.cpp:27
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 106 of file VmathArray.hpp.

References ASSERTL1, and Sdiv().

107  {
108  ASSERTL1(static_cast<unsigned int>(n*incx) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
109  ASSERTL1(static_cast<unsigned int>(n*incy) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
110 
111  Sdiv(n,alpha,&x[0],incx,&y[0],incy);
112  }
void Sdiv(int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
Scalar multiply y = alpha/y.
Definition: VmathArray.hpp:106
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 86 of file VmathArray.hpp.

References ASSERTL1, and Smul().

87  {
88  ASSERTL1(static_cast<unsigned int>(n*incx) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
89  ASSERTL1(static_cast<unsigned int>(n*incy) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
90 
91  Smul(n,alpha, &x[0],incx,&y[0],incy);
92  }
void Smul(int n, const T alpha, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
Scalar multiply y = alpha*y.
Definition: VmathArray.hpp:86
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 213 of file Vmath.cpp.

Referenced by Nektar::Extrapolate::AccelerationBDF(), Nektar::Extrapolate::AddPressureToOutflowBCs(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::SpatialDomains::GeomFactors::Adjoint(), Nektar::VCSMapping::ApplyIncNSMappingForcing(), Nektar::LinearElasticSystem::BuildLaplacianIJMatrix(), Nektar::PulseWaveSystem::CalcCharacteristicVariables(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::SolverUtils::FilterAeroForces::CalculateForces(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::LibUtilities::GaussPoints::CalculateGalerkinProjectionMatrix(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Computestreakpositions(), Nektar::CoupledLinearNS::Continuation(), Nektar::LinearisedAdvection::DFT(), Diffusion::DoImplicitSolve(), Nektar::BidomainRoth::DoImplicitSolve(), Nektar::Bidomain::DoImplicitSolve(), Nektar::Monodomain::DoImplicitSolve(), Nektar::UnsteadyDiffusion::DoImplicitSolve(), Nektar::UnsteadyAdvectionDiffusion::DoImplicitSolve(), Nektar::UnsteadyViscousBurgers::DoImplicitSolve(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::Bidomain::DoOdeRhs(), Nektar::BidomainRoth::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_small(), Nektar::Extrapolate::EvaluateBDFArray(), Nektar::CoupledLinearNS::EvaluateNewtonRHS(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Nektar::VortexWaveInteraction::ExecuteRoll(), Extractlayerdata(), Nektar::Extrapolate::ExtrapolateArray(), Nektar::VortexWaveInteraction::FileRelaxation(), Nektar::MultiRegions::ExpList1DHomogeneous2D::GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GetCoords(), Nektar::UnsteadyInviscidBurger::GetFluxVector(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::LinearSWE::GetFluxVector(), Nektar::APE::GetFluxVector(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::VariableConverter::GetPressure(), Nektar::APE::GetStdVelocity(), Nektar::CompressibleFlowSystem::GetStdVelocity(), Nektar::NavierStokesCFE::GetViscousFluxVector(), Nektar::NavierStokesCFE::GetViscousFluxVectorDeAlias(), Nektar::ForcingMovingBody::InitialiseCableModel(), Nektar::LocalRegions::NodalTriExp::Integral(), Nektar::LocalRegions::HexExp::IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_SumFac(), main(), Nektar::SolverUtils::FilterFieldConvert::OutputField(), Nektar::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::PrepareLocalSchurComplement(), Nektar::FieldUtils::ProcessAddFld::Process(), Nektar::FieldUtils::ProcessC0Projection::Process(), Nektar::FieldUtils::ProcessMultiShear::Process(), Nektar::FieldUtils::ProcessQCriterion::Process(), Nektar::FieldUtils::ProcessScaleInFld::Process(), Nektar::FieldUtils::ProcessWSS::Process(), Nektar::FieldUtils::ProcessCombineAvg::Process(), Nektar::LibUtilities::NekFFTW::Reshuffle_Nek2FFTW(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::IncNavierStokes::SetWomersleyBoundary(), Smul(), Nektar::CoupledLinearNS::SolveUnsteadyStokesSystem(), Nektar::SubSteppingExtrapolate::SubStepExtrapolateField(), Nektar::SolverUtils::UnsteadySystem::SVVVarDiffCoeff(), Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate(), Nektar::FilterMovingBody::UpdateForce(), Nektar::MultiRegions::GlobalLinSysIterative::UpdateKnownSolutions(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::SymmetryBC::v_Apply(), Nektar::WallBC::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::TriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::NodalTriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::SegExp::v_ComputeVertexNormal(), Nektar::MappingExtrapolate::v_CorrectPressureBCs(), Nektar::MultiRegions::ExpList::v_CurlCurl(), 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::SmoothShockCapture::v_DoArtificialDiffusion(), Nektar::LinearElasticSystem::v_DoSolve(), 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::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::DisContField3D::v_HelmSolve(), Nektar::MultiRegions::DisContField2D::v_HelmSolve(), Nektar::MultiRegions::DisContField1D::v_HelmSolve(), Nektar::SolverUtils::FilterFieldConvert::v_Initialise(), Nektar::BidomainRoth::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::IterativeElasticSystem::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::TriExp::v_Integral(), Nektar::LocalRegions::QuadExp::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::WeakPressureExtrapolate::v_MountHOPBCs(), Nektar::SubSteppingExtrapolate::v_MountHOPBCs(), Nektar::StdRegions::StdHexExp::v_MultiplyByStdQuadratureMetric(), Nektar::SolverUtils::DiffusionLDG::v_NumFluxforVector(), Nektar::SolverUtils::UnsteadySystem::v_NumFluxforVector(), Nektar::StdRegions::StdTriExp::v_PhysDeriv(), 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::VCSWeakPressure::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VelocityCorrectionScheme::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SolvePressure(), Nektar::VCSMapping::v_SolveViscous(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::GlobalMapping::Mapping::v_VelocityLaplacian(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO1(), Nektar::APE::WallBC(), Nektar::NonlinearSWE::WallBoundary(), Nektar::LinearSWE::WallBoundary(), and Nektar::NonlinearPeregrine::WallBoundary().

215  {
216  ++n;
217  if (incx == 1 && incy == 1)
218  {
219  while( --n )
220  {
221  *y = alpha * (*x);
222  ++x;
223  ++y;
224  }
225  }
226  else
227  {
228  while( --n )
229  {
230  *y = alpha * (*x);
231  x += incx;
232  y += incy;
233  }
234  }
235  }
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 283 of file VmathArray.hpp.

References ASSERTL1, and Svtsvtp().

284  {
285  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
286  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
287  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
288 
289  Svtsvtp(n,alpha,&x[0],incx,beta,&y[0],incy,&z[0],incz);
290  }
void Svtsvtp(int n, const T alpha, const Array< OneD, const T > &x, const int incx, const T beta, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
svtsvtp (scalar times vector plus scalar times vector): z = alpha*x + beta*y
Definition: VmathArray.hpp:283
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 
)
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 242 of file VmathArray.hpp.

References ASSERTL1, and Svtvm().

243  {
244  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
245  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
246  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
247 
248  Svtvm(n,alpha,&x[0],incx,&y[0],incy,&z[0],incz);
249 
250  }
void Svtvm(int n, const T alpha, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
svtvp (scalar times vector plus vector): z = alpha*x + y
Definition: VmathArray.hpp:242
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 518 of file Vmath.cpp.

Referenced by Nektar::Extrapolate::CalcOutflowBCs(), Svtvm(), Nektar::SolverUtils::FilterReynoldsStresses::v_ProcessSample(), and Nektar::CourtemancheRamirezNattel98::v_Update().

521  {
522  while( n-- )
523  {
524  *z = alpha * (*x) - (*y);
525  x += incx;
526  y += incy;
527  z += incz;
528  }
529  }
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 231 of file VmathArray.hpp.

References ASSERTL1, and Svtvp().

232  {
233  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
234  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
235  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
236 
237  Svtvp(n,alpha,&x[0],incx,&y[0],incy,&z[0],incz);
238 
239  }
void Svtvp(int n, const T alpha, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
svtvp (scalar times vector plus vector): z = alpha*x + y
Definition: VmathArray.hpp:231
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 485 of file Vmath.cpp.

Referenced by Nektar::Extrapolate::AccelerationBDF(), Nektar::Extrapolate::AddDuDt(), Nektar::Extrapolate::AddVelBC(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::SolverUtils::DriverSteadyState::ComputeSFD(), Nektar::MultiRegions::GlobalLinSysIterative::DoConjugateGradient(), Nektar::UnsteadyAdvectionDiffusion::DoOdeRhs(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_small(), Nektar::Extrapolate::EvaluateBDFArray(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Nektar::Extrapolate::ExtrapolateArray(), Nektar::VortexWaveInteraction::FileRelaxation(), Nektar::Extrapolate::GetMaxStdVelocity(), Nektar::VariableConverter::GetPressure(), Nektar::APE::GetStdVelocity(), Nektar::CompressibleFlowSystem::GetStdVelocity(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), main(), Nektar::FieldUtils::ProcessScalGrad::Process(), Nektar::FieldUtils::ProcessCombineAvg::Process(), Nektar::RiemannInvariantBC::RiemannInvariantBC(), Svtvp(), Nektar::CellModel::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate(), Nektar::LinearisedAdvection::UpdateBase(), Nektar::SubSteppingExtrapolateWeakPressure::v_AddNormVelOnOBC(), Nektar::WeakPressureExtrapolate::v_AddNormVelOnOBC(), Nektar::SolverUtils::ForcingBody::v_Apply(), 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().

488  {
489  ++n;
490  if (incx == 1 && incy == 1 && incz == 1)
491  {
492  while( --n )
493  {
494  *z = alpha * (*x) + (*y);
495  ++x;
496  ++y;
497  ++z;
498  }
499  }
500  else
501  {
502  while( --n )
503  {
504  *z = alpha * (*x) + (*y);
505  x += incx;
506  y += incy;
507  z += incz;
508  }
509  }
510  }
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 199 of file VmathArray.hpp.

References ASSERTL1, and Vabs().

200  {
201  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
202  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
203 
204  Vabs(n,&x[0],incx,&y[0],incy);
205  }
void Vabs(int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
vabs: y = |x|
Definition: VmathArray.hpp:199
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
template<class T >
void Vmath::Vabs ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  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 115 of file VmathArray.hpp.

References ASSERTL1, and Vadd().

116  {
117 
118  ASSERTL1(static_cast<unsigned int>(n*incx) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
119  ASSERTL1(static_cast<unsigned int>(n*incy) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
120  ASSERTL1(static_cast<unsigned int>(n*incz) <= z.num_elements()+z.GetOffset(),"Array out of bounds");
121 
122  Vadd(n,&x[0],incx,&y[0],incy,&z[0],incz);
123  }
void Vadd(int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
Add vector z = x+y.
Definition: VmathArray.hpp:115
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 299 of file Vmath.cpp.

Referenced by Nektar::NekMatrix< DataType, StandardMatrixTag >::AbsMaxtoMinEigenValueRatio(), Nektar::NonlinearSWE::AddCoriolis(), Nektar::LinearSWE::AddCoriolis(), Nektar::NonlinearPeregrine::AddCoriolis(), Nektar::Extrapolate::AddPressureToOutflowBCs(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::VCSMapping::ApplyIncNSMappingForcing(), Nektar::MultiRegions::PreconditionerBlock::BlockPreconditionerCG(), Nektar::PulseWaveSystem::CalcCharacteristicVariables(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Computestreakpositions(), Nektar::CoupledLinearNS::Continuation(), Nektar::Bidomain::DoImplicitSolve(), Nektar::NonlinearSWE::DoOdeRhs(), Nektar::LinearSWE::DoOdeRhs(), Nektar::Bidomain::DoOdeRhs(), Nektar::BidomainRoth::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::UnsteadyViscousBurgers::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::SmoothShockCapture::GetForcingTerm(), Nektar::NavierStokesCFE::GetViscousFluxVector(), Nektar::NavierStokesCFE::GetViscousFluxVectorDeAlias(), Nektar::LocalRegions::HexExp::IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree_GenericImpl(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), main(), Nektar::VCSMapping::MappingAccelerationCorrection(), MoveOutsidePointsNnormpos(), Nektar::Collections::IProductWRTDerivBase_IterPerExp::operator()(), Nektar::Collections::IProductWRTDerivBase_NoCollection::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Quad::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tri::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Hex::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tet::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Prism::operator()(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::FieldUtils::ProcessMultiShear::Process(), Nektar::FieldUtils::ProcessQCriterion::Process(), Nektar::FieldUtils::ProcessAddFld::Process(), Nektar::FieldUtils::ProcessWSS::Process(), Nektar::FieldUtils::ProcessCombineAvg::Process(), Nektar::CoupledLinearNS::SolveSteadyNavierStokes(), Nektar::FilterMovingBody::UpdateForce(), Nektar::GlobalMapping::UpdateGeometry(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::SolverUtils::Advection3DHomogeneous1D::v_Advect(), Nektar::SolverUtils::AdvectionFR::v_Advect(), Nektar::ForcingStabilityCoupledLNS::v_Apply(), Nektar::SolverUtils::ForcingNoise::v_Apply(), Nektar::SolverUtils::ForcingBody::v_Apply(), Nektar::ForcingMovingBody::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::SolverUtils::ForcingProgrammatic::v_Apply(), Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs(), Nektar::LocalRegions::TetExp::v_ComputeLaplacianMetric(), Nektar::GlobalMapping::MappingXofZ::v_ContravarToCartesian(), Nektar::MappingExtrapolate::v_CorrectPressureBCs(), Nektar::GlobalMapping::MappingXofXZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::Mapping::v_CurlCurlField(), Nektar::MultiRegions::ExpListHomogeneous2D::v_DealiasedDotProd(), Nektar::SolverUtils::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::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::GlobalMapping::Mapping::v_Divergence(), Nektar::SmoothShockCapture::v_DoArtificialDiffusion(), Nektar::ArtificialDiffusion::v_DoArtificialDiffusion(), Nektar::NavierStokesCFE::v_DoDiffusion(), Nektar::MultiRegions::GlobalLinSysIterativeFull::v_DoMatrixMultiply(), Nektar::MultiRegions::PreconditionerLinearWithLowEnergy::v_DoPreconditioner(), Nektar::LinearElasticSystem::v_DoSolve(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::GlobalMapping::Mapping::v_gradgradU(), 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::HexExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::TriExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::QuadExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::MultiRegions::ContField3D::v_LinearAdvectionDiffusionReactionSolve(), Nektar::MultiRegions::ContField2D::v_LinearAdvectionDiffusionReactionSolve(), Nektar::GlobalMapping::MappingXofZ::v_LowerIndex(), Nektar::GlobalMapping::MappingXofXZ::v_LowerIndex(), 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::SolverUtils::FilterAverageFields::v_ProcessSample(), Nektar::CompressibleFlowSystem::v_SetInitialConditions(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VelocityCorrectionScheme::v_SetUpPressureForcing(), 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::VCSMapping::v_SolvePressure(), Nektar::VCSMapping::v_SolveViscous(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::SolverUtils::FilterModalEnergy::v_Update(), Nektar::GlobalMapping::Mapping::v_UpdateBCs(), Nektar::GlobalMapping::Mapping::v_VelocityLaplacian(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO1(), Vadd(), Nektar::SolverUtils::EquationSystem::WeakAdvectionDivergenceForm(), and Nektar::SolverUtils::EquationSystem::WeakDGDiffusion().

301  {
302  while( n-- )
303  {
304  *z = (*x) + (*y);
305  x += incx;
306  y += incy;
307  z += incz;
308  }
309  }
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 367 of file VmathArray.hpp.

References ASSERTL1, and Vamax().

368  {
369  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
370 
371  return Vamax(n,&x[0],incx);
372  }
T Vamax(int n, const Array< OneD, const T > &x, const int incx)
Return the maximum absolute element in x called vamax to avoid conflict with max. ...
Definition: VmathArray.hpp:367
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 825 of file Vmath.cpp.

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

826  {
827 
828  T xmax = *x;
829  T xm;
830 
831  while( n-- )
832  {
833  xm = (*x > 0)? *x: -*x;
834  if (xm > xmax)
835  {
836  xmax = xm;
837  }
838  x += incx;
839  }
840  return xmax;
841  }
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 450 of file VmathArray.hpp.

References ASSERTL1, and Vcopy().

451  {
452  ASSERTL1(static_cast<unsigned int>(std::abs(n*incx)) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
453  ASSERTL1(static_cast<unsigned int>(std::abs(n*incy)) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
454 
455  Vcopy(n,&x[0],incx,&y[0],incy);
456  }
void Vcopy(int n, const Array< OneD, const T > &x, int incx, Array< OneD, T > &y, int const incy)
Definition: VmathArray.hpp:450
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
template<typename T >
void Vmath::Vcopy ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Definition at line 1061 of file Vmath.cpp.

Referenced by Nektar::LocalRegions::Expansion2D::AddHDGHelmholtzTraceTerms(), Nektar::SpatialDomains::GeomFactors::Adjoint(), Nektar::VCSMapping::ApplyIncNSMappingForcing(), Nektar::MultiRegions::AssemblyMap::AssembleBnd(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::CompressibleFlowSystem::CalcSteadyState(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::LibUtilities::NodalTriElec::CalculateInterpMatrix(), Nektar::LibUtilities::NodalPrismElec::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTriEvenlySpaced::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTetElec::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTriFekete::CalculateInterpMatrix(), Nektar::LibUtilities::NodalPrismEvenlySpaced::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTetEvenlySpaced::CalculateInterpMatrix(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Computestreakpositions(), Nektar::NonlinearSWE::ConservativeToPrimitive(), Nektar::LinearSWE::ConservativeToPrimitive(), Nektar::NonlinearPeregrine::ConservativeToPrimitive(), Nektar::GlobalMapping::Mapping::ContravarFromCartesian(), Nektar::GlobalMapping::Mapping::ContravarToCartesian(), Nektar::SolverUtils::DriverArnoldi::CopyArnoldiArrayToField(), Nektar::ShallowWaterSystem::CopyBoundaryTrace(), Nektar::SolverUtils::DriverArnoldi::CopyFieldToArnoldiArray(), Nektar::SolverUtils::EquationSystem::CopyFromPhysField(), Nektar::SolverUtils::DriverArnoldi::CopyFwdToAdj(), Nektar::Extrapolate::CopyPressureHBCsToPbndExp(), Nektar::SolverUtils::EquationSystem::CopyToPhysField(), Nektar::GlobalMapping::Mapping::CovarFromCartesian(), Nektar::GlobalMapping::Mapping::CovarToCartesian(), Nektar::StdRegions::StdExpansion::CreateGeneralMatrix(), DetermineclosePointxindex(), Nektar::LinearisedAdvection::DFT(), Nektar::MultiRegions::GlobalLinSysIterative::DoAconjugateProjection(), Nektar::Bidomain::DoImplicitSolve(), Nektar::MultiRegions::GlobalLinSysPETSc::DoNekppOperation(), Nektar::PulseWavePropagation::DoOdeProjection(), Nektar::ImageWarpingSystem::DoOdeProjection(), Nektar::NonlinearSWE::DoOdeProjection(), Nektar::LinearSWE::DoOdeProjection(), Nektar::UnsteadyInviscidBurger::DoOdeProjection(), Nektar::UnsteadyDiffusion::DoOdeProjection(), Nektar::UnsteadyAdvection::DoOdeProjection(), Nektar::APE::DoOdeProjection(), Nektar::NonlinearPeregrine::DoOdeProjection(), Nektar::UnsteadyAdvectionDiffusion::DoOdeProjection(), Nektar::CFLtester::DoOdeProjection(), Nektar::UnsteadyViscousBurgers::DoOdeProjection(), Nektar::CompressibleFlowSystem::DoOdeProjection(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::NekMatrix< DataType, StandardMatrixTag >::EigenSolve(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_sort(), Nektar::MultiRegions::DisContField3D::EvaluateHDGPostProcessing(), Nektar::MultiRegions::DisContField2D::EvaluateHDGPostProcessing(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Nektar::VortexWaveInteraction::ExecuteRoll(), Extractlayerdata(), Nektar::VortexWaveInteraction::FileRelaxation(), Nektar::LibUtilities::Basis::GenBasis(), Nektar::LocalRegions::NodalTriExp::GeneralMatrixOp_MatOp(), Nektar::LocalRegions::TetExp::GeneralMatrixOp_MatOp(), GenerateNeighbourArrays(), Nektar::MultiRegions::ExpList2DHomogeneous1D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GetCoords(), Nektar::Collections::CoalescedGeomData::GetDerivFactors(), Nektar::MultiRegions::ExpList::GetExpIndex(), Nektar::UnsteadyDiffusion::GetFluxVector(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::CompressibleFlowSystem::GetFluxVector(), Nektar::UnsteadyAdvectionDiffusion::GetFluxVectorDiff(), Nektar::UnsteadyViscousBurgers::GetFluxVectorDiff(), Nektar::Collections::CoalescedGeomData::GetJac(), Nektar::Collections::CoalescedGeomData::GetJacWithStdWeights(), Nektar::FieldUtils::ProcessMapping::GetMapping(), Nektar::LinearSWE::GetVelocityVector(), Nektar::NavierStokesCFE::GetViscousFluxVector(), Nektar::MultiRegions::AssemblyMap::GlobalToLocalBnd(), Nektar::StdRegions::StdExpansion::H1(), Nektar::Collections::HexIProduct(), Nektar::MultiRegions::ExpListHomogeneous1D::Homogeneous1DTrans(), Nektar::LinearisedAdvection::ImportFldBase(), Nektar::ForcingMovingBody::InitialiseCableModel(), Nektar::CompressibleFlowSystem::InitializeSteadyState(), Nektar::LibUtilities::Interp1D(), Nektar::LibUtilities::Interp2D(), Nektar::LibUtilities::InterpCoeff1D(), Nektar::LibUtilities::InterpCoeff2D(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocEdgesToTrace(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocFacesToTrace(), Nektar::Collections::IProductWRTDerivBase_StdMat::IProductWRTDerivBase_StdMat(), Nektar::MultiRegions::DisContField2D::L2_DGDeriv(), Nektar::NonlinearPeregrine::LaitoneSolitaryWave(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree_GenericImpl(), Nektar::MultiRegions::AssemblyMap::LocalBndToGlobal(), Nektar::GlobalMapping::Mapping::LowerIndex(), main(), MappingEVids(), Nektar::MultiRegions::MultiLevelBisectionReordering(), Nektar::MultiRegions::GlobalMatrix::Multiply(), Nektar::MultiRegions::ContField2D::MultiplyByInvMassMatrix(), Nektar::ForcingMovingBody::Newmark_betaSolver(), Nektar::Collections::BwdTrans_SumFac_Seg::operator()(), Nektar::Collections::BwdTrans_SumFac_Quad::operator()(), Nektar::Collections::BwdTrans_SumFac_Hex::operator()(), Orderfunctionx(), Nektar::Collections::PhysDeriv_StdMat::PhysDeriv_StdMat(), Nektar::LibUtilities::PhysGalerkinProject1D(), Nektar::LibUtilities::PhysGalerkinProject2D(), Nektar::StdRegions::StdExpansion2D::PhysTensorDeriv(), Nektar::StdRegions::StdExpansion3D::PhysTensorDeriv(), PolyFit(), PolyInterp(), Nektar::PressureInflowFileBC::PressureInflowFileBC(), Nektar::PressureOutflowFileBC::PressureOutflowFileBC(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::FieldUtils::ProcessJacobianEnergy::Process(), Nektar::FieldUtils::ProcessQualityMetric::Process(), Nektar::FieldUtils::ProcessNumModes::Process(), Nektar::FieldUtils::ProcessVorticity::Process(), Nektar::FieldUtils::ProcessHomogeneousStretch::Process(), Nektar::FieldUtils::ProcessAddFld::Process(), Nektar::FieldUtils::ProcessC0Projection::Process(), Nektar::FieldUtils::ProcessGrad::Process(), Nektar::FieldUtils::ProcessMapping::Process(), Nektar::FieldUtils::ProcessPointDataToFld::Process(), Nektar::Collections::QuadIProduct(), Nektar::GlobalMapping::Mapping::RaiseIndex(), Nektar::MultiRegions::AssemblyMapDG::RealignTraceElement(), Nektar::LibUtilities::NekFFTW::Reshuffle_FFTW2Nek(), Nektar::LibUtilities::NekFFTW::Reshuffle_Nek2FFTW(), Nektar::SolverUtils::RiemannSolver::rotateFromNormal(), Nektar::SolverUtils::RiemannSolver::rotateToNormal(), Nektar::LocalRegions::Expansion3D::SetFaceToGeomOrientation(), Nektar::FieldUtils::ProcessEquiSpacedOutput::SetHomogeneousConnectivity(), Nektar::MultiRegions::ExpList::SetPhys(), Nektar::MultiRegions::LocTraceToTraceMap::Setup2D(), Nektar::MultiRegions::LocTraceToTraceMap::Setup3D(), Nektar::SubSteppingExtrapolate::SubStepProjection(), Nektar::UnsteadyAdvectionDiffusion::SubStepProjection(), 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::MultiRegions::GlobalLinSysIterative::UpdateKnownSolutions(), Nektar::VortexWaveInteraction::UpdateWaveForceMag(), Nektar::RinglebFlowBC::v_Apply(), Nektar::SymmetryBC::v_Apply(), Nektar::WallBC::v_Apply(), Nektar::IsentropicVortexBC::v_Apply(), Nektar::WallViscousBC::v_Apply(), Nektar::ForcingMovingBody::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelCovar(), 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::MappingExtrapolate::v_CalcNeumannPressureBCs(), Nektar::LocalRegions::HexExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::QuadExp::v_ComputeLaplacianMetric(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingTranslation::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingTranslation::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarToCartesian(), Nektar::MappingExtrapolate::v_CorrectPressureBCs(), Nektar::GlobalMapping::MappingXofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingTranslation::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingTranslation::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarToCartesian(), Nektar::GlobalMapping::Mapping::v_CurlCurlField(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedDotProd(), Nektar::MultiRegions::ExpListHomogeneous2D::v_DealiasedProd(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedProd(), Nektar::SolverUtils::DiffusionLFR::v_DerCFlux_1D(), Nektar::SolverUtils::DiffusionLFRNS::v_DerCFlux_1D(), 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::IterativeElasticSystem::v_DoSolve(), Nektar::LinearElasticSystem::v_DoSolve(), Nektar::PulseWaveSystem::v_DoSolve(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoTransformFromLowEnergy(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoTransformToLowEnergy(), Nektar::IsentropicVortex::v_EvaluateExactSolution(), Nektar::SolverUtils::DriverModifiedArnoldi::v_Execute(), 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::MultiRegions::ExpListHomogeneous2D::v_ExtractDataToCoeffs(), Nektar::LocalRegions::SegExp::v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpListHomogeneous1D::v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpList::v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpList::v_ExtractPhysToBndElmt(), 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::StdHexExp::v_FillMode(), Nektar::StdRegions::StdSegExp::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::StdRegions::StdTriExp::v_GeneralMatrixOp_MatOp(), Nektar::LocalRegions::TriExp::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::StdSegExp::v_GenMatrix(), Nektar::StdRegions::StdPrismExp::v_GenMatrix(), Nektar::StdRegions::StdTetExp::v_GenMatrix(), Nektar::MultiRegions::DisContField3DHomogeneous2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBoundaryNormals(), Nektar::MultiRegions::ExpList::v_GetBoundaryNormals(), Nektar::GlobalMapping::Mapping::v_GetCartesianCoordinates(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::GlobalMapping::Mapping::v_GetCoordVelocity(), Nektar::LocalRegions::QuadExp::v_GetEdgePhysVals(), Nektar::LocalRegions::TriExp::v_GetEdgePhysVals(), Nektar::LocalRegions::QuadExp::v_GetEdgeQFactors(), Nektar::MultiRegions::DisContField3D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField2D::v_GetFwdBwdTracePhys(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingGeneral::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetJacobian(), Nektar::GlobalMapping::MappingGeneral::v_GetJacobian(), Nektar::GlobalMapping::MappingXYofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetMetricTensor(), Nektar::GlobalMapping::MappingGeneral::v_GetMetricTensor(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetNormals(), Nektar::MultiRegions::ContField3D::v_ImposeDirichletConditions(), Nektar::MultiRegions::ContField2D::v_ImposeDirichletConditions(), Nektar::SolverUtils::FilterHistoryPoints::v_Initialise(), Nektar::IterativeElasticSystem::v_InitObject(), Nektar::GlobalMapping::Mapping::v_InitObject(), Nektar::StdRegions::StdPointExp::v_IProductWRTBase(), Nektar::StdRegions::StdQuadExp::v_IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdHexExp::v_IProductWRTBase_SumFacKernel(), Nektar::GlobalMapping::MappingXofXZ::v_LowerIndex(), Nektar::GlobalMapping::MappingXofZ::v_LowerIndex(), Nektar::GlobalMapping::MappingTranslation::v_LowerIndex(), Nektar::MultiRegions::ContField3D::v_MultiplyByInvMassMatrix(), Nektar::SolverUtils::DiffusionLFRNS::v_NumericalFluxO1(), Nektar::SolverUtils::DiffusionLFR::v_NumFluxforScalar(), Nektar::SolverUtils::FilterFieldConvert::v_PrepareOutput(), Nektar::GlobalMapping::MappingXofZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingTranslation::v_RaiseIndex(), Nektar::LocalRegions::HexExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdSegExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdQuadExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdPrismExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTetExp::v_ReduceOrderCoeffs(), Nektar::LocalRegions::QuadExp::v_ReduceOrderCoeffs(), Nektar::LinearisedAdvection::v_SetBaseFlow(), Nektar::IsentropicVortex::v_SetInitialConditions(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SetUpViscousForcing(), Nektar::MultiRegions::GlobalLinSysXxtFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysIterativeFull::v_Solve(), Nektar::MultiRegions::GlobalLinSysStaticCond::v_Solve(), Nektar::MultiRegions::GlobalLinSysPETSc::v_SolveLinearSystem(), Nektar::VCSMapping::v_SolvePressure(), Nektar::VCSMapping::v_SolveViscous(), Nektar::SubSteppingExtrapolate::v_SubStepSaveFields(), Nektar::MultiRegions::AssemblyMapCG::v_UniversalAssemble(), Nektar::SolverUtils::FilterHistoryPoints::v_Update(), Nektar::GlobalMapping::Mapping::v_UpdateBCs(), Nektar::GlobalMapping::Mapping::v_UpdateMapping(), Nektar::GlobalMapping::Mapping::v_VelocityLaplacian(), Nektar::SolverUtils::DiffusionLDG::v_WeakPenaltyforScalar(), Nektar::SolverUtils::DiffusionLFR::v_WeakPenaltyforScalar(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO1(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_WriteVtkPieceHeader(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_WriteVtkPieceHeader(), Vcopy(), Nektar::APE::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::NonlinearPeregrine::WCESolve(), Nektar::SolverUtils::EquationSystem::WeakDGDiffusion(), Nektar::SolverUtils::UnsteadySystem::WeakPenaltyforScalar(), Nektar::FieldUtils::OutputTecplot::WriteTecplotConnectivity(), and Nektar::FieldUtils::OutputTecplotBinary::WriteTecplotConnectivity().

1063  {
1064  if( incx ==1 && incy == 1)
1065  {
1066  memcpy(y,x,n*sizeof(T));
1067  }
1068  else
1069  {
1070  while( n-- )
1071  {
1072  *y = *x;
1073  x += incx;
1074  y += incy;
1075  }
1076  }
1077  }
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 95 of file VmathArray.hpp.

References ASSERTL1, and Vdiv().

96  {
97  ASSERTL1(static_cast<unsigned int>(n*incx) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
98  ASSERTL1(static_cast<unsigned int>(n*incy) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
99  ASSERTL1(static_cast<unsigned int>(n*incz) <= z.num_elements()+z.GetOffset(),"Array out of bounds");
100 
101  Vdiv(n,&x[0],incx,&y[0],incy,&z[0],incz);
102 
103  }
void Vdiv(int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
Multiply vector z = x/y.
Definition: VmathArray.hpp:95
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
template<class T >
void Vmath::Vdiv ( int  n,
const T *  x,
const int  incx,
const T *  y,
const int  incy,
T *  z,
const int  incz 
)

Multiply vector z = x/y.

Definition at line 241 of file Vmath.cpp.

Referenced by Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::SpatialDomains::GeomFactors::ComputeDerivFactors(), Nektar::SpatialDomains::GeomFactors::ComputeGmat(), Nektar::NonlinearSWE::ConservativeToPrimitive(), Nektar::LinearSWE::ConservativeToPrimitive(), Nektar::NonlinearPeregrine::ConservativeToPrimitive(), Nektar::APE::GetFluxVector(), Nektar::VariableConverter::GetPressure(), Nektar::NonlinearSWE::GetVelocityVector(), Nektar::NonlinearPeregrine::GetVelocityVector(), Nektar::Utilities::ProcessLinear::Invalid(), main(), Nektar::VCSMapping::MappingPressureCorrection(), Nektar::FieldUtils::ProcessMultiShear::Process(), Nektar::SolverUtils::AdvectionFR::v_Advect(), Nektar::PressureOutflowBC::v_Apply(), Nektar::PressureOutflowFileBC::v_Apply(), Nektar::RiemannInvariantBC::v_Apply(), Nektar::PressureOutflowNonReflectiveBC::v_Apply(), Nektar::PressureInflowFileBC::v_Apply(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelCovar(), Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs(), Nektar::NonlinearSWE::v_ConservativeToPrimitive(), Nektar::LinearSWE::v_ConservativeToPrimitive(), Nektar::NonlinearPeregrine::v_ConservativeToPrimitive(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarToCartesian(), Nektar::SolverUtils::DiffusionLFR::v_Diffuse(), Nektar::SolverUtils::DiffusionLFRNS::v_Diffuse(), Nektar::GlobalMapping::Mapping::v_Divergence(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), Nektar::FilterEnergy::v_GetVelocity(), Nektar::LocalRegions::SegExp::v_PhysDeriv_s(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SetUpViscousForcing(), Nektar::LocalRegions::TetExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PrismExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::HexExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TriExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::QuadExp::v_SVVLaplacianFilter(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO1(), and Vdiv().

243  {
244  ++n;
245  if (incx == 1 && incy == 1)
246  {
247  while( --n )
248  {
249  *z = (*x) / (*y);
250  ++x;
251  ++y;
252  ++z;
253  }
254  }
255  else
256  {
257  while( --n )
258  {
259  *z = (*x) / (*y);
260  x += incx;
261  y += incy;
262  z += incz;
263  }
264  }
265  }
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 108 of file Vmath.hpp.

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

110  {
111  while (n--)
112  {
113  *y = exp( *x );
114  x += incx;
115  y += incy;
116  }
117  }
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 173 of file VmathArray.hpp.

References ASSERTL1, and Vexp().

174  {
175  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
176  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
177 
178  Vexp(n, &x[0], incx, &y[0], incy);
179  }
void Vexp(int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
Definition: VmathArray.hpp:173
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
template<class T >
void Vmath::Vlog ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Definition at line 96 of file Vmath.hpp.

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

98  {
99  while (n--)
100  {
101  *y = log( *x );
102  x += incx;
103  y += incy;
104  }
105  }
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 164 of file VmathArray.hpp.

References ASSERTL1, and Vlog().

165  {
166  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
167  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
168 
169  Vlog(n, &x[0], incx, &y[0], incy);
170  }
void Vlog(int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
Definition: VmathArray.hpp:164
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 349 of file VmathArray.hpp.

References ASSERTL1, and Vmax().

350  {
351  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
352 
353  return Vmax(n,&x[0],incx);
354  }
T Vmax(int n, const Array< OneD, const T > &x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max.
Definition: VmathArray.hpp:349
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
template<class T >
T Vmath::Vmax ( int  n,
const T *  x,
const int  incx 
)

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

Definition at line 779 of file Vmath.cpp.

Referenced by Nektar::NekMatrix< DataType, StandardMatrixTag >::AbsMaxtoMinEigenValueRatio(), Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::CompressibleFlowSystem::CalcSteadyState(), Computestreakpositions(), Nektar::CoupledLocalToGlobalC0ContMap::CoupledLocalToGlobalC0ContMap(), EnforceRotationalSymmetry(), ExpandVertices(), Nektar::APE::GetCFLEstimate(), Nektar::SmoothShockCapture::GetForcingTerm(), Nektar::Extrapolate::GetMaxStdVelocity(), Nektar::VortexWaveInteraction::GetReflectionIndex(), GetReflectionIndex(), GetReflectionIndex2D(), Nektar::Utilities::ProcessLinear::Invalid(), Nektar::MultiRegions::ExpList::Linf(), main(), MappingEVids(), MoveOutsidePointsNnormpos(), Orderfunctionx(), Nektar::FieldUtils::ProcessJacobianEnergy::Process(), Nektar::FieldUtils::ProcessInterpField::Process(), Nektar::FieldUtils::ProcessInterpPoints::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::SpatialDomains::TetGeom::v_ContainsPoint(), Nektar::SpatialDomains::PrismGeom::v_ContainsPoint(), Nektar::SpatialDomains::HexGeom::v_ContainsPoint(), Nektar::SmoothShockCapture::v_DoArtificialDiffusion(), Nektar::FilterBenchmark::v_Update(), Vmax(), and Nektar::FieldUtils::OutputTecplotBinary::WriteTecplotZone().

780  {
781 
782  T xmax = *x;
783 
784  while( n-- )
785  {
786  if (*x > xmax)
787  {
788  xmax = *x;
789  }
790  x += incx;
791  }
792 
793  return xmax;
794  }
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 385 of file VmathArray.hpp.

References ASSERTL1, and Vmin().

386  {
387  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
388 
389  return Vmin(n,&x[0],incx);
390  }
T Vmin(int n, const Array< OneD, const T > &x, const int incx)
Return the minimum element in x - called vmin to avoid conflict with min.
Definition: VmathArray.hpp:385
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 66 of file VmathArray.hpp.

References ASSERTL1, and Vmul().

67  {
68  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
69  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
70  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
71 
72  Vmul(n,&x[0],incx,&y[0],incy,&z[0],incz);
73  }
void Vmul(int n, const Array< TwoD, NekDouble >::const_reference &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
Definition: VmathArray.hpp:75
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 75 of file VmathArray.hpp.

References ASSERTL1, and Vmul().

76  {
77  ASSERTL1(n*incx <= x.num_elements(),"Array out of bounds");
78  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
79  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
80 
81  Vmul(n,x.origin(),incx,&y[0],incy,&z[0],incz);
82  }
void Vmul(int n, const Array< TwoD, NekDouble >::const_reference &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
Definition: VmathArray.hpp:75
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 183 of file Vmath.cpp.

Referenced by Nektar::NekMatrix< DataType, StandardMatrixTag >::AbsMaxtoMinEigenValueRatio(), Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::UnsteadyAdvectionDiffusion::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::Extrapolate::AddPressureToOutflowBCs(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::SolverUtils::EquationSystem::AdvectionNonConservativeForm(), Nektar::PulseWaveSystem::CalcCharacteristicVariables(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::CompressibleFlowSystem::CalcSteadyState(), Nektar::SolverUtils::FilterAeroForces::CalculateForces(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::LibUtilities::GaussPoints::CalculateGalerkinProjectionMatrix(), Nektar::GlobalMapping::MappingXYofXY::CalculateMetricTensor(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), 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::UnsteadyViscousBurgers::GetFluxVectorAdv(), Nektar::UnsteadyAdvection::GetFluxVectorDeAlias(), Nektar::CompressibleFlowSystem::GetFluxVectorDeAlias(), Nektar::Extrapolate::GetMaxStdVelocity(), Nektar::VariableConverter::GetPressure(), Nektar::APE::GetStdVelocity(), Nektar::CompressibleFlowSystem::GetStdVelocity(), Nektar::NavierStokesCFE::GetViscousFluxVector(), Nektar::NavierStokesCFE::GetViscousFluxVectorDeAlias(), Nektar::StdRegions::StdExpansion::H1(), Nektar::Collections::HexIProduct(), Nektar::LocalRegions::NodalTriExp::Integral(), Nektar::StdRegions::StdExpansion2D::Integral(), Nektar::FieldUtils::ProcessInnerProduct::IProduct(), 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::Collections::IProductWRTBase_StdMat::operator()(), Nektar::Collections::IProductWRTDerivBase_StdMat::operator()(), Nektar::Collections::IProductWRTBase_IterPerExp::operator()(), Nektar::Collections::IProductWRTDerivBase_IterPerExp::operator()(), Nektar::Collections::PhysDeriv_IterPerExp::operator()(), Nektar::Collections::IProductWRTBase_SumFac_Seg::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Seg::operator()(), Nektar::Collections::PhysDeriv_SumFac_Seg::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Quad::operator()(), Nektar::Collections::PhysDeriv_SumFac_Quad::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tri::operator()(), Nektar::Collections::PhysDeriv_SumFac_Tri::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Hex::operator()(), Nektar::Collections::PhysDeriv_SumFac_Hex::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tet::operator()(), Nektar::Collections::PhysDeriv_SumFac_Tet::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Prism::operator()(), Nektar::Collections::PhysDeriv_SumFac_Prism::operator()(), Nektar::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::Collections::PrismIProduct(), Nektar::FieldUtils::ProcessMultiShear::Process(), Nektar::FieldUtils::ProcessQCriterion::Process(), Nektar::FieldUtils::ProcessCombineAvg::Process(), Nektar::Collections::QuadIProduct(), Nektar::LibUtilities::NekFFTW::Reshuffle_FFTW2Nek(), Nektar::LibUtilities::NekFFTW::Reshuffle_Nek2FFTW(), Nektar::SolverUtils::RiemannSolver::rotateFromNormal(), Nektar::SolverUtils::RiemannSolver::rotateToNormal(), Nektar::IncNavierStokes::SetRadiationBoundaryForcing(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::SolverUtils::UnsteadySystem::SVVVarDiffCoeff(), Nektar::Collections::TetIProduct(), Nektar::Collections::TriIProduct(), Nektar::FilterMovingBody::UpdateForce(), Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::SolverUtils::AdvectionNonConservative::v_Advect(), Nektar::AdjointAdvection::v_Advect(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::SolverUtils::AdvectionFR::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::GlobalMapping::MappingXYofZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXYofXY::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXYofZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXYofXY::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXofZ::v_ApplyChristoffelCovar(), Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::TriExp::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::GlobalMapping::MappingXYofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarToCartesian(), Nektar::MappingExtrapolate::v_CorrectPressureBCs(), Nektar::GlobalMapping::MappingXYofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarToCartesian(), 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::GlobalMapping::Mapping::v_Divergence(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoMultiplybyInverseTransposedTransformationMatrix(), Nektar::MultiRegions::PreconditionerDiagonal::v_DoPreconditioner(), Nektar::GlobalMapping::MappingXofXZ::v_DotGradJacobian(), Nektar::MultiRegions::DisContField3D::v_EvaluateBoundaryConditions(), Nektar::SolverUtils::DriverAdaptive::v_Execute(), 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::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), 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::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::LocalRegions::SegExp::v_HelmholtzMatrixOp(), Nektar::BidomainRoth::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::LocalRegions::PrismExp::v_Integral(), Nektar::LocalRegions::SegExp::v_Integral(), Nektar::LocalRegions::TetExp::v_Integral(), Nektar::LocalRegions::PyrExp::v_Integral(), Nektar::LocalRegions::TriExp::v_Integral(), Nektar::LocalRegions::QuadExp::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::StdRegions::StdSegExp::v_IProductWRTBase_SumFac(), 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::GlobalMapping::MappingXofXZ::v_LowerIndex(), Nektar::GlobalMapping::MappingXofZ::v_LowerIndex(), Nektar::LocalRegions::Expansion::v_MultiplyByQuadratureMetric(), Nektar::StdRegions::StdPyrExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdSegExp::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::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::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::FilterReynoldsStresses::v_ProcessSample(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofZ::v_RaiseIndex(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SolvePressure(), Nektar::LocalRegions::TetExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PrismExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdTriExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::HexExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdQuadExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TriExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::QuadExp::v_SVVLaplacianFilter(), Nektar::SolverUtils::FilterEnergyBase::v_Update(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::GlobalMapping::MappingXYofZ::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXYofXY::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXofZ::v_UpdateGeomInfo(), 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().

185  {
186  ++n;
187  if (incx == 1 && incy == 1 && incz == 1)
188  {
189  while( --n )
190  {
191  *z = (*x) * (*y);
192  ++x;
193  ++y;
194  ++z;
195  }
196  }
197  else
198  {
199  while( --n )
200  {
201  *z = (*x) * (*y);
202  x += incx;
203  y += incy;
204  z += incz;
205  }
206  }
207  }
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 119 of file Vmath.hpp.

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

121  {
122  while (n--)
123  {
124  *y = pow( *x, f );
125  x += incx;
126  y += incy;
127  }
128  }
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 181 of file VmathArray.hpp.

References ASSERTL1, and Vpow().

182  {
183  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
184  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
185 
186  Vpow(n, &x[0], incx, f, &y[0], incy);
187  }
void Vpow(int n, const Array< OneD, const T > &x, const int incx, const T f, Array< OneD, T > &y, const int incy)
Definition: VmathArray.hpp:181
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 190 of file VmathArray.hpp.

References ASSERTL1, and Vsqrt().

191  {
192  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
193  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
194 
195  Vsqrt(n,&x[0],incx,&y[0],incy);
196  }
void Vsqrt(int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
sqrt y = sqrt(x)
Definition: VmathArray.hpp:190
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
template<class T >
void Vmath::Vsqrt ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

sqrt y = sqrt(x)

Definition at line 408 of file Vmath.cpp.

Referenced by Nektar::PulseWaveSystem::CalcCharacteristicVariables(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::SpatialDomains::GeomFactors::ComputeDerivFactors(), Nektar::SpatialDomains::GeomFactors::ComputeJac(), main(), Nektar::FieldUtils::ProcessMultiShear::Process(), Nektar::FieldUtils::ProcessWSS::Process(), Nektar::FieldUtils::ProcessSurfDistance::Process(), Nektar::SolverUtils::UnsteadySystem::SVVVarDiffCoeff(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::TriExp::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::FilterElectrogram::v_Initialise(), Nektar::LocalRegions::TetExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PrismExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdTriExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::HexExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdQuadExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TriExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::QuadExp::v_SVVLaplacianFilter(), and Vsqrt().

410  {
411  while (n--)
412  {
413  *y = sqrt( *x );
414  x += incx;
415  y += incy;
416  }
417  }
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 617 of file Vmath.cpp.

623  {
624  while( n-- )
625  {
626  *z = alpha * (*v) + (*w) + (*x);
627  v += incv;
628  w += incw;
629  x += incx;
630  z += incz;
631  }
632  }
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 136 of file VmathArray.hpp.

References ASSERTL1, and Vsub().

137  {
138  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
139  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
140  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
141 
142  Vsub(n,&x[0],incx,&y[0],incy,&z[0],incz);
143 
144  }
void Vsub(int n, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
Subtract vector z = x-y.
Definition: VmathArray.hpp:136
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 343 of file Vmath.cpp.

Referenced by Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::UnsteadyAdvectionDiffusion::AddAdvectionPenaltyFlux(), Nektar::NekMeshUtils::BGFSUpdate(), Nektar::PulseWaveSystem::CalcCharacteristicVariables(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::CompressibleFlowSystem::CalcSteadyState(), Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::NonlinearSWE::ConservativeToPrimitive(), Nektar::LinearSWE::ConservativeToPrimitive(), Nektar::NonlinearPeregrine::ConservativeToPrimitive(), 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::VCSMapping::MappingPressureCorrection(), Nektar::FieldUtils::ProcessDisplacement::Process(), Nektar::FieldUtils::ProcessVorticity::Process(), Nektar::FieldUtils::ProcessQCriterion::Process(), Nektar::FieldUtils::ProcessSurfDistance::Process(), Nektar::FieldUtils::ProcessCombineAvg::Process(), Nektar::NekMeshUtils::BLMesh::Proximity(), Nektar::CellModel::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate(), Nektar::ForcingMovingBody::v_Apply(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::NonlinearSWE::v_ConservativeToPrimitive(), Nektar::LinearSWE::v_ConservativeToPrimitive(), Nektar::NonlinearPeregrine::v_ConservativeToPrimitive(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarFromCartesian(), Nektar::MappingExtrapolate::v_CorrectPressureBCs(), Nektar::GlobalMapping::MappingXofXZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarToCartesian(), Nektar::MultiRegions::ExpList::v_CurlCurl(), Nektar::GlobalMapping::Mapping::v_CurlCurlField(), Nektar::SolverUtils::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::SolverUtils::DriverAdaptive::v_Execute(), Nektar::StdRegions::StdPointExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdQuadExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::TriExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::SegExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::QuadExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdTriExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdSegExp::v_FwdTrans_BndConstrained(), Nektar::GlobalMapping::Mapping::v_gradgradU(), Nektar::SolverUtils::DiffusionLDG::v_NumFluxforVector(), Nektar::SolverUtils::UnsteadySystem::v_NumFluxforVector(), Nektar::GlobalMapping::MappingXofZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::VCSMapping::v_SetUpPressureForcing(), 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::VCSMapping::v_SolvePressure(), Nektar::SolverUtils::FilterEnergyBase::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::SolverUtils::FilterModalEnergy::v_Update(), Nektar::GlobalMapping::Mapping::v_VelocityLaplacian(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO1(), and Vsub().

345  {
346  ++n;
347  if (incx == 1 && incy == 1 && incz == 1)
348  {
349  while( --n )
350  {
351  *z = (*x) - (*y);
352  ++x;
353  ++y;
354  ++z;
355  }
356  }
357  else
358  {
359  while( --n )
360  {
361  *z = (*x) - (*y);
362  x += incx;
363  y += incy;
364  z += incz;
365  }
366  }
367  }
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 331 of file VmathArray.hpp.

References ASSERTL1, and Vsum().

332  {
333  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
334 
335  return Vsum(n,&x[0],incx);
336  }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
T Vsum(int n, const Array< OneD, const T > &x, const int incx)
Subtract return sum(x)
Definition: VmathArray.hpp:331
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 253 of file VmathArray.hpp.

References ASSERTL1, and Vvtvm().

254  {
255  ASSERTL1(n*incw <= w.num_elements()+w.GetOffset(),"Array out of bounds");
256  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
257  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
258  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
259 
260  Vvtvm(n,&w[0],incw,&x[0],incx,&y[0],incy,&z[0],incz);
261 
262  }
void Vvtvm(int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
vvtvm (vector times vector minus vector): z = w*x - y
Definition: VmathArray.hpp:253
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 
)
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 210 of file VmathArray.hpp.

References ASSERTL1, and Vvtvp().

211  {
212  ASSERTL1(n*incw <= w.num_elements()+w.GetOffset(),"Array out of bounds");
213  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
214  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
215  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
216 
217  Vvtvp(n,&w[0],incw,&x[0],incx,&y[0],incy,&z[0],incz);
218  }
void Vvtvp(int n, const Array< TwoD, NekDouble >::const_reference &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
Definition: VmathArray.hpp:220
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 220 of file VmathArray.hpp.

References ASSERTL1, and Vvtvp().

221  {
222  ASSERTL1(n*incw <= w.num_elements(),"Array out of bounds");
223  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
224  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
225  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
226 
227  Vvtvp(n,w.origin(),incw,&x[0],incx,&y[0],incy,&z[0],incz);
228  }
void Vvtvp(int n, const Array< TwoD, NekDouble >::const_reference &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const T > &y, const int incy, Array< OneD, T > &z, const int incz)
Definition: VmathArray.hpp:220
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 442 of file Vmath.cpp.

Referenced by Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::SolverUtils::EquationSystem::AdvectionNonConservativeForm(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::SolverUtils::FilterAeroForces::CalculateForces(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::GlobalMapping::MappingXYofXY::CalculateMetricTensor(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::SpatialDomains::GeomFactors::CheckIfValid(), Nektar::SpatialDomains::GeomFactors::ComputeDerivFactors(), Nektar::SpatialDomains::GeomFactors::ComputeGmat(), Nektar::SpatialDomains::GeomFactors::ComputeJac(), Nektar::APE::GetFluxVector(), Nektar::Extrapolate::GetMaxStdVelocity(), Nektar::UnsteadyAdvectionDiffusion::GetNormalVel(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::UnsteadyAdvection::GetNormalVelocity(), Nektar::UnsteadyViscousBurgers::GetNormalVelocity(), Nektar::VariableConverter::GetPressure(), GetQ(), Nektar::APE::GetStdVelocity(), Nektar::CompressibleFlowSystem::GetStdVelocity(), Nektar::NavierStokesCFE::GetViscousFluxVector(), Nektar::NavierStokesCFE::GetViscousFluxVectorDeAlias(), Nektar::StdRegions::StdExpansion::H1(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), main(), Nektar::VCSMapping::MappingAccelerationCorrection(), Nektar::VCSMapping::MappingAdvectionCorrection(), Nektar::Collections::PhysDeriv_StdMat::operator()(), Nektar::Collections::IProductWRTDerivBase_StdMat::operator()(), Nektar::Collections::IProductWRTDerivBase_IterPerExp::operator()(), Nektar::Collections::PhysDeriv_IterPerExp::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Quad::operator()(), Nektar::Collections::PhysDeriv_SumFac_Quad::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tri::operator()(), Nektar::Collections::PhysDeriv_SumFac_Tri::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Hex::operator()(), Nektar::Collections::PhysDeriv_SumFac_Hex::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Tet::operator()(), Nektar::Collections::PhysDeriv_SumFac_Tet::operator()(), Nektar::Collections::IProductWRTDerivBase_SumFac_Prism::operator()(), Nektar::Collections::PhysDeriv_SumFac_Prism::operator()(), Nektar::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::FieldUtils::ProcessMultiShear::Process(), Nektar::FieldUtils::ProcessScalGrad::Process(), Nektar::FieldUtils::ProcessSurfDistance::Process(), Nektar::FieldUtils::ProcessWSS::Process(), Nektar::SolverUtils::RiemannSolver::rotateFromNormal(), Nektar::SolverUtils::RiemannSolver::rotateToNormal(), Nektar::IncNavierStokes::SetZeroNormalVelocity(), Nektar::SolverUtils::UnsteadySystem::SVVVarDiffCoeff(), Nektar::CellModel::TimeIntegrate(), Nektar::FilterMovingBody::UpdateForce(), Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::SolverUtils::AdvectionNonConservative::v_Advect(), Nektar::AdjointAdvection::v_Advect(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::WallBC::v_Apply(), Nektar::SymmetryBC::v_Apply(), Nektar::PressureOutflowBC::v_Apply(), Nektar::PressureOutflowFileBC::v_Apply(), Nektar::RiemannInvariantBC::v_Apply(), Nektar::PressureOutflowNonReflectiveBC::v_Apply(), Nektar::PressureInflowFileBC::v_Apply(), Nektar::GlobalMapping::MappingXYofXY::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXofXZ::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingGeneral::v_ApplyChristoffelContravar(), Nektar::GlobalMapping::MappingXYofZ::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingXYofXY::v_ApplyChristoffelCovar(), Nektar::GlobalMapping::MappingGeneral::v_ApplyChristoffelCovar(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::TriExp::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::GlobalMapping::MappingGeneral::v_ContravarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingGeneral::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingGeneral::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingGeneral::v_CovarToCartesian(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedDotProd(), Nektar::GlobalMapping::MappingXofXZ::v_DotGradJacobian(), Nektar::GlobalMapping::Mapping::v_DotGradJacobian(), 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::GlobalMapping::Mapping::v_LowerIndex(), 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::GlobalMapping::Mapping::v_RaiseIndex(), Nektar::SolverUtils::FilterEnergyBase::v_Update(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::FilterElectrogram::v_Update(), Vvtvp(), Nektar::APE::WallBC(), Nektar::NonlinearSWE::WallBoundary(), Nektar::LinearSWE::WallBoundary(), Nektar::NonlinearPeregrine::WallBoundary(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), and Nektar::NonlinearPeregrine::WallBoundaryForcing().

447  {
448  while( n-- )
449  {
450  *z = (*w) * (*x) + (*y);
451  w += incw;
452  x += incx;
453  y += incy;
454  z += incz;
455  }
456  }
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 564 of file Vmath.cpp.

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

570  {
571  while( n-- )
572  {
573  *z = (*v) * (*w) - (*x) * (*y);
574  v += incv;
575  w += incw;
576  x += incx;
577  y += incy;
578  z += incz;
579  }
580  }
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 265 of file VmathArray.hpp.

References ASSERTL1, and Vvtvvtp().

272  {
273  ASSERTL1(n*incv <= v.num_elements()+v.GetOffset(),"Array out of bounds");
274  ASSERTL1(n*incw <= w.num_elements()+w.GetOffset(),"Array out of bounds");
275  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
276  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
277  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
278 
279  Vvtvvtp(n,&v[0],incv,&w[0],incw,&x[0],incx,&y[0],incy,&z[0],incz);
280  }
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
Definition: VmathArray.hpp:265
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 147 of file VmathArray.hpp.

References ASSERTL1, and Zero().

148  {
149  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
150 
151  Zero(n,&x[0],incx);
152 
153  }
void Zero(int n, Array< OneD, T > &x, const int incx)
Zero vector.
Definition: VmathArray.hpp:147
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
template<class T >
void Vmath::Zero ( int  n,
T *  x,
const int  incx 
)

Zero vector.

Definition at line 373 of file Vmath.cpp.

Referenced by Nektar::MultiRegions::AssemblyMap::AssembleBnd(), Nektar::CoupledAssemblyMap::CoupledAssemblyMap(), Nektar::StdRegions::StdExpansion::CreateGeneralMatrix(), Nektar::LinearisedAdvection::DFT(), Nektar::MultiRegions::GlobalLinSysIterative::DoAconjugateProjection(), Nektar::MultiRegions::GlobalLinSysIterative::DoConjugateGradient(), Nektar::NekMatrix< DataType, StandardMatrixTag >::EigenSolve(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::SolverUtils::Forcing::EvaluateFunction(), Nektar::GlobalMapping::Mapping::EvaluateFunction(), Nektar::IsentropicVortex::EvaluateIsentropicVortex(), Nektar::IsentropicVortexBC::EvaluateIsentropicVortex(), Extractlayerdata(), Nektar::UnsteadyDiffusion::GetFluxVector(), Nektar::LinearSWE::GetFluxVector(), Nektar::APE::GetFluxVector(), Nektar::CompressibleFlowSystem::GetFluxVector(), Nektar::UnsteadyAdvectionDiffusion::GetFluxVectorDiff(), Nektar::UnsteadyViscousBurgers::GetFluxVectorDiff(), Nektar::Extrapolate::GetMaxStdVelocity(), Nektar::UnsteadyAdvectionDiffusion::GetNormalVel(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::UnsteadyAdvection::GetNormalVelocity(), Nektar::UnsteadyViscousBurgers::GetNormalVelocity(), Nektar::APE::GetStdVelocity(), Nektar::CompressibleFlowSystem::GetStdVelocity(), Nektar::NavierStokesCFE::GetViscousFluxVector(), Nektar::NavierStokesCFE::GetViscousFluxVectorDeAlias(), Nektar::SolverUtils::EquationSystem::ImportFld(), Nektar::SolverUtils::EquationSystem::ImportFldToMultiDomains(), Nektar::Collections::IProductWRTDerivBase_StdMat::IProductWRTDerivBase_StdMat(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), Nektar::CellModel::LoadCellModel(), main(), Nektar::VCSMapping::MappingAccelerationCorrection(), Nektar::VCSMapping::MappingAdvectionCorrection(), MoveOutsidePointsNnormpos(), Nektar::Collections::PhysDeriv_StdMat::operator()(), Nektar::Collections::BwdTrans_SumFac_Prism::operator()(), Nektar::Collections::PhysDeriv_StdMat::PhysDeriv_StdMat(), Nektar::Utilities::ProcessSpherigon::Process(), Nektar::FieldUtils::ProcessScalGrad::Process(), Nektar::FieldUtils::ProcessHomogeneousStretch::Process(), Nektar::FieldUtils::ProcessQCriterion::Process(), Nektar::FieldUtils::ProcessMultiShear::Process(), Nektar::FieldUtils::ProcessSurfDistance::Process(), Nektar::FieldUtils::ProcessWSS::Process(), Nektar::FieldUtils::Iso::SeparateRegions(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap(), Nektar::CoupledLinearNS::SolveLinearNS(), Diffusion::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate(), Nektar::FilterMovingBody::UpdateForce(), Nektar::LocalRegions::Expansion1D::v_AddRobinEdgeContribution(), Nektar::LocalRegions::Expansion2D::v_AddRobinEdgeContribution(), Nektar::NoAdvection::v_Advect(), Nektar::WallBC::v_Apply(), Nektar::MultiRegions::AssemblyMapCG::v_Assemble(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::TriExp::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::ExpListHomogeneous2D::v_DealiasedDotProd(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedDotProd(), Nektar::GlobalMapping::Mapping::v_Divergence(), Nektar::MultiRegions::GlobalLinSysIterativeFull::v_DoMatrixMultiply(), Nektar::MultiRegions::PreconditionerLinear::v_DoPreconditionerWithNonVertOutput(), Nektar::Projection::v_DoSolve(), Nektar::Laplace::v_DoSolve(), Nektar::GlobalMapping::MappingXYofZ::v_DotGradJacobian(), Nektar::GlobalMapping::MappingXofZ::v_DotGradJacobian(), Nektar::GlobalMapping::MappingTranslation::v_DotGradJacobian(), 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::MultiRegions::DisContField3D::v_ExtractTracePhys(), Nektar::StdRegions::StdNodalTetExp::v_FillMode(), Nektar::StdRegions::StdNodalTriExp::v_FillMode(), Nektar::StdRegions::StdNodalPrismExp::v_FillMode(), Nektar::LocalRegions::Expansion1D::v_GenMatrix(), Nektar::LocalRegions::Expansion3D::v_GenMatrix(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::MultiRegions::DisContField3D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField1D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField2D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField3D::v_HelmSolve(), Nektar::MultiRegions::DisContField2D::v_HelmSolve(), Nektar::MultiRegions::DisContField1D::v_HelmSolve(), Nektar::GlobalMapping::Mapping::v_InitObject(), Nektar::MultiRegions::AssemblyMapCG::v_LinearSpaceMap(), Nektar::LocalRegions::SegExp::v_PhysDeriv_n(), Nektar::LocalRegions::SegExp::v_PhysDeriv_s(), Nektar::LocalRegions::HexExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdSegExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdQuadExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTetExp::v_ReduceOrderCoeffs(), Nektar::LocalRegions::QuadExp::v_ReduceOrderCoeffs(), Nektar::SolverUtils::EquationSystem::v_SetInitialConditions(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VelocityCorrectionScheme::v_SetUpViscousForcing(), Nektar::SolverUtils::FilterEnergyBase::v_Update(), Nektar::CourtemancheRamirezNattel98::v_Update(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO1(), Nektar::SolverUtils::DiffusionLDGNS::v_WeakPenaltyO2(), Nektar::SolverUtils::DiffusionLFRNS::v_WeakPenaltyO2(), Zero(), and Nektar::SolverUtils::EquationSystem::ZeroPhysFields().

374  {
375  if(incx == 1)
376  {
377  std::memset(x,'\0', n*sizeof(T));
378  }
379  else
380  {
381  T zero = 0;
382  ++n;
383  while(--n)
384  {
385  *x = zero;
386  x+=incx;
387  }
388  }
389  }
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 
)

Variable Documentation

boost::mutex Vmath::mutex
static

Definition at line 134 of file Vmath.cpp.

Referenced by Nektar::NekMeshUtils::Edge::GetGeom().