Skip to content

Commit 85b6a32

Browse files
committed
more cleaning
1 parent 69914fc commit 85b6a32

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

SU2_CFD/src/solvers/CNEMOEulerSolver.cpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,6 +1542,9 @@ void CNEMOEulerSolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_contai
15421542
for (iVertex = 0; iVertex < geometry->nVertex[val_marker]; iVertex++) {
15431543
iPoint = geometry->vertex[val_marker][iVertex]->GetNode();
15441544

1545+
/*--- Allocate the value at the infinity ---*/
1546+
V_infty = GetCharacPrimVar(val_marker, iVertex);
1547+
15451548
/*--- Check if the node belongs to the domain (i.e, not a halo node) ---*/
15461549
if (geometry->nodes->GetDomain(iPoint)) {
15471550

@@ -1930,8 +1933,9 @@ void CNEMOEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container
19301933
bool gravity = config->GetGravityForce();
19311934
bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
19321935

1933-
su2double *U_domain = new su2double[nVar]; su2double *U_outlet = new su2double[nVar];
1934-
su2double *V_domain = new su2double[nPrimVar]; su2double *V_outlet = new su2double[nPrimVar];
1936+
su2double *U_domain;
1937+
su2double *U_outlet = new su2double[nVar];
1938+
su2double *V_domain, *V_outlet;
19351939
su2double *Normal = new su2double[nDim];
19361940
su2double *Ys = new su2double[nSpecies];
19371941

@@ -1949,6 +1953,9 @@ void CNEMOEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container
19491953
for (iVertex = 0; iVertex < geometry->nVertex[val_marker]; iVertex++) {
19501954
iPoint = geometry->vertex[val_marker][iVertex]->GetNode();
19511955

1956+
/*--- Allocate the value at the outlet ---*/
1957+
V_outlet = GetCharacPrimVar(val_marker, iVertex);
1958+
19521959
/*--- Check if the node belongs to the domain (i.e., not a halo node) ---*/
19531960
if (geometry->nodes->GetDomain(iPoint)) {
19541961

@@ -1963,8 +1970,8 @@ void CNEMOEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container
19631970
UnitNormal[iDim] = Normal[iDim]/Area;
19641971

19651972
/*--- Current solution at this boundary node ---*/
1966-
for (iVar = 0; iVar < nVar; iVar++) U_domain[iVar] = nodes->GetSolution(iPoint, iVar);
1967-
for (iVar = 0; iVar < nPrimVar; iVar++) V_domain[iVar] = nodes->GetPrimitive(iPoint, iVar);
1973+
U_domain = nodes->GetSolution(iPoint);
1974+
V_domain = nodes->GetPrimitive(iPoint);
19681975

19691976
/*--- Initialize solution at outlet ---*/
19701977
for (iVar = 0; iVar < nVar; iVar++) U_outlet[iVar] = 0.0;
@@ -2154,10 +2161,7 @@ void CNEMOEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container
21542161
}
21552162

21562163
/*--- Free locally allocated memory ---*/
2157-
delete [] U_domain;
21582164
delete [] U_outlet;
2159-
delete [] V_domain;
2160-
delete [] V_outlet;
21612165
delete [] Normal;
21622166
delete [] Ys;
21632167

0 commit comments

Comments
 (0)