Skip to content

Commit 0ab83dd

Browse files
committed
Fix SA for Sliding Meshes
1 parent c863e9c commit 0ab83dd

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

SU2_CFD/src/interfaces/cfd/CSlidingInterface.cpp

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,24 @@ void CSlidingInterface::GetDonor_Variable(CSolver *donor_solution, CGeometry *do
5151
nDonorVar = donor_solution->GetnPrimVar();
5252

5353
/*--- the number of primitive variables is set to two by default for the turbulent solver ---*/
54-
bool turbulent = (nDonorVar == 2) ;
54+
bool SA, SST;
55+
SA = (nDonorVar == 1);
56+
SST = (nDonorVar == 2);
5557

56-
if (turbulent){
57-
58-
/*--- for turbulent solver retrieve solution and set it as the donor variable ---*/
58+
if (SA){
59+
/*--- for SA turbulent solver retrieve solution and set it as the donor variable ---*/
60+
Donor_Variable[0] = donor_solution->GetNodes()->GetSolution(Point_Donor,0);
61+
}
62+
else if (SST){
63+
/*--- for SST turbulent solver retrieve solution and set it as the donor variable ---*/
5964
Donor_Variable[0] = donor_solution->GetNodes()->GetSolution(Point_Donor,0);
6065
Donor_Variable[1] = donor_solution->GetNodes()->GetSolution(Point_Donor,1);
61-
62-
} else{
63-
66+
}
67+
else{
6468
/*--- Retrieve primitive variables and set them as the donor variables ---*/
65-
for (iVar = 0; iVar < nDonorVar; iVar++)
66-
Donor_Variable[iVar] = donor_solution->GetNodes()->GetPrimitive(Point_Donor,iVar);
67-
69+
for (iVar = 0; iVar < nDonorVar; iVar++) {
70+
Donor_Variable[iVar] = donor_solution->GetNodes()->GetPrimitive(Point_Donor, iVar);
71+
}
6872
}
6973
}
7074

0 commit comments

Comments
 (0)