Skip to content

Commit 29495cc

Browse files
authored
Merge pull request #1147 from su2code/address_review_1076
fix variable lenght arrays
2 parents dd4acca + 985dd36 commit 29495cc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Common/src/grid_movement/CVolumetricMovement.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ void CVolumetricMovement::ComputenNonconvexElements(CGeometry *geometry, bool Sc
325325
for (iNodes = 0; iNodes < nNodes; iNodes ++) {
326326

327327
/*--- Calculate minimum and maximum angle between edge vectors adjacent to each node ---*/
328-
su2double edgeVector_i[nDim], edgeVector_j[nDim];
328+
su2double edgeVector_i[3], edgeVector_j[3];
329329

330330
for (iDim = 0; iDim < nDim; iDim ++) {
331331
if (iNodes == 0) {
@@ -385,12 +385,12 @@ void CVolumetricMovement::ComputenNonconvexElements(CGeometry *geometry, bool Sc
385385
const auto Coords_k = geometry->nodes->GetCoord(face_point_k);
386386

387387
/*--- Get edge vectors from point k to i and point j to i ---*/
388-
su2double edgeVector_i[nDim], edgeVector_j[nDim];
388+
su2double edgeVector_i[3], edgeVector_j[3];
389389
GeometryToolbox::Distance(nDim, Coords_k, Coords_i, edgeVector_i);
390390
GeometryToolbox::Distance(nDim, Coords_j, Coords_i, edgeVector_j);
391391

392392
/*--- Calculate cross product of edge vectors and its length---*/
393-
su2double crossProduct[nDim];
393+
su2double crossProduct[3];
394394
GeometryToolbox::CrossProduct(edgeVector_i, edgeVector_j, crossProduct);
395395
crossProductLength = GeometryToolbox::Norm(nDim, crossProduct);
396396

0 commit comments

Comments
 (0)