Lines Matching +full:- +full:f

1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
25 …alar Tf_cheb[BLASIUS_MAX_N_CHEBYSHEV]; // !< Chebyshev coefficient for f
26 …CeedScalar Th_cheb[BLASIUS_MAX_N_CHEBYSHEV - 1]; // !< Chebyshev coefficien…
33 …QFUNCTION_HELPER void ChebyshevEval(int N, const double *Tf, double x, double eta_max, double *f) { in ChebyshevEval() argument
35 // Chebyshev polynomials T_0, T_1, T_2 of the first kind in (-1,1) in ChebyshevEval()
37 {1, x, 2 * x * x - 1}, in ChebyshevEval()
43 // i-th derivative of f in ChebyshevEval()
44 f[i] = table[i][0] * Tf[0] + table[i][1] * Tf[1] + table[i][2] * Tf[2]; in ChebyshevEval()
47 // T_n(x) = 2xT_{n-1}(x) - T_{n-2}(x) in ChebyshevEval()
48 table[0][i % 3] = 2 * x * table[0][(i - 1) % 3] - table[0][(i - 2) % 3]; in ChebyshevEval()
51 // T'_{n}(x)/n = 2T_{n-1}(x) + T'_{n-2}(x)/n-2 in ChebyshevEval()
52 table[j][i % 3] = i * (2 * table[j - 1][(i - 1) % 3] + table[j][(i - 2) % 3] / (i - 2)); in ChebyshevEval()
55 f[j] += table[j][i % 3] * Tf[i]; in ChebyshevEval()
59 // Transform derivatives from Chebyshev [-1, 1] to [0, eta_max]. in ChebyshevEval()
60 for (int j = 0; j < i; j++) f[i] *= dX_deta; in ChebyshevEval()
69 CeedInt N = blasius->n_cheb; in BlasiusSolution()
70 CeedScalar mu = blasius->newt_ctx.gas.mu; in BlasiusSolution()
71 State S_infty = blasius->S_infty; in BlasiusSolution()
74 CeedScalar eta = x[1] * sqrt(U_infty / (nu * (x0 + x[0] - x_inflow))); in BlasiusSolution()
75 CeedScalar X = 2 * (eta / blasius->eta_max) - 1.; in BlasiusSolution()
76 CeedScalar Rd = GasConstant(blasius->newt_ctx.gas); in BlasiusSolution()
78 CeedScalar f[4], h[4]; in BlasiusSolution() local
79 ChebyshevEval(N, blasius->Tf_cheb, X, blasius->eta_max, f); in BlasiusSolution()
80 ChebyshevEval(N - 1, blasius->Th_cheb, X, blasius->eta_max, h); in BlasiusSolution()
82 *t12 = mu * U_infty * f[2] * sqrt(U_infty / (nu * (x0 + x[0] - x_inflow))); in BlasiusSolution()
85 Y[1] = U_infty * f[1]; in BlasiusSolution()
86 Y[2] = 0.5 * sqrt(nu * U_infty / (x0 + x[0] - x_inflow)) * (eta * f[1] - f[0]); in BlasiusSolution()
90 return StateFromY(blasius->newt_ctx.gas, Y); in BlasiusSolution()
101 const NewtonianIGProperties gas = context->newt_ctx.gas; in ICsBlasius()
102 const CeedScalar mu = context->newt_ctx.gas.mu; in ICsBlasius()
103 const CeedScalar delta0 = context->delta0; in ICsBlasius()
104 const CeedScalar x_inflow = context->x_inflow; in ICsBlasius()
107 const State S_infty = context->S_infty; in ICsBlasius()
117 StateToQ(gas, s, q, context->newt_ctx.state_var); in ICsBlasius()
131 const bool is_implicit = context->implicit; in Blasius_Inflow()
132 const NewtonianIGProperties gas = context->newt_ctx.gas; in Blasius_Inflow()
133 State S_infty = context->S_infty; in Blasius_Inflow()
136 …const CeedScalar x0 = U_infty * rho_0 / (gas.mu * 25 / Square(context->delta0)… in Blasius_Inflow()
141 wdetJb *= is_implicit ? -1. : 1.; in Blasius_Inflow()
146 State s = BlasiusSolution(context, x, x0, context->x_inflow, rho_0, &t12); in Blasius_Inflow()
152 if (context->weakT) { // density from the current solution in Blasius_Inflow()
171 for (CeedInt j = 0; j < 5; j++) v[j][i] = -wdetJb * Flux[j]; in Blasius_Inflow()
184 const NewtonianIGProperties gas = context->newt_ctx.gas; in Blasius_Inflow_Jacobian()
185 const bool is_implicit = context->implicit; in Blasius_Inflow_Jacobian()
188 const State S_infty = context->S_infty; in Blasius_Inflow_Jacobian()
191 …const CeedScalar x0 = U_infty * rho_0 / (gas.mu * 25 / Square(context->delta0)… in Blasius_Inflow_Jacobian()
196 wdetJb *= is_implicit ? -1. : 1.; in Blasius_Inflow_Jacobian()
205 if (context->weakT) { in Blasius_Inflow_Jacobian()
216 dP = dE * (gamma - 1.); in Blasius_Inflow_Jacobian()
221 v[0][i] = -wdetJb * drho * u_normal; in Blasius_Inflow_Jacobian()
223 v[j + 1][i] = -wdetJb * (drho * u_normal * s.Y.velocity[j] + normal[j] * dP); in Blasius_Inflow_Jacobian()
225 v[4][i] = -wdetJb * u_normal * (dE + dP); in Blasius_Inflow_Jacobian()