Nektar++
Diffusion.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: Diffusion.cpp
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: Abstract base class for diffusion.
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
36 
37 namespace Nektar
38 {
39  namespace SolverUtils
40  {
42  {
43  static DiffusionFactory instance;
44  return instance;
45  }
46 
50  {
51  v_InitObject(pSession, pFields);
52 
53  // Div curl storage
54  int nPts = pFields[0]->GetTotPoints();
55  m_divVel = Array<OneD, NekDouble>(nPts, 0.0);
58  }
59 
61  const std::size_t nConvectiveFields,
63  const Array<OneD, Array<OneD, NekDouble> > &inarray,
64  Array<OneD, Array<OneD, NekDouble> > &outarray,
65  const Array<OneD, Array<OneD, NekDouble> > &pFwd,
66  const Array<OneD, Array<OneD, NekDouble> > &pBwd)
67  {
68  v_Diffuse(nConvectiveFields, fields, inarray, outarray, pFwd, pBwd);
69  }
70 
71  /**
72  * @brief Similar with Diffusion::Diffuse(): calculate diffusion flux
73  * The difference is in the outarray:
74  * it is the coefficients of basis for DiffuseCoeffs()
75  * it is the physics on quadrature points for Diffuse()
76  */
78  const std::size_t nConvectiveFields,
80  const Array<OneD, Array<OneD, NekDouble> > &inarray,
81  Array<OneD, Array<OneD, NekDouble> > &outarray,
82  const Array<OneD, Array<OneD, NekDouble> > &pFwd,
83  const Array<OneD, Array<OneD, NekDouble> > &pBwd)
84  {
85  v_DiffuseCoeffs(nConvectiveFields, fields, inarray,
86  outarray, pFwd, pBwd);
87  }
88 
90  const std::size_t nConvectiveFields,
92  const Array<OneD, Array<OneD, NekDouble> > &inarray,
93  Array<OneD, Array<OneD, NekDouble> > &outarray,
94  NekDouble time,
95  const Array<OneD, Array<OneD, NekDouble> > &pFwd,
96  const Array<OneD, Array<OneD, NekDouble> > &pBwd)
97  {
98  m_time = time;
99  v_Diffuse(nConvectiveFields, fields, inarray, outarray, pFwd, pBwd);
100  }
101 
103  const std::size_t nConvectiveFields,
105  const Array<OneD, Array<OneD, NekDouble> > &inarray,
106  Array<OneD, Array<OneD, NekDouble> > &outarray,
107  NekDouble time,
108  const Array<OneD, Array<OneD, NekDouble> > &pFwd,
109  const Array<OneD, Array<OneD, NekDouble> > &pBwd)
110  {
111  m_time = time;
112  v_DiffuseCoeffs(nConvectiveFields, fields, inarray, outarray,
113  pFwd, pBwd);
114  }
117  const Array<OneD, Array<OneD, NekDouble> > &inarray,
119  Array<OneD, NekDouble > &MuVarTrace)
120  {
121  size_t nTracePts = fields[0]->GetTrace()->GetTotPoints();
122 
123  Array<OneD, NekDouble> Fwd{nTracePts, 0.0};
124  Array<OneD, NekDouble> Bwd{nTracePts, 0.0};
125 
126  m_ArtificialDiffusionVector(inarray, muvar);
127 
128  // BwdMuvar is left to be 0.0 according to DiffusionLDG.cpp
129  fields[0]->GetFwdBwdTracePhys(muvar, Fwd, Bwd, false);
130 
131  for (int k = 0; k < nTracePts; ++k)
132  {
133  MuVarTrace[k] = 0.5 * (Fwd[k] + Bwd[k]) ;
134  }
135  }
136 
138  const int nConvectiveFields,
139  const int nDim,
140  const int nPts,
141  const int nTracePts,
143  const Array<OneD, const int > &nonZeroIndex,
146  Array<OneD, Array<OneD, NekDouble> > &outarray)
147  {
148  boost::ignore_unused(nTracePts);
149 
150  int nCoeffs = outarray[nConvectiveFields-1].size();
151  Array<OneD, NekDouble> tmpCoeff(nCoeffs,0.0);
152  Array<OneD, Array<OneD, NekDouble> > tmpfield(nDim);
153 
154  for(int i = 0;i<nDim;i++)
155  {
156  tmpfield[i] = Array<OneD, NekDouble>(nPts,0.0);
157  }
158  int nv = 0;
159 
160  for(int j=0;j<nonZeroIndex.size();j++)
161  {
162  nv = nonZeroIndex[j];
163  MultiRegions::ExpListSharedPtr tracelist = fields[nv]->GetTrace();
164  for(int nd=0;nd<nDim;nd++)
165  {
166  Vmath::Zero(nPts,tmpfield[nd],1);
167 
168  tracelist->MultiplyByQuadratureMetric(Fwdflux[nd][nv],
169  Fwdflux[nd][nv]);
170  tracelist->MultiplyByQuadratureMetric(Bwdflux[nd][nv],
171  Bwdflux[nd][nv]);
172 
173  fields[nv]->AddTraceQuadPhysToOffDiag(Fwdflux[nd][nv],
174  Bwdflux[nd][nv],tmpfield[nd]);
175  fields[nv]->DivideByQuadratureMetric(tmpfield[nd],tmpfield[nd]);
176  }
177  fields[nv]->IProductWRTDerivBase(tmpfield,tmpCoeff);
178  Vmath::Vadd(nCoeffs,tmpCoeff,1,outarray[nv],1,outarray[nv],1);
179  }
180  }
181 
183  const std::size_t nConvectiveFields,
185  const Array<OneD, Array<OneD, NekDouble> > &inarray,
186  Array<OneD, Array<OneD, NekDouble> > &outarray,
187  const Array<OneD, Array<OneD, NekDouble> > &pFwd,
188  const Array<OneD, Array<OneD, NekDouble> > &pBwd)
189  {
190  boost::ignore_unused(nConvectiveFields, fields, inarray, outarray,
191  pFwd, pBwd);
192  NEKERROR(ErrorUtil::efatal, "v_Diffuse not defined");
193  }
194 
196  const std::size_t nConvectiveFields,
198  const Array<OneD, Array<OneD, NekDouble> > &inarray,
199  Array<OneD, Array<OneD, NekDouble> > &outarray,
200  const Array<OneD, Array<OneD, NekDouble> > &pFwd,
201  const Array<OneD, Array<OneD, NekDouble> > &pBwd)
202  {
203  boost::ignore_unused(nConvectiveFields, fields, inarray,
204  outarray, pFwd, pBwd);
205  NEKERROR(ErrorUtil::efatal, "v_DiffuseCoeffs not defined");
206  }
207 
209  const std::size_t nConvectiveFields,
211  const Array<OneD, Array<OneD, NekDouble> > &inarray,
212  Array<OneD, Array<OneD, NekDouble> > &outarray,
213  const Array<OneD, Array<OneD, NekDouble> > &vFwd,
214  const Array<OneD, Array<OneD, NekDouble> > &vBwd,
216  Array< OneD, int > &nonZeroIndex)
217  {
218  boost::ignore_unused(nConvectiveFields, fields, inarray,
219  outarray, vFwd, vBwd,qfield,nonZeroIndex);
220  NEKERROR(ErrorUtil::efatal,"v_DiffuseCoeffs not defined");
221  }
222 
223  // Diffusion Calculate the physical derivatives
226  const Array<OneD, Array<OneD, NekDouble>> &inarray,
228  const Array<OneD, Array<OneD, NekDouble>> &pFwd,
229  const Array<OneD, Array<OneD, NekDouble>> &pBwd)
230  {
231  v_DiffuseCalcDerivative(fields, inarray, qfields, pFwd, pBwd);
232  }
233 
234 
237  {
238  NEKERROR(ErrorUtil::efatal,"v_GetTraceNormal not defined");
240  }
241 
243  const std::size_t nConvectiveFields,
244  const size_t npnts,
245  const Array<OneD, const Array<OneD, NekDouble> > &vFwd,
246  const Array<OneD, const Array<OneD, NekDouble> > &vBwd,
249  {
250  boost::ignore_unused(nConvectiveFields, npnts, vFwd, vBwd,
251  aver, jump);
252  NEKERROR(ErrorUtil::efatal, "v_ConsVarAveJump not defined");
253  }
254 
257  const Array<OneD, Array<OneD, NekDouble>> &inarray,
259  const Array<OneD, Array<OneD, NekDouble>> &pFwd,
260  const Array<OneD, Array<OneD, NekDouble>> &pBwd)
261  {
262  boost::ignore_unused(fields, inarray, qfields,
263  pFwd, pBwd);
264  NEKERROR(ErrorUtil::efatal, "Not defined for function DiffuseVolumeFLux.");
265  }
266 
269  const Array<OneD, Array<OneD, NekDouble>> &inarray,
271  TensorOfArray3D<NekDouble> &VolumeFlux,
272  Array< OneD, int > &nonZeroIndex)
273  {
274  boost::ignore_unused(fields, inarray, qfields, VolumeFlux,
275  nonZeroIndex);
276  NEKERROR(ErrorUtil::efatal, "Not defined for function DiffuseVolumeFLux.");
277  }
278 
281  const Array<OneD, Array<OneD, NekDouble>> &inarray,
283  TensorOfArray3D<NekDouble> &VolumeFlux,
284  Array<OneD, Array<OneD, NekDouble> > &TraceFlux,
285  const Array<OneD, Array<OneD, NekDouble>> &pFwd,
286  const Array<OneD, Array<OneD, NekDouble>> &pBwd,
287  Array< OneD, int > &nonZeroIndex)
288  {
289  boost::ignore_unused(fields, inarray, qfields, VolumeFlux,
290  TraceFlux, pFwd, pBwd, nonZeroIndex);
291  NEKERROR(ErrorUtil::efatal, "Not defined function DiffuseTraceFLux.");
292  }
293 
294  /**
295  * @brief Compute primary variables
296  *
297  */
300  const Array<OneD, Array<OneD, NekDouble>> &inarray,
301  Array<OneD, Array<OneD, NekDouble>> &primVar)
302  {
303 
304  int nDim = fields[0]->GetCoordim(0);
305  int nPts = fields[0]->GetTotPoints();
306  for(int i = 0; i < nDim; ++i)
307  {
308  primVar[i] = Array<OneD, NekDouble>(nPts, 0.0);
309  Vmath::Vdiv(nPts, inarray[i+1], 1, inarray[0], 1, primVar[i], 1);
310  }
311  }
312 
313  /**
314  * @brief Compute and store scalars needed for shock sensor, i.e.
315  * divergence and curl squared
316  * @param dimensions, points, primary variables derivative
317  *
318  */
321  const TensorOfArray3D<NekDouble> &pVarDer)
322  {
323  int nDim = fields[0]->GetCoordim(0);
324  int nPts = fields[0]->GetTotPoints();
325  // Compute and store scalars needed for shock sensor
326  Array<OneD, NekDouble> tmp3(nPts, 0.0);
327  Array<OneD, NekDouble> tmp4(nPts, 0.0);
328 
329  // Zero the variables for the current iteration step
330  Vmath::Zero(nPts, m_divVel, 1);
331  Vmath::Zero(nPts, m_divVelSquare, 1);
332  Vmath::Zero(nPts, m_curlVelSquare, 1);
333 
334  // div vel
335  for (int j = 0; j < nDim; ++j)
336  {
337  Vmath::Vadd(nPts, m_divVel, 1, pVarDer[j][j], 1, m_divVel, 1);
338  }
339  // (div vel)**2
340  Vmath::Vmul(nPts, m_divVel, 1, m_divVel, 1, m_divVelSquare, 1);
341 
342  // curl vel
343  if ( nDim > 2 )
344  {
345  // curl[0] 3/2
346  Vmath::Vadd(nPts, tmp4, 1, pVarDer[2][1], 1, tmp4, 1);
347  // curl[0]-2/3
348  Vmath::Vcopy(nPts, pVarDer[1][2], 1, tmp3, 1);
349  Vmath::Neg(nPts, tmp3, 1);
350  Vmath::Vadd(nPts, tmp4, 1, tmp3, 1, tmp4, 1);
351  // square curl[0]
352  Vmath::Vmul(nPts, tmp4, 1, tmp4, 1, tmp3, 1);
353  Vmath::Vadd(nPts, m_curlVelSquare, 1, tmp3, 1, m_curlVelSquare, 1);
354 
355  tmp4 = Array<OneD, NekDouble>(nPts, 0.0);
356  // curl[1] 3/1
357  Vmath::Vadd(nPts, tmp4, 1, pVarDer[2][0], 1, tmp4, 1);
358  // curl[1]-1/3
359  Vmath::Vcopy(nPts, pVarDer[0][2], 1, tmp3, 1);
360  Vmath::Neg(nPts, tmp3, 1);
361  Vmath::Vadd(nPts, tmp4, 1, tmp3, 1, tmp4, 1);
362  // square curl[1]
363  Vmath::Vmul(nPts, tmp4, 1, tmp4, 1, tmp3, 1);
364  Vmath::Vadd(nPts, m_curlVelSquare, 1, tmp3, 1, m_curlVelSquare, 1);
365 
366  tmp4 = Array<OneD, NekDouble>(nPts, 0.0);
367  // curl[2] 1/2
368  Vmath::Vadd(nPts, tmp4, 1, pVarDer[0][1], 1, tmp4, 1);
369  // curl[2]-2/1
370  Vmath::Vcopy(nPts, pVarDer[1][0], 1, tmp3, 1);
371  Vmath::Neg(nPts, tmp3, 1);
372  Vmath::Vadd(nPts, tmp4, 1, tmp3, 1, tmp4, 1);
373  // square curl[2]
374  Vmath::Vmul(nPts, tmp4, 1, tmp4, 1, tmp3, 1);
375  Vmath::Vadd(nPts, m_curlVelSquare, 1, tmp3, 1, m_curlVelSquare, 1);
376 
377  }
378  else if ( nDim > 1 )
379  {
380  // curl[2] 1/2
381  Vmath::Vadd(nPts, tmp4, 1, pVarDer[0][1], 1, tmp4, 1);
382  // curl[2]-2/1
383  Vmath::Vcopy(nPts, pVarDer[1][0], 1, tmp3, 1);
384  Vmath::Neg(nPts, tmp3, 1);
385  Vmath::Vadd(nPts, tmp4, 1, tmp3, 1, tmp4, 1);
386  // square curl[2]
387  Vmath::Vmul(nPts, tmp4, 1, tmp4, 1, tmp3, 1);
388  Vmath::Vadd(nPts, m_curlVelSquare, 1, tmp3, 1, m_curlVelSquare, 1);
389  }
390  else
391  {
392  Vmath::Fill(nPts, 0.0, m_curlVelSquare, 1);
393  }
394  }
395  }
396 }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Definition: ErrorUtil.hpp:209
Provides a generic Factory class.
Definition: NekFactory.hpp:105
SOLVER_UTILS_EXPORT void Diffuse(const std::size_t nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const Array< OneD, Array< OneD, NekDouble > > &pFwd=NullNekDoubleArrayOfArray, const Array< OneD, Array< OneD, NekDouble > > &pBwd=NullNekDoubleArrayOfArray)
Definition: Diffusion.cpp:60
Array< OneD, NekDouble > m_divVelSquare
Definition: Diffusion.h:160
SOLVER_UTILS_EXPORT void DiffuseCoeffs(const std::size_t nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const Array< OneD, Array< OneD, NekDouble > > &pFwd=NullNekDoubleArrayOfArray, const Array< OneD, Array< OneD, NekDouble > > &pBwd=NullNekDoubleArrayOfArray)
Similar with Diffusion::Diffuse(): calculate diffusion flux The difference is in the outarray: it is ...
Definition: Diffusion.cpp:77
SOLVER_UTILS_EXPORT void GetAVmu(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &muvar, Array< OneD, NekDouble > &MuVarTrace)
Get the mu of artifical viscosity(AV)
Definition: Diffusion.cpp:115
virtual SOLVER_UTILS_EXPORT void v_DiffuseCoeffs(const std::size_t nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const Array< OneD, Array< OneD, NekDouble > > &pFwd, const Array< OneD, Array< OneD, NekDouble > > &pBwd)
Definition: Diffusion.cpp:195
DiffusionArtificialDiffusion m_ArtificialDiffusionVector
Definition: Diffusion.h:469
SOLVER_UTILS_EXPORT void DiffuseCalcDerivative(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble >> &inarray, TensorOfArray3D< NekDouble > &qfields, const Array< OneD, Array< OneD, NekDouble >> &pFwd=NullNekDoubleArrayOfArray, const Array< OneD, Array< OneD, NekDouble >> &pBwd=NullNekDoubleArrayOfArray)
Definition: Diffusion.cpp:224
virtual SOLVER_UTILS_EXPORT void v_DiffuseVolumeFlux(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble >> &inarray, TensorOfArray3D< NekDouble > &qfields, TensorOfArray3D< NekDouble > &VolumeFlux, Array< OneD, int > &nonZeroIndex)
Diffusion Volume Flux.
Definition: Diffusion.cpp:267
Array< OneD, NekDouble > m_divVel
Params for Ducros sensor.
Definition: Diffusion.h:159
SOLVER_UTILS_EXPORT void GetDivCurl(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const TensorOfArray3D< NekDouble > &pVarDer)
Compute divergence and curl squared.
Definition: Diffusion.cpp:319
Array< OneD, NekDouble > m_curlVelSquare
Definition: Diffusion.h:161
SOLVER_UTILS_EXPORT void InitObject(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields)
Definition: Diffusion.cpp:47
virtual SOLVER_UTILS_EXPORT void v_GetPrimVar(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &primVar)
Compute primary derivatives.
Definition: Diffusion.cpp:298
virtual SOLVER_UTILS_EXPORT void v_DiffuseTraceFlux(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble >> &inarray, TensorOfArray3D< NekDouble > &Qfields, TensorOfArray3D< NekDouble > &VolumeFlux, Array< OneD, Array< OneD, NekDouble > > &TraceFlux, const Array< OneD, Array< OneD, NekDouble >> &pFwd, const Array< OneD, Array< OneD, NekDouble >> &pBwd, Array< OneD, int > &nonZeroIndex)
Diffusion term Trace Flux.
Definition: Diffusion.cpp:279
virtual SOLVER_UTILS_EXPORT void v_DiffuseCalcDerivative(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, TensorOfArray3D< NekDouble > &qfields, const Array< OneD, Array< OneD, NekDouble > > &pFwd, const Array< OneD, Array< OneD, NekDouble > > &pBwd)
Diffusion Flux, calculate the physical derivatives.
Definition: Diffusion.cpp:255
SOLVER_UTILS_EXPORT void AddSymmFluxIntegralToOffDiag(const int nConvectiveFields, const int nDim, const int nPts, const int nTracePts, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const int > &nonZeroIndex, TensorOfArray3D< NekDouble > &Fwdflux, TensorOfArray3D< NekDouble > &Bwdflux, Array< OneD, Array< OneD, NekDouble > > &outarray)
Definition: Diffusion.cpp:137
virtual SOLVER_UTILS_EXPORT void v_ConsVarAveJump(const std::size_t nConvectiveFields, const size_t npnts, const Array< OneD, const Array< OneD, NekDouble > > &vFwd, const Array< OneD, const Array< OneD, NekDouble > > &vBwd, Array< OneD, Array< OneD, NekDouble > > &aver, Array< OneD, Array< OneD, NekDouble > > &jump)
Definition: Diffusion.cpp:242
virtual SOLVER_UTILS_EXPORT void v_Diffuse(const std::size_t nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const Array< OneD, Array< OneD, NekDouble > > &pFwd, const Array< OneD, Array< OneD, NekDouble > > &pBwd)
Definition: Diffusion.cpp:182
virtual SOLVER_UTILS_EXPORT const Array< OneD, const Array< OneD, NekDouble > > & v_GetTraceNormal()
Definition: Diffusion.cpp:236
virtual SOLVER_UTILS_EXPORT void v_InitObject(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields)
Definition: Diffusion.h:478
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
DiffusionFactory & GetDiffusionFactory()
Definition: Diffusion.cpp:41
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
static Array< OneD, Array< OneD, NekDouble > > NullNekDoubleArrayOfArray
double NekDouble
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.
Definition: Vmath.cpp:192
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition: Vmath.cpp:461
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.
Definition: Vmath.cpp:322
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.
Definition: Vmath.cpp:257
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:436
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition: Vmath.cpp:45
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1199