NREL / SOWFA

Other
136 stars 113 forks source link

Unnecessary initialization of windVectors in horizontalAxisWindTurbinesALM.C #2

Open ghost opened 8 years ago

ghost commented 8 years ago

First initialization of windVectors: Line 639-640

    // Define the windVectors array and set it to zero.
    windVectors.append(List<List<vector> >(NumBl[j],List<vector>(numBladePoints[i],vector::zero)));

Duplicated initialization and then assignment in: Line 1103-1107

            // Zero the wind vector.
            windVectors[i][j][k] = vector::zero;

            // Now put the velocity in that cell into blade-oriented coordinates.
            windVectors[i][j][k] = windVectorsLocal[iter];

From the above code, it is obvious line 1104 is unnecessary.