Skip to content

Commit 9ce0fad

Browse files
committed
another fix
1 parent c79e111 commit 9ce0fad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Common/src/grid_movement/CRadialBasisFunctionInterpolation.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,10 @@ void CRadialBasisFunctionInterpolation::SetDeformation(CGeometry* geometry, CCon
279279
unsigned long Local_nControlNodes = ControlNodes->size();
280280

281281
/*--- Array containing the local number of control nodes ---*/
282-
unsigned long Local_nControlNodesArr[size];
282+
std::vector<unsigned long> Local_nControlNodesArr(size);
283283

284284
/*--- gathering local control node coordinate sizes on all processes. ---*/
285-
SU2_MPI::Allgather(&Local_nControlNodes, 1, MPI_UNSIGNED_LONG, Local_nControlNodesArr, 1, MPI_UNSIGNED_LONG,
285+
SU2_MPI::Allgather(&Local_nControlNodes, 1, MPI_UNSIGNED_LONG, Local_nControlNodesArr.data(), 1, MPI_UNSIGNED_LONG,
286286
SU2_MPI::GetComm());
287287

288288
/*--- Gathering all deformation vectors on the master node ---*/
@@ -294,8 +294,8 @@ void CRadialBasisFunctionInterpolation::SetDeformation(CGeometry* geometry, CCon
294294
unsigned long start_idx = 0;
295295
for (auto iProc = 0; iProc < size; iProc++) {
296296
if (iProc != MASTER_NODE) {
297-
SU2_MPI::Recv(&CtrlNodeDeformation[0] + start_idx, Local_nControlNodesArr[iProc] * nDim, MPI_DOUBLE, iProc, 0,
298-
SU2_MPI::GetComm(), MPI_STATUS_IGNORE);
297+
SU2_MPI::Recv(CtrlNodeDeformation.data() + start_idx, Local_nControlNodesArr[iProc] * nDim, MPI_DOUBLE, iProc,
298+
0, SU2_MPI::GetComm(), MPI_STATUS_IGNORE);
299299
}
300300
start_idx += Local_nControlNodesArr[iProc] * nDim;
301301
}

0 commit comments

Comments
 (0)