18 template <
typename memoryType>
32 real gamma = intgSchm.gamma[subStep],
33 zeta = intgSchm.zeta[subStep],
34 alpha = intgSchm.alphaExplicit[subStep],
35 nu = (*paramDB)[
"flow"][
"nu"].get<
real>();
37 if (timeStep == (*paramDB)[
"simulation"][
"startStep"].get<
int>())
44 real *H_r = thrust::raw_pointer_cast(&H[0]),
45 *q_r = thrust::raw_pointer_cast(&q[0]),
46 *rn_r = thrust::raw_pointer_cast(&rn[0]),
47 *dxD = thrust::raw_pointer_cast(&(domInfo->dxD[0])),
48 *dyD = thrust::raw_pointer_cast(&(domInfo->dyD[0]));
50 real *xminus = thrust::raw_pointer_cast(&(bc[
XMINUS][0])),
51 *xplus = thrust::raw_pointer_cast(&(bc[
XPLUS][0])),
52 *yminus = thrust::raw_pointer_cast(&(bc[
YMINUS][0])),
53 *yplus = thrust::raw_pointer_cast(&(bc[
YPLUS][0]));
58 real dt = (*paramDB)[
"simulation"][
"dt"].get<
real>();
62 dim3 dimGridx(
int( (nx-1-0.5)/(
BSZ-2) ) + 1,
int( (ny-0.5)/(
BSZ-2) ) + 1 ),
63 dimGridy(
int( (nx-0.5)/(
BSZ-2) ) + 1,
int( (ny-1-0.5)/(
BSZ-2) ) + 1 );
69 kernels::convectionTermU <<<dimGridx, dimBlock>>> (rn_r, H_r, q_r, nx, ny, dxD, dyD, dt, gamma, zeta, alpha, nu);
70 kernels::convectionTermV <<<dimGridy, dimBlock>>> (rn_r, H_r, q_r, nx, ny, dxD, dyD, dt, gamma, zeta, alpha, nu);
72 dim3 dimGridbc(
int((nx+ny-0.5)/(
BSZ*
BSZ))+1, 1);
73 dim3 dimBlockbc(BSZ*BSZ, 1);
76 kernels::convectionTermUBottomTop <<<dimGridbc, dimBlockbc>>> (rn_r, H_r, q_r, nx, ny, dxD, dyD, dt, gamma, zeta, alpha, nu, yminus, yplus, xminus, xplus);
77 kernels::convectionTermVBottomTop <<<dimGridbc, dimBlockbc>>> (rn_r, H_r, q_r, nx, ny, dxD, dyD, dt, gamma, zeta, alpha, nu, yminus, yplus);
80 kernels::convectionTermULeftRight <<<dimGridbc, dimBlockbc>>> (rn_r, H_r, q_r, nx, ny, dxD, dyD, dt, gamma, zeta, alpha, nu, xminus, xplus);
81 kernels::convectionTermVLeftRight <<<dimGridbc, dimBlockbc>>> (rn_r, H_r, q_r, nx, ny, dxD, dyD, dt, gamma, zeta, alpha, nu, yminus, yplus, xminus, xplus);
88 template <
typename memoryType>
91 logger.startTimer(
"generateRN");
93 calculateExplicitQTerms();
94 calculateExplicitLambdaTerms();
96 logger.stopTimer(
"generateRN");
Declaration of the kernels to generate the explicit terms of the momentum equation.
double real
Is a float or a double depending on the machine precision.
virtual void calculateExplicitLambdaTerms()
Doing nothing. Used in methods that use the explicit pressure term in the intermediate velocity solve...
void calculateExplicitQTerms()
void generateRN()
Generates explicit terms of the momentum equation.