reformat SAT

This commit is contained in:
Magnus Ulimoen 2020-04-09 13:31:11 +02:00
parent 5f7bd70d1b
commit 17edb14899
1 changed files with 10 additions and 28 deletions

View File

@ -755,16 +755,12 @@ fn SAT_characteristic(
let phi2_c2 = (phi2 + c * c) / (GAMMA - 1.0); let phi2_c2 = (phi2 + c * c) / (GAMMA - 1.0);
#[rustfmt::skip]
let T = [ let T = [
[ 1.0, 0.0, 1.0, 1.0], [ 1.0, 0.0, 1.0, 1.0],
[ u, ky, u + kx * c, u - kx * c], [ u, ky, u + kx * c, u - kx * c],
[ v, -kx, v + ky * c, v - ky * c], [ v, -kx, v + ky * c, v - ky * c],
[ [phi2 / (GAMMA - 1.0), ky * u - kx * v, phi2_c2 + c * theta, phi2_c2 - c * theta],
phi2 / (GAMMA - 1.0),
ky * u - kx * v,
phi2_c2 + c * theta,
phi2_c2 - c * theta,
],
]; ];
let U = kx_ * u + ky_ * v; let U = kx_ * u + ky_ * v;
let L = [ let L = [
@ -774,26 +770,12 @@ fn SAT_characteristic(
U - c * Float::hypot(kx_, ky_), U - c * Float::hypot(kx_, ky_),
]; ];
let beta = 1.0 / (2.0 * c * c); let beta = 1.0 / (2.0 * c * c);
#[rustfmt::skip]
let TI = [ let TI = [
[ [ 1.0 - phi2 / (c * c), (GAMMA - 1.0) * u / (c * c), (GAMMA - 1.0) * v / (c * c), -(GAMMA - 1.0) / (c * c)],
1.0 - phi2 / (c * c),
(GAMMA - 1.0) * u / (c * c),
(GAMMA - 1.0) * v / (c * c),
-(GAMMA - 1.0) / (c * c),
],
[ -(ky * u - kx * v), ky, -kx, 0.0], [ -(ky * u - kx * v), ky, -kx, 0.0],
[ [beta * (phi2 - c * theta), beta * (kx * c - (GAMMA - 1.0) * u), beta * (ky * c - (GAMMA - 1.0) * v), beta * (GAMMA - 1.0)],
beta * (phi2 - c * theta), [beta * (phi2 + c * theta), -beta * (kx * c + (GAMMA - 1.0) * u), -beta * (ky * c + (GAMMA - 1.0) * v), beta * (GAMMA - 1.0)],
beta * (kx * c - (GAMMA - 1.0) * u),
beta * (ky * c - (GAMMA - 1.0) * v),
beta * (GAMMA - 1.0),
],
[
beta * (phi2 + c * theta),
-beta * (kx * c + (GAMMA - 1.0) * u),
-beta * (ky * c + (GAMMA - 1.0) * v),
beta * (GAMMA - 1.0),
],
]; ];
let res = [rho - z[0], rhou - z[1], rhov - z[2], e - z[3]]; let res = [rho - z[0], rhou - z[1], rhov - z[2], e - z[3]];