Nektar++
Loading...
Searching...
No Matches
Expansion1D.cpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: Expansion1D.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: File for Expansion1D routines
32//
33///////////////////////////////////////////////////////////////////////////////
34
37
38using namespace std;
39
41{
42
44{
45 DNekMatSharedPtr returnval;
46
47 switch (mkey.GetMatrixType())
48 {
50 {
52 "HybridDGHelmholtz matrix not set up "
53 "for non boundary-interior expansions");
54 int i;
55 NekDouble lambdaval =
58 int ncoeffs = GetNcoeffs();
59
60 int coordim = GetCoordim();
61
66 DNekMat LocMat(ncoeffs, ncoeffs);
67
68 returnval =
70 DNekMat &Mat = *returnval;
71
72 Vmath::Zero(ncoeffs * ncoeffs, Mat.GetPtr(), 1);
73
74 for (i = 0; i < coordim; ++i)
75 {
76 DNekScalMat &Dmat = *GetLocMatrix(DerivType[i]);
77
78 Mat = Mat + Dmat * invMass * Transpose(Dmat);
79 }
80
81 // Add end Mass Matrix Contribution
83 Mat = Mat + lambdaval * Mass;
84
86 GetBoundaryMap(bmap);
87
88 // Add tau*F_e using elemental mass matrices
89 for (i = 0; i < 2; ++i)
90 {
91 Mat(bmap[i], bmap[i]) = Mat(bmap[i], bmap[i]) + tau;
92 }
93 }
94 break;
96 {
97 int j, k;
98 int nbndry = NumDGBndryCoeffs();
99 int ncoeffs = GetNcoeffs();
103 factors[StdRegions::eFactorTau] =
105
106 Array<OneD, NekDouble> lambda(nbndry);
107 DNekVec Lambda(nbndry, lambda, eWrapper);
108 Array<OneD, NekDouble> ulam(ncoeffs);
109 DNekVec Ulam(ncoeffs, ulam, eWrapper);
110 Array<OneD, NekDouble> f(ncoeffs);
111 DNekVec F(ncoeffs, f, eWrapper);
112
113 // declare matrix space
114 returnval =
116 DNekMat &Umat = *returnval;
117
118 // Helmholtz matrix
119 DNekScalMat &invHmat =
121
122 // for each degree of freedom of the lambda space
123 // calculate Umat entry
124 // Generate Lambda to U_lambda matrix
125 for (j = 0; j < nbndry; ++j)
126 {
127 Vmath::Zero(nbndry, &lambda[0], 1);
128 Vmath::Zero(ncoeffs, &f[0], 1);
129 lambda[j] = 1.0;
130
132 lambda, f);
133
134 Ulam = invHmat * F; // generate Ulam from lambda
135
136 // fill column of matrix
137 for (k = 0; k < ncoeffs; ++k)
138 {
139 Umat(k, j) = Ulam[k];
140 }
141 }
142 }
143 break;
147 {
148 int j = 0;
149 int k = 0;
150 int dir = 0;
151 int nbndry = NumDGBndryCoeffs();
152 int ncoeffs = GetNcoeffs();
153
154 Array<OneD, NekDouble> lambda(nbndry);
155 DNekVec Lambda(nbndry, lambda, eWrapper);
156
157 Array<OneD, NekDouble> ulam(ncoeffs);
158 DNekVec Ulam(ncoeffs, ulam, eWrapper);
159 Array<OneD, NekDouble> f(ncoeffs);
160 DNekVec F(ncoeffs, f, eWrapper);
164 factors[StdRegions::eFactorTau] =
166
167 // declare matrix space
168 returnval =
170 DNekMat &Qmat = *returnval;
171
172 // Lambda to U matrix
173 DNekScalMat &lamToU =
175
176 // Inverse mass matrix
178
179 // Weak Derivative matrix
181 switch (mkey.GetMatrixType())
182 {
184 dir = 0;
186 break;
188 dir = 1;
190 break;
192 dir = 2;
194 break;
195 default:
196 ASSERTL0(false, "Direction not known");
197 break;
198 }
199
200 // for each degree of freedom of the lambda space
201 // calculate Qmat entry
202 // Generate Lambda to Q_lambda matrix
203 for (j = 0; j < nbndry; ++j)
204 {
205 Vmath::Zero(nbndry, &lambda[0], 1);
206 lambda[j] = 1.0;
207
208 // for lambda[j] = 1 this is the solution to ulam
209 for (k = 0; k < ncoeffs; ++k)
210 {
211 Ulam[k] = lamToU(k, j);
212 }
213
214 // -D^T ulam
215 Vmath::Neg(ncoeffs, &ulam[0], 1);
216 F = Transpose(*Dmat) * Ulam;
217
218 // + \tilde{G} \lambda
219 AddNormTraceInt(dir, lambda, f);
220
221 // multiply by inverse mass matrix
222 Ulam = invMass * F;
223
224 // fill column of matrix (Qmat is in column major format)
225 Vmath::Vcopy(ncoeffs, &ulam[0], 1,
226 &(Qmat.GetPtr())[0] + j * ncoeffs, 1);
227 }
228 }
229 break;
231 {
232 int j;
233 int nbndry = NumBndryCoeffs();
234
238 factors[StdRegions::eFactorTau] =
240
243 GetBoundaryMap(bmap);
244
245 // declare matrix space
246 returnval =
248 DNekMat &BndMat = *returnval;
249
250 // Matrix to map Lambda to U
251 DNekScalMat &LamToU =
253
254 // Matrix to map Lambda to Q
255 DNekScalMat &LamToQ =
257
258 lam[0] = 1.0;
259 lam[1] = 0.0;
260 for (j = 0; j < nbndry; ++j)
261 {
262 BndMat(0, j) =
263 -LamToQ(bmap[0], j) - factors[StdRegions::eFactorTau] *
264 (LamToU(bmap[0], j) - lam[j]);
265 }
266
267 lam[0] = 0.0;
268 lam[1] = 1.0;
269 for (j = 0; j < nbndry; ++j)
270 {
271 BndMat(1, j) =
272 LamToQ(bmap[1], j) - factors[StdRegions::eFactorTau] *
273 (LamToU(bmap[1], j) - lam[j]);
274 }
275 }
276 break;
277 default:
278 ASSERTL0(false,
279 "This matrix type cannot be generated from this class");
280 break;
281 }
282
283 return returnval;
284}
285
286void Expansion1D::v_PhysDeriv(const int dir,
287 const Array<OneD, const NekDouble> &inarray,
288 Array<OneD, NekDouble> &outarray)
289{
290 switch (dir)
291 {
292 case 0:
293 {
294 v_PhysDeriv(inarray, outarray, NullNekDouble1DArray,
296 break;
297 }
298
299 case 1:
300 {
301 v_PhysDeriv(inarray, NullNekDouble1DArray, outarray,
303 break;
304 }
305
306 case 2:
307 {
309 outarray);
310 break;
311 }
312
313 default:
314 {
315 ASSERTL1(false, "input dir is out of range");
316 }
317 break;
318 }
319}
320
321/**
322 \brief Inner product of \a inarray over region with respect to
323 expansion basis \a base and return in \a outarray
324
325 Calculate \f$ I[p] = \int^{1}_{-1} \phi_p(\xi_1) u(\xi_1) d\xi_1
326 = \sum_{i=0}^{nq-1} \phi_p(\xi_{1i}) u(\xi_{1i}) w_i \f$ where
327 \f$ outarray[p] = I[p], inarray[i] = u(\xi_{1i}), base[p*nq+i] =
328 \phi_p(\xi_{1i}) \f$.
329
330 Inputs: \n
331 - \a inarray: physical point array of function to be integrated
332 \f$ u(\xi_1) \f$
333
334 Output: \n
335
336 - \a outarray: array of coefficients representing the inner
337 product of function with ever mode in the exapnsion
338
339**/
341 Array<OneD, NekDouble> &outarray)
342{
343 const Array<OneD, const NekDouble> &jac = m_geomFactors->GetJac();
344 bool Deformed = (m_geomFactors->GetGtype() == SpatialDomains::eDeformed);
345
347 {
348 int nqtot = GetTotPoints();
349 if (Deformed)
350 {
351 Vmath::Vmul(nqtot, jac, 1, inarray, 1, outarray, 1);
352 }
353 else
354 {
355 Vmath::Smul(nqtot, jac[0], inarray, 1, outarray, 1);
356 }
357 v_MultiplyByStdQuadratureMetric(outarray, outarray);
358 }
359 else
360 {
361 v_IProductWRTBaseKernel(m_base[0]->GetBdata(), inarray, outarray, jac,
362 Deformed);
363 }
364}
365
366/** \brief Evaluate the derivative \f$ d/d{\xi_1} \f$ at the
367 physical quadrature points given by \a inarray and return in \a
368 outarray.
369
370 This is a wrapper around StdExpansion1D::Tensor_Deriv
371
372 Input:\n
373
374 - \a n: number of derivatives to be evaluated where \f$ n \leq dim\f$
375
376 - \a inarray: array of function evaluated at the quadrature points
377
378 Output: \n
379
380 - \a outarray: array of the derivatives \f$
381 du/d_{\xi_1}|_{\xi_{1i}} d\xi_1/dx,
382 du/d_{\xi_1}|_{\xi_{1i}} d\xi_1/dy,
383 du/d_{\xi_1}|_{\xi_{1i}} d\xi_1/dz,
384 \f$ depending on value of \a dim
385*/
390{
391 int nquad0 = m_base[0]->GetNumPoints();
392 Array<TwoD, const NekDouble> gmat = m_geomFactors->GetDerivFactors();
393 Array<OneD, NekDouble> diff(nquad0);
394
395 PhysTensorDeriv(inarray, diff);
396 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
397 {
398 if (out_d0.size())
399 {
400 Vmath::Vmul(nquad0, &gmat[0][0], 1, &diff[0], 1, &out_d0[0], 1);
401 }
402
403 if (out_d1.size())
404 {
405 Vmath::Vmul(nquad0, &gmat[1][0], 1, &diff[0], 1, &out_d1[0], 1);
406 }
407
408 if (out_d2.size())
409 {
410 Vmath::Vmul(nquad0, &gmat[2][0], 1, &diff[0], 1, &out_d2[0], 1);
411 }
412 }
413 else
414 {
415 if (out_d0.size())
416 {
417 Vmath::Smul(nquad0, gmat[0][0], diff, 1, out_d0, 1);
418 }
419
420 if (out_d1.size())
421 {
422 Vmath::Smul(nquad0, gmat[1][0], diff, 1, out_d1, 1);
423 }
424
425 if (out_d2.size())
426 {
427 Vmath::Smul(nquad0, gmat[2][0], diff, 1, out_d2, 1);
428 }
429 }
430}
431
432void Expansion1D::AddNormTraceInt([[maybe_unused]] const int dir,
434 Array<OneD, NekDouble> &outarray)
435{
436 int k;
437 int nbndry = NumBndryCoeffs();
438 int nquad = GetNumPoints(0);
441
442 GetBoundaryMap(vmap);
443
444 // add G \lambda term (can assume G is diagonal since one
445 // of the basis is zero at boundary otherwise)
446 for (k = 0; k < nbndry; ++k)
447 {
448 outarray[vmap[k]] += (Basis[(vmap[k] + 1) * nquad - 1] *
449 Basis[(vmap[k] + 1) * nquad - 1] -
450 Basis[vmap[k] * nquad] * Basis[vmap[k] * nquad]) *
451 inarray[vmap[k]];
452 }
453}
454
456 const NekDouble tau, const Array<OneD, const NekDouble> &inarray,
457 Array<OneD, NekDouble> &outarray)
458{
459 int i, n;
460 int nbndry = NumBndryCoeffs();
461 int nquad = GetNumPoints(0);
462 int ncoeffs = GetNcoeffs();
463 int coordim = GetCoordim();
465
466 ASSERTL0(&inarray[0] != &outarray[0],
467 "Input and output arrays use the same memory");
468
471
472 GetBoundaryMap(vmap);
473
474 // Add F = \tau <phi_i,phi_j> (note phi_i is zero if phi_j is non-zero)
475 for (i = 0; i < nbndry; ++i)
476 {
477 outarray[vmap[i]] += tau * Basis[(vmap[i] + 1) * nquad - 1] *
478 Basis[(vmap[i] + 1) * nquad - 1] *
479 inarray[vmap[i]];
480 outarray[vmap[i]] += tau * Basis[vmap[i] * nquad] *
481 Basis[vmap[i] * nquad] * inarray[vmap[i]];
482 }
483
484 //===============================================================
485 // Add -\sum_i D_i^T M^{-1} G_i + E_i M^{-1} G_i =
486 // \sum_i D_i M^{-1} G_i term
487
491 Array<OneD, NekDouble> tmpcoeff(ncoeffs, 0.0);
492 DNekVec Coeffs(ncoeffs, outarray, eWrapper);
493 DNekVec Tmpcoeff(ncoeffs, tmpcoeff, eWrapper);
494
495 for (n = 0; n < coordim; ++n)
496 {
497 // evaluate M^{-1} G
498 for (i = 0; i < ncoeffs; ++i)
499 {
500 // lower boundary (negative normal)
501 tmpcoeff[i] -= invMass(i, vmap[0]) * Basis[vmap[0] * nquad] *
502 Basis[vmap[0] * nquad] * inarray[vmap[0]];
503
504 // upper boundary (positive normal)
505 tmpcoeff[i] += invMass(i, vmap[1]) *
506 Basis[(vmap[1] + 1) * nquad - 1] *
507 Basis[(vmap[1] + 1) * nquad - 1] * inarray[vmap[1]];
508 }
509
510 DNekScalMat &Dmat = *GetLocMatrix(DerivType[n]);
511 Coeffs = Coeffs + Dmat * Tmpcoeff;
512 }
513}
514
516 const int vert, const Array<OneD, const NekDouble> &primCoeffs,
517 DNekMatSharedPtr &inoutmat)
518{
520 "Robin boundary conditions are only implemented for "
521 "boundary-interior expanisons");
522 ASSERTL1(inoutmat->GetRows() == inoutmat->GetColumns(),
523 "Assuming that input matrix was square");
524
525 // Get local Element mapping for vertex point
526 int map = GetVertexMap(vert);
527
528 // Now need to identify a map which takes the local edge
529 // mass matrix to the matrix stored in inoutmat;
530 // This can currently be deduced from the size of the matrix
531 // - if inoutmat.m_rows() == v_NCoeffs() it is a full
532 // matrix system
533 // - if inoutmat.m_rows() == v_NumBndCoeffs() it is a
534 // boundary CG system
535
536 int rows = inoutmat->GetRows();
537
538 if (rows == GetNcoeffs())
539 {
540 // no need to do anything
541 }
542 else if (rows == NumBndryCoeffs()) // same as NumDGBndryCoeffs()
543 {
544 int i;
546 GetBoundaryMap(bmap);
547
548 for (i = 0; i < 2; ++i)
549 {
550 if (map == bmap[i])
551 {
552 map = i;
553 break;
554 }
555 }
556 ASSERTL1(i != 2, "Did not find number in map");
557 }
558
559 // assumes end points have unit magnitude
560 (*inoutmat)(map, map) += primCoeffs[0];
561}
562
563/**
564 * Given an edge and vector of element coefficients:
565 * - maps those elemental coefficients corresponding to the trace into
566 * an vector.
567 * - update the element coefficients
568 * - multiplies the edge vector by the edge mass matrix
569 * - maps the edge coefficients back onto the elemental coefficients
570 */
572 const int vert, const Array<OneD, const NekDouble> &primCoeffs,
573 const Array<OneD, NekDouble> &incoeffs, Array<OneD, NekDouble> &coeffs)
574{
576 "Not set up for non boundary-interior expansions");
577
578 int map = GetVertexMap(vert);
579 coeffs[map] += primCoeffs[0] * incoeffs[map];
580}
581
583 const Array<OneD, Array<OneD, NekDouble>> &vec)
584{
586 GetLeftAdjacentElementExp()->GetTraceNormal(
588
589 int nq = m_base[0]->GetNumPoints();
591 Vmath::Vmul(nq, &vec[0][0], 1, &normals[0][0], 1, &Fn[0], 1);
592 Vmath::Vvtvp(nq, &vec[1][0], 1, &normals[1][0], 1, &Fn[0], 1, &Fn[0], 1);
593
594 return Integral(Fn);
595}
596
597/** @brief: This method gets all of the factors which are
598 required as part of the Gradient Jump Penalty
599 stabilisation and involves the product of the normal and
600 geometric factors along the element trace.
601*/
604 [[maybe_unused]] Array<OneD, Array<OneD, NekDouble>> &d0factors,
605 [[maybe_unused]] Array<OneD, Array<OneD, NekDouble>> &d1factors)
606{
607 int nquad = GetNumPoints(0);
608 Array<TwoD, const NekDouble> gmat = m_geomFactors->GetDerivFactors();
609
610 if (factors.size() <= 2)
611 {
613 factors[0] = Array<OneD, NekDouble>(1);
614 factors[1] = Array<OneD, NekDouble>(1);
615 }
616
617 // Outwards normal
622
623 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
624 {
625 factors[0][0] = gmat[0][nquad - 1] * normal_0[0][0];
626 factors[1][0] = gmat[0][0] * normal_1[0][0];
627
628 for (int n = 1; n < normal_0.size(); ++n)
629 {
630 factors[0][0] += gmat[n][0] * normal_0[n][0];
631 factors[1][0] += gmat[n][nquad - 1] * normal_1[n][0];
632 }
633 }
634 else
635 {
636 factors[0][0] = gmat[0][0] * normal_0[0][0];
637 factors[1][0] = gmat[0][0] * normal_1[0][0];
638
639 for (int n = 1; n < normal_0.size(); ++n)
640 {
641 factors[0][0] += gmat[n][0] * normal_0[n][0];
642 factors[1][0] += gmat[n][0] * normal_1[n][0];
643 }
644 }
645}
646
648 [[maybe_unused]] const StdRegions::Orientation orient,
649 Array<OneD, int> &idmap, [[maybe_unused]] const int nq0,
650 [[maybe_unused]] const int nq1, [[maybe_unused]] bool Forwards)
651{
652 if (idmap.size() != 1)
653 {
654 idmap = Array<OneD, int>(1);
655 }
656
657 idmap[0] = 0;
658}
659
660void Expansion1D::v_TraceNormLen([[maybe_unused]] const int traceid,
661 NekDouble &h, NekDouble &p)
662{
663 h = GetGeom()->GetVertex(1)->dist(*GetGeom()->GetVertex(0));
664 p = m_ncoeffs - 1;
665}
666
667} // namespace Nektar::LocalRegions
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Represents a basis of a given type.
Definition Basis.h:198
const Array< OneD, const NekDouble > & GetBdata() const
Return basis definition array m_bdata.
Definition Basis.h:301
void v_AddRobinTraceContribution(const int vert, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs) override
void AddHDGHelmholtzTraceTerms(const NekDouble tau, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Inner product of inarray over region with respect to expansion basis base and return in outarray.
void v_AddRobinMassMatrix(const int vert, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat) override
void AddNormTraceInt(const int dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
NekDouble v_VectorFlux(const Array< OneD, Array< OneD, NekDouble > > &vec) override
void v_ReOrientTracePhysMap(const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1, bool Forwards) override
void v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p) override
void v_NormalTraceDerivFactors(Array< OneD, Array< OneD, NekDouble > > &factors, Array< OneD, Array< OneD, NekDouble > > &d0factors, Array< OneD, Array< OneD, NekDouble > > &d1factors) override
: This method gets all of the factors which are required as part of the Gradient Jump Penalty stabili...
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
void v_PhysDeriv(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculate the derivative of the physical points in a given direction.
SpatialDomains::Geometry * GetGeom() const
ExpansionSharedPtr GetLeftAdjacentElementExp() const
Definition Expansion.h:531
int GetLeftAdjacentElementTrace() const
Definition Expansion.h:544
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
Definition Expansion.cpp:88
const NormalVector & GetTraceNormal(const int id)
SpatialDomains::GeomFactorsUniquePtr m_geomFactors
Definition Expansion.h:307
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
PointGeom * GetVertex(int i) const
Returns vertex i of this object.
Definition Geometry.h:353
NekDouble dist(PointGeom &a)
return distance between this and input a
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.
void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
virtual void v_IProductWRTBaseKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, const NekDouble > &jac, const bool Deformed)=0
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)
const LibUtilities::BasisSharedPtr & GetBasis(int dir) const
This function gets the shared point to basis in the dir direction.
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
int GetVertexMap(const int localVertexId, bool useCoeffPacking=false)
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
Array< OneD, LibUtilities::BasisSharedPtr > m_base
NekDouble Integral(const Array< OneD, const NekDouble > &inarray)
This function integrates the specified function over the domain.
MatrixType GetMatrixType() const
NekDouble GetConstFactor(const ConstFactorType &factor) const
@ eDeformed
Geometry is curved or has non-constant factors.
std::map< ConstFactorType, NekDouble > ConstFactorMap
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
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.
Definition Vmath.hpp:72
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition Vmath.hpp:292
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
Definition Vmath.hpp:366
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
Definition Vmath.hpp:100
void Zero(int n, T *x, const int incx)
Zero vector.
Definition Vmath.hpp:273
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition Vmath.hpp:825
STL namespace.