Skip to content

Commit

Permalink
fluids: Make shocktube test less brittle
Browse files Browse the repository at this point in the history
- Small, insignificant changes to the coordinate locations make a
  dramatic difference to the initial condition
- For the test case, there is a node right at the midpoint of the
  domain. Adding the epsilon fudge factor makes the if statement more
  stable
  • Loading branch information
jrwrigh committed Jul 31, 2023
1 parent 5694f5b commit fd955d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/fluids/qfunctions/shocktube.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ CEED_QFUNCTION_HELPER CeedInt Exact_ShockTube(CeedInt dim, CeedScalar time, cons
CeedScalar rho, P, u[3] = {0.};

// Initial Conditions
if (x <= mid_point) {
if (x <= mid_point + 200*CEED_EPSILON) {
rho = rho_high;
P = P_high;
} else {
Expand Down

0 comments on commit fd955d3

Please sign in to comment.