Nektar++
Loading...
Searching...
No Matches
TraceDataWarehouse.hpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: TraceDataWarehouse.hpp
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:
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#pragma once
36
41
43{
44
45class ExpList;
46
47/// Shared pointer to an ExpList object.
48typedef std::shared_ptr<ExpList> ExpListSharedPtr;
49
50class TraceEssentialCreator;
51
57
58/**
59 * @brief Outward normals of the whole global trace, in trace block layout.
60 *
61 * One entry spanning every trace block, the blocks one after another. Each
62 * block holds every coordinate component, laid out component-major with a
63 * stride of the block's padded CompSize(): real points first, zero beyond, so
64 * block @c b starts at the sum of @c nDim*CompSize() over the blocks before it.
65 * That is the layout a Field over the trace uses internally, so a block can be
66 * copied straight into a trace Field block without rearrangement.
67 *
68 * A single entry rather than one per block: the normals come from one
69 * ExpList::GetNormals() over the whole trace, and an entry per block repeated
70 * that for every block, which made the set-up quadratic in the number of
71 * traces.
72 *
73 * This is the trace-layout counterpart of BndCondNormalKey, which holds the
74 * same quantity in boundary expansion layout for the boundary condition
75 * operators. A trace flux operator works over the trace and wants this one.
76 */
77template <typename TData>
79{
81
82public:
84 typedef TData value_type;
85
86 ~GlobalTraceNormalKey() override = default;
87
89 {
90 hash_combine(m_hash, typeid(value_type).name(), "GlobalTraceNormalKey");
91 }
92};
93
94/**
95 * @brief Each element's outward unit normals on its own traces, in the
96 * element-local trace layout of one element block at one interleave width.
97 *
98 * The layout is that of a Field over GetLocTraceBlockAttributes() (the
99 * element's own trace points, not the Gauss-Lobatto ones) at
100 * @c interleave_width: component-major, @c nDim components, each of the
101 * block's padded CompSize(); within a component, groups of
102 * @c interleave_width elements, point-major with one element per lane, the
103 * traces of an element in ShapeTypeTraceIDInDir order, each in the element's
104 * own trace frame (Expansion::GetTraceNormal()). Zero on padding elements.
105 * An operator acting on an element-local trace field at that width reads it
106 * point for point with the field.
107 */
108template <typename TData>
110{
112
113public:
115 typedef TData value_type;
116
117 ~LocalTraceNormalKey() override = default;
118
119 LocalTraceNormalKey(const unsigned int block_idx,
120 const unsigned int interleave_width)
121 : m_block_idx(block_idx), m_interleave_width(interleave_width)
122 {
124 typeid(value_type).name(), "LocalTraceNormalKey");
125 }
126
127private:
128 unsigned int m_block_idx;
129 unsigned int m_interleave_width;
130};
131
132/**
133 * @brief Outward normals of one boundary region, in that region's boundary
134 * expansion layout.
135 *
136 * The boundary counterpart of GlobalTraceNormalKey, which is in global trace
137 * layout. A boundary condition operator works in the storage layout of
138 * BndCondPhysOp - one block per region, in boundary expansion order - and
139 * never sees the trace, so it cannot use the trace-layout normals.
140 *
141 * Keyed on the *region* ordinal, which indexes GetBndCondExpansions(). That is
142 * not the same as a BndCondPhysOp block index once periodic regions are
143 * skipped, so the caller must pass the ordinal it recorded at construction
144 * rather than the block index.
145 */
146template <typename TData> class BndCondNormalKey : public LibUtilities::BaseKey
147{
149
150public:
152 typedef TData value_type;
153
154 ~BndCondNormalKey() override = default;
155
156 BndCondNormalKey(const unsigned int region_idx) : m_region_idx(region_idx)
157 {
159 "BndCondNormalKey");
160 }
161
162private:
163 unsigned int m_region_idx;
164};
165
166template <typename TData> class IPTraceScalarKey : public LibUtilities::BaseKey
167{
169
170public:
172 typedef TData value_type;
173
174 ~IPTraceScalarKey() override = default;
175
176 IPTraceScalarKey(const unsigned int block_idx, const IPTraceScalarData type)
177 : m_block_idx(block_idx), m_type(type)
178 {
179 hash_combine(m_hash, m_block_idx, static_cast<unsigned int>(m_type),
180 typeid(value_type).name(), "IPTraceScalarKey");
181 }
182
183private:
184 unsigned int m_block_idx;
186};
187
188template <typename TData>
190{
192
193public:
195 typedef TData value_type;
196
197 ~IPTraceDerivBaseKey() override = default;
198
199 // Stores the physical derivative of each elemental basis function on the
200 // local trace, multiplied by the trace quadrature metric. The scalar IP
201 // symmetric term uses this as:
202 // sum_p jump(p) * (D n)_d(p) * dphi_i/dx_d(p) * wJ_trace(p).
203 // Layout is [direction][coefficient][local trace point] for one element
204 // block shape.
205 IPTraceDerivBaseKey(const unsigned int block_idx) : m_block_idx(block_idx)
206 {
207 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
208 "IPTraceDerivBaseKey");
209 }
210
211private:
212 unsigned int m_block_idx;
213};
214
215template <typename TData>
217{
219
220public:
222 typedef unsigned int value_type;
223
224 ~LocTracePhysToElmtMapsKey() override = default;
225
226 LocTracePhysToElmtMapsKey(const unsigned int block_idx,
227 const unsigned int interleave_width)
228 : m_block_idx(block_idx), m_interleave_width(interleave_width)
229 {
231 typeid(value_type).name(), "LocTracePhysToElmtMapsKey");
232 }
233
234private:
235 unsigned int m_block_idx;
236 unsigned int m_interleave_width;
237};
238
239template <typename TData>
241{
243
244public:
246 typedef unsigned int value_type;
247
248 ~OrientationMapsKey() override = default;
249
250 OrientationMapsKey(const unsigned int block_idx,
251 const unsigned int interleave_width)
252 : m_block_idx(block_idx), m_interleave_width(interleave_width)
253 {
255 typeid(value_type).name(), "OrientationMapsKey");
256 }
257
258private:
259 unsigned int m_block_idx;
260 unsigned int m_interleave_width;
261};
262
263template <typename TData>
265{
267
268public:
270 typedef size_t value_type;
271
272 ~OrientationMapsOffsetKey() override = default;
273
274 OrientationMapsOffsetKey(const unsigned int block_idx,
275 const unsigned int interleave_width)
276 : m_block_idx(block_idx), m_interleave_width(interleave_width)
277 {
279 typeid(value_type).name(), "OrientationMapsOffsetKey");
280 }
281
282private:
283 unsigned int m_block_idx;
284 unsigned int m_interleave_width;
285};
286
287/**
288 * @brief The point maps of the element-local traces with @p nq0 by @p nq1
289 * points (@p nq0 points for an edge, one for a point trace), one per
290 * orientation: row `orient` of `StdRegions::SIZE_Orientation` rows of
291 * `nq0 * nq1` entries holds, for each global-trace point, the local point
292 * that lands there (@p forwards) or, for each local point, the global point
293 * it takes (not @p forwards). Rows of orientations that do not apply to the
294 * trace dimension hold the identity. The trace flux operators read every
295 * collocated trace through these, by the trace's orientation; one table
296 * per point set serves every operator on the expansion list.
297 */
298template <typename TData> class TracePointMapKey : public LibUtilities::BaseKey
299{
301
302public:
304 typedef unsigned int value_type;
305
306 ~TracePointMapKey() override = default;
307
308 TracePointMapKey(const unsigned int traceDim, const unsigned int nq0,
309 const unsigned int nq1, const bool forwards)
310 : m_traceDim(traceDim), m_nq0(nq0), m_nq1(nq1), m_forwards(forwards)
311 {
313 typeid(value_type).name(), "TracePointMapKey");
314 }
315
316private:
317 unsigned int m_traceDim;
318 unsigned int m_nq0;
319 unsigned int m_nq1;
321};
322
323template <typename TData>
325{
327
328public:
330 typedef size_t value_type;
331
332 ~LocToTracePhysOffsetKey() override = default;
333
334 LocToTracePhysOffsetKey(const unsigned int block_idx,
335 const unsigned int interleave_width)
336 : m_block_idx(block_idx), m_interleave_width(interleave_width)
337 {
339 typeid(value_type).name(), "LocToTracePhysOffsetKey");
340 }
341
342private:
343 unsigned int m_block_idx;
344 unsigned int m_interleave_width;
345};
346
347template <typename TData>
349{
351
352public:
354 typedef bool value_type;
355
356 ~IsLocTraceLeftAdjacentKey() override = default;
357
358 IsLocTraceLeftAdjacentKey(const unsigned int block_idx,
359 const unsigned int interleave_width)
360 : m_block_idx(block_idx), m_interleave_width(interleave_width)
361 {
363 typeid(value_type).name(), "IsLocTraceLeftAdjacentKey");
364 }
365
366private:
367 unsigned int m_block_idx;
368 unsigned int m_interleave_width;
369};
370
371template <typename TData>
373{
375
376public:
378 typedef unsigned int value_type;
379
380 ~InterpTraceIndexKey() override = default;
381
382 InterpTraceIndexKey(const unsigned int block_idx,
383 const unsigned int interleave_width)
384 : m_block_idx(block_idx), m_interleave_width(interleave_width)
385 {
387 typeid(value_type).name(), "InterpTraceIndexKey");
388 }
389
390private:
391 unsigned int m_block_idx;
392 unsigned int m_interleave_width;
393};
394
395template <typename TData> class InterpPointsKey : public LibUtilities::BaseKey
396{
398
399public:
401 typedef unsigned int value_type;
402
403 ~InterpPointsKey() override = default;
404
405 InterpPointsKey(const unsigned int block_idx) : m_block_idx(block_idx)
406 {
407 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
408 "InterpPointsKey");
409 }
410
411private:
412 unsigned int m_block_idx;
413};
414
415template <typename TData> class InterpTypesKey : public LibUtilities::BaseKey
416{
418
419public:
421 typedef unsigned int value_type;
422
423 ~InterpTypesKey() override = default;
424
425 InterpTypesKey(const unsigned int block_idx) : m_block_idx(block_idx)
426 {
427 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
428 "InterpTypesKey");
429 }
430
431private:
432 unsigned int m_block_idx;
433};
434
435template <typename TData> class QuadRangeKey : public LibUtilities::BaseKey
436{
438
439public:
441 typedef unsigned int value_type;
442
443 ~QuadRangeKey() override = default;
444
445 QuadRangeKey(const unsigned int block_idx) : m_block_idx(block_idx)
446 {
447 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
448 "QuadRangeKey");
449 }
450
451private:
452 unsigned int m_block_idx;
453};
454
455template <typename TData> class InterpTraceKey : public LibUtilities::BaseKey
456{
458
459public:
462
463 ~InterpTraceKey() override = default;
464
465 InterpTraceKey(const unsigned int block_idx) : m_block_idx(block_idx)
466 {
467 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
468 "InterpTraceKey");
469 }
470
471private:
472 unsigned int m_block_idx;
473};
474
475template <typename TData> class InterpTraceI0Key : public LibUtilities::BaseKey
476{
478
479public:
481 typedef TData value_type;
482
483 ~InterpTraceI0Key() override = default;
484
485 InterpTraceI0Key(const unsigned int block_idx) : m_block_idx(block_idx)
486 {
487 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
488 "InterpTraceI0Key");
489 }
490
491private:
492 unsigned int m_block_idx;
493};
494
495template <typename TData>
497{
499
500public:
502 typedef unsigned int value_type;
503
504 ~InterpTraceI0OffsetKey() override = default;
505
506 InterpTraceI0OffsetKey(const unsigned int block_idx)
507 : m_block_idx(block_idx)
508 {
509 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
510 "InterpTraceI0OffsetKey");
511 }
512
513private:
514 unsigned int m_block_idx;
515};
516
517template <typename TData> class InterpTraceI1Key : public LibUtilities::BaseKey
518{
520
521public:
523 typedef TData value_type;
524
525 ~InterpTraceI1Key() override = default;
526
527 InterpTraceI1Key(const unsigned int block_idx) : m_block_idx(block_idx)
528 {
529 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
530 "InterpTraceI1Key");
531 }
532
533private:
534 unsigned int m_block_idx;
535};
536
537template <typename TData>
539{
541
542public:
544 typedef unsigned int value_type;
545
546 ~InterpTraceI1OffsetKey() override = default;
547
548 InterpTraceI1OffsetKey(const unsigned int block_idx)
549 : m_block_idx(block_idx)
550 {
551 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
552 "InterpTraceI1OffsetKey");
553 }
554
555private:
556 unsigned int m_block_idx;
557};
558
559template <typename TData>
561{
563
564public:
566 typedef TData value_type;
567
568 ~InterpFromTraceI0Key() override = default;
569
570 InterpFromTraceI0Key(const unsigned int block_idx) : m_block_idx(block_idx)
571 {
572 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
573 "InterpFromTraceI0Key");
574 }
575
576private:
577 unsigned int m_block_idx;
578};
579
580template <typename TData>
582{
584
585public:
588
589 ~InterpFromTraceI1Key() override = default;
590
591 InterpFromTraceI1Key(const unsigned int block_idx) : m_block_idx(block_idx)
592 {
593 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
594 "InterpFromTraceI1Key");
595 }
596
597private:
598 unsigned int m_block_idx;
599};
600
601template <typename TData> class InterpEndPtI0Key : public LibUtilities::BaseKey
602{
604
605public:
607 typedef TData value_type;
608
609 ~InterpEndPtI0Key() override = default;
610
611 InterpEndPtI0Key(const unsigned int block_idx) : m_block_idx(block_idx)
612 {
613 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
614 "InterpEndPtI0Key");
615 }
616
617private:
618 unsigned int m_block_idx;
619};
620
621template <typename TData>
623{
625
626public:
628 typedef unsigned int value_type;
629
630 ~InterpEndPtI0OffsetKey() override = default;
631
632 InterpEndPtI0OffsetKey(const unsigned int block_idx)
633 : m_block_idx(block_idx)
634 {
635 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
636 "InterpEndPtI0OffsetKey");
637 }
638
639private:
640 unsigned int m_block_idx;
641};
642
643template <typename TData> class InterpEndPtI1Key : public LibUtilities::BaseKey
644{
646
647public:
649 typedef TData value_type;
650
651 ~InterpEndPtI1Key() override = default;
652
653 InterpEndPtI1Key(const unsigned int block_idx) : m_block_idx(block_idx)
654 {
655 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
656 "InterpEndPtI1Key");
657 }
658
659private:
660 unsigned int m_block_idx;
661};
662
663template <typename TData>
665{
667
668public:
670 typedef unsigned int value_type;
671
672 ~InterpEndPtI1OffsetKey() override = default;
673
674 InterpEndPtI1OffsetKey(const unsigned int block_idx)
675 : m_block_idx(block_idx)
676 {
677 hash_combine(m_hash, m_block_idx, typeid(value_type).name(),
678 "InterpEndPtI1OffsetKey");
679 }
680
681private:
682 unsigned int m_block_idx;
683};
684
685template <typename TData> class Interp1DKey : public LibUtilities::BaseKey
686{
688
689public:
691 typedef TData value_type;
692
693 ~Interp1DKey() override = default;
694
696 const LibUtilities::PointsKey toKey)
697 : m_fromKey(fromKey), m_toKey(toKey)
698 {
700 typeid(value_type).name(), "Interp1DKey");
701 }
702
703private:
706};
707
708template <typename TData> class Interp2DKey : public LibUtilities::BaseKey
709{
711
712public:
714 typedef TData value_type;
715
716 ~Interp2DKey() override = default;
717
719 const LibUtilities::PointsKey fromKey1,
720 const LibUtilities::PointsKey toKey0,
721 const LibUtilities::PointsKey toKey1)
722 : m_fromKey0(fromKey0), m_fromKey1(fromKey1), m_toKey0(toKey0),
723 m_toKey1(toKey1)
724 {
727 m_toKey1.GetNumPoints(), typeid(value_type).name(),
728 "Interp2DKey");
729 }
730
731private:
736};
737
739{
740public:
741 ~TraceEssentialCreator() override = default;
743 : m_expansionList(expansionList)
744 {
745 }
746
747 template <typename MemSpace, typename TData>
749 const LocTracePhysToElmtMapsKey<TData> &locTracePhysToElmtMapsKey);
750
751 template <typename MemSpace, typename TData>
753 const OrientationMapsKey<TData> &orientationMapsKey);
754
755 template <typename MemSpace, typename TData>
757 const OrientationMapsOffsetKey<TData> &orientationMapsOffsetKey);
758
759 template <typename MemSpace, typename TData>
761 const TracePointMapKey<TData> &tracePointMapKey);
762
763 template <typename MemSpace, typename TData>
765 const LocToTracePhysOffsetKey<TData> &locToTracePhysOffsetKey);
766
767 template <typename MemSpace, typename TData>
769 const IsLocTraceLeftAdjacentKey<TData> &isLocTraceLeftAdjacentKey);
770
771 template <typename MemSpace, typename TData>
773 const InterpTraceIndexKey<TData> &interpTraceIndexKey);
774
775 template <typename MemSpace, typename TData>
777 const InterpPointsKey<TData> &interpPointsKey);
778
779 template <typename MemSpace, typename TData>
781 const InterpTypesKey<TData> &interpTypesKey);
782
783 template <typename MemSpace, typename TData>
785 const QuadRangeKey<TData> &quadRangeKey);
786
787 template <typename MemSpace, typename TData>
789 const InterpTraceKey<TData> &interpTraceKey);
790
791 template <typename MemSpace, typename TData>
793 const InterpTraceI0Key<TData> &interpTraceI0Key);
794
795 template <typename MemSpace, typename TData>
797 const InterpTraceI0OffsetKey<TData> &interpTraceI0OffsetKey);
798
799 template <typename MemSpace, typename TData>
801 const InterpTraceI1Key<TData> &interpTraceI1Key);
802
803 template <typename MemSpace, typename TData>
805 const InterpTraceI1OffsetKey<TData> &interpTraceI1OffsetKey);
806
807 template <typename MemSpace, typename TData>
809 const InterpFromTraceI0Key<TData> &interpFromTraceI0Key);
810
811 template <typename MemSpace, typename TData>
813 const InterpFromTraceI1Key<TData> &interpFromTraceI1Key);
814
815 template <typename MemSpace, typename TData>
817 const InterpEndPtI0Key<TData> &interpEndPtI0Key);
818
819 template <typename MemSpace, typename TData>
821 const InterpEndPtI0OffsetKey<TData> &interpEndPtI0OffsetKey);
822
823 template <typename MemSpace, typename TData>
825 const InterpEndPtI1Key<TData> &interpEndPtI1Key);
826
827 template <typename MemSpace, typename TData>
829 const InterpEndPtI1OffsetKey<TData> &interpEndPtI1OffsetKey);
830
831 template <typename MemSpace, typename TData>
833 const Interp1DKey<TData> &interp1DKey);
834
835 template <typename MemSpace, typename TData>
837 const Interp2DKey<TData> &interp2DKey);
838
839 template <typename MemSpace, typename TData>
841 const GlobalTraceNormalKey<TData> &globalTraceNormalKey);
842
843 template <typename MemSpace, typename TData>
845 const BndCondNormalKey<TData> &bndCondNormalKey);
846
847 template <typename MemSpace, typename TData>
849 const LocalTraceNormalKey<TData> &localTraceNormalKey);
850
851 template <typename MemSpace, typename TData>
853 const IPTraceScalarKey<TData> &ipTraceScalarKey);
854
855 template <typename MemSpace, typename TData>
857 const IPTraceDerivBaseKey<TData> &ipTraceDerivBaseKey);
858
859 inline static const std::string m_name = "TraceEssentialCreator";
860
861private:
863};
864
866{
867public:
869
870 NEK_DEVICE_INLINE PermuteKernel(const unsigned int orient,
871 const unsigned int nq0,
872 const unsigned int nq1 = 1)
873 {
874 InitCoeffs(orient, nq0, nq1);
875 }
876
877 NEK_DEVICE_INLINE void InitCoeffs(const unsigned int orient,
878 const unsigned int nq0,
879 const unsigned int nq1 = 1)
880 {
881 m_nq0 = nq0;
882 m_nq1 = nq1;
883 if (orient >= 5) // 2D face
884 {
885 if (orient >= 9) // swap if transposed
886 {
887 m_nq0 = nq1;
888 m_nq1 = nq0;
889 }
890 unsigned int isTransposed =
891 (orient - 5) / 4; // 1 if transposed, 0 otherwise
892 unsigned int isDir1Bwd =
893 ((orient - 5) / 2) % 2; // 1 for bwd, 0 otherwise
894 unsigned int isDir2Bwd = (orient - 5) % 2; // 1 for bwd, 0 otherwise
895
896 m_coeffA = (1 - isTransposed) * (1 - 2 * isDir1Bwd) +
897 isTransposed * nq0 * (1 - 2 * isDir1Bwd);
898 m_coeffB = isTransposed * (1 - 2 * isDir2Bwd) +
899 (1 - isTransposed) * nq0 * (1 - 2 * isDir2Bwd);
900 m_coeffC = (isDir1Bwd * (nq0 - 1) * nq0 + isDir2Bwd * (nq1 - 1)) *
901 isTransposed +
902 (isDir1Bwd * (nq0 - 1) + isDir2Bwd * (nq1 - 1) * nq0) *
903 (1 - isTransposed);
904 }
905 else // 1D edge
906 {
907 if (orient == 3)
908 {
909 m_coeffA = 1; // result is i
910 m_coeffB = 0;
911 m_coeffC = 0;
912 }
913 else if (orient == 4)
914 {
915 m_coeffA = -1; // result is nq0 - i - 1
916 m_coeffB = 0;
917 m_coeffC = nq0 - 1;
918 }
919 }
920 }
921
923 const unsigned int &i, const unsigned int &j) const
924 {
925 return i * m_coeffA + j * m_coeffB + m_coeffC;
926 }
927
928 template <typename T>
930 const T *in, T *out, unsigned int nvars = 1) const
931 {
932 for (unsigned int j = 0; j < m_nq1; ++j)
933 {
934 for (unsigned int i = 0; i < m_nq0; ++i)
935 {
936 for (unsigned int v = 0; v < nvars; ++v)
937 {
938 out[(i + j * m_nq0) * nvars + v] =
939 in[(i * m_coeffA + j * m_coeffB + m_coeffC) * nvars +
940 v];
941 }
942 }
943 }
944 }
945
946private:
947 unsigned int m_nq0 = 1, m_nq1 = 1;
948 int m_coeffA = 0, m_coeffB = 0, m_coeffC = 0;
949};
950
951} // namespace Nektar::MultiRegions
#define NEK_DEVICE_INLINE
Definition Backends.hpp:283
A MemoryRegion represents a memory region.
Defines a specification for a set of points.
Definition Points.h:50
size_t GetNumPoints() const
Definition Points.h:85
Outward normals of one boundary region, in that region's boundary expansion layout.
BndCondNormalKey(const unsigned int region_idx)
Outward normals of the whole global trace, in trace block layout.
IPTraceDerivBaseKey(const unsigned int block_idx)
IPTraceScalarKey(const unsigned int block_idx, const IPTraceScalarData type)
Interp1DKey(const LibUtilities::PointsKey fromKey, const LibUtilities::PointsKey toKey)
Interp2DKey(const LibUtilities::PointsKey fromKey0, const LibUtilities::PointsKey fromKey1, const LibUtilities::PointsKey toKey0, const LibUtilities::PointsKey toKey1)
InterpEndPtI0Key(const unsigned int block_idx)
InterpEndPtI0OffsetKey(const unsigned int block_idx)
InterpEndPtI1Key(const unsigned int block_idx)
InterpEndPtI1OffsetKey(const unsigned int block_idx)
InterpFromTraceI0Key(const unsigned int block_idx)
InterpFromTraceI1Key(const unsigned int block_idx)
InterpPointsKey(const unsigned int block_idx)
InterpTraceI0Key(const unsigned int block_idx)
InterpTraceI0OffsetKey(const unsigned int block_idx)
InterpTraceI1Key(const unsigned int block_idx)
InterpTraceI1OffsetKey(const unsigned int block_idx)
InterpTraceIndexKey(const unsigned int block_idx, const unsigned int interleave_width)
InterpTraceKey(const unsigned int block_idx)
InterpTypesKey(const unsigned int block_idx)
IsLocTraceLeftAdjacentKey(const unsigned int block_idx, const unsigned int interleave_width)
LocToTracePhysOffsetKey(const unsigned int block_idx, const unsigned int interleave_width)
LocTracePhysToElmtMapsKey(const unsigned int block_idx, const unsigned int interleave_width)
Each element's outward unit normals on its own traces, in the element-local trace layout of one eleme...
LocalTraceNormalKey(const unsigned int block_idx, const unsigned int interleave_width)
OrientationMapsKey(const unsigned int block_idx, const unsigned int interleave_width)
OrientationMapsOffsetKey(const unsigned int block_idx, const unsigned int interleave_width)
NEK_DEVICE_INLINE PermuteKernel()=default
NEK_DEVICE_INLINE void InitCoeffs(const unsigned int orient, const unsigned int nq0, const unsigned int nq1=1)
NEK_DEVICE_INLINE void PermuteTraceToLocTrace2DKernel(const T *in, T *out, unsigned int nvars=1) const
NEK_DEVICE_INLINE unsigned int GetLocTraceToTraceIndex(const unsigned int &i, const unsigned int &j) const
NEK_DEVICE_INLINE PermuteKernel(const unsigned int orient, const unsigned int nq0, const unsigned int nq1=1)
QuadRangeKey(const unsigned int block_idx)
TraceEssentialCreator(const ExpListSharedPtr &expansionList)
LibUtilities::MemoryRegion< unsigned int > Create(const LocTracePhysToElmtMapsKey< TData > &locTracePhysToElmtMapsKey)
The point maps of the element-local traces with nq0 by nq1 points (nq0 points for an edge,...
TracePointMapKey(const unsigned int traceDim, const unsigned int nq0, const unsigned int nq1, const bool forwards)
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
void hash_combine(std::size_t &seed)
Definition HashUtils.hpp:45
std::shared_ptr< DNekMat > DNekMatSharedPtr