Skip to content

Commit

Permalink
Fix magic number for magnetic tower donut
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrete committed Jan 29, 2024
1 parent 89fa9ce commit 63a654b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pgen/cluster/magnetic_tower.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class MagneticTowerObj {
// Compute the potential in jet cylindrical coordinates
a_r = 0.0;
a_theta = 0.0;
if (fabs(h) >= 0.001 && fabs(h) <= offset_ + thickness_) {
if (fabs(h) >= offset_ && fabs(h) <= offset_ + thickness_) {
a_h = field_ * l_scale_ * exp_r2_h2;
} else {
a_h = 0.0;
Expand Down Expand Up @@ -110,7 +110,7 @@ class MagneticTowerObj {
const parthenon::Real exp_r2_h2 = exp(-pow(r / l_scale_, 2));
// Compute the field in jet cylindrical coordinates
b_r = 0.0;
if (fabs(h) >= 0.001 && fabs(h) <= offset_ + thickness_) {
if (fabs(h) >= offset_ && fabs(h) <= offset_ + thickness_) {
b_theta = 2.0 * field_ * r / l_scale_ * exp_r2_h2;
} else {
b_theta = 0.0;
Expand Down

0 comments on commit 63a654b

Please sign in to comment.