Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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)
 
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 317 of file VmathArray.hpp.

References ASSERTL1, and Assmb().

318  {
319  ASSERTL1(n <= x.num_elements()+x.GetOffset(),"Array out of bounds");
320  ASSERTL1(n <= y.num_elements()+y.GetOffset(),"Array out of bounds");
321 
322  Assmb(n,&x[0],&y[0],&z[0]);
323  }
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:317
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 708 of file Vmath.cpp.

710  {
711  while (n--)
712  {
713  *(z + *(y++)) += *(sign++) * (*(x++));
714  }
715  }
#define sign(a, b)
return the sign(b)*a
Definition: Polylib.cpp:22
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 434 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::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().

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

Definition at line 399 of file VmathArray.hpp.

References ASSERTL1, and Dot().

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

References ASSERTL1, and Dot().

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

Referenced by Nektar::IncNavierStokes::CalcSteadyState(), Dot(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_small(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_test(), and Nektar::MultiRegions::GlobalLinSysIterative::Set_Rhs_Magnitude().

903  {
904  T sum = 0;
905 
906  while( n-- )
907  {
908  sum += (*w) * (*x);
909  ++w;
910  ++x;
911  }
912  return sum;
913  }
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 920 of file Vmath.cpp.

923  {
924  T sum = 0;
925 
926  while( n-- )
927  {
928  sum += (*w) * (*x);
929  w += incw;
930  x += incx;
931  }
932  return sum;
933  }
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 421 of file VmathArray.hpp.

References ASSERTL1, and Dot2().

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

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

944  {
945  T sum = 0;
946 
947  while( n-- )
948  {
949  sum += (*y == 1 ? (*w) * (*x) : 0 );
950  ++w;
951  ++x;
952  ++y;
953  }
954  return sum;
955  }
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 964 of file Vmath.cpp.

968  {
969  T sum = 0;
970 
971  while( n-- )
972  {
973  sum += (*y == 1 ? (*w) * (*x) : 0.0 );
974  w += incw;
975  x += incx;
976  y += incy;
977  }
978  return sum;
979  }
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(), GetQ(), Nektar::Utilities::ProcessQualityMetric::GetQ(), Nektar::CompressibleFlowSystem::GetViscousFluxVector(), Nektar::LinearisedAdvection::ImportFldBase(), Nektar::AdjointAdvection::ImportFldBase(), main(), Nektar::Utilities::ProcessJacobianEnergy::Process(), Nektar::Utilities::ProcessNumModes::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::TenTusscher06::v_SetInitialConditions(), Nektar::Fox02::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:218
template void Vmath::Fill ( int  n,
const Nektar::NekDouble  alpha,
Nektar::NekDouble x,
const int  incx 
)
template<class T >
void Vmath::FillWhiteNoise ( int  n,
const T  eps,
Array< OneD, T > &  x,
const int  incx,
int  outseed 
)

Definition at line 56 of file VmathArray.hpp.

References ASSERTL1, and FillWhiteNoise().

57  {
58  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Out of bounds");
59 
60  FillWhiteNoise(n,eps,&x[0],incx,outseed);
61  }
void FillWhiteNoise(int n, const T eps, Array< OneD, T > &x, const int incx, int outseed)
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:218
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::NavierStokesCFE::v_SetInitialConditions().

139  {
140  // Protect the static vars here and in ran2
141  boost::mutex::scoped_lock l(mutex);
142  while( n-- )
143  {
144  static int iset = 0;
145  static T gset;
146  long seed = long(outseed);
147  T fac, rsq, v1, v2;
148 
149  if (iset == 0) {
150  do {
151  v1 = 2.0 * ran2<T> (&seed) - 1.0;
152  v2 = 2.0 * ran2<T> (&seed) - 1.0;
153  rsq = v1*v1 + v2*v2;
154  } while (rsq >= 1.0 || rsq == 0.0);
155  fac = sqrt(-2.0 * log (rsq) / rsq);
156  gset = v1 * fac;
157  iset = 1;
158  *x = eps * v2 * fac;
159  } else {
160  iset = 0;
161  *x = eps * gset;
162  }
163  x += incx;
164  }
165  }
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 296 of file VmathArray.hpp.

References ASSERTL1, and Gathr().

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

647  {
648  while (n--)
649  {
650  *z++ = *(sign++) * (*(x + *y++));
651  }
652  return;
653  }
#define sign(a, b)
return the sign(b)*a
Definition: Polylib.cpp:22
template void Vmath::Gathr ( int  n,
const Nektar::NekDouble sign,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)
template<class T >
int Vmath::Iamax ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Return the index of the maximum absolute element in x.

Definition at line 355 of file VmathArray.hpp.

References ASSERTL1, and Iamax().

356  {
357  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
358 
359  return Iamax(n,&x[0],incx);
360 
361  }
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:355
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 786 of file Vmath.cpp.

Referenced by Iamax().

787  {
788 
789  int i, indx = ( n > 0 ) ? 0 : -1;
790  T xmax = *x;
791  T xm;
792 
793  for (i = 0; i < n; i++)
794  {
795  xm = (*x > 0)? *x: -*x;
796  if (xm > xmax)
797  {
798  xmax = xm;
799  indx = i;
800  }
801  x += incx;
802  }
803 
804  return indx;
805  }
template int Vmath::Iamax ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
template<class T >
int Vmath::Imax ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Return the index of the maximum element in x.

Definition at line 338 of file VmathArray.hpp.

References ASSERTL1, and Imax().

339  {
340  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
341 
342  return Imax(n,&x[0],incx);
343  }
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:338
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 741 of file Vmath.cpp.

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

742  {
743 
744  int i, indx = ( n > 0 ) ? 0 : -1;
745  T xmax = *x;
746 
747  for (i = 0; i < n; i++)
748  {
749  if (*x > xmax)
750  {
751  xmax = *x;
752  indx = i;
753  }
754  x += incx;
755  }
756 
757  return indx;
758  }
template int Vmath::Imax ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
template int Vmath::Imax ( int  n,
const int *  x,
const int  incx 
)
template<class T >
int Vmath::Imin ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Return the index of the minimum element in x.

Definition at line 374 of file VmathArray.hpp.

References ASSERTL1, and Imin().

375  {
376  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
377 
378  return Imin(n,&x[0],incx);
379  }
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:374
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 833 of file Vmath.cpp.

Referenced by DetermineclosePointxindex(), Imin(), main(), MappingEVids(), MoveOutsidePointsNnormpos(), Orderfunctionx(), 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().

834  {
835 
836  int i, indx = ( n > 0 ) ? 0 : -1;
837  T xmin = *x;
838 
839  for(i = 0;i < n;i++)
840  {
841  if( *x < xmin )
842  {
843  xmin = *x;
844  indx = i;
845  }
846  x += incx;
847  }
848 
849  return indx;
850  }
template int Vmath::Imin ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
template int Vmath::Imin ( int  n,
const int *  x,
const int  incx 
)
template<class T >
void Vmath::Neg ( int  n,
Array< OneD, T > &  x,
const int  incx 
)

Negate x = -x.

Definition at line 154 of file VmathArray.hpp.

References ASSERTL1, and Neg().

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

Negate x = -x.

Definition at line 382 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::APE::DoOdeRhs(), Nektar::EulerCFE::DoOdeRhs(), Nektar::UnsteadyAdvection::DoOdeRhs(), Nektar::EulerADCFE::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::UnsteadyAdvectionDiffusion::DoOdeRhs(), Nektar::CFLtester::DoOdeRhs(), Nektar::UnsteadyViscousBurgers::DoOdeRhs(), Nektar::MultiRegions::ContField2D::LaplaceSolve(), main(), Nektar::VCSMapping::MappingAccelerationCorrection(), Nektar::VCSMapping::MappingAdvectionCorrection(), Neg(), Nektar::Utilities::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::SkewSymmetricAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::AdjointAdvection::v_Advect(), Nektar::LocalRegions::Expansion3D::v_DGDeriv(), Nektar::LocalRegions::Expansion2D::v_DGDeriv(), Nektar::SolverUtils::DiffusionLDG::v_Diffuse(), Nektar::SolverUtils::DiffusionLDGNS::v_Diffuse(), Nektar::SolverUtils::AdvectionFR::v_DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFR::v_DivCFlux_2D_Gauss(), Nektar::SolverUtils::DiffusionLFRNS::v_DivCFlux_2D_Gauss(), Nektar::EigenValuesAdvection::v_DoSolve(), Nektar::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::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::CompressibleFlowSystem::WallViscousBC(), Nektar::SolverUtils::EquationSystem::WeakDGAdvection(), and Nektar::SolverUtils::EquationSystem::WeakDGDiffusion().

383  {
384  while( n-- )
385  {
386  *x = -(*x);
387  x += incx;
388  }
389  }
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 391 of file VmathArray.hpp.

References ASSERTL1, and Nnan().

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

Return number of NaN elements of x.

Definition at line 878 of file Vmath.cpp.

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

879  {
880 
881  int nNan = 0;
882 
883  while (n--)
884  {
885  if (*x != *x)
886  {
887  nNan++;
888  }
889  x += incx;
890  }
891 
892  return nNan;
893  }
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 456 of file VmathArray.hpp.

References ASSERTL1, and Reverse().

457  {
458  ASSERTL1(static_cast<unsigned int>(std::abs(n*incx)) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
459  ASSERTL1(static_cast<unsigned int>(std::abs(n*incy)) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
460 
461  Reverse(n,&x[0],incx,&y[0],incy);
462  }
void Reverse(int n, const Array< OneD, const T > &x, int incx, Array< OneD, T > &y, int const incy)
Definition: VmathArray.hpp:456
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
template<class T >
void Vmath::Reverse ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)
template void Vmath::Reverse ( int  n,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)
template<class T >
void Vmath::Sadd ( int  n,
const T  alpha,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

Add vector y = alpha + x.

Definition at line 124 of file VmathArray.hpp.

References ASSERTL1, and Sadd().

125  {
126 
127  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
128  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
129 
130  Sadd(n,alpha,&x[0],incx,&y[0],incy);
131  }
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:124
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 301 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::CompressibleFlowSystem::GetViscousFluxVectorDeAlias(), Nektar::ForcingMovingBody::InitialiseCableModel(), Nektar::NonlinearPeregrine::LaitoneSolitaryWave(), main(), MoveOutsidePointsNnormpos(), Sadd(), Nektar::Utilities::ProcessEquiSpacedOutput::SetHomogeneousConnectivity(), Nektar::FilterMovingBody::UpdateForce(), Nektar::SolverUtils::DriverArpack::v_Execute(), Nektar::MultiRegions::ExpList1DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous2D::v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_GetCoords(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::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::MappingXofZ::v_LowerIndex(), Nektar::GlobalMapping::MappingXofXZ::v_LowerIndex(), Nektar::StdRegions::StdTetExp::v_PhysDeriv(), Nektar::GlobalMapping::MappingXofZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::CellModelAlievPanfilov::v_Update(), Nektar::CellModelFitzHughNagumo::v_Update(), and Nektar::CourtemancheRamirezNattel98::v_Update().

303  {
304  ++n;
305  if (incx == 1 && incy == 1)
306  {
307  while( --n )
308  {
309  *y = alpha + (*x);
310  ++x;
311  ++y;
312  }
313  }
314  else
315  {
316  while( --n )
317  {
318  *y = alpha + (*x);
319  x += incx;
320  y += incy;
321  }
322  }
323  }
template void Vmath::Sadd ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)
template<class T >
void Vmath::Scatr ( int  n,
const Array< OneD, const T > &  x,
const Array< OneD, const int > &  y,
Array< OneD, T > &  z 
)

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

Definition at line 307 of file VmathArray.hpp.

References ASSERTL1, and Scatr().

308  {
309  ASSERTL1(n <= x.num_elements()+x.GetOffset(),"Array out of bounds");
310  ASSERTL1(n <= y.num_elements()+y.GetOffset(),"Array out of bounds");
311 
312  Scatr(n,&x[0],&y[0],&z[0]);
313  }
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:307
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 672 of file Vmath.cpp.

674  {
675  while (n--)
676  {
677  if(*sign)
678  {
679  *(z + *(y++)) = *(sign++) * (*(x++));
680  }
681  else
682  {
683  x++;
684  y++;
685  sign++;
686  }
687  }
688  }
#define sign(a, b)
return the sign(b)*a
Definition: Polylib.cpp:22
template void Vmath::Scatr ( int  n,
const Nektar::NekDouble sign,
const Nektar::NekDouble x,
const int *  y,
Nektar::NekDouble z 
)
template<class T >
void Vmath::Sdiv ( int  n,
const T  alpha,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

Scalar multiply y = alpha/y.

Definition at line 104 of file VmathArray.hpp.

References ASSERTL1, and Sdiv().

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

Scalar multiply y = alpha*y.

Definition at line 84 of file VmathArray.hpp.

References ASSERTL1, and Smul().

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

Referenced by Nektar::SubSteppingExtrapolate::AddDuDt(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::SpatialDomains::GeomFactors::Adjoint(), Nektar::VCSMapping::ApplyIncNSMappingForcing(), Nektar::LinearElasticSystem::BuildLaplacianIJMatrix(), Nektar::PulseWaveSystem::CalcCharacteristicVariables(), Nektar::Extrapolate::CalcExplicitDuDt(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::SolverUtils::FilterAeroForces::CalculateForces(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::LibUtilities::GaussPoints::CalculateGalerkinProjectionMatrix(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Computestreakpositions(), Nektar::CoupledLinearNS::Continuation(), Nektar::Extrapolate::CurlCurl(), Nektar::LinearisedAdvection::DFT(), Nektar::AdjointAdvection::DFT(), Diffusion::DoImplicitSolve(), Nektar::Bidomain::DoImplicitSolve(), Nektar::BidomainRoth::DoImplicitSolve(), Nektar::Monodomain::DoImplicitSolve(), Nektar::UnsteadyDiffusion::DoImplicitSolve(), Nektar::UnsteadyAdvectionDiffusion::DoImplicitSolve(), Nektar::UnsteadyViscousBurgers::DoImplicitSolve(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::Bidomain::DoOdeRhs(), Nektar::BidomainRoth::DoOdeRhs(), Nektar::APE::DoOdeRhs(), Nektar::EulerADCFE::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_small(), Nektar::CoupledLinearNS::EvaluateNewtonRHS(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Nektar::VortexWaveInteraction::ExecuteRoll(), Extractlayerdata(), Nektar::Extrapolate::ExtrapolateArray(), Nektar::Extrapolate::ExtrapolatePressureHBCs(), 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::CompressibleFlowSystem::GetPressure(), Nektar::CompressibleFlowSystem::GetViscousFluxVector(), Nektar::CompressibleFlowSystem::GetViscousFluxVectorDeAlias(), Nektar::ForcingMovingBody::InitialiseCableModel(), Nektar::LocalRegions::NodalTriExp::Integral(), Nektar::LocalRegions::HexExp::IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_SumFac(), main(), Nektar::SolverUtils::FilterSampler::OutputField(), Nektar::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::PrepareLocalSchurComplement(), Nektar::CompressibleFlowSystem::PressureInflowFileBC(), Nektar::CompressibleFlowSystem::PressureOutflowBC(), Nektar::CompressibleFlowSystem::PressureOutflowFileBC(), Nektar::CompressibleFlowSystem::PressureOutflowNonReflectiveBC(), Nektar::Utilities::ProcessMultiShear::Process(), Nektar::Utilities::ProcessQCriterion::Process(), Nektar::Utilities::ProcessWSS::Process(), Nektar::Utilities::ProcessAddFld::Process(), Nektar::Utilities::ProcessC0Projection::Process(), Nektar::Utilities::ProcessCombineAvg::Process(), Nektar::Utilities::ProcessScaleInFld::Process(), Nektar::LibUtilities::NekFFTW::Reshuffle_Nek2FFTW(), Nektar::CompressibleFlowSystem::RiemannInvariantBC(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Smul(), Nektar::CoupledLinearNS::SolveUnsteadyStokesSystem(), Nektar::SubSteppingExtrapolate::SubStepExtrapolateField(), Nektar::SolverUtils::UnsteadySystem::SVVVarDiffCoeff(), Nektar::CompressibleFlowSystem::SymmetryBC(), Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate(), Nektar::FilterMovingBody::UpdateForce(), Nektar::MultiRegions::GlobalLinSysIterative::UpdateKnownSolutions(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), 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::GlobalMapping::Mapping::v_CurlCurlField(), 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::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::BidomainRoth::v_InitObject(), Nektar::Monodomain::v_InitObject(), Nektar::IterativeElasticSystem::v_InitObject(), Nektar::StdRegions::StdTriExp::v_Integral(), Nektar::LocalRegions::SegExp::v_Integral(), Nektar::LocalRegions::PrismExp::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::SubSteppingExtrapolate::v_MountHOPBCs(), Nektar::StdRegions::StdHexExp::v_MultiplyByStdQuadratureMetric(), Nektar::SolverUtils::DiffusionLDG::v_NumFluxforVector(), Nektar::SolverUtils::UnsteadySystem::v_NumFluxforVector(), Nektar::StdRegions::StdPrismExp::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv(), Nektar::LocalRegions::TetExp::v_PhysDeriv(), Nektar::LocalRegions::PrismExp::v_PhysDeriv(), Nektar::LocalRegions::PyrExp::v_PhysDeriv(), Nektar::LocalRegions::TriExp::v_PhysDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDeriv(), Nektar::StdRegions::StdTetExp::v_PhysDeriv(), Nektar::LocalRegions::HexExp::v_PhysDeriv(), Nektar::MultiRegions::ExpListHomogeneous2D::v_PhysDeriv(), Nektar::MultiRegions::ExpListHomogeneous1D::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv_s(), 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::CompressibleFlowSystem::WallBC(), Nektar::NonlinearSWE::WallBoundary(), Nektar::LinearSWE::WallBoundary(), Nektar::NonlinearPeregrine::WallBoundary(), and Nektar::CompressibleFlowSystem::WallViscousBC().

201  {
202  ++n;
203  if (incx == 1 && incy == 1)
204  {
205  while( --n )
206  {
207  *y = alpha * (*x);
208  ++x;
209  ++y;
210  }
211  }
212  else
213  {
214  while( --n )
215  {
216  *y = alpha * (*x);
217  x += incx;
218  y += incy;
219  }
220  }
221  }
template void Vmath::Smul ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)
template<class T >
void Vmath::Svtsvtp ( int  n,
const T  alpha,
const Array< OneD, const T > &  x,
const int  incx,
const T  beta,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

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

Definition at line 281 of file VmathArray.hpp.

References ASSERTL1, and Svtsvtp().

282  {
283  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
284  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
285  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
286 
287  Svtsvtp(n,alpha,&x[0],incx,beta,&y[0],incy,&z[0],incz);
288  }
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:281
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 240 of file VmathArray.hpp.

References ASSERTL1, and Svtvm().

241  {
242  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
243  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
244  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
245 
246  Svtvm(n,alpha,&x[0],incx,&y[0],incy,&z[0],incz);
247 
248  }
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:240
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 504 of file Vmath.cpp.

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

507  {
508  while( n-- )
509  {
510  *z = alpha * (*x) - (*y);
511  x += incx;
512  y += incy;
513  z += incz;
514  }
515  }
template void Vmath::Svtvm ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)
template<class T >
void Vmath::Svtvp ( int  n,
const T  alpha,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

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

Definition at line 229 of file VmathArray.hpp.

References ASSERTL1, and Svtvp().

230  {
231  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
232  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
233  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
234 
235  Svtvp(n,alpha,&x[0],incx,&y[0],incy,&z[0],incz);
236 
237  }
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:229
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 471 of file Vmath.cpp.

Referenced by Nektar::SubSteppingExtrapolate::AddDuDt(), Nektar::Extrapolate::CalcExplicitDuDt(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::SolverUtils::DriverSteadyState::ComputeSFD(), Nektar::MultiRegions::GlobalLinSysIterative::DoConjugateGradient(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_small(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Nektar::Extrapolate::ExtrapolateArray(), Nektar::Extrapolate::ExtrapolatePressureHBCs(), Nektar::VortexWaveInteraction::FileRelaxation(), Nektar::CompressibleFlowSystem::GetPressure(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), main(), Nektar::Utilities::ProcessScalGrad::Process(), Nektar::Utilities::ProcessCombineAvg::Process(), Svtvp(), Nektar::CellModel::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate(), Nektar::LinearisedAdvection::UpdateBase(), Nektar::AdjointAdvection::UpdateBase(), 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().

474  {
475  ++n;
476  if (incx == 1 && incy == 1 && incz == 1)
477  {
478  while( --n )
479  {
480  *z = alpha * (*x) + (*y);
481  ++x;
482  ++y;
483  ++z;
484  }
485  }
486  else
487  {
488  while( --n )
489  {
490  *z = alpha * (*x) + (*y);
491  x += incx;
492  y += incy;
493  z += incz;
494  }
495  }
496  }
template void Vmath::Svtvp ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)
template<class T >
void Vmath::Vabs ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

vabs: y = |x|

Definition at line 197 of file VmathArray.hpp.

References ASSERTL1, and Vabs().

198  {
199  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
200  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
201 
202  Vabs(n,&x[0],incx,&y[0],incy);
203  }
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:197
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 113 of file VmathArray.hpp.

References ASSERTL1, and Vadd().

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

Referenced by Nektar::NekMatrix< DataType, StandardMatrixTag >::AbsMaxtoMinEigenValueRatio(), Nektar::NonlinearSWE::AddCoriolis(), Nektar::LinearSWE::AddCoriolis(), Nektar::NonlinearPeregrine::AddCoriolis(), Nektar::APE::AddSource(), Nektar::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::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::Extrapolate::CurlCurl(), Nektar::Bidomain::DoImplicitSolve(), Nektar::NonlinearSWE::DoOdeRhs(), Nektar::LinearSWE::DoOdeRhs(), Nektar::Bidomain::DoOdeRhs(), Nektar::BidomainRoth::DoOdeRhs(), Nektar::EulerADCFE::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::UnsteadyAdvectionDiffusion::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::CompressibleFlowSystem::GetViscousFluxVector(), Nektar::CompressibleFlowSystem::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::CompressibleFlowSystem::PressureInflowFileBC(), Nektar::CompressibleFlowSystem::PressureOutflowBC(), Nektar::CompressibleFlowSystem::PressureOutflowFileBC(), Nektar::CompressibleFlowSystem::PressureOutflowNonReflectiveBC(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::Utilities::ProcessQCriterion::Process(), Nektar::Utilities::ProcessWSS::Process(), Nektar::Utilities::ProcessMultiShear::Process(), Nektar::Utilities::ProcessAddFld::Process(), Nektar::Utilities::ProcessCombineAvg::Process(), Nektar::CompressibleFlowSystem::RiemannInvariantBC(), Nektar::CoupledLinearNS::SolveSteadyNavierStokes(), Nektar::FilterMovingBody::UpdateForce(), Nektar::SolverUtils::UpdateGeometry(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::NavierStokesAdvection::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::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::MultiRegions::GlobalLinSysIterativeFull::v_DoMatrixMultiply(), Nektar::MultiRegions::PreconditionerLinearWithLowEnergy::v_DoPreconditioner(), Nektar::LinearElasticSystem::v_DoSolve(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::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::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::NavierStokesCFE::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().

287  {
288  while( n-- )
289  {
290  *z = (*x) + (*y);
291  x += incx;
292  y += incy;
293  z += incz;
294  }
295  }
template void Vmath::Vadd ( int  n,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)
template<class T >
T Vmath::Vamax ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

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

Definition at line 365 of file VmathArray.hpp.

References ASSERTL1, and Vamax().

366  {
367  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
368 
369  return Vamax(n,&x[0],incx);
370  }
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:365
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 811 of file Vmath.cpp.

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

812  {
813 
814  T xmax = *x;
815  T xm;
816 
817  while( n-- )
818  {
819  xm = (*x > 0)? *x: -*x;
820  if (xm > xmax)
821  {
822  xmax = xm;
823  }
824  x += incx;
825  }
826  return xmax;
827  }
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 448 of file VmathArray.hpp.

References ASSERTL1, and Vcopy().

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

Definition at line 1047 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::Extrapolate::CalcOutflowBCs(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), 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::AdjointAdvection::DFT(), Nektar::MultiRegions::GlobalLinSysIterative::DoAconjugateProjection(), Nektar::Bidomain::DoImplicitSolve(), Nektar::MultiRegions::GlobalLinSysPETSc::DoNekppOperation(), Nektar::ImageWarpingSystem::DoOdeProjection(), Nektar::PulseWavePropagation::DoOdeProjection(), Nektar::NonlinearSWE::DoOdeProjection(), Nektar::LinearSWE::DoOdeProjection(), Nektar::UnsteadyInviscidBurger::DoOdeProjection(), Nektar::UnsteadyDiffusion::DoOdeProjection(), Nektar::NavierStokesCFE::DoOdeProjection(), Nektar::APE::DoOdeProjection(), Nektar::EulerCFE::DoOdeProjection(), Nektar::EulerADCFE::DoOdeProjection(), Nektar::UnsteadyAdvection::DoOdeProjection(), Nektar::NonlinearPeregrine::DoOdeProjection(), Nektar::UnsteadyAdvectionDiffusion::DoOdeProjection(), Nektar::CFLtester::DoOdeProjection(), Nektar::UnsteadyViscousBurgers::DoOdeProjection(), Nektar::NavierStokesCFE::DoOdeRhs(), Nektar::NonlinearPeregrine::DoOdeRhs(), Nektar::NekMatrix< DataType, StandardMatrixTag >::EigenSolve(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_sort(), Nektar::MultiRegions::DisContField3D::EvaluateHDGPostProcessing(), Nektar::MultiRegions::DisContField2D::EvaluateHDGPostProcessing(), Nektar::ForcingMovingBody::EvaluateStructDynModel(), Nektar::VortexWaveInteraction::ExecuteRoll(), Extractlayerdata(), Nektar::Extrapolate::ExtrapolateArray(), Nektar::VortexWaveInteraction::FileRelaxation(), Nektar::LibUtilities::Basis::GenBasis(), Nektar::LocalRegions::NodalTriExp::GeneralMatrixOp_MatOp(), Nektar::LocalRegions::TetExp::GeneralMatrixOp_MatOp(), GenerateNeighbourArrays(), Nektar::MultiRegions::DisContField3DHomogeneous2D::GetBoundaryToElmtMap(), Nektar::MultiRegions::DisContField3DHomogeneous1D::GetBoundaryToElmtMap(), Nektar::MultiRegions::ExpList2DHomogeneous1D::GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GetCoords(), Nektar::EulerCFE::GetExactIsentropicVortex(), Nektar::MultiRegions::ExpList::GetExpIndex(), Nektar::UnsteadyDiffusion::GetFluxVector(), Nektar::NonlinearSWE::GetFluxVector(), Nektar::NonlinearPeregrine::GetFluxVector(), Nektar::CompressibleFlowSystem::GetFluxVector(), Nektar::UnsteadyAdvectionDiffusion::GetFluxVectorDiff(), Nektar::UnsteadyViscousBurgers::GetFluxVectorDiff(), Nektar::Utilities::ProcessMapping::GetMapping(), Nektar::LinearSWE::GetVelocityVector(), Nektar::CompressibleFlowSystem::GetViscousFluxVector(), Nektar::CompressibleFlowSystem::GetViscousFluxVectorDeAlias(), Nektar::MultiRegions::AssemblyMap::GlobalToLocalBnd(), Nektar::StdRegions::StdExpansion::H1(), Nektar::MultiRegions::ExpListHomogeneous1D::Homogeneous1DTrans(), Nektar::LinearisedAdvection::ImportFldBase(), Nektar::AdjointAdvection::ImportFldBase(), Nektar::ForcingMovingBody::InitialiseCableModel(), Nektar::LibUtilities::Interp1D(), Nektar::LibUtilities::Interp2D(), Nektar::LibUtilities::InterpCoeff1D(), Nektar::LibUtilities::InterpCoeff2D(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocEdgesToTrace(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocFacesToTrace(), 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(), Orderfunctionx(), Nektar::LibUtilities::PhysGalerkinProject1D(), Nektar::LibUtilities::PhysGalerkinProject2D(), Nektar::StdRegions::StdExpansion2D::PhysTensorDeriv(), Nektar::StdRegions::StdExpansion3D::PhysTensorDeriv(), PolyFit(), PolyInterp(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::Utilities::OutputFld::Process(), Nektar::Utilities::ProcessJacobianEnergy::Process(), Nektar::Utilities::ProcessQualityMetric::Process(), Nektar::Utilities::ProcessVorticity::Process(), Nektar::Utilities::ProcessGrad::Process(), Nektar::Utilities::ProcessAddFld::Process(), Nektar::Utilities::ProcessC0Projection::Process(), Nektar::Utilities::ProcessPointDataToFld::Process(), Nektar::Utilities::ProcessMapping::Process(), 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::EulerCFE::SetBoundaryIsentropicVortex(), Nektar::EulerCFE::SetBoundaryRinglebFlow(), Nektar::LocalRegions::Expansion3D::SetFaceToGeomOrientation(), Nektar::Utilities::ProcessEquiSpacedOutput::SetHomogeneousConnectivity(), Nektar::EulerCFE::SetInitialIsentropicVortex(), Nektar::MultiRegions::ExpList::SetPhys(), Nektar::MultiRegions::LocTraceToTraceMap::Setup2D(), Nektar::MultiRegions::LocTraceToTraceMap::Setup3D(), Nektar::SubSteppingExtrapolate::SubStepProjection(), Nektar::UnsteadyAdvectionDiffusion::SubStepProjection(), Nektar::CompressibleFlowSystem::SymmetryBC(), Diffusion::TimeIntegrate(), Nektar::CellModel::TimeIntegrate(), Nektar::LibUtilities::TimeIntegrationScheme::TimeIntegrate(), Nektar::LibUtilities::Transposition::TransposeXtoYZ(), Nektar::LibUtilities::Transposition::TransposeXYtoZ(), Nektar::LibUtilities::Transposition::TransposeYZtoX(), Nektar::LibUtilities::Transposition::TransposeYZtoZY(), Nektar::LibUtilities::Transposition::TransposeZtoXY(), Nektar::LibUtilities::Transposition::TransposeZYtoYZ(), Nektar::MultiRegions::AssemblyMap::UniversalAssembleBnd(), Nektar::VortexWaveInteraction::UpdateAlpha(), Nektar::LinearisedAdvection::UpdateBase(), Nektar::AdjointAdvection::UpdateBase(), Nektar::MultiRegions::GlobalLinSysIterative::UpdateKnownSolutions(), Nektar::VortexWaveInteraction::UpdateWaveForceMag(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::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::MappingXofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingTranslation::v_ContravarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_ContravarToCartesian(), Nektar::MappingExtrapolate::v_CorrectPressureBCs(), Nektar::GlobalMapping::MappingXofXZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingTranslation::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofXZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofZ::v_CovarToCartesian(), Nektar::GlobalMapping::MappingTranslation::v_CovarToCartesian(), Nektar::GlobalMapping::MappingXYofXY::v_CovarToCartesian(), Nektar::GlobalMapping::Mapping::v_CurlCurlField(), 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::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::LocalRegions::SegExp::v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpListHomogeneous2D::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::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::MappingXofXZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofZ::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXYofXY::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingGeneral::v_GetInvMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetJacobian(), Nektar::GlobalMapping::MappingGeneral::v_GetJacobian(), Nektar::GlobalMapping::MappingXofZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXofXZ::v_GetMetricTensor(), Nektar::GlobalMapping::MappingXYofZ::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::CompressibleFlowSystem::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::GlobalMapping::MappingXofZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingTranslation::v_RaiseIndex(), Nektar::LocalRegions::HexExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdPrismExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdQuadExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTetExp::v_ReduceOrderCoeffs(), Nektar::LocalRegions::QuadExp::v_ReduceOrderCoeffs(), Nektar::LinearisedAdvection::v_SetBaseFlow(), Nektar::AdjointAdvection::v_SetBaseFlow(), Nektar::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::CompressibleFlowSystem::WallBC(), Nektar::NonlinearSWE::WallBoundary(), Nektar::LinearSWE::WallBoundary(), Nektar::NonlinearPeregrine::WallBoundary(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundaryContVariables(), Nektar::NonlinearPeregrine::WallBoundaryForcing(), Nektar::CompressibleFlowSystem::WallViscousBC(), Nektar::NonlinearPeregrine::WCESolve(), Nektar::SolverUtils::EquationSystem::WeakDGDiffusion(), and Nektar::SolverUtils::UnsteadySystem::WeakPenaltyforScalar().

1049  {
1050  if( incx ==1 && incy == 1)
1051  {
1052  memcpy(y,x,n*sizeof(T));
1053  }
1054  else
1055  {
1056  while( n-- )
1057  {
1058  *y = *x;
1059  x += incx;
1060  y += incy;
1061  }
1062  }
1063  }
template void Vmath::Vcopy ( int  n,
const int *  x,
const int  incx,
int *  y,
const int  incy 
)
template void Vmath::Vcopy ( int  n,
const unsigned int *  x,
const int  incx,
unsigned int *  y,
const int  incy 
)
template void Vmath::Vcopy ( int  n,
const Nektar::NekDouble x,
const int  incx,
Nektar::NekDouble y,
const int  incy 
)
template<class T >
void Vmath::Vdiv ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

Multiply vector z = x/y.

Definition at line 93 of file VmathArray.hpp.

References ASSERTL1, and Vdiv().

94  {
95  ASSERTL1(static_cast<unsigned int>(n*incx) <= x.num_elements()+x.GetOffset(),"Array out of bounds");
96  ASSERTL1(static_cast<unsigned int>(n*incy) <= y.num_elements()+y.GetOffset(),"Array out of bounds");
97  ASSERTL1(static_cast<unsigned int>(n*incz) <= z.num_elements()+z.GetOffset(),"Array out of bounds");
98 
99  Vdiv(n,&x[0],incx,&y[0],incy,&z[0],incz);
100 
101  }
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:93
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 227 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::NavierStokesCFE::DoOdeRhs(), Nektar::APE::DoOdeRhs(), Nektar::APE::GetFluxVector(), Nektar::CompressibleFlowSystem::GetPressure(), Nektar::NonlinearSWE::GetVelocityVector(), Nektar::NonlinearPeregrine::GetVelocityVector(), main(), Nektar::VCSMapping::MappingPressureCorrection(), Nektar::CompressibleFlowSystem::PressureInflowFileBC(), Nektar::CompressibleFlowSystem::PressureOutflowBC(), Nektar::CompressibleFlowSystem::PressureOutflowFileBC(), Nektar::CompressibleFlowSystem::PressureOutflowNonReflectiveBC(), Nektar::Utilities::ProcessMultiShear::Process(), Nektar::CompressibleFlowSystem::RiemannInvariantBC(), Nektar::SolverUtils::AdvectionFR::v_Advect(), 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().

229  {
230  ++n;
231  if (incx == 1 && incy == 1)
232  {
233  while( --n )
234  {
235  *z = (*x) / (*y);
236  ++x;
237  ++y;
238  ++z;
239  }
240  }
241  else
242  {
243  while( --n )
244  {
245  *z = (*x) / (*y);
246  x += incx;
247  y += incy;
248  z += incz;
249  }
250  }
251  }
template void Vmath::Vdiv ( int  n,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)
template<class T >
void Vmath::Vexp ( int  n,
const T *  x,
const int  incx,
T *  y,
const int  incy 
)

Definition at line 107 of file Vmath.hpp.

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

109  {
110  while (n--)
111  {
112  *y = exp( *x );
113  x += incx;
114  y += incy;
115  }
116  }
template<class T >
void Vmath::Vexp ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

Definition at line 171 of file VmathArray.hpp.

References ASSERTL1, and Vexp().

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

Definition at line 95 of file Vmath.hpp.

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

97  {
98  while (n--)
99  {
100  *y = log( *x );
101  x += incx;
102  y += incy;
103  }
104  }
template<class T >
void Vmath::Vlog ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
Array< OneD, T > &  y,
const int  incy 
)

Definition at line 162 of file VmathArray.hpp.

References ASSERTL1, and Vlog().

163  {
164  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
165  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
166 
167  Vlog(n, &x[0], incx, &y[0], incy);
168  }
void Vlog(int n, const Array< OneD, const T > &x, const int incx, Array< OneD, T > &y, const int incy)
Definition: VmathArray.hpp:162
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
template<class T >
T Vmath::Vmax ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

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

Definition at line 347 of file VmathArray.hpp.

References ASSERTL1, and Vmax().

348  {
349  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
350 
351  return Vmax(n,&x[0],incx);
352  }
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:347
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
template<class T >
T Vmath::Vmax ( int  n,
const T *  x,
const int  incx 
)
template Nektar::NekDouble Vmath::Vmax ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
template int Vmath::Vmax ( int  n,
const int *  x,
const int  incx 
)
template<class T >
T Vmath::Vmin ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

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

Definition at line 383 of file VmathArray.hpp.

References ASSERTL1, and Vmin().

384  {
385  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
386 
387  return Vmin(n,&x[0],incx);
388  }
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:383
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
template<class T >
T Vmath::Vmin ( int  n,
const T *  x,
const int  incx 
)
template Nektar::NekDouble Vmath::Vmin ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
template int Vmath::Vmin ( int  n,
const int *  x,
const int  incx 
)
template<class T >
void Vmath::Vmul ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

Multiply vector z = x*y.

Definition at line 64 of file VmathArray.hpp.

References ASSERTL1, and Vmul().

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

Definition at line 73 of file VmathArray.hpp.

References ASSERTL1, and Vmul().

74  {
75  ASSERTL1(n*incx <= x.num_elements(),"Array out of bounds");
76  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
77  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
78 
79  Vmul(n,x.origin(),incx,&y[0],incy,&z[0],incz);
80  }
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:73
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 169 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::NonlinearSWE::AddVariableDepth(), Nektar::NonlinearPeregrine::AddVariableDepth(), Nektar::SolverUtils::EquationSystem::AdvectionNonConservativeForm(), Nektar::PulseWaveSystem::CalcCharacteristicVariables(), Nektar::VortexWaveInteraction::CalcL2ToLinfPressure(), CalcNonLinearForcing(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), 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(), Nektar::APE::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::CompressibleFlowSystem::GetPressure(), Nektar::CompressibleFlowSystem::GetViscousFluxVector(), Nektar::CompressibleFlowSystem::GetViscousFluxVectorDeAlias(), Nektar::StdRegions::StdExpansion::H1(), Nektar::LocalRegions::NodalTriExp::Integral(), Nektar::StdRegions::StdExpansion2D::Integral(), Nektar::Utilities::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::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::CompressibleFlowSystem::PressureInflowFileBC(), Nektar::CompressibleFlowSystem::PressureOutflowBC(), Nektar::CompressibleFlowSystem::PressureOutflowFileBC(), Nektar::CompressibleFlowSystem::PressureOutflowNonReflectiveBC(), Nektar::NonlinearSWE::PrimitiveToConservative(), Nektar::LinearSWE::PrimitiveToConservative(), Nektar::NonlinearPeregrine::PrimitiveToConservative(), Nektar::Utilities::ProcessMultiShear::Process(), Nektar::Utilities::ProcessQCriterion::Process(), Nektar::Utilities::ProcessCombineAvg::Process(), Nektar::LibUtilities::NekFFTW::Reshuffle_FFTW2Nek(), Nektar::LibUtilities::NekFFTW::Reshuffle_Nek2FFTW(), Nektar::CompressibleFlowSystem::RiemannInvariantBC(), Nektar::SolverUtils::RiemannSolver::rotateFromNormal(), Nektar::SolverUtils::RiemannSolver::rotateToNormal(), Nektar::IncNavierStokes::SetRadiationBoundaryForcing(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::SolverUtils::UnsteadySystem::SVVVarDiffCoeff(), Nektar::FilterMovingBody::UpdateForce(), Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::SolverUtils::AdvectionNonConservative::v_Advect(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::SolverUtils::AdvectionFR::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::AdjointAdvection::v_Advect(), Nektar::SolverUtils::ForcingAbsorption::v_Apply(), Nektar::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::MappingXofXZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXofZ::v_CovarFromCartesian(), Nektar::GlobalMapping::MappingXYofZ::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::QuadExp::v_Integral(), Nektar::LocalRegions::TriExp::v_Integral(), Nektar::StdRegions::StdSegExp::v_Integral(), Nektar::LocalRegions::HexExp::v_Integral(), Nektar::StdRegions::StdPointExp::v_IProductWRTBase(), Nektar::LocalRegions::PyrExp::v_IProductWRTBase(), Nektar::LocalRegions::SegExp::v_IProductWRTBase(), Nektar::StdRegions::StdSegExp::v_IProductWRTBase(), Nektar::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::LocalRegions::PointExp::v_NormVectorIProductWRTBase(), Nektar::EigenValuesAdvection::v_NumericalFlux(), Nektar::ImageWarpingSystem::v_NumericalFlux(), Nektar::CFLtester::v_NumericalFlux(), Nektar::IncNavierStokes::v_NumericalFlux(), Nektar::SolverUtils::DiffusionLDGNS::v_NumericalFluxO1(), Nektar::SolverUtils::DiffusionLDGNS::v_NumericalFluxO2(), Nektar::SolverUtils::DiffusionLFRNS::v_NumericalFluxO2(), Nektar::SolverUtils::DiffusionLDG::v_NumFluxforScalar(), Nektar::SolverUtils::UnsteadySystem::v_NumFluxforScalar(), Nektar::SolverUtils::DiffusionLDG::v_NumFluxforVector(), Nektar::SolverUtils::DiffusionLFR::v_NumFluxforVector(), Nektar::SolverUtils::UnsteadySystem::v_NumFluxforVector(), Nektar::LocalRegions::SegExp::v_PhysDeriv(), Nektar::LocalRegions::TetExp::v_PhysDeriv(), Nektar::LocalRegions::PrismExp::v_PhysDeriv(), Nektar::LocalRegions::PyrExp::v_PhysDeriv(), Nektar::LocalRegions::TriExp::v_PhysDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDeriv(), Nektar::StdRegions::StdTetExp::v_PhysDeriv(), Nektar::LocalRegions::HexExp::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv_n(), Nektar::LocalRegions::TriExp::v_PhysDirectionalDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDirectionalDeriv(), Nektar::NonlinearSWE::v_PrimitiveToConservative(), Nektar::LinearSWE::v_PrimitiveToConservative(), Nektar::NonlinearPeregrine::v_PrimitiveToConservative(), Nektar::SolverUtils::FilterReynoldsStresses::v_ProcessSample(), Nektar::GlobalMapping::MappingXofZ::v_RaiseIndex(), Nektar::GlobalMapping::MappingXofXZ::v_RaiseIndex(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SolvePressure(), Nektar::LocalRegions::TetExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PrismExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::HexExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdTriExp::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().

171  {
172  ++n;
173  if (incx == 1 && incy == 1 && incz == 1)
174  {
175  while( --n )
176  {
177  *z = (*x) * (*y);
178  ++x;
179  ++y;
180  ++z;
181  }
182  }
183  else
184  {
185  while( --n )
186  {
187  *z = (*x) * (*y);
188  x += incx;
189  y += incy;
190  z += incz;
191  }
192  }
193  }
template void Vmath::Vmul ( int  n,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)
template<class T >
void Vmath::Vpow ( int  n,
const T *  x,
const int  incx,
const T  f,
T *  y,
const int  incy 
)

Definition at line 118 of file Vmath.hpp.

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

120  {
121  while (n--)
122  {
123  *y = pow( *x, f );
124  x += incx;
125  y += incy;
126  }
127  }
template<class T >
void Vmath::Vpow ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
const T  f,
Array< OneD, T > &  y,
const int  incy 
)

Definition at line 179 of file VmathArray.hpp.

References ASSERTL1, and Vpow().

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

sqrt y = sqrt(x)

Definition at line 188 of file VmathArray.hpp.

References ASSERTL1, and Vsqrt().

189  {
190  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
191  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
192 
193  Vsqrt(n,&x[0],incx,&y[0],incy);
194  }
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:188
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 394 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::CompressibleFlowSystem::PressureInflowFileBC(), Nektar::CompressibleFlowSystem::PressureOutflowBC(), Nektar::CompressibleFlowSystem::PressureOutflowFileBC(), Nektar::CompressibleFlowSystem::PressureOutflowNonReflectiveBC(), Nektar::Utilities::ProcessMultiShear::Process(), Nektar::Utilities::ProcessSurfDistance::Process(), Nektar::Utilities::ProcessWSS::Process(), Nektar::CompressibleFlowSystem::RiemannInvariantBC(), 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::LocalRegions::HexExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdTriExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdQuadExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TriExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::QuadExp::v_SVVLaplacianFilter(), and Vsqrt().

396  {
397  while (n--)
398  {
399  *y = sqrt( *x );
400  x += incx;
401  y += incy;
402  }
403  }
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 603 of file Vmath.cpp.

609  {
610  while( n-- )
611  {
612  *z = alpha * (*v) + (*w) + (*x);
613  v += incv;
614  w += incw;
615  x += incx;
616  z += incz;
617  }
618  }
template void Vmath::Vstvpp ( int  n,
const Nektar::NekDouble  alpha,
const Nektar::NekDouble v,
int  incv,
const Nektar::NekDouble w,
int  incw,
const Nektar::NekDouble x,
int  incx,
Nektar::NekDouble z,
int  incz 
)
template<class T >
void Vmath::Vsub ( int  n,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

Subtract vector z = x-y.

Definition at line 134 of file VmathArray.hpp.

References ASSERTL1, and Vsub().

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

Referenced by Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::UnsteadyAdvectionDiffusion::AddAdvectionPenaltyFlux(), Nektar::SubSteppingExtrapolate::AddDuDt(), Nektar::NekMeshUtils::BGFSUpdate(), Nektar::PulseWaveSystem::CalcCharacteristicVariables(), Nektar::VortexWaveInteraction::CalcNonLinearWaveForce(), Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::NonlinearSWE::ConservativeToPrimitive(), Nektar::LinearSWE::ConservativeToPrimitive(), Nektar::NonlinearPeregrine::ConservativeToPrimitive(), Nektar::Extrapolate::CurlCurl(), Nektar::ImageWarpingSystem::DoOdeRhs(), Nektar::NavierStokesCFE::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::Utilities::ProcessDisplacement::Process(), Nektar::Utilities::ProcessVorticity::Process(), Nektar::Utilities::ProcessQCriterion::Process(), Nektar::Utilities::ProcessSurfDistance::Process(), Nektar::Utilities::ProcessCombineAvg::Process(), Nektar::CompressibleFlowSystem::SymmetryBC(), 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::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(), Vsub(), Nektar::CompressibleFlowSystem::WallBC(), and Nektar::CompressibleFlowSystem::WallViscousBC().

331  {
332  ++n;
333  if (incx == 1 && incy == 1 && incz == 1)
334  {
335  while( --n )
336  {
337  *z = (*x) - (*y);
338  ++x;
339  ++y;
340  ++z;
341  }
342  }
343  else
344  {
345  while( --n )
346  {
347  *z = (*x) - (*y);
348  x += incx;
349  y += incy;
350  z += incz;
351  }
352  }
353  }
template void Vmath::Vsub ( int  n,
const Nektar::NekDouble x,
const int  incx,
const Nektar::NekDouble y,
const int  incy,
Nektar::NekDouble z,
const int  incz 
)
template<class T >
T Vmath::Vsum ( int  n,
const Array< OneD, const T > &  x,
const int  incx 
)

Subtract return sum(x)

Definition at line 329 of file VmathArray.hpp.

References ASSERTL1, and Vsum().

330  {
331  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
332 
333  return Vsum(n,&x[0],incx);
334  }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
T Vsum(int n, const Array< OneD, const T > &x, const int incx)
Subtract return sum(x)
Definition: VmathArray.hpp:329
template<class T >
T Vmath::Vsum ( int  n,
const T *  x,
const int  incx 
)
template Nektar::NekDouble Vmath::Vsum ( int  n,
const Nektar::NekDouble x,
const int  incx 
)
template int Vmath::Vsum ( int  n,
const int *  x,
const int  incx 
)
template<class T >
void Vmath::Vvtvm ( int  n,
const Array< OneD, const T > &  w,
const int  incw,
const Array< OneD, const T > &  x,
const int  incx,
const Array< OneD, const T > &  y,
const int  incy,
Array< OneD, T > &  z,
const int  incz 
)

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

Definition at line 251 of file VmathArray.hpp.

References ASSERTL1, and Vvtvm().

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

References ASSERTL1, and Vvtvp().

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

Definition at line 218 of file VmathArray.hpp.

References ASSERTL1, and Vvtvp().

219  {
220  ASSERTL1(n*incw <= w.num_elements(),"Array out of bounds");
221  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
222  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
223  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
224 
225  Vvtvp(n,w.origin(),incw,&x[0],incx,&y[0],incy,&z[0],incz);
226  }
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:218
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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 428 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::UnsteadyAdvectionDiffusion::GetNormalVel(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::UnsteadyAdvection::GetNormalVelocity(), Nektar::UnsteadyViscousBurgers::GetNormalVelocity(), Nektar::CompressibleFlowSystem::GetPressure(), GetQ(), Nektar::StdRegions::StdExpansion::H1(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), main(), Nektar::VCSMapping::MappingAccelerationCorrection(), Nektar::VCSMapping::MappingAdvectionCorrection(), Nektar::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::CompressibleFlowSystem::PressureInflowFileBC(), Nektar::CompressibleFlowSystem::PressureOutflowBC(), Nektar::CompressibleFlowSystem::PressureOutflowFileBC(), Nektar::CompressibleFlowSystem::PressureOutflowNonReflectiveBC(), Nektar::Utilities::ProcessMultiShear::Process(), Nektar::Utilities::ProcessScalGrad::Process(), Nektar::Utilities::ProcessSurfDistance::Process(), Nektar::Utilities::ProcessWSS::Process(), Nektar::CompressibleFlowSystem::RiemannInvariantBC(), Nektar::SolverUtils::RiemannSolver::rotateFromNormal(), Nektar::SolverUtils::RiemannSolver::rotateToNormal(), Nektar::IncNavierStokes::SetZeroNormalVelocity(), Nektar::SolverUtils::UnsteadySystem::SVVVarDiffCoeff(), Nektar::CompressibleFlowSystem::SymmetryBC(), Nektar::CellModel::TimeIntegrate(), Nektar::FilterMovingBody::UpdateForce(), Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::SolverUtils::AdvectionNonConservative::v_Advect(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::LinearisedAdvection::v_Advect(), Nektar::AdjointAdvection::v_Advect(), 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::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::PrismExp::v_PhysDeriv(), Nektar::LocalRegions::TetExp::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::CompressibleFlowSystem::WallBC(), Nektar::NonlinearSWE::WallBoundary(), Nektar::LinearSWE::WallBoundary(), Nektar::NonlinearPeregrine::WallBoundary(), Nektar::NonlinearSWE::WallBoundary2D(), Nektar::LinearSWE::WallBoundary2D(), Nektar::NonlinearPeregrine::WallBoundary2D(), and Nektar::NonlinearPeregrine::WallBoundaryForcing().

433  {
434  while( n-- )
435  {
436  *z = (*w) * (*x) + (*y);
437  w += incw;
438  x += incx;
439  y += incy;
440  z += incz;
441  }
442  }
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 550 of file Vmath.cpp.

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

556  {
557  while( n-- )
558  {
559  *z = (*v) * (*w) - (*x) * (*y);
560  v += incv;
561  w += incw;
562  x += incx;
563  y += incy;
564  z += incz;
565  }
566  }
template void Vmath::Vvtvvtm ( int  n,
const Nektar::NekDouble v,
int  incv,
const Nektar::NekDouble w,
int  incw,
const Nektar::NekDouble x,
int  incx,
const Nektar::NekDouble y,
int  incy,
Nektar::NekDouble z,
int  incz 
)
template<class T >
void Vmath::Vvtvvtp ( int  n,
const Array< OneD, const T > &  v,
int  incv,
const Array< OneD, const T > &  w,
int  incw,
const Array< OneD, const T > &  x,
int  incx,
const Array< OneD, const T > &  y,
int  incy,
Array< OneD, T > &  z,
int  incz 
)

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

Definition at line 263 of file VmathArray.hpp.

References ASSERTL1, and Vvtvvtp().

270  {
271  ASSERTL1(n*incv <= v.num_elements()+v.GetOffset(),"Array out of bounds");
272  ASSERTL1(n*incw <= w.num_elements()+w.GetOffset(),"Array out of bounds");
273  ASSERTL1(n*incx <= x.num_elements()+x.GetOffset(),"Array out of bounds");
274  ASSERTL1(n*incy <= y.num_elements()+y.GetOffset(),"Array out of bounds");
275  ASSERTL1(n*incz <= z.num_elements()+z.GetOffset(),"Array out of bounds");
276 
277  Vvtvvtp(n,&v[0],incv,&w[0],incw,&x[0],incx,&y[0],incy,&z[0],incz);
278  }
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:263
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
template<class T >
void Vmath::Vvtvvtp ( int  n,
const T *  v,
int  incv,
const T *  w,
int  incw,
const T *  x,
int  incx,
const T *  y,
int  incy,
T *  z,
int  incz 
)
template void Vmath::Vvtvvtp ( int  n,
const Nektar::NekDouble v,
int  incv,
const Nektar::NekDouble w,
int  incw,
const Nektar::NekDouble x,
int  incx,
const Nektar::NekDouble y,
int  incy,
Nektar::NekDouble z,
int  incz 
)
template<class T >
void Vmath::Zero ( int  n,
Array< OneD, T > &  x,
const int  incx 
)

Zero vector.

Definition at line 145 of file VmathArray.hpp.

References ASSERTL1, and Zero().

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

Zero vector.

Definition at line 359 of file Vmath.cpp.

Referenced by Nektar::MultiRegions::AssemblyMap::AssembleBnd(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::CoupledAssemblyMap::CoupledAssemblyMap(), Nektar::StdRegions::StdExpansion::CreateGeneralMatrix(), Nektar::LinearisedAdvection::DFT(), Nektar::AdjointAdvection::DFT(), Nektar::MultiRegions::GlobalLinSysIterative::DoAconjugateProjection(), Nektar::MultiRegions::GlobalLinSysIterative::DoConjugateGradient(), Nektar::NekMatrix< DataType, StandardMatrixTag >::EigenSolve(), Nektar::SolverUtils::DriverModifiedArnoldi::EV_big(), Nektar::SolverUtils::Forcing::EvaluateFunction(), Nektar::SolverUtils::EquationSystem::EvaluateFunction(), Nektar::GlobalMapping::Mapping::EvaluateFunction(), Nektar::EulerCFE::EvaluateIsentropicVortex(), Extractlayerdata(), Nektar::UnsteadyDiffusion::GetFluxVector(), Nektar::LinearSWE::GetFluxVector(), Nektar::APE::GetFluxVector(), Nektar::CompressibleFlowSystem::GetFluxVector(), Nektar::UnsteadyAdvectionDiffusion::GetFluxVectorDiff(), Nektar::UnsteadyViscousBurgers::GetFluxVectorDiff(), Nektar::UnsteadyAdvectionDiffusion::GetNormalVel(), Nektar::UnsteadyInviscidBurger::GetNormalVelocity(), Nektar::UnsteadyAdvection::GetNormalVelocity(), Nektar::UnsteadyViscousBurgers::GetNormalVelocity(), Nektar::CompressibleFlowSystem::GetViscousFluxVector(), Nektar::CompressibleFlowSystem::GetViscousFluxVectorDeAlias(), Nektar::SolverUtils::EquationSystem::ImportFld(), Nektar::SolverUtils::EquationSystem::ImportFldToMultiDomains(), Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree(), Nektar::CellModel::LoadCellModel(), main(), Nektar::VCSMapping::MappingAccelerationCorrection(), Nektar::VCSMapping::MappingAdvectionCorrection(), MoveOutsidePointsNnormpos(), Nektar::Utilities::ProcessSpherigon::Process(), Nektar::Utilities::ProcessMultiShear::Process(), Nektar::Utilities::ProcessQCriterion::Process(), Nektar::Utilities::ProcessScalGrad::Process(), Nektar::Utilities::ProcessSurfDistance::Process(), Nektar::Utilities::ProcessWSS::Process(), Nektar::Utilities::Iso::separate_regions(), 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::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::GlobalMapping::Mapping::v_Divergence(), Nektar::MultiRegions::GlobalLinSysIterativeFull::v_DoMatrixMultiply(), Nektar::MultiRegions::PreconditionerLinear::v_DoPreconditionerWithNonVertOutput(), Nektar::Laplace::v_DoSolve(), Nektar::GlobalMapping::MappingXofZ::v_DotGradJacobian(), Nektar::GlobalMapping::MappingXYofZ::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::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_SetUpPressureForcing(), 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().

360  {
361  if(incx == 1)
362  {
363  std::memset(x,'\0', n*sizeof(T));
364  }
365  else
366  {
367  T zero = 0;
368  ++n;
369  while(--n)
370  {
371  *x = zero;
372  x+=incx;
373  }
374  }
375  }
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.