Skip to content

Commit 37b5af5

Browse files
committed
bug fixed
1 parent 57e2870 commit 37b5af5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/shapes/cylinder.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void cylinder::generate_mask_fieldmap()
181181
theta_c = cos(m_orientation * M_PI / 180); // cos(theta), angle between axis of vessel and B0 (in radian)
182182
theta_c2 = theta_c * theta_c;
183183
theta_s2 = 1. - theta_c2; // sin^2(theta)
184-
184+
185185
std::cout<<"Generating...\n";
186186
ProgressBar bar{option::ShowPercentage{true}, option::Start{"["}, option::Fill{"="}, option::Lead{">"}, option::End{"]"}};
187187
auto start = std::chrono::high_resolution_clock::now();
@@ -215,7 +215,7 @@ void cylinder::generate_mask_fieldmap()
215215
#pragma omp parallel for
216216
for(int32_t pz=z_min; pz<z_max; pz++)
217217
for(int32_t py=y_min; py<y_max; py++)
218-
for(int32_t px=x_min; px<x_max; px++)
218+
for(int32_t px=x_min; px<x_max; px++)
219219
{
220220
size_t p = px*res2 + py*res1 + pz;
221221
float *grid = &m_grid[3*p];
@@ -238,7 +238,7 @@ void cylinder::generate_mask_fieldmap()
238238
if (distance2 > cyl_rad2) // outside the cylinder
239239
m_fieldmap[p] += 2*M_PI * (1-m_Y)*m_dChi * (cyl_rad2 / distance2) * phi_2c2_1 * theta_s2;
240240
else // inside the cylinder
241-
m_fieldmap[p] += 2*M_PI * (1-m_Y)*m_dChi * (theta_c2 - 1/3);
241+
m_fieldmap[p] += 2*M_PI * (1-m_Y)*m_dChi * (theta_c2 - 1.0/3.0);
242242
}
243243
}
244244
bar.set_progress(100 * (c+1)/float(m_cylinder_radii.size()));

src/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#define SPINWALK_VERSION_MAJOR 1
88
#define SPINWALK_VERSION_MINOR 13
9-
#define SPINWALK_VERSION_PATCH 10
9+
#define SPINWALK_VERSION_PATCH 11
1010

1111
//---------------------------------------------------------------------------------------------
1212
//

0 commit comments

Comments
 (0)