35#include <boost/core/ignore_unused.hpp>
61 : StdExpansion(Ba.GetNumModes(), 1, Ba),
62 StdExpansion1D(Ba.GetNumModes(), Ba), StdRegions::StdSegExp(Ba),
65 std::bind(&
SegExp::CreateMatrix, this, std::placeholders::_1),
66 std::string(
"SegExpMatrix")),
67 m_staticCondMatrixManager(std::bind(&
Expansion::CreateStaticCondMatrix,
68 this, std::placeholders::_1),
69 std::string(
"SegExpStaticCondMatrix"))
78 : StdExpansion(S), StdExpansion1D(S), StdRegions::StdSegExp(S),
80 m_staticCondMatrixManager(S.m_staticCondMatrixManager)
104 int nquad0 =
m_base[0]->GetNumPoints();
120 ival = StdSegExp::v_Integral(tmp);
154 int nquad0 =
m_base[0]->GetNumPoints();
165 Vmath::Vmul(nquad0, &gmat[0][0], 1, &diff[0], 1, &out_d0[0], 1);
170 Vmath::Vmul(nquad0, &gmat[1][0], 1, &diff[0], 1, &out_d1[0], 1);
175 Vmath::Vmul(nquad0, &gmat[2][0], 1, &diff[0], 1, &out_d2[0], 1);
182 Vmath::Smul(nquad0, gmat[0][0], diff, 1, out_d0, 1);
187 Vmath::Smul(nquad0, gmat[1][0], diff, 1, out_d1, 1);
192 Vmath::Smul(nquad0, gmat[2][0], diff, 1, out_d2, 1);
208 int nquad0 =
m_base[0]->GetNumPoints();
209 int coordim =
m_geom->GetCoordim();
247 int nquad0 =
m_base[0]->GetNumPoints();
250 int coordim =
m_geom->GetCoordim();
262 cout <<
"der_n" << endl;
263 for (
int k = 0; k < coordim; ++k)
271 for (
int i = 0; i < nquad0; i++)
273 cout <<
"nx= " << normals[0][i] <<
" ny=" << normals[1][i]
277 "normal vectors do not exist: check if a"
278 "boundary region is defined as I ");
280 Vmath::Vmul(nquad0, normals[0], 1, inarray_d0, 1, out_dn_tmp, 1);
281 Vmath::Vadd(nquad0, out_dn_tmp, 1, out_dn, 1, out_dn, 1);
283 Vmath::Vmul(nquad0, normals[1], 1, inarray_d1, 1, out_dn_tmp, 1);
284 Vmath::Vadd(nquad0, out_dn_tmp, 1, out_dn, 1, out_dn, 1);
286 for (
int i = 0; i < nquad0; i++)
288 cout <<
"deps/dx =" << inarray_d0[i]
289 <<
" deps/dy=" << inarray_d1[i] << endl;
319 ASSERTL1(
false,
"input dir is out of range");
353 if (
m_base[0]->Collocation())
369 out = (*matsys) * in;
377 if (
m_base[0]->Collocation())
407 "Cannot use FwdTrans_BndConstrained with these points.");
412 ASSERTL0(
false,
"This type of FwdTrans is not defined"
413 "for this expansion type");
416 fill(outarray.get(), outarray.get() +
m_ncoeffs, 0.0);
444 Blas::Dgemv(
'N', nInteriorDofs, nInteriorDofs, matsys->Scale(),
445 &((matsys->GetOwnedMatrix())->GetPtr())[0],
446 nInteriorDofs, tmp1.get() + offset, 1, 0.0,
447 outarray.get() + offset, 1);
513 int nquad0 =
m_base[0]->GetNumPoints();
526 StdSegExp::v_IProductWRTBase(base, tmp, outarray, coll_check);
533 ASSERTL1(dir < 3,
"input dir is out of range");
535 "input dir is out of range");
537 int nquad =
m_base[0]->GetNumPoints();
545 Vmath::Vmul(nquad, gmat[dir], 1, inarray, 1, tmp1, 1);
549 Vmath::Smul(nquad, gmat[dir][0], inarray, 1, tmp1, 1);
559 int nq =
m_base[0]->GetNumPoints();
567 Vmath::Vmul(nq, &Fx[0], 1, &normals[0][0], 1, &Fn[0], 1);
568 Vmath::Vvtvp(nq, &Fy[0], 1, &normals[1][0], 1, &Fn[0], 1, &Fn[0], 1);
594 return StdExpansion1D::v_PhysEvaluate(Lcoord, physvals);
603 m_geom->GetLocCoords(coord, Lcoord);
605 return StdExpansion1D::v_PhysEvaluate(Lcoord, physvals);
610 std::array<NekDouble, 3> &firstOrderDerivs)
614 m_geom->GetLocCoords(coord, Lcoord);
615 return StdSegExp::v_PhysEvaluate(Lcoord, inarray, firstOrderDerivs);
620 std::array<NekDouble, 3> &firstOrderDerivs,
621 std::array<NekDouble, 6> &secondOrderDerivs)
625 m_geom->GetLocCoords(coord, Lcoord);
626 return StdSegExp::v_PhysEvaluate(Lcoord, inarray, firstOrderDerivs,
635 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[0] <= 1.0,
636 "Local coordinates are not in region [-1,1]");
639 for (i = 0; i <
m_geom->GetCoordim(); ++i)
641 coords[i] =
m_geom->GetCoord(i, Lcoords);
657 int nquad =
m_base[0]->GetNumPoints();
664 outarray = inarray[0];
667 outarray = inarray[nquad - 1];
682 Blas::Ddot(nquad, mat_gauss->GetOwnedMatrix()->GetPtr().get(), 1,
693 boost::ignore_unused(EdgeExp, orient);
697 outarray[0] = result;
703 int nquad =
m_base[0]->GetNumPoints();
705 ASSERTL1(vertex == 0 || vertex == 1,
"Vertex value should be 0 or 1");
709 map[0] = vertex == 0 ? 0 : nquad - 1;
723 if (&inarray[0] != &outarray[0])
738 m_base[0]->GetBasisKey());
744 m_base[0]->GetPointsKey());
768 const NekDouble *data,
const std::vector<unsigned int> &nummodes,
769 const int mode_offset,
NekDouble *coeffs,
770 std::vector<LibUtilities::BasisType> &fromType)
772 boost::ignore_unused(fromType);
778 int fillorder = min((
int)nummodes[mode_offset],
m_ncoeffs);
807 ASSERTL0(
false,
"basis is either not set up or not hierarchicial");
824 for (i = 0; i < vCoordDim; ++i)
830 size_t nbnd = vertex;
843 for (i = 0; i < vCoordDim; ++i)
849 for (i = 0; i < vCoordDim; ++i)
855 ASSERTL0(
false,
"point is out of range (point < 2)");
860 for (i = 0; i < vCoordDim; ++i)
862 vert += normal[i][0] * normal[i][0];
864 vert = 1.0 /
sqrt(vert);
868 for (i = 0; i < vCoordDim; ++i)
870 Vmath::Smul(nqe, vert, normal[i], 1, normal[i], 1);
883 boost::ignore_unused(mkey);
885 int nquad =
m_base[0]->GetNumPoints();
895 switch (
m_geom->GetCoordim())
904 Vmath::Vmul(nquad, &gmat[0][0], 1, dPhysValuesdx.get(), 1,
905 dPhysValuesdx.get(), 1);
909 Blas::Dscal(nquad, gmat[0][0], dPhysValuesdx.get(), 1);
917 PhysDeriv(physValues, dPhysValuesdx, dPhysValuesdy);
922 Vmath::Vmul(nquad, &gmat[0][0], 1, dPhysValuesdx.get(), 1,
923 dPhysValuesdx.get(), 1);
924 Vmath::Vvtvp(nquad, &gmat[1][0], 1, dPhysValuesdy.get(), 1,
925 dPhysValuesdx.get(), 1, dPhysValuesdx.get(), 1);
929 Blas::Dscal(nquad, gmat[0][0], dPhysValuesdx.get(), 1);
930 Blas::Daxpy(nquad, gmat[1][0], dPhysValuesdy.get(), 1,
931 dPhysValuesdx.get(), 1);
940 PhysDeriv(physValues, dPhysValuesdx, dPhysValuesdy, dPhysValuesdz);
945 Vmath::Vmul(nquad, &gmat[0][0], 1, dPhysValuesdx.get(), 1,
946 dPhysValuesdx.get(), 1);
947 Vmath::Vvtvp(nquad, &gmat[1][0], 1, dPhysValuesdy.get(), 1,
948 dPhysValuesdx.get(), 1, dPhysValuesdx.get(), 1);
949 Vmath::Vvtvp(nquad, &gmat[2][0], 1, dPhysValuesdz.get(), 1,
950 dPhysValuesdx.get(), 1, dPhysValuesdx.get(), 1);
954 Blas::Dscal(nquad, gmat[0][0], dPhysValuesdx.get(), 1);
955 Blas::Daxpy(nquad, gmat[1][0], dPhysValuesdy.get(), 1,
956 dPhysValuesdx.get(), 1);
957 Blas::Daxpy(nquad, gmat[2][0], dPhysValuesdz.get(), 1,
958 dPhysValuesdx.get(), 1);
963 ASSERTL0(
false,
"Wrong number of dimensions");
974 int nquad =
m_base[0]->GetNumPoints();
989 switch (
m_geom->GetCoordim())
998 Vmath::Vmul(nquad, &gmat[0][0], 1, dPhysValuesdx.get(), 1,
999 dPhysValuesdx.get(), 1);
1003 Blas::Dscal(nquad, gmat[0][0], dPhysValuesdx.get(), 1);
1011 PhysDeriv(physValues, dPhysValuesdx, dPhysValuesdy);
1016 Vmath::Vmul(nquad, &gmat[0][0], 1, dPhysValuesdx.get(), 1,
1017 dPhysValuesdx.get(), 1);
1018 Vmath::Vvtvp(nquad, &gmat[1][0], 1, dPhysValuesdy.get(), 1,
1019 dPhysValuesdx.get(), 1, dPhysValuesdx.get(), 1);
1023 Blas::Dscal(nquad, gmat[0][0], dPhysValuesdx.get(), 1);
1024 Blas::Daxpy(nquad, gmat[1][0], dPhysValuesdy.get(), 1,
1025 dPhysValuesdx.get(), 1);
1034 PhysDeriv(physValues, dPhysValuesdx, dPhysValuesdy, dPhysValuesdz);
1039 Vmath::Vmul(nquad, &gmat[0][0], 1, dPhysValuesdx.get(), 1,
1040 dPhysValuesdx.get(), 1);
1041 Vmath::Vvtvp(nquad, &gmat[1][0], 1, dPhysValuesdy.get(), 1,
1042 dPhysValuesdx.get(), 1, dPhysValuesdx.get(), 1);
1043 Vmath::Vvtvp(nquad, &gmat[2][0], 1, dPhysValuesdz.get(), 1,
1044 dPhysValuesdx.get(), 1, dPhysValuesdx.get(), 1);
1048 Blas::Dscal(nquad, gmat[0][0], dPhysValuesdx.get(), 1);
1049 Blas::Daxpy(nquad, gmat[1][0], dPhysValuesdy.get(), 1,
1050 dPhysValuesdx.get(), 1);
1051 Blas::Daxpy(nquad, gmat[2][0], dPhysValuesdz.get(), 1,
1052 dPhysValuesdx.get(), 1);
1057 ASSERTL0(
false,
"Wrong number of dimensions");
1095 return tmp->GetStdMatrix(mkey);
1105 "Geometric information is not set up");
1115 goto UseLocRegionsMatrix;
1120 goto UseStdRegionsMatrix;
1141 goto UseStdRegionsMatrix;
1153 goto UseLocRegionsMatrix;
1165 "Cannot call eWeakDeriv2 in a "
1166 "coordinate system which is not at "
1167 "least two-dimensional");
1172 "Cannot call eWeakDeriv2 in a "
1173 "coordinate system which is not "
1174 "three-dimensional");
1198 goto UseLocRegionsMatrix;
1202 int coordim =
m_geom->GetCoordim();
1204 for (
int i = 0; i < coordim; ++i)
1210 goto UseStdRegionsMatrix;
1223 int rows = LapMat.GetRows();
1224 int cols = LapMat.GetColumns();
1230 (*helm) = LapMat + factor * MassMat;
1271 coords[0] = (vertex == 0) ? -1.0 : 1.0;
1273 m_Ix =
m_base[0]->GetI(coords);
1279 UseLocRegionsMatrix:
1285 UseStdRegionsMatrix:
1314 returnval = StdSegExp::v_GenMatrix(mkey);
1336 ASSERTL1(&inarray[0] != &outarray[0],
1337 "inarray and outarray can not be the same");
1342 outarray[0] = inarray[1];
1343 outarray[1] = inarray[0];
1347 outarray[m] = sgn * inarray[m];
1355 outarray[
m_ncoeffs - 1 - m] = inarray[m];
1359 ASSERTL0(
false,
"This basis is not allowed in this method");
1380 out = (*matsys) * in;
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
Describes the specification for a Basis.
Defines a specification for a set of points.
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
std::map< int, NormalVector > m_traceNormals
std::map< int, Array< OneD, NekDouble > > m_elmtBndNormDirElmtLen
the element length in each element boundary(Vertex, edge or face) normal direction calculated based o...
SpatialDomains::GeometrySharedPtr GetGeom() const
SpatialDomains::GeometrySharedPtr m_geom
ExpansionSharedPtr GetLeftAdjacentElementExp() const
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
int GetLeftAdjacentElementTrace() const
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
void v_DropLocMatrix(const MatrixKey &mkey) override
virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const override
virtual void v_GetTracePhysVals(const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient) override
virtual void v_PhysDeriv_s(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_ds) override
Evaluate the derivative along a line: . The derivative is calculated performing the product .
virtual void v_GetVertexPhysVals(const int vertex, const Array< OneD, const NekDouble > &inarray, NekDouble &outarray) override
virtual NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals) override
void ReverseCoeffsAndSign(const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Reverse the coefficients in a boundary interior expansion this routine is of use when we need the seg...
SegExp(const LibUtilities::BasisKey &Ba, const SpatialDomains::Geometry1DSharedPtr &geom)
Constructor using BasisKey class for quadrature points and order definition.
virtual void v_NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray) override
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const override
virtual void v_FwdTransBndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Inner product of inarray over region with respect to the expansion basis (this)->_Base[0] and return ...
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray) override
Integrate the physical point list inarray over region and return the value.
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
virtual void v_PhysDeriv_n(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_dn) override
Evaluate the derivative normal to a line: . The derivative is calculated performing the product .
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType) override
Unpack data from input file assuming it comes from.
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) override
Evaluate the derivative at the physical quadrature points given by inarray and return in outarray.
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey) override
void MultiplyByElmtInvMass(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_NumBndryCoeffs() const override
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals) override
virtual void v_GetTracePhysMap(const int vertex, Array< OneD, int > &map) override
virtual int v_NumDGBndryCoeffs() const override
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override
virtual void v_SetCoeffsToOrientation(StdRegions::Orientation dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
virtual void v_DropLocStaticCondMatrix(const MatrixKey &mkey) override
virtual const Array< OneD, const NekDouble > & v_GetPhysNormals() override
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey) override
virtual void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords) override
virtual void v_ComputeTraceNormal(const int vertex) override
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void PhysTensorDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Evaluate the derivative at the physical quadrature points given by inarray and return in outarray.
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
const LibUtilities::PointsKeyVector GetPointsKeys() const
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
int GetVertexMap(const int localVertexId, bool useCoeffPacking=false)
void NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Backward transformation from coefficient space to physical space.
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
void PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
Array< OneD, LibUtilities::BasisSharedPtr > m_base
LibUtilities::ShapeType GetShapeType() const
const VarCoeffMap & GetVarCoeffs() const
MatrixType GetMatrixType() const
const ConstFactorMap & GetConstFactors() const
NekDouble GetConstFactor(const ConstFactorType &factor) const
static void Dgemv(const char &trans, const int &m, const int &n, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
BLAS level 2: Matrix vector multiply y = alpha A x plus beta y where A[m x n].
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
static double Ddot(const int &n, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: output = .
static void Daxpy(const int &n, const double &alpha, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: y = alpha x plus y.
void Interp1D(const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
this function interpolates a 1D function evaluated at the quadrature points of the basis fbasis0 to ...
std::vector< PointsKey > PointsKeyVector
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ ePolyEvenlySpaced
1D Evenly-spaced points using Lagrange polynomial
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
@ eModified_B
Principle Modified Functions .
@ eGauss_Lagrange
Lagrange Polynomials using the Gauss points.
@ eGLL_Lagrange
Lagrange for SEM basis .
@ eModified_A
Principle Modified Functions .
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
GeomType
Indicates the type of element geometry.
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ eNoGeomType
No type defined.
@ eMovingRegular
Currently unused.
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< Geometry1D > Geometry1DSharedPtr
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
std::map< ConstFactorType, NekDouble > ConstFactorMap
std::shared_ptr< StdSegExp > StdSegExpSharedPtr
StdRegions::ConstFactorMap factors
The above copyright notice and this permission notice shall be included.
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
static Array< OneD, Array< OneD, NekDouble > > NullNekDoubleArrayOfArray
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
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.
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
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.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
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.
void Zero(int n, T *x, const int incx)
Zero vector.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
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.
scalarT< T > sqrt(scalarT< T > in)