File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,8 +132,8 @@ contains
132132 if (xy_local(2) >= 0._wp) then
133133 ! finds the location on the airfoil grid with the minimum distance (closest)
134134 do k = 1, Np
135- dist_vec(1) = xy_local(1) - airfoil_grid_u(k)%x
136- dist_vec(2) = xy_local(2) - airfoil_grid_u(k)%y
135+ dist_vec(1) = airfoil_grid_u(k)%x - xy_local(1)
136+ dist_vec(2) = airfoil_grid_u(k)%y - xy_local(2)
137137 dist_vec(3) = 0._wp
138138 dist = sqrt(sum(dist_vec**2))
139139 if (k == 1) then
@@ -146,14 +146,14 @@ contains
146146 end if
147147 end if
148148 end do
149- dist_vec(1) = xy_local(1) - airfoil_grid_u(global_id)%x
150- dist_vec(2) = xy_local(2) - airfoil_grid_u(global_id)%y
149+ dist_vec(1) = airfoil_grid_u(global_id)%x - xy_local(1)
150+ dist_vec(2) = airfoil_grid_u(global_id)%y - xy_local(2)
151151 dist_vec(3) = 0
152152 dist = global_dist
153153 else
154154 do k = 1, Np
155- dist_vec(1) = xy_local(1) - airfoil_grid_l(k)%x
156- dist_vec(2) = xy_local(2) - airfoil_grid_l(k)%y
155+ dist_vec(1) = airfoil_grid_l(k)%x - xy_local(1)
156+ dist_vec(2) = airfoil_grid_l(k)%y - xy_local(2)
157157 dist_vec(3) = 0
158158 dist = sqrt(sum(dist_vec**2))
159159 if (k == 1) then
You can’t perform that action at this time.
0 commit comments