Nektar++
Loading...
Searching...
No Matches
RiemannSolver.cpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: RiemannSolver.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 Riemann solvers with factory.
32//
33///////////////////////////////////////////////////////////////////////////////
34
37
38#define EPSILON 0.000001
39
40#define CROSS(dest, v1, v2) \
41 { \
42 dest[0] = v1[1] * v2[2] - v1[2] * v2[1]; \
43 dest[1] = v1[2] * v2[0] - v1[0] * v2[2]; \
44 dest[2] = v1[0] * v2[1] - v1[1] * v2[0]; \
45 }
46
47#define DOT(v1, v2) (v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2])
48
49#define SUB(dest, v1, v2) \
50 { \
51 dest[0] = v1[0] - v2[0]; \
52 dest[1] = v1[1] - v2[1]; \
53 dest[2] = v1[2] - v2[2]; \
54 }
55
56namespace Nektar::SolverUtils
57{
58/**
59 * Retrieves the singleton instance of the Riemann solver factory.
60 */
62{
63 static RiemannSolverFactory instance;
64 return instance;
65}
66
67/**
68 * @class RiemannSolver
69 *
70 * @brief The RiemannSolver class provides an abstract interface under
71 * which solvers for various Riemann problems can be implemented.
72 */
73
74RiemannSolver::RiemannSolver() : m_requiresRotation(false), m_rotStorage(3)
75{
76}
77
79 [[maybe_unused]] const LibUtilities::SessionReaderSharedPtr &pSession)
80 : m_requiresRotation(false), m_rotStorage(3)
81{
82}
83
84/**
85 * @brief Perform the Riemann solve given the forwards and backwards
86 * spaces.
87 *
88 * This routine calls the virtual function #v_Solve to perform the
89 * Riemann solve. If the flag #m_requiresRotation is set, then the
90 * velocity field is rotated to the normal direction to perform
91 * dimensional splitting, and the resulting fluxes are rotated back to
92 * the Cartesian directions before being returned. For the Rotation to
93 * work, the normal vectors "N" and the location of the vector
94 * components in Fwd "vecLocs"must be set via the SetAuxVec() method.
95 *
96 * @param Fwd Forwards trace space.
97 * @param Bwd Backwards trace space.
98 * @param flux Resultant flux along trace space.
99 */
100void RiemannSolver::Solve(const int nDim,
101 const Array<OneD, const Array<OneD, NekDouble>> &Fwd,
102 const Array<OneD, const Array<OneD, NekDouble>> &Bwd,
104{
106 {
107 ASSERTL1(CheckVectors("N"), "N not defined.");
108 ASSERTL1(CheckAuxVec("vecLocs"), "vecLocs not defined.");
110 m_vectors["N"]();
112 m_auxVec["vecLocs"]();
113
114 int nFields = Fwd.size();
115 int nPts = Fwd[0].size();
116
117 if (m_rotStorage[0].size() != nFields ||
118 m_rotStorage[0][0].size() != nPts)
119 {
120 for (int i = 0; i < 3; ++i)
121 {
123 for (int j = 0; j < nFields; ++j)
124 {
126 }
127 }
128 }
129
130 rotateToNormal(Fwd, normals, vecLocs, m_rotStorage[0]);
131 rotateToNormal(Bwd, normals, vecLocs, m_rotStorage[1]);
132
134 rotateFromNormal(m_rotStorage[2], normals, vecLocs, flux);
135
136 // Attempt to subtract (\vec{U}\vec{vg})\dot n for ALE
137 if (m_ALESolver)
138 {
139 auto vgt = m_vectors["vgt"]();
140 auto N = m_vectors["N"]();
141 for (int i = 0; i < flux.size(); ++i)
142 {
143 for (int j = 0; j < flux[i].size(); ++j)
144 {
145 NekDouble tmp = 0;
146 for (int k = 0; k < nDim; ++k)
147 {
148 tmp += N[k][j] * vgt[k][j];
149 }
150 flux[i][j] -= 0.5 * (Fwd[i][j] + Bwd[i][j]) * tmp;
151 }
152 }
153 }
154 }
155 else
156 {
157 v_Solve(nDim, Fwd, Bwd, flux);
158 }
159}
160
161/**
162 * @brief Rotate a vector field to trace normal.
163 *
164 * This function performs a rotation of a vector so that the first
165 * component aligns with the trace normal direction.
166 *
167 * The vectors components are stored in inarray. Their locations must
168 * be specified in the "vecLocs" array. vecLocs[0] contains the locations
169 * of the first vectors components, vecLocs[1] those of the second and
170 * so on.
171 *
172 * In 2D, this is accomplished through the transform:
173 *
174 * \f[ (u_x, u_y) = (n_x u_x + n_y u_y, -n_x v_x + n_y v_y) \f]
175 *
176 * In 3D, we generate a (non-unique) transformation using
177 * RiemannSolver::fromToRotation.
178 *
179 */
181 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
182 const Array<OneD, const Array<OneD, NekDouble>> &normals,
183 const Array<OneD, const Array<OneD, NekDouble>> &vecLocs,
185{
186 for (int i = 0; i < inarray.size(); ++i)
187 {
188 Vmath::Vcopy(inarray[i].size(), inarray[i], 1, outarray[i], 1);
189 }
190
191 for (int i = 0; i < vecLocs.size(); i++)
192 {
193 ASSERTL1(vecLocs[i].size() == normals.size(),
194 "vecLocs[i] element count mismatch");
195
196 switch (normals.size())
197 {
198 case 1:
199 { // do nothing
200 const int nq = inarray[0].size();
201 const int vx = (int)vecLocs[i][0];
202 Vmath::Vmul(nq, inarray[vx], 1, normals[0], 1, outarray[vx], 1);
203 break;
204 }
205 case 2:
206 {
207 const int nq = inarray[0].size();
208 const int vx = (int)vecLocs[i][0];
209 const int vy = (int)vecLocs[i][1];
210
211 Vmath::Vmul(nq, inarray[vx], 1, normals[0], 1, outarray[vx], 1);
212 Vmath::Vvtvp(nq, inarray[vy], 1, normals[1], 1, outarray[vx], 1,
213 outarray[vx], 1);
214 Vmath::Vmul(nq, inarray[vx], 1, normals[1], 1, outarray[vy], 1);
215 Vmath::Vvtvm(nq, inarray[vy], 1, normals[0], 1, outarray[vy], 1,
216 outarray[vy], 1);
217 break;
218 }
219
220 case 3:
221 {
222 const int nq = inarray[0].size();
223 const int vx = (int)vecLocs[i][0];
224 const int vy = (int)vecLocs[i][1];
225 const int vz = (int)vecLocs[i][2];
226
227 if (m_ALESolver)
228 {
229 // Generate matrices if they don't already exist.
230 if (m_rotMat.size() == 0 || m_updateNormals())
231 {
233 }
234 }
235 else
236 {
237 // Generate matrices if they don't already exist.
238 if (m_rotMat.size() == 0)
239 {
241 }
242 }
243
244 // Apply rotation matrices.
245 Vmath::Vvtvvtp(nq, inarray[vx], 1, m_rotMat[0], 1, inarray[vy],
246 1, m_rotMat[1], 1, outarray[vx], 1);
247 Vmath::Vvtvp(nq, inarray[vz], 1, m_rotMat[2], 1, outarray[vx],
248 1, outarray[vx], 1);
249 Vmath::Vvtvvtp(nq, inarray[vx], 1, m_rotMat[3], 1, inarray[vy],
250 1, m_rotMat[4], 1, outarray[vy], 1);
251 Vmath::Vvtvp(nq, inarray[vz], 1, m_rotMat[5], 1, outarray[vy],
252 1, outarray[vy], 1);
253 Vmath::Vvtvvtp(nq, inarray[vx], 1, m_rotMat[6], 1, inarray[vy],
254 1, m_rotMat[7], 1, outarray[vz], 1);
255 Vmath::Vvtvp(nq, inarray[vz], 1, m_rotMat[8], 1, outarray[vz],
256 1, outarray[vz], 1);
257 break;
258 }
259
260 default:
261 ASSERTL1(false, "Invalid space dimension.");
262 break;
263 }
264 }
265}
266
267/**
268 * @brief Rotate a vector field from trace normal.
269 *
270 * This function performs a rotation of the triad of vector components
271 * provided in inarray so that the first component aligns with the
272 * Cartesian components; it performs the inverse operation of
273 * RiemannSolver::rotateToNormal.
274 */
276 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
277 const Array<OneD, const Array<OneD, NekDouble>> &normals,
278 const Array<OneD, const Array<OneD, NekDouble>> &vecLocs,
280{
281 for (int i = 0; i < inarray.size(); ++i)
282 {
283 Vmath::Vcopy(inarray[i].size(), inarray[i], 1, outarray[i], 1);
284 }
285
286 for (int i = 0; i < vecLocs.size(); i++)
287 {
288 ASSERTL1(vecLocs[i].size() == normals.size(),
289 "vecLocs[i] element count mismatch");
290
291 switch (normals.size())
292 {
293 case 1:
294 { // do nothing
295 const int nq = normals[0].size();
296 const int vx = (int)vecLocs[i][0];
297 Vmath::Vmul(nq, inarray[vx], 1, normals[0], 1, outarray[vx], 1);
298 break;
299 }
300 case 2:
301 {
302 const int nq = normals[0].size();
303 const int vx = (int)vecLocs[i][0];
304 const int vy = (int)vecLocs[i][1];
305
306 Vmath::Vmul(nq, inarray[vy], 1, normals[1], 1, outarray[vx], 1);
307 Vmath::Vvtvm(nq, inarray[vx], 1, normals[0], 1, outarray[vx], 1,
308 outarray[vx], 1);
309 Vmath::Vmul(nq, inarray[vx], 1, normals[1], 1, outarray[vy], 1);
310 Vmath::Vvtvp(nq, inarray[vy], 1, normals[0], 1, outarray[vy], 1,
311 outarray[vy], 1);
312 break;
313 }
314
315 case 3:
316 {
317 const int nq = normals[0].size();
318 const int vx = (int)vecLocs[i][0];
319 const int vy = (int)vecLocs[i][1];
320 const int vz = (int)vecLocs[i][2];
321
322 Vmath::Vvtvvtp(nq, inarray[vx], 1, m_rotMat[0], 1, inarray[vy],
323 1, m_rotMat[3], 1, outarray[vx], 1);
324 Vmath::Vvtvp(nq, inarray[vz], 1, m_rotMat[6], 1, outarray[vx],
325 1, outarray[vx], 1);
326 Vmath::Vvtvvtp(nq, inarray[vx], 1, m_rotMat[1], 1, inarray[vy],
327 1, m_rotMat[4], 1, outarray[vy], 1);
328 Vmath::Vvtvp(nq, inarray[vz], 1, m_rotMat[7], 1, outarray[vy],
329 1, outarray[vy], 1);
330 Vmath::Vvtvvtp(nq, inarray[vx], 1, m_rotMat[2], 1, inarray[vy],
331 1, m_rotMat[5], 1, outarray[vz], 1);
332 Vmath::Vvtvp(nq, inarray[vz], 1, m_rotMat[8], 1, outarray[vz],
333 1, outarray[vz], 1);
334 break;
335 }
336
337 default:
338 ASSERTL1(false, "Invalid space dimension.");
339 break;
340 }
341 }
342}
343
344/**
345 * @brief Determine whether a scalar has been defined in #m_scalars.
346 *
347 * @param name Scalar name.
348 */
349bool RiemannSolver::CheckScalars(std::string name)
350{
351 return m_scalars.find(name) != m_scalars.end();
352}
353
354/**
355 * @brief Determine whether a vector has been defined in #m_vectors.
356 *
357 * @param name Vector name.
358 */
359bool RiemannSolver::CheckVectors(std::string name)
360{
361 return m_vectors.find(name) != m_vectors.end();
362}
363
364/**
365 * @brief Determine whether a parameter has been defined in #m_params.
366 *
367 * @param name Parameter name.
368 */
369bool RiemannSolver::CheckParams(std::string name)
370{
371 return m_params.find(name) != m_params.end();
372}
373
374/**
375 * @brief Determine whether a scalar has been defined in #m_auxScal.
376 *
377 * @param name Scalar name.
378 */
379bool RiemannSolver::CheckAuxScal(std::string name)
380{
381 return m_auxScal.find(name) != m_auxScal.end();
382}
383
384/**
385 * @brief Determine whether a vector has been defined in #m_auxVec.
386 *
387 * @param name Vector name.
388 */
389bool RiemannSolver::CheckAuxVec(std::string name)
390{
391 return m_auxVec.find(name) != m_auxVec.end();
392}
393
394/**
395 * @brief Generate rotation matrices for 3D expansions.
396 */
398 const Array<OneD, const Array<OneD, NekDouble>> &normals)
399{
400 Array<OneD, NekDouble> xdir(3, 0.0);
402 NekDouble tmp[9];
403 const int nq = normals[0].size();
404 int i, j;
405 xdir[0] = 1.0;
406
407 // Allocate storage for rotation matrices.
409
410 for (i = 0; i < 9; ++i)
411 {
413 }
414 for (i = 0; i < normals[0].size(); ++i)
415 {
416 // Generate matrix which takes us from (1,0,0) vector to trace
417 // normal.
418 tn[0] = normals[0][i];
419 tn[1] = normals[1][i];
420 tn[2] = normals[2][i];
421 FromToRotation(tn, xdir, tmp);
422
423 for (j = 0; j < 9; ++j)
424 {
425 m_rotMat[j][i] = tmp[j];
426 }
427 }
428}
429
430/**
431 * @brief A function for creating a rotation matrix that rotates a
432 * vector @a from into another vector @a to.
433 *
434 * Authors: Tomas Möller, John Hughes
435 * "Efficiently Building a Matrix to Rotate One Vector to
436 * Another" Journal of Graphics Tools, 4(4):1-4, 1999
437 *
438 * @param from Normalised 3-vector to rotate from.
439 * @param to Normalised 3-vector to rotate to.
440 * @param out Resulting 3x3 rotation matrix (row-major order).
441 */
444 NekDouble *mat)
445{
446 NekDouble v[3];
447 NekDouble e, h, f;
448
449 CROSS(v, from, to);
450 e = DOT(from, to);
451 f = (e < 0) ? -e : e;
452 if (f > 1.0 - EPSILON)
453 {
454 NekDouble u[3], v[3];
455 NekDouble x[3];
456 NekDouble c1, c2, c3;
457 int i, j;
458
459 x[0] = (from[0] > 0.0) ? from[0] : -from[0];
460 x[1] = (from[1] > 0.0) ? from[1] : -from[1];
461 x[2] = (from[2] > 0.0) ? from[2] : -from[2];
462
463 if (x[0] < x[1])
464 {
465 if (x[0] < x[2])
466 {
467 x[0] = 1.0;
468 x[1] = x[2] = 0.0;
469 }
470 else
471 {
472 x[2] = 1.0;
473 x[0] = x[1] = 0.0;
474 }
475 }
476 else
477 {
478 if (x[1] < x[2])
479 {
480 x[1] = 1.0;
481 x[0] = x[2] = 0.0;
482 }
483 else
484 {
485 x[2] = 1.0;
486 x[0] = x[1] = 0.0;
487 }
488 }
489
490 u[0] = x[0] - from[0];
491 u[1] = x[1] - from[1];
492 u[2] = x[2] - from[2];
493 v[0] = x[0] - to[0];
494 v[1] = x[1] - to[1];
495 v[2] = x[2] - to[2];
496
497 c1 = 2.0 / DOT(u, u);
498 c2 = 2.0 / DOT(v, v);
499 c3 = c1 * c2 * DOT(u, v);
500
501 for (i = 0; i < 3; i++)
502 {
503 for (j = 0; j < 3; j++)
504 {
505 mat[3 * i + j] =
506 -c1 * u[i] * u[j] - c2 * v[i] * v[j] + c3 * v[i] * u[j];
507 }
508 mat[i + 3 * i] += 1.0;
509 }
510 }
511 else
512 {
513 NekDouble hvx, hvz, hvxy, hvxz, hvyz;
514 h = 1.0 / (1.0 + e);
515 hvx = h * v[0];
516 hvz = h * v[2];
517 hvxy = hvx * v[1];
518 hvxz = hvx * v[2];
519 hvyz = hvz * v[1];
520 mat[0] = e + hvx * v[0];
521 mat[1] = hvxy - v[2];
522 mat[2] = hvxz + v[1];
523 mat[3] = hvxy + v[2];
524 mat[4] = e + h * v[1] * v[1];
525 mat[5] = hvyz - v[0];
526 mat[6] = hvxz - v[1];
527 mat[7] = hvyz + v[0];
528 mat[8] = e + hvz * v[2];
529 }
530}
531
532/**
533 * @brief Calculate the flux jacobian of Fwd and Bwd
534 *
535 * @param Fwd Forwards trace space.
536 * @param Bwd Backwards trace space.
537 * @param flux Resultant flux along trace space.
538 */
540 const int nDim, const Array<OneD, const Array<OneD, NekDouble>> &Fwd,
541 const Array<OneD, const Array<OneD, NekDouble>> &Bwd,
543{
544 int nPts = Fwd[0].size();
545
547 {
548 ASSERTL1(CheckVectors("N"), "N not defined.");
549 ASSERTL1(CheckAuxVec("vecLocs"), "vecLocs not defined.");
551 m_vectors["N"]();
553 m_auxVec["vecLocs"]();
554
555 v_CalcFluxJacobian(nDim, Fwd, Bwd, normals, FJac, BJac);
556 }
557 else
558 {
560 for (int i = 0; i < nDim; i++)
561 {
562 normals[i] = Array<OneD, NekDouble>(nPts, 0.0);
563 }
564 Vmath::Fill(nPts, 1.0, normals[0], 1);
565
566 v_CalcFluxJacobian(nDim, Fwd, Bwd, normals, FJac, BJac);
567 }
568}
569
571 [[maybe_unused]] const int nDim,
572 [[maybe_unused]] const Array<OneD, const Array<OneD, NekDouble>> &Fwd,
573 [[maybe_unused]] const Array<OneD, const Array<OneD, NekDouble>> &Bwd,
574 [[maybe_unused]] const Array<OneD, const Array<OneD, NekDouble>> &normals,
575 [[maybe_unused]] DNekBlkMatSharedPtr &FJac,
576 [[maybe_unused]] DNekBlkMatSharedPtr &BJac)
577{
578 NEKERROR(ErrorUtil::efatal, "v_CalcFluxJacobian not specified.");
579}
580
581} // namespace Nektar::SolverUtils
#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 EPSILON
#define CROSS(dest, v1, v2)
#define DOT(v1, v2)
Provides a generic Factory class.
SOLVER_UTILS_EXPORT bool CheckAuxVec(std::string name)
Determine whether a vector has been defined in m_auxVec.
SOLVER_UTILS_EXPORT void Solve(const int nDim, const Array< OneD, const Array< OneD, NekDouble > > &Fwd, const Array< OneD, const Array< OneD, NekDouble > > &Bwd, Array< OneD, Array< OneD, NekDouble > > &flux)
Perform the Riemann solve given the forwards and backwards spaces.
std::function< bool()> m_updateNormals
Function of normals updated flag.
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_rotStorage
Rotation storage.
bool m_requiresRotation
Indicates whether the Riemann solver requires a rotation to be applied to the velocity fields.
virtual SOLVER_UTILS_EXPORT void v_CalcFluxJacobian(const int nDim, const Array< OneD, const Array< OneD, NekDouble > > &Fwd, const Array< OneD, const Array< OneD, NekDouble > > &Bwd, const Array< OneD, const Array< OneD, NekDouble > > &normals, DNekBlkMatSharedPtr &FJac, DNekBlkMatSharedPtr &BJac)
SOLVER_UTILS_EXPORT bool CheckParams(std::string name)
Determine whether a parameter has been defined in m_params.
std::map< std::string, RSScalarFuncType > m_auxScal
Map of auxiliary scalar function types.
SOLVER_UTILS_EXPORT void rotateToNormal(const Array< OneD, const Array< OneD, NekDouble > > &inarray, const Array< OneD, const Array< OneD, NekDouble > > &normals, const Array< OneD, const Array< OneD, NekDouble > > &vecLocs, Array< OneD, Array< OneD, NekDouble > > &outarray)
Rotate a vector field to trace normal.
virtual void v_Solve(const int nDim, const Array< OneD, const Array< OneD, NekDouble > > &Fwd, const Array< OneD, const Array< OneD, NekDouble > > &Bwd, Array< OneD, Array< OneD, NekDouble > > &flux)=0
SOLVER_UTILS_EXPORT void rotateFromNormal(const Array< OneD, const Array< OneD, NekDouble > > &inarray, const Array< OneD, const Array< OneD, NekDouble > > &normals, const Array< OneD, const Array< OneD, NekDouble > > &vecLocs, Array< OneD, Array< OneD, NekDouble > > &outarray)
Rotate a vector field from trace normal.
Array< OneD, Array< OneD, NekDouble > > m_rotMat
Rotation matrices for each trace quadrature point.
SOLVER_UTILS_EXPORT bool CheckScalars(std::string name)
Determine whether a scalar has been defined in m_scalars.
SOLVER_UTILS_EXPORT void CalcFluxJacobian(const int nDim, const Array< OneD, const Array< OneD, NekDouble > > &Fwd, const Array< OneD, const Array< OneD, NekDouble > > &Bwd, DNekBlkMatSharedPtr &FJac, DNekBlkMatSharedPtr &BJac)
Calculate the flux jacobian of Fwd and Bwd.
std::map< std::string, RSVecFuncType > m_vectors
Map of vector function types.
std::map< std::string, RSScalarFuncType > m_scalars
Map of scalar function types.
SOLVER_UTILS_EXPORT bool CheckVectors(std::string name)
Determine whether a vector has been defined in m_vectors.
void FromToRotation(Array< OneD, const NekDouble > &from, Array< OneD, const NekDouble > &to, NekDouble *mat)
A function for creating a rotation matrix that rotates a vector from into another vector to.
SOLVER_UTILS_EXPORT void GenerateRotationMatrices(const Array< OneD, const Array< OneD, NekDouble > > &normals)
Generate rotation matrices for 3D expansions.
SOLVER_UTILS_EXPORT bool CheckAuxScal(std::string name)
Determine whether a scalar has been defined in m_auxScal.
std::map< std::string, RSParamFuncType > m_params
Map of parameter function types.
SOLVER_UTILS_EXPORT RiemannSolver()
bool m_ALESolver
Flag if using the ALE formulation.
std::map< std::string, RSVecFuncType > m_auxVec
Map of auxiliary vector function types.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
RiemannSolverFactory & GetRiemannSolverFactory()
std::shared_ptr< DNekBlkMat > DNekBlkMatSharedPtr
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 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 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 minus vector): z = w*x - y
Definition Vmath.hpp:381
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition Vmath.hpp:54
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):
Definition Vmath.hpp:439
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition Vmath.hpp:825