Skip to content

Commit b2e8b79

Browse files
author
Martin D. Weinberg
committed
Fix a typo in the trapezoidal rule computation of the tapered Mestel mass; this doesn't affect any computation in EXP so far
1 parent 97b81c5 commit b2e8b79

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

exputil/mestel.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ double TaperedMestelDisk::get_mass(double R)
158158
for (int i=1; i<=N; i++) {
159159
double rr = rmin + dr*i;
160160
double cur = get_density(rr);
161-
cum += 0.5*dr*(lst + cur) * 2.0*M_PI*rr;
161+
cum += 0.5*dr*(lst*(rr-dr) + cur*rr) * 2.0*M_PI;
162162
lst = cur;
163163

164164
vecR(i) = rr;

0 commit comments

Comments
 (0)