@@ -78,7 +78,7 @@ void CMixingPlaneInterface::BroadcastData_MixingPlane(const CInterpolator& inter
7878
7979 /* --- Fill send buffers. ---*/
8080
81- vector<short > sendDonorMarker (nSpanDonor + 1 );
81+ vector<short > sendDonorMarker (nSpanDonor + 1 , - 1 );
8282 vector<su2double> sendDonorVar (static_cast <size_t >(nSpanDonor + 1 ) * nMixingVars);
8383
8484 if (markDonor != -1 ) {
@@ -124,23 +124,19 @@ void CMixingPlaneInterface::BroadcastData_MixingPlane(const CInterpolator& inter
124124
125125 auto & targetSpan = interpolator.targetSpans [iMarkerInt][iTargetSpan];
126126
127+ /* --- Get the global index of the donor span. ---*/
128+ const auto donorSpan = targetSpan.donorSpan ;
129+
127130 InitializeTarget_Variable (target_solution, markTarget, iTargetSpan, nSpanDonor);
128131
129132 if ((iTargetSpan == 0 ) || (iTargetSpan == nTargetSpan) || (iTargetSpan == nTargetSpan - 1 )) {
130133 /* --- Transfer values at hub, shroud and 1D values ---*/
131- unsigned long donorSpan;
132- if (iTargetSpan == 0 ) donorSpan = 0 ;
133- else if (iTargetSpan == nTargetSpan - 1 ) donorSpan = nSpanDonor - 1 ;
134- else if (iTargetSpan == nTargetSpan) donorSpan = nSpanDonor;
135-
136134 RecoverTarget_Span_Endwall (sendDonorVar, donorSpan);
137135
138136 SetTarget_Variable (target_solution, target_geometry, target_config, markTarget, iTargetSpan, 0 );
139137 }
140138 else {
141- /* --- Get the global index of the donor and the interpolation coefficient. ---*/
142-
143- const auto donorSpan = targetSpan.donorSpan ;
139+ /* --- Get the global index of interpolation coefficient. ---*/
144140 const auto donorCoeff = targetSpan.coefficient ;
145141
146142 /* --- Recover the Target_Variable from the buffer of variables. ---*/
0 commit comments