Skip to content

Commit 96e830f

Browse files
committed
MPI issues
1 parent 3150c51 commit 96e830f

1 file changed

Lines changed: 2 additions & 27 deletions

File tree

SU2_CFD/src/interfaces/cfd/CMixingPlaneInterface.cpp

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void CMixingPlaneInterface::BroadcastData_MixingPlane(const CInterpolator& inter
9292
/*--- Gather data. ---*/
9393
const auto nTotalDonors = nSpanDonor * size; // Number of donor spans across all ranks
9494
const auto nSpanDonorVars = nSpanDonor * nMixingVars; // Number of variables to be transferred on each rank
95-
vector<unsigned long> buffDonorMarker(nTotalDonors);
95+
vector<unsigned short> buffDonorMarker(nTotalDonors);
9696
vector<su2double> buffDonorVar(static_cast<unsigned long>(nTotalDonors) * nMixingVars); // Total number of variables to be transferred on all ranks
9797

9898
SU2_MPI::Allgather(sendDonorMarker.data(), nSpanDonor, MPI_UNSIGNED_SHORT,
@@ -104,7 +104,7 @@ void CMixingPlaneInterface::BroadcastData_MixingPlane(const CInterpolator& inter
104104
SU2_MPI::GetComm());
105105

106106
for (auto iSize = 0; iSize < size; iSize++){
107-
if (buffDonorVar[static_cast<size_t>(nSpanDonorVars) * iSize] > 0.0) {
107+
if (buffDonorMarker[static_cast<size_t>(iSize) * static_cast<unsigned long>(nSpanDonor)] != -1) {
108108
for (auto iSpan = 0ul; iSpan < nSpanDonor; iSpan++){
109109
for (auto iVar = 0u; iVar < nMixingVars; iVar++) sendDonorVar[iSpan * nMixingVars + iVar] = buffDonorVar[static_cast<size_t>(iSize) * nSpanDonorVars + iSpan * nMixingVars + iVar];
110110
}
@@ -203,28 +203,3 @@ void CMixingPlaneInterface::SetTarget_Variable(CSolver *target_solution, CGeomet
203203

204204
target_solution->SetnMixingStates( Marker_Target, Span_Target, iDonorSpan + 1 );
205205
}
206-
207-
void CMixingPlaneInterface::SetAverageValues(CSolver *donor_solution, CSolver *target_solution,
208-
unsigned short donorZone){
209-
210-
unsigned short iSpan;
211-
212-
for(iSpan = 0; iSpan<nSpanMaxAllZones +1; iSpan++){
213-
/*--- transfer inviscid quantities ---*/
214-
target_solution->SetDensityIn(donor_solution->GetDensityIn(donorZone, iSpan), donorZone, iSpan);
215-
target_solution->SetPressureIn(donor_solution->GetPressureIn(donorZone, iSpan), donorZone, iSpan);
216-
target_solution->SetTurboVelocityIn(donor_solution->GetTurboVelocityIn(donorZone, iSpan), donorZone, iSpan);
217-
target_solution->SetDensityOut(donor_solution->GetDensityOut(donorZone, iSpan), donorZone, iSpan);
218-
target_solution->SetPressureOut(donor_solution->GetPressureOut(donorZone, iSpan), donorZone, iSpan);
219-
target_solution->SetTurboVelocityOut(donor_solution->GetTurboVelocityOut(donorZone, iSpan), donorZone, iSpan);
220-
221-
/*--- transfer turbulent quantities ---*/
222-
target_solution->SetKineIn(donor_solution->GetKineIn(donorZone, iSpan), donorZone, iSpan);
223-
target_solution->SetOmegaIn(donor_solution->GetOmegaIn(donorZone, iSpan), donorZone, iSpan);
224-
target_solution->SetNuIn(donor_solution->GetNuIn(donorZone, iSpan), donorZone, iSpan);
225-
target_solution->SetKineOut(donor_solution->GetKineOut(donorZone, iSpan), donorZone, iSpan);
226-
target_solution->SetOmegaOut(donor_solution->GetOmegaOut(donorZone, iSpan), donorZone, iSpan);
227-
target_solution->SetNuOut(donor_solution->GetNuOut(donorZone, iSpan), donorZone, iSpan);
228-
229-
}
230-
}

0 commit comments

Comments
 (0)