Skip to content

Commit 9e7a093

Browse files
committed
Bug in tracking for multi-CPU, out of bounds error
1 parent 1aac185 commit 9e7a093

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pmpo_MPMesh.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ void MPMesh::CVTTrackingElmCenterBased(const int printVTPIndex){
155155
//go through all the connected elm, calc distance
156156
for(int i=1; i<=numConnElms; i++){
157157
int elmID = elm2ElmConn(iElm,i)-1;
158-
158+
if (elmID >= numElms)
159+
continue;
159160
//New delta
160161
Vec3d center(elmCenter(elmID, 0), elmCenter(elmID, 1), elmCenter(elmID, 2));
161162
delta = MPnew - center;

0 commit comments

Comments
 (0)