Skip to content

Commit

Permalink
fix index of physical coordinates in some bns surface kernels (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
AliKarakus authored Apr 15, 2022
1 parent f28c638 commit 22ccbfc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions solvers/bns/okl/bnsSurfaceHex3D.okl
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ void surfaceMRTerms(const int e,
const dfloat s22M = -c*c*(sqrt(2.0)*q9M - q3M*q3M/q1M);
const dfloat s33M = -c*c*(sqrt(2.0)*q10M - q4M*q4M/q1M);

const dlong idM = vmapM[sk];
dfloat rP, uP, vP, wP, s11P, s12P, s13P, s22P, s23P, s33P;
bnsBoundaryConditions3D(bc, c, nu, time,
x[idM], y[idM], z[idM], nx, ny, nz,
Expand Down Expand Up @@ -534,6 +535,7 @@ void surfaceMRTerms_split(const int e,
const dfloat s22M = -c*c*(sqrt(2.0)*q9M - q3M*q3M/q1M);
const dfloat s33M = -c*c*(sqrt(2.0)*q10M - q4M*q4M/q1M);

const dlong idM = vmapM[sk];
dfloat rP, uP, vP, wP, s11P, s12P, s13P, s22P, s23P, s33P;
bnsBoundaryConditions3D(bc, c, nu, time,
x[idM], y[idM], z[idM], nx, ny, nz,
Expand Down
3 changes: 3 additions & 0 deletions solvers/bns/okl/bnsSurfaceQuad2D.okl
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ void surfaceMRTerms(const int e,
const dfloat s22M = -c*c*(sqrt(2.0)*q6M - q3M*q3M/q1M);

dfloat rP, uP, vP, s11P, s12P, s22P;
const dlong idM = vmapM[sk];
bnsBoundaryConditions2D(bc, c, nu, time, x[idM], y[idM], nx, ny,
rM, uM, vM, s11M, s12M, s22M,
&rP, &uP, &vP, &s11P, &s12P, &s22P);
Expand Down Expand Up @@ -403,6 +404,8 @@ void surfaceMRTerms_split(const int e,
const dfloat s22M = -c*c*(sqrt(2.0)*q6M - q3M*q3M/q1M);

dfloat rP, uP, vP, s11P, s12P, s22P;

const dlong idM = vmapM[sk];
bnsBoundaryConditions2D(bc, c, nu, time, x[idM], y[idM], nx, ny,
rM, uM, vM, s11M, s12M, s22M,
&rP, &uP, &vP, &s11P, &s12P, &s22P);
Expand Down
8 changes: 5 additions & 3 deletions solvers/bns/okl/bnsSurfaceTet3D.okl
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,10 @@ void upwind_split(const dfloat nx, const dfloat ny, const dfloat nz, const dfl
const dfloat s22M = -c*c*(sqrt(2.0)*q9M - q3M*q3M/q1M);
const dfloat s33M = -c*c*(sqrt(2.0)*q10M - q4M*q4M/q1M);

const dlong vidM = vmapM[id];
dfloat rP, uP, vP, wP, s11P, s12P, s13P, s22P, s23P, s33P;
bnsBoundaryConditions3D(bc, c, nu, time,
x[idM], y[idM], z[idM], nx, ny, nz,
x[vidM], y[vidM], z[vidM], nx, ny, nz,
rM, uM, vM, wM, s11M, s12M, s13M, s22M, s23M, s33M,
&rP, &uP, &vP, &wP, &s11P, &s12P, &s13P, &s22P, &s23P, &s33P);

Expand Down Expand Up @@ -716,10 +717,11 @@ void upwind_split(const dfloat nx, const dfloat ny, const dfloat nz, const dfl
const dfloat s11M = -c*c*(sqrt(2.0)*q8M - q2M*q2M/q1M);
const dfloat s22M = -c*c*(sqrt(2.0)*q9M - q3M*q3M/q1M);
const dfloat s33M = -c*c*(sqrt(2.0)*q10M - q4M*q4M/q1M);


const dlong vidM = vmapM[id];
dfloat rP, uP, vP, wP, s11P, s12P, s13P, s22P, s23P, s33P;
bnsBoundaryConditions3D(bc, c, nu, time,
x[idM], y[idM], z[idM], nx, ny, nz,
x[vidM], y[vidM], z[vidM], nx, ny, nz,
rM, uM, vM, wM, s11M, s12M, s13M, s22M, s23M, s33M,
&rP, &uP, &vP, &wP, &s11P, &s12P, &s13P, &s22P, &s23P, &s33P);

Expand Down
6 changes: 4 additions & 2 deletions solvers/bns/okl/bnsSurfaceTri2D.okl
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,9 @@ void upwind(const dfloat nx, const dfloat ny, const dfloat c,
const dfloat s11M = -c*c*(sqrt(2.0)*q5M - q2M*q2M/q1M);
const dfloat s22M = -c*c*(sqrt(2.0)*q6M - q3M*q3M/q1M);

const dlong vidM = vmapM[id];
dfloat rP, uP, vP, s11P, s12P, s22P;
bnsBoundaryConditions2D(bc, c, nu, time, x[idM], y[idM], nx, ny,
bnsBoundaryConditions2D(bc, c, nu, time, x[vidM], y[vidM], nx, ny,
rM, uM, vM, s11M, s12M, s22M,
&rP, &uP, &vP, &s11P, &s12P, &s22P);

Expand Down Expand Up @@ -657,8 +658,9 @@ void upwind_split(const dfloat nx, const dfloat ny, const dfloat c,
const dfloat s11M = -c*c*(sqrt(2.0)*q5M - q2M*q2M/q1M);
const dfloat s22M = -c*c*(sqrt(2.0)*q6M - q3M*q3M/q1M);

const dlong vidM = vmapM[id];
dfloat rP, uP, vP, s11P, s12P, s22P;
bnsBoundaryConditions2D(bc, c, nu, time, x[idM], y[idM], nx, ny,
bnsBoundaryConditions2D(bc, c, nu, time, x[vidM], y[vidM], nx, ny,
rM, uM, vM, s11M, s12M, s22M,
&rP, &uP, &vP, &s11P, &s12P, &s22P);

Expand Down

0 comments on commit 22ccbfc

Please sign in to comment.