82 {
83 for (
unsigned int blk = 0; blk <
in.GetBlocks().size(); ++blk)
84 {
85 const unsigned int streamID = blk + 1;
86
87 auto &inblock =
in.GetBlocks()[blk];
88 auto &derivblock = deriv.GetBlocks()[blk];
89 auto &outblock =
out.GetBlocks()[blk];
90
91
92 ASSERTL1(derivblock.GetInterleaveWidth() ==
93 inblock.GetInterleaveWidth(),
94 "The state and its gradient share an interleave width");
95 outblock.template SetInterleaveWidth<TData>(
96 derivblock.GetInterleaveWidth());
97
98 auto derivbase =
99 derivblock.template GetPtr<MemSpace, ReadOnly>(streamID);
100 auto outbase =
101 outblock.template GetPtr<MemSpace, WriteOnly>(streamID);
102 auto diffCoeffBase =
103 m_diffCoeff.template GetPtr<MemSpace, ReadOnly>(streamID);
104
105 const auto npts = outblock.CompSize();
106 const auto nvarComps = inblock.GetNumComponents();
107 const auto derivStride = derivblock.CompSize();
108 const auto outStride = outblock.CompSize();
109
111 {
112 case 1:
113 DiffusionScalarVolFluxKernelLauncher<ExecSpace, 1>(
114 npts, nvarComps, derivStride, outStride, diffCoeffBase,
115 derivbase, outbase, streamID);
116 break;
117 case 2:
118 DiffusionScalarVolFluxKernelLauncher<ExecSpace, 2>(
119 npts, nvarComps, derivStride, outStride, diffCoeffBase,
120 derivbase, outbase, streamID);
121 break;
122 case 3:
123 DiffusionScalarVolFluxKernelLauncher<ExecSpace, 3>(
124 npts, nvarComps, derivStride, outStride, diffCoeffBase,
125 derivbase, outbase, streamID);
126 break;
127 default:
129 "The scalar diffusion volume flux is for one, "
130 "two and three dimensions.");
131 }
132 }
133
134 out.SetInterleaveWidth(deriv);
135 }
#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....
LibUtilities::MemoryRegion< TData > m_diffCoeff
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT in
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT out