Skip to content

Commit ab1bb6a

Browse files
committed
Change arrays to vectors
1 parent 641806e commit ab1bb6a

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

SU2_CFD/src/solvers/CEulerSolver.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -777,10 +777,10 @@ void CEulerSolver::Set_MPI_Nearfield(CGeometry *geometry, CConfig *config) {
777777
/*--- Define buffer vector interior domain ---*/
778778

779779
su2double *Buffer_Send_PrimVar = nullptr;
780-
unsigned long *nPointTotal_s = new unsigned long[size];
781-
unsigned long *nPointTotal_r = new unsigned long[size];
782-
su2double *iPrimVar = new su2double [nPrimVar];
783-
unsigned long nPointTotal_rCum[size+1];
780+
vector<unsigned long> nPointTotal_s(size);
781+
vector<unsigned long> nPointTotal_r(size);
782+
vector<su2double> iPrimVar(nPrimVar);
783+
vector<unsigned long> nPointTotal_rCum(size+1);
784784
unsigned long Buffer_Size_PrimVar = 0;
785785
vector<unsigned long> PointTotal_Counter(size, 0);
786786

@@ -1073,12 +1073,6 @@ for (iDomain = 0; iDomain < size; iDomain++) {
10731073
delete [] Buffer_Receive_PrimVarMPI;
10741074
delete [] req_Recv;
10751075

1076-
/*--- Release all of the temporary memory ---*/
1077-
1078-
delete [] nPointTotal_s;
1079-
delete [] nPointTotal_r;
1080-
delete [] iPrimVar;
1081-
10821076
}
10831077

10841078
void CEulerSolver::SetNondimensionalization(CConfig *config, unsigned short iMesh) {

0 commit comments

Comments
 (0)