Skip to content

Commit

Permalink
add commented out option for a donut of scalar in Advection
Browse files Browse the repository at this point in the history
  • Loading branch information
hklion committed Sep 24, 2024
1 parent 43852ed commit ebf3289
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Exec/Advection/prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,18 @@ init_custom_prob(
const Real r2 = x*x + y*y;
const Real rad = 0.1 * (prob_hi[0]-prob_lo[0]);
const Real radsq = rad*rad;
const Real rad_inner = 0.05 * (prob_hi[0]-prob_lo[0]);
const Real rad_inner_sq = rad_inner*rad_inner;

if (l_use_salt) {
state(i,j,k,Salt_comp)= S0;
}

// Single circle of scalar (default)
state(i, j, k, Scalar_comp) = std::exp(-r2/(2.*radsq));

// Donut of scalar
//state(i, j, k, Scalar_comp) = 1.25 * (std::exp(-r2/(2.*radsq)) - std::exp(-r2/(2*rad_inner_sq)));
});

// Construct a box that is on x-faces
Expand Down

0 comments on commit ebf3289

Please sign in to comment.