Lines Matching +full:- +full:s
1 // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
4 // SPDX-License-Identifier: BSD-2-Clause
28 CeedScalar(*jac_data_sur) = context->newtonian_ctx.is_implicit ? out[1] : NULL; in Freestream()
30 const NewtonianIdealGasContext newt_ctx = &context->newtonian_ctx; in Freestream()
31 const bool is_implicit = newt_ctx->is_implicit; in Freestream()
35 const State s = StateFromQ(newt_ctx, qi, state_var); in Freestream() local
39 wdetJb *= is_implicit ? -1. : 1.; in Freestream()
44 flux = RiemannFlux_HLL(newt_ctx, s, context->S_infty, normal); in Freestream()
47 flux = RiemannFlux_HLLC(newt_ctx, s, context->S_infty, normal); in Freestream()
52 for (CeedInt j = 0; j < 5; j++) v[j][i] = -wdetJb * Flux[j]; in Freestream()
96 const NewtonianIdealGasContext newt_ctx = &context->newtonian_ctx; in Freestream_Jacobian()
97 const bool is_implicit = newt_ctx->is_implicit; in Freestream_Jacobian()
103 wdetJb *= is_implicit ? -1. : 1.; in Freestream_Jacobian()
108 State s = StateFromQ(newt_ctx, qi, state_var); in Freestream_Jacobian() local
109 State ds = StateFromQ_fwd(newt_ctx, s, dqi, state_var); in Freestream_Jacobian()
114 dflux = RiemannFlux_HLL_fwd(newt_ctx, s, ds, context->S_infty, dS_infty, normal); in Freestream_Jacobian()
117 dflux = RiemannFlux_HLLC_fwd(newt_ctx, s, ds, context->S_infty, dS_infty, normal); in Freestream_Jacobian()
122 for (CeedInt j = 0; j < 5; j++) v[j][i] = -wdetJb * dFlux[j]; in Freestream_Jacobian()
153 // softplus(x) - x = log(1 + exp(x)) - x
154 // = log(1 + exp(x)) + log(exp(-x))
155 // = log((1 + exp(x)) * exp(-x))
156 // = log(exp(-x) + 1)
157 // = softplus(-x)
183 CeedScalar(*jac_data_sur) = outflow->gas.is_implicit ? out[1] : NULL; in RiemannOutflow()
185 const NewtonianIdealGasContext gas = &outflow->gas; in RiemannOutflow()
186 const bool is_implicit = gas->is_implicit; in RiemannOutflow()
191 wdetJb *= is_implicit ? -1. : 1.; in RiemannOutflow()
196 y_ext.pressure = outflow->pressure; in RiemannOutflow()
197 y_ext.temperature = outflow->temperature; in RiemannOutflow()
199 …const CeedScalar proj = (1 - outflow->recirc) * Softplus(-u_normal, outflow->softplus_velocity… in RiemannOutflow()
201 …y_ext.velocity[j] += normal[j] * proj; // (I - n n^T) projects into the plane tangent to the norm… in RiemannOutflow()
219 for (CeedInt j = 0; j < 5; j++) v[j][i] = -wdetJb * Flux[j]; in RiemannOutflow()
254 const NewtonianIdealGasContext gas = &outflow->gas; in RiemannOutflow_Jacobian()
255 const bool is_implicit = gas->is_implicit; in RiemannOutflow_Jacobian()
260 wdetJb *= is_implicit ? -1. : 1.; in RiemannOutflow_Jacobian()
270 y_ext.pressure = outflow->pressure; in RiemannOutflow_Jacobian()
271 y_ext.temperature = outflow->temperature; in RiemannOutflow_Jacobian()
276 …const CeedScalar proj = (1 - outflow->recirc) * Softplus(-u_normal, outflow->softplus_velocit… in RiemannOutflow_Jacobian()
277 …const CeedScalar dproj = (1 - outflow->recirc) * Softplus_fwd(-u_normal, -du_normal, outflow->… in RiemannOutflow_Jacobian()
301 for (int j = 0; j < 5; j++) v[j][i] = -wdetJb * dFlux[j]; in RiemannOutflow_Jacobian()
320 // classic outflow condition used by PHASTA-C and retained largely for
331 CeedScalar(*jac_data_sur) = outflow->gas.is_implicit ? out[1] : NULL; in PressureOutflow()
333 const NewtonianIdealGasContext gas = &outflow->gas; in PressureOutflow()
334 const bool is_implicit = gas->is_implicit; in PressureOutflow()
338 State s = StateFromQ(gas, qi, state_var); in PressureOutflow() local
339 s.Y.pressure = outflow->pressure; in PressureOutflow()
343 wdetJb *= is_implicit ? -1. : 1.; in PressureOutflow()
346 StatePhysicalGradientFromReference_Boundary(Q, i, gas, s, state_var, Grad_q, dXdx, grad_s); in PressureOutflow()
352 ViscousEnergyFlux(gas, s.Y, grad_s, stress, Fe); in PressureOutflow()
355 FluxInviscid(gas, s, F_inviscid); in PressureOutflow()
360 for (CeedInt j = 0; j < 5; j++) v[j][i] = -wdetJb * Flux[j]; in PressureOutflow()
384 // Jacobian for weak-pressure outflow boundary condition
395 const NewtonianIdealGasContext gas = &outflow->gas; in PressureOutflow_Jacobian()
396 const bool is_implicit = gas->is_implicit; in PressureOutflow_Jacobian()
401 wdetJb *= is_implicit ? -1. : 1.; in PressureOutflow_Jacobian()
408 State s = StateFromQ(gas, qi, state_var); in PressureOutflow_Jacobian() local
409 State ds = StateFromQ_fwd(gas, s, dqi, state_var); in PressureOutflow_Jacobian()
410 s.Y.pressure = outflow->pressure; in PressureOutflow_Jacobian()
414 StatePhysicalGradientFromReference_Boundary(Q, i, gas, s, state_var, Grad_dq, dXdx, grad_ds); in PressureOutflow_Jacobian()
421 ViscousEnergyFlux_fwd(gas, s.Y, ds.Y, grad_ds, stress, dstress, dFe); in PressureOutflow_Jacobian()
424 FluxInviscid_fwd(gas, s, ds, dF_inviscid); in PressureOutflow_Jacobian()
429 for (int j = 0; j < 5; j++) v[j][i] = -wdetJb * dFlux[j]; in PressureOutflow_Jacobian()