Nektar++
Loading...
Searching...
No Matches
StdExpansion2D.cpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: StdExpansion2D.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: Daughter of StdExpansion. This class contains routine
32// which are common to 2D expansion. Typically this inolves physiocal
33// space operations.
34//
35///////////////////////////////////////////////////////////////////////////////
36
38
43
44#ifdef max
45#undef max
46#endif
47
48namespace Nektar::StdRegions
49{
50// Declaretion of scalar routine
53
55 [[maybe_unused]] int numcoeffs,
56 [[maybe_unused]] const LibUtilities::BasisKey &Ba,
57 [[maybe_unused]] const LibUtilities::BasisKey &Bb)
58{
59}
60
61//----------------------------
62// Differentiation Methods
63//----------------------------
64/**
65 * Calculate the derivative along the tenosr directions. This function was
66 * originally in StdEpxansion2D but due to the boost_pp switch statement is
67 * currently shape dependent
68 */
70 const Array<OneD, const NekDouble> &inarray,
71 Array<OneD, NekDouble> &outarray_d0, Array<OneD, NekDouble> &outarray_d1)
72{
73 int nquad0 = m_base[0]->GetNumPoints();
74 int nquad1 = m_base[1]->GetNumPoints();
75 bool Deriv0 = (outarray_d0.size() > 0);
76 bool Deriv1 = (outarray_d1.size() > 0);
77 const NekDouble *D0 = m_base[0]->GetD()->GetRawPtr();
78 const NekDouble *D1 = m_base[1]->GetD()->GetRawPtr();
79
81 // copy inarray data if inarray and outarray are the same.
82 if ((inarray.data() == outarray_d0.data()) ||
83 (inarray.data() == outarray_d1.data()))
84 {
85 Array<OneD, NekDouble> wsp(nquad0 * nquad1);
86 CopyArray(inarray, wsp);
87 intmp = wsp;
88 }
89 else
90 {
91 intmp = inarray;
92 }
93
94 // Switch statment using boost_pp and macros. This unfolls into a
95 // nested switch statement which runs from SMIN to SMAX for quadratrure
96 // order. If you want to see it unwrapped compile in verbose mode and add
97 // --preprocess to the c++ command. Default case
98#undef PHYSDERIV_DEF
99#define PHYSDERIV_DEF \
100 PhysDerivTensor2DKernel(nquad0, nquad1, (const vec_t *)intmp.data(), \
101 (const vec_t *)D0, (const vec_t *)D1, \
102 (vec_t *)outarray_d0.data(), \
103 (vec_t *)outarray_d1.data(), Deriv0, Deriv1)
104
105 // Loop case over quarature points
106#undef PHYSDERIV_Q
107#define PHYSDERIV_Q(r, i) \
108 case NQ1(i): \
109 PhysDerivTensor2DKernel(NQ1(i), NQ1(i), (const vec_t *)intmp.data(), \
110 (const vec_t *)D0, (const vec_t *)D1, \
111 (vec_t *)outarray_d0.data(), \
112 (vec_t *)outarray_d1.data(), Deriv0, Deriv1); \
113 break;
114
115 // templated cases on standard quadrature
116 // usage where quad order goes from SMIN to SMAX
117 if (nquad0 == nquad1)
118 {
119 switch (nquad0)
120 {
121 BOOST_PP_FOR((SMIN, SMAX), STDLEV1TEST, STDLEV1UPDATE, PHYSDERIV_Q);
122 default:
124 break;
125 }
126 }
127 else
128 {
130 }
131}
132
134 const Array<OneD, const NekDouble> &inarray,
135 Array<OneD, NekDouble> &outarray)
136{
137 switch (dir)
138 {
139 case 0:
140 {
141 v_PhysDeriv(inarray, outarray, NullNekDouble1DArray,
143 break;
144 }
145 case 1:
146 {
147 v_PhysDeriv(inarray, NullNekDouble1DArray, outarray,
149 break;
150 }
151 default:
152 {
153 ASSERTL1(false, "input dir is out of range");
154 break;
155 }
156 }
157}
158
160 const Array<OneD, const NekDouble> &coords,
161 const Array<OneD, const NekDouble> &physvals)
162{
163 ASSERTL2(coords[0] > -1 - NekConstants::kNekZeroTol, "coord[0] < -1");
164 ASSERTL2(coords[0] < 1 + NekConstants::kNekZeroTol, "coord[0] > 1");
165 ASSERTL2(coords[1] > -1 - NekConstants::kNekZeroTol, "coord[1] < -1");
166 ASSERTL2(coords[1] < 1 + NekConstants::kNekZeroTol, "coord[1] > 1");
167
169 LocCoordToLocCollapsed(coords, coll);
170
171 const int nq0 = m_base[0]->GetNumPoints();
172 const int nq1 = m_base[1]->GetNumPoints();
173
174 Array<OneD, NekDouble> wsp(nq1);
175 for (int i = 0; i < nq1; ++i)
176 {
177 wsp[i] = StdExpansion::BaryEvaluate<0>(coll[0], &physvals[0] + i * nq0);
178 }
179
180 return StdExpansion::BaryEvaluate<1>(coll[1], &wsp[0]);
181}
182
185 const Array<OneD, const NekDouble> &physvals)
186{
187 NekDouble val;
188 int i;
189 int nq0 = m_base[0]->GetNumPoints();
190 int nq1 = m_base[1]->GetNumPoints();
191 Array<OneD, NekDouble> wsp1(nq1);
192
193 // interpolate first coordinate direction
194 for (i = 0; i < nq1; ++i)
195 {
196 wsp1[i] =
197 Vmath::Dot(nq0, &(I[0]->GetPtr())[0], 1, &physvals[i * nq0], 1);
198 }
199
200 // interpolate in second coordinate direction
201 val = Vmath::Dot(nq1, I[1]->GetPtr(), 1, wsp1, 1);
202
203 return val;
204}
205
206/** \brief Calculate the inner product of inarray with respect to
207 * the basis B=base0*base1 and put into outarray
208 *
209 * \f$
210 * \begin{array}{rcl}
211 * I_{pq} = (\phi_p \phi_q, u) & = & \sum_{i=0}^{nq_0}
212 * \sum_{j=0}^{nq_1}
213 * \phi_p(\xi_{0,i}) \phi_q(\xi_{1,j}) w^0_i w^1_j u(\xi_{0,i}
214 * \xi_{1,j}) \\
215 * & = & \sum_{i=0}^{nq_0} \phi_p(\xi_{0,i})
216 * \sum_{j=0}^{nq_1} \phi_q(\xi_{1,j}) \tilde{u}_{i,j}
217 * \end{array}
218 * \f$
219 *
220 * where
221 *
222 * \f$ \tilde{u}_{i,j} = w^0_i w^1_j u(\xi_{0,i},\xi_{1,j}) \f$
223 *
224 * which can be implemented as
225 *
226 * \f$ f_{qi} = \sum_{j=0}^{nq_1} \phi_q(\xi_{1,j})
227 * \tilde{u}_{i,j} = {\bf B_1 U} \f$
228 * \f$ I_{pq} = \sum_{i=0}^{nq_0} \phi_p(\xi_{0,i}) f_{qi} =
229 * {\bf B_0 F} \f$
230 *
231 * This is a wrapper function around \a IProductWRTBaseKernel()
232 */
234 const Array<OneD, const NekDouble> &inarray,
235 Array<OneD, NekDouble> &outarray)
236{
237 const bool CollDir0 = m_base[0]->Collocation();
238 const bool CollDir1 = m_base[1]->Collocation();
239
240 if (CollDir0 && CollDir1)
241 {
242 v_MultiplyByStdQuadratureMetric(inarray, outarray);
243 }
244 else
245 {
246 const Array<OneD, const NekDouble> one(1, 1.0);
247 v_IProductWRTBaseKernel(m_base[0]->GetBdata(), m_base[1]->GetBdata(),
248 inarray, outarray, one, false, CollDir0,
249 CollDir1);
250 }
251}
252
254 const Array<OneD, const NekDouble> &base0,
255 const Array<OneD, const NekDouble> &base1,
256 const Array<OneD, const NekDouble> &inarray,
258 const bool Deformed, const bool CollDir0, const bool CollDir1)
259{
260 v_IProductWRTBaseKernel(base0, base1, inarray, outarray, jac, Deformed,
261 CollDir0, CollDir1);
262}
263
265{
266 ASSERTL1((dir == 0) || (dir == 1), "Invalid direction.");
267
268 const int nq0 = m_base[0]->GetNumPoints();
269 const int nq1 = m_base[1]->GetNumPoints();
270 const int nq = nq0 * nq1;
271
272 Array<OneD, NekDouble> in(nq, 0.0);
274 Array<OneD, NekDouble> one(1, 1.0);
275
276 for (int i = 0; i < nq; i++)
277 {
278 int l = i % nq0;
279 int m = (i / nq0);
280
281 // initialise with inverse of weights t
282 in[i] = 1.0 / (m_weights[0][l] * m_weights[1][m]);
283
284 // do standard iproduct
285 if (dir == 0)
286 {
287 v_IProductWRTBaseKernel(m_base[0]->GetDbdata(),
288 m_base[1]->GetBdata(), in, out, one, false,
289 false, m_base[1]->Collocation());
290 }
291 else if (dir == 1)
292 {
293 v_IProductWRTBaseKernel(m_base[0]->GetBdata(),
294 m_base[1]->GetDbdata(), in, out, one, false,
295 m_base[0]->Collocation(), false);
296 }
297 in[i] = 0.0;
298
299 for (int j = 0; j < m_ncoeffs; j++)
300 {
301 (*mat)(j, i) = out[j];
302 }
303 }
304}
305
307 const Array<OneD, const NekDouble> &inarray,
308 Array<OneD, NekDouble> &outarray)
309{
310 int nquad0 = m_base[0]->GetNumPoints();
311 int nquad1 = m_base[1]->GetNumPoints();
312
313 int cnt = 0;
314 for (int i = 0; i < nquad1; ++i)
315 {
316 for (int j = 0; j < nquad0; ++j, ++cnt)
317 {
318 outarray[cnt] = inarray[cnt] * m_weights[0][j] * m_weights[1][i];
319 }
320 }
321}
322
324 const Array<OneD, const NekDouble> &inarray,
326{
327 if (mkey.GetNVarCoeff() == 0 &&
330 {
331 using std::max;
332
333 // This implementation is only valid when there are no
334 // coefficients associated to the Laplacian operator
335 int nquad0 = m_base[0]->GetNumPoints();
336 int nquad1 = m_base[1]->GetNumPoints();
337 int nqtot = nquad0 * nquad1;
338 int nmodes0 = m_base[0]->GetNumModes();
339 int nmodes1 = m_base[1]->GetNumModes();
340 int wspsize =
341 max(max(max(nqtot, m_ncoeffs), nquad1 * nmodes0), nquad0 * nmodes1);
342
343 // Allocate temporary storage
344 Array<OneD, NekDouble> wsp0(4 * wspsize); // size wspsize
345 Array<OneD, NekDouble> wsp1(wsp0 + wspsize); // size 3*wspsize
346
347 if (!(m_base[0]->Collocation() && m_base[1]->Collocation()))
348 {
349 // LAPLACIAN MATRIX OPERATION
350 // wsp0 = u = B * u_hat
351 // wsp1 = du_dxi1 = D_xi1 * wsp0 = D_xi1 * u
352 // wsp2 = du_dxi2 = D_xi2 * wsp0 = D_xi2 * u
353 BwdTrans(inarray, wsp0);
354 LaplacianMatrixOp_MatFree_Kernel(wsp0, outarray, wsp1);
355 }
356 else
357 {
358 LaplacianMatrixOp_MatFree_Kernel(inarray, outarray, wsp1);
359 }
360 }
361 else
362 {
364 mkey);
365 }
366}
367
369 const Array<OneD, const NekDouble> &inarray,
371{
372 if (mkey.GetNVarCoeff() == 0 &&
375 {
376 using std::max;
377
378 int nquad0 = m_base[0]->GetNumPoints();
379 int nquad1 = m_base[1]->GetNumPoints();
380 int nqtot = nquad0 * nquad1;
381 int nmodes0 = m_base[0]->GetNumModes();
382 int nmodes1 = m_base[1]->GetNumModes();
383 int wspsize =
384 max(max(max(nqtot, m_ncoeffs), nquad1 * nmodes0), nquad0 * nmodes1);
386
387 // Allocate temporary storage
388 Array<OneD, NekDouble> wsp0(5 * wspsize); // size wspsize
389 Array<OneD, NekDouble> wsp1(wsp0 + wspsize); // size wspsize
390 Array<OneD, NekDouble> wsp2(wsp0 + 2 * wspsize); // size 3*wspsize
391
392 if (!(m_base[0]->Collocation() && m_base[1]->Collocation()))
393 {
394 // MASS MATRIX OPERATION
395 // The following is being calculated:
396 // wsp0 = B * u_hat = u
397 // wsp1 = W * wsp0
398 // outarray = B^T * wsp1 = B^T * W * B * u_hat = M * u_hat
399 BwdTrans(inarray, wsp0);
400 IProductWRTBase(wsp0, outarray);
401 LaplacianMatrixOp_MatFree_Kernel(wsp0, wsp1, wsp2);
402 }
403 else
404 {
405 MultiplyByQuadratureMetric(inarray, outarray);
406 LaplacianMatrixOp_MatFree_Kernel(inarray, wsp1, wsp2);
407 }
408
409 // outarray = lambda * outarray + wsp1
410 // = (lambda * M + L ) * u_hat
411 Vmath::Svtvp(m_ncoeffs, lambda, &outarray[0], 1, &wsp1[0], 1,
412 &outarray[0], 1);
413 }
414 else
415 {
417 mkey);
418 }
419}
420
422 [[maybe_unused]] const unsigned int traceid,
423 [[maybe_unused]] Array<OneD, unsigned int> &maparray)
424{
425 ASSERTL0(false,
426 "This method must be defined at the individual shape level");
427}
428
429/** \brief Determine the mapping to re-orientate the
430 coefficients along the element trace (assumed to align
431 with the standard element) into the orientation of the
432 local trace given by edgeOrient.
433 */
435 const unsigned int eid, Array<OneD, unsigned int> &maparray,
436 Array<OneD, int> &signarray, Orientation edgeOrient, int P,
437 [[maybe_unused]] int Q)
438{
439 unsigned int i;
440
441 int dir;
442 // determine basis direction for edge.
444 {
445 dir = (eid == 0) ? 0 : 1;
446 }
447 else
448 {
449 dir = eid % 2;
450 }
451
452 int numModes = m_base[dir]->GetNumModes();
453
454 // P is the desired length of the map
455 P = (P == -1) ? numModes : P;
456
457 // decalare maparray
458 if (maparray.size() != P)
459 {
460 maparray = Array<OneD, unsigned int>(P);
461 }
462
463 // fill default mapping as increasing index
464 for (i = 0; i < P; ++i)
465 {
466 maparray[i] = i;
467 }
468
469 if (signarray.size() != P)
470 {
471 signarray = Array<OneD, int>(P, 1);
472 }
473 else
474 {
475 std::fill(signarray.data(), signarray.data() + P, 1);
476 }
477
478 // Zero signmap and set maparray to zero if
479 // elemental modes are not as large as trace modes
480 for (i = numModes; i < P; ++i)
481 {
482 signarray[i] = 0.0;
483 maparray[i] = maparray[0];
484 }
485
486 if (edgeOrient == eBackwards)
487 {
488 const LibUtilities::BasisType bType = GetBasisType(dir);
489
490 if ((bType == LibUtilities::eModified_A) ||
491 (bType == LibUtilities::eModified_B))
492 {
493 std::swap(maparray[0], maparray[1]);
494
495 for (i = 3; i < std::min(P, numModes); i += 2)
496 {
497 signarray[i] *= -1;
498 }
499 }
500 else if (bType == LibUtilities::eGLL_Lagrange ||
502 {
503 ASSERTL1(P == numModes, "Different trace space edge dimension "
504 "and element edge dimension not currently "
505 "possible for GLL-Lagrange bases");
506
507 std::reverse(maparray.data(), maparray.data() + P);
508 }
509 else
510 {
511 ASSERTL0(false, "Mapping not defined for this type of basis");
512 }
513 }
514}
515
518 Array<OneD, int> &signarray,
519 Orientation edgeOrient, int P,
520 int Q)
521{
522 Array<OneD, unsigned int> map1, map2;
523 v_GetTraceCoeffMap(eid, map1);
524 v_GetElmtTraceToTraceMap(eid, map2, signarray, edgeOrient, P, Q);
525
526 if (maparray.size() != map2.size())
527 {
528 maparray = Array<OneD, unsigned int>(map2.size());
529 }
530
531 for (int i = 0; i < map2.size(); ++i)
532 {
533 maparray[i] = map1[map2[i]];
534 }
535}
536
537void StdExpansion2D::v_PhysInterp(std::shared_ptr<StdExpansion> fromExp,
538 const Array<OneD, const NekDouble> &fromData,
540 bool Transpose)
541{
542 if (Transpose)
543 {
544 LibUtilities::Interp2D(fromExp->GetBasis(0)->GetPointsKey(),
545 fromExp->GetBasis(1)->GetPointsKey(), fromData,
546 m_base[1]->GetPointsKey(),
547 m_base[0]->GetPointsKey(), toData);
548 }
549 else
550 {
551 LibUtilities::Interp2D(fromExp->GetBasis(0)->GetPointsKey(),
552 fromExp->GetBasis(1)->GetPointsKey(), fromData,
553 m_base[0]->GetPointsKey(),
554 m_base[1]->GetPointsKey(), toData);
555 }
556}
557
559 const StdRegions::Orientation orient, Array<OneD, int> &idmap,
560 const int nq0, [[maybe_unused]] const int nq1,
561 [[maybe_unused]] bool Forwards)
562{
563 if (idmap.size() != nq0)
564 {
565 idmap = Array<OneD, int>(nq0);
566 }
567 switch (orient)
568 {
570 // Fwd
571 for (int i = 0; i < nq0; ++i)
572 {
573 idmap[i] = i;
574 }
575 break;
577 {
578 // Bwd
579 for (int i = 0; i < nq0; ++i)
580 {
581 idmap[i] = nq0 - 1 - i;
582 }
583 }
584 break;
585 default:
586 ASSERTL0(false, "Unknown orientation");
587 break;
588 }
589}
590
591} // namespace Nektar::StdRegions
#define ASSERTL0(condition, msg)
#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...
#define PHYSDERIV_Q(r, i)
#define PHYSDERIV_DEF
#define STDLEV1UPDATE(r, state)
#define STDLEV1TEST(r, state)
Describes the specification for a Basis.
Definition Basis.h:45
virtual void v_IProductWRTBaseKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, NekDouble > &jac, const bool Deformed, bool CollDir0=false, bool CollDir1=false)=0
void v_GenStdMatBwdDeriv(const int dir, DNekMatSharedPtr &mat) override
NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals) override
This function evaluates the expansion at a single (arbitrary) point of the domain.
void PhysTensorDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray_d0, Array< OneD, NekDouble > &outarray_d1)
Calculate the 2D derivative in the local tensor/collapsed coordinate at the physical points.
void v_HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_GetTraceToElementMap(const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient=eForwards, int P=-1, int Q=-1) override
void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculate the inner product of inarray with respect to the basis B=base0*base1 and put into outarray.
NekDouble v_PhysEvaluateInterp(const Array< OneD, DNekMatSharedPtr > &I, const Array< OneD, const NekDouble > &physvals) override
void IProductWRTBaseKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, NekDouble > &jac, const bool Deformed, bool CollDir0=false, bool CollDir1=false)
void v_GetTraceCoeffMap(const unsigned int traceid, Array< OneD, unsigned int > &maparray) override
void v_ReOrientTracePhysMap(const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1, bool Forwards) override
void v_LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) 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.
void v_GetElmtTraceToTraceMap(const unsigned int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient, int P, int Q) override
Determine the mapping to re-orientate the coefficients along the element trace (assumed to align with...
void v_PhysInterp(std::shared_ptr< StdExpansion > fromExp, const Array< OneD, const NekDouble > &fromData, Array< OneD, NekDouble > &toData, bool Transpose) override
void LaplacianMatrixOp_MatFree_GenericImpl(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
void LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Convert local cartesian coordinate xi into local collapsed coordinates eta.
void IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
this function calculates the inner product of a given function f with the different modes of the expa...
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.
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void HelmholtzMatrixOp_MatFree_GenericImpl(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Array< OneD, LibUtilities::BasisSharedPtr > m_base
std::vector< Array< OneD, const NekDouble > > m_weights
void LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
NekDouble GetConstFactor(const ConstFactorType &factor) const
bool ConstFactorExists(const ConstFactorType &factor) const
void Interp2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
this function interpolates a 2D function evaluated at the quadrature points of the 2D basis,...
Definition Interp.cpp:101
@ eModified_B
Principle Modified Functions .
Definition BasisType.h:49
@ eGauss_Lagrange
Lagrange Polynomials using the Gauss points.
Definition BasisType.h:57
@ eGLL_Lagrange
Lagrange for SEM basis .
Definition BasisType.h:56
@ eModified_A
Principle Modified Functions .
Definition BasisType.h:48
static const NekDouble kNekZeroTol
tinysimd::scalarT< double > vec_t
static Array< OneD, NekDouble > NullNekDouble1DArray
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
std::shared_ptr< DNekMat > DNekMatSharedPtr
void CopyArray(const Array< OneD, ConstDataType > &source, Array< OneD, DataType > &dest)
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.
Definition Vmath.hpp:396
T Dot(int n, const T *w, const T *x)
dot product
Definition Vmath.hpp:761
scalarT< T > max(scalarT< T > lhs, scalarT< T > rhs)
Definition scalar.hpp:305