Lines Matching refs:CeedScalar
24 CeedScalar center[3];
25 CeedScalar curr_time;
26 CeedScalar vortex_strength;
27 CeedScalar c_tau;
28 CeedScalar mean_velocity[3];
64 …QFUNCTION_HELPER int Exact_Euler(CeedInt dim, CeedScalar time, const CeedScalar X[], CeedInt Nf, C… in Exact_Euler()
67 const CeedScalar vortex_strength = context->vortex_strength; in Exact_Euler()
68 const CeedScalar *center = context->center; // Center of the domain in Exact_Euler()
69 const CeedScalar *mean_velocity = context->mean_velocity; in Exact_Euler()
72 const CeedScalar gamma = 1.4; in Exact_Euler()
73 const CeedScalar cv = 2.5; in Exact_Euler()
74 const CeedScalar R = 1.; in Exact_Euler()
75 const CeedScalar x = X[0], y = X[1]; // Coordinates in Exact_Euler()
77 const CeedScalar xc = center[0] + mean_velocity[0] * time; in Exact_Euler()
78 const CeedScalar yc = center[1] + mean_velocity[1] * time; in Exact_Euler()
80 const CeedScalar x0 = x - xc; in Exact_Euler()
81 const CeedScalar y0 = y - yc; in Exact_Euler()
82 const CeedScalar r = sqrt(x0 * x0 + y0 * y0); in Exact_Euler()
83 const CeedScalar C = vortex_strength * exp((1. - r * r) / 2.) / (2. * M_PI); in Exact_Euler()
84 …const CeedScalar delta_T = -(gamma - 1.) * vortex_strength * vortex_strength * exp(1 - r * r) / (… in Exact_Euler()
85 const CeedScalar S_vortex = 1; // no perturbation in the entropy P / rho^gamma in Exact_Euler()
86 …const CeedScalar S_bubble = (gamma - 1.) * vortex_strength * vortex_strength / (8. * gamma * M_PI … in Exact_Euler()
87 CeedScalar rho, P, T, E, u[3] = {0.}; in Exact_Euler()
182 …void ConvectiveFluxJacobian_Euler(CeedScalar dF[3][5][5], const CeedScalar rho, const CeedScalar u… in ConvectiveFluxJacobian_Euler()
183 const CeedScalar gamma) { in ConvectiveFluxJacobian_Euler()
184 CeedScalar u_sq = u[0] * u[0] + u[1] * u[1] + u[2] * u[2]; // Velocity square in ConvectiveFluxJacobian_Euler()
215 …UNCTION_HELPER void Tau_spatial(CeedScalar Tau_x[3], const CeedScalar dXdx[3][3], const CeedScalar… in Tau_spatial()
216 const CeedScalar c_tau) { in Tau_spatial()
219 …CeedScalar h = 2 / sqrt(dXdx[0][i] * dXdx[0][i] + dXdx[1][i] * dXdx[1][i] + dXdx[2][i] * dXdx[2][i… in Tau_spatial()
221 CeedScalar fastest_wave = fabs(u[i]) + sound_speed; in Tau_spatial()
229 CEED_QFUNCTION(ICsEuler)(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)… in ICsEuler()
230 const CeedScalar(*X)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[0]; in ICsEuler()
231 CeedScalar(*q0)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0]; in ICsEuler()
236 const CeedScalar x[] = {X[0][i], X[1][i], X[2][i]}; in ICsEuler()
237 CeedScalar q[5] = {0.}; in ICsEuler()
269 CEED_QFUNCTION(Euler)(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) { in Euler()
270 const CeedScalar(*q)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[0]; in Euler()
271 const CeedScalar(*dq)[5][CEED_Q_VLA] = (const CeedScalar(*)[5][CEED_Q_VLA])in[1]; in Euler()
272 const CeedScalar(*q_data) = in[2]; in Euler()
273 CeedScalar(*v)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0]; in Euler()
274 CeedScalar(*dv)[5][CEED_Q_VLA] = (CeedScalar(*)[5][CEED_Q_VLA])out[1]; in Euler()
277 const CeedScalar c_tau = context->c_tau; in Euler()
278 const CeedScalar gamma = 1.4; in Euler()
283 const CeedScalar rho = q[0][i]; in Euler()
284 const CeedScalar u[3] = {q[1][i] / rho, q[2][i] / rho, q[3][i] / rho}; in Euler()
285 const CeedScalar E = q[4][i]; in Euler()
286 const CeedScalar drho[3] = {dq[0][0][i], dq[1][0][i], dq[2][0][i]}; in Euler()
287 const CeedScalar dU[3][3] = { in Euler()
292 const CeedScalar dE[3] = {dq[0][4][i], dq[1][4][i], dq[2][4][i]}; in Euler()
293 CeedScalar wdetJ, dXdx[3][3]; in Euler()
296 CeedScalar drhodx[3] = {0.}; in Euler()
297 CeedScalar dEdx[3] = {0.}; in Euler()
298 CeedScalar dUdx[3][3] = {{0.}}; in Euler()
299 CeedScalar dXdxdXdxT[3][3] = {{0.}}; in Euler()
311 …const CeedScalar E_kinetic = 0.5 * rho * (u[0] * u[0] + u[1] * u[1] + u[2] * u[2]), E_internal = E… in Euler()
338 CeedScalar jacob_F_conv[3][5][5] = {{{0.}}}; in Euler()
342 CeedScalar dqdx[5][3]; in Euler()
350 CeedScalar strong_conv[5] = {0.}; in Euler()
359 const CeedScalar sound_speed = sqrt(gamma * P / rho); in Euler()
360 CeedScalar Tau_x[3] = {0.}; in Euler()
364 CeedScalar stab[5][3] = {{0.}}; in Euler()
389 CEED_QFUNCTION(IFunction_Euler)(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *cons… in IFunction_Euler()
390 const CeedScalar(*q)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[0]; in IFunction_Euler()
391 const CeedScalar(*dq)[5][CEED_Q_VLA] = (const CeedScalar(*)[5][CEED_Q_VLA])in[1]; in IFunction_Euler()
392 const CeedScalar(*q_dot)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[2]; in IFunction_Euler()
393 const CeedScalar(*q_data) = in[3]; in IFunction_Euler()
394 CeedScalar(*v)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0]; in IFunction_Euler()
395 CeedScalar(*dv)[5][CEED_Q_VLA] = (CeedScalar(*)[5][CEED_Q_VLA])out[1]; in IFunction_Euler()
396 CeedScalar *jac_data = out[2]; in IFunction_Euler()
399 const CeedScalar c_tau = context->c_tau; in IFunction_Euler()
400 const CeedScalar gamma = 1.4; in IFunction_Euler()
401 const CeedScalar zeros[14] = {0.}; in IFunction_Euler()
406 const CeedScalar rho = q[0][i]; in IFunction_Euler()
407 const CeedScalar u[3] = {q[1][i] / rho, q[2][i] / rho, q[3][i] / rho}; in IFunction_Euler()
408 const CeedScalar E = q[4][i]; in IFunction_Euler()
409 const CeedScalar drho[3] = {dq[0][0][i], dq[1][0][i], dq[2][0][i]}; in IFunction_Euler()
410 const CeedScalar dU[3][3] = { in IFunction_Euler()
415 const CeedScalar dE[3] = {dq[0][4][i], dq[1][4][i], dq[2][4][i]}; in IFunction_Euler()
416 CeedScalar wdetJ, dXdx[3][3]; in IFunction_Euler()
419 CeedScalar drhodx[3] = {0.}; in IFunction_Euler()
420 CeedScalar dEdx[3] = {0.}; in IFunction_Euler()
421 CeedScalar dUdx[3][3] = {{0.}}; in IFunction_Euler()
422 CeedScalar dXdxdXdxT[3][3] = {{0.}}; in IFunction_Euler()
433 …const CeedScalar E_kinetic = 0.5 * rho * (u[0] * u[0] + u[1] * u[1] + u[2] * u[2]), E_internal = E… in IFunction_Euler()
462 CeedScalar jacob_F_conv[3][5][5] = {{{0.}}}; in IFunction_Euler()
466 CeedScalar dqdx[5][3]; in IFunction_Euler()
474 CeedScalar strong_conv[5] = {0.}; in IFunction_Euler()
482 CeedScalar strong_res[5]; in IFunction_Euler()
487 const CeedScalar sound_speed = sqrt(gamma * P / rho); in IFunction_Euler()
488 CeedScalar Tau_x[3] = {0.}; in IFunction_Euler()
492 CeedScalar stab[5][3] = {{0.}}; in IFunction_Euler()
528 …UNCTION(TravelingVortex_Inflow)(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *con… in TravelingVortex_Inflow()
529 const CeedScalar(*q_data_sur) = in[2]; in TravelingVortex_Inflow()
530 CeedScalar(*v)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0]; in TravelingVortex_Inflow()
535 CeedScalar *mean_velocity = context->mean_velocity; in TravelingVortex_Inflow()
536 const CeedScalar cv = 2.5; in TravelingVortex_Inflow()
537 const CeedScalar R = 1.; in TravelingVortex_Inflow()
538 CeedScalar T_inlet; in TravelingVortex_Inflow()
539 CeedScalar P_inlet; in TravelingVortex_Inflow()
551 CeedScalar wdetJb, norm[3]; in TravelingVortex_Inflow()
556 …const CeedScalar face_normal = norm[0] * mean_velocity[0] + norm[1] * mean_velocity[1] + norm[2] *… in TravelingVortex_Inflow()
564 const CeedScalar rho_inlet = P_inlet / (R * T_inlet); in TravelingVortex_Inflow()
565 …const CeedScalar E_kinetic_inlet = (mean_velocity[0] * mean_velocity[0] + mean_velocity[1] * mean_… in TravelingVortex_Inflow()
567 const CeedScalar E_inlet = rho_inlet * (cv * T_inlet + E_kinetic_inlet); in TravelingVortex_Inflow()
589 CEED_QFUNCTION(Euler_Outflow)(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const … in Euler_Outflow()
590 const CeedScalar(*q)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[0]; in Euler_Outflow()
591 const CeedScalar(*q_data_sur) = in[2]; in Euler_Outflow()
592 CeedScalar(*v)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0]; in Euler_Outflow()
596 CeedScalar *mean_velocity = context->mean_velocity; in Euler_Outflow()
598 const CeedScalar gamma = 1.4; in Euler_Outflow()
603 const CeedScalar rho = q[0][i]; in Euler_Outflow()
604 const CeedScalar u[3] = {q[1][i] / rho, q[2][i] / rho, q[3][i] / rho}; in Euler_Outflow()
605 const CeedScalar E = q[4][i]; in Euler_Outflow()
607 CeedScalar wdetJb, norm[3]; in Euler_Outflow()
612 …const CeedScalar face_normal = norm[0] * mean_velocity[0] + norm[1] * mean_velocity[1] + norm[2] *… in Euler_Outflow()
619 const CeedScalar E_kinetic = (u[0] * u[0] + u[1] * u[1]) / 2.; in Euler_Outflow()
620 const CeedScalar P = (E - E_kinetic * rho) * (gamma - 1.); // pressure in Euler_Outflow()
621 … const CeedScalar u_normal = norm[0] * u[0] + norm[1] * u[1] + norm[2] * u[2]; // Normal velocity in Euler_Outflow()