Skip to content

Commit 7b78f06

Browse files
committed
Fix identification of marker boundaries at mixing plane interface
1 parent fd20657 commit 7b78f06

5 files changed

Lines changed: 11 additions & 15 deletions

File tree

Common/include/CConfig.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10040,7 +10040,7 @@ class CConfig {
1004010040
* \param[in] nMarker - Number of the marker in a zone being tested, starting at 0.
1004110041
* \return value > 1 if (on this mpi rank) the zone defined by config is part of the mixing plane.
1004210042
*/
10043-
short FindMixingPlaneInterfaceMarker(unsigned short nMarker) const;
10043+
short FindMixingPlaneInterfaceMarker(unsigned short nMarker, unsigned short iMarkerInt) const;
1004410044

1004510045
/*!
1004610046
* \brief Get whether or not to save solution data to libROM.

Common/src/CConfig.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9964,11 +9964,11 @@ short CConfig::FindInterfaceMarker(unsigned short iInterface) const {
99649964
return -1;
99659965
}
99669966

9967-
short CConfig::FindMixingPlaneInterfaceMarker(unsigned short nMarker) const {
9967+
short CConfig::FindMixingPlaneInterfaceMarker(unsigned short nMarker, unsigned short iMarkerInt) const {
99689968
short mark;
99699969
for (auto iMarker = 0; iMarker < nMarker; iMarker++){
99709970
/*--- If the tag GetMarker_All_MixingPlaneInterface equals the index we are looping at ---*/
9971-
if (GetMarker_All_MixingPlaneInterface(iMarker)){
9971+
if (GetMarker_All_MixingPlaneInterface(iMarker) == iMarkerInt){
99729972
/*--- We have identified the local index of the marker ---*/
99739973
/*--- Store the identifier for the marker ---*/
99749974
mark = iMarker;

Common/src/interface_interpolation/CMixingPlane.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ void CMixingPlane::WriteInterpolationDetails(const std::string& filename, const
236236
outFile << "===============================================================" << endl;
237237

238238
// Loop through each marker interface
239-
for (auto iMarkerInt = 0; iMarkerInt < nMarkerInt; iMarkerInt++) {
239+
for (auto iMarkerInt = 0; iMarkerInt < nMarkerInt + 1; iMarkerInt++) {
240240
if (targetSpans[iMarkerInt].empty()) continue;
241241

242242
outFile << "Marker Interface " << iMarkerInt << "\n";
@@ -256,7 +256,7 @@ void CMixingPlane::WriteInterpolationDetails(const std::string& filename, const
256256
outFile << "\n\nGrouped by Donor Span\n";
257257
outFile << "=====================\n\n";
258258

259-
for (auto iMarkerInt = 0; iMarkerInt < nMarkerInt; iMarkerInt++) {
259+
for (auto iMarkerInt = 0; iMarkerInt < nMarkerInt + 1; iMarkerInt++) {
260260
if (targetSpans[iMarkerInt].empty()) continue;
261261

262262
outFile << "Marker Interface " << iMarkerInt << "\n";

SU2_CFD/src/drivers/CDriver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2963,7 +2963,7 @@ void CFluidDriver::Run() {
29632963
for (iZone = 0; iZone < nZone; iZone++) {
29642964
for (jZone = 0; jZone < nZone; jZone++)
29652965
if(jZone != iZone && interpolator_container[iZone][jZone] != nullptr)
2966-
interpolator_container[iZone][jZone]->SetTransferCoeff(config_container);
2966+
interpolator_container[iZone][jZone]->SetTransferCoeff(geometry_container, config_container);
29672967
}
29682968
}
29692969

SU2_CFD/src/interfaces/cfd/CMixingPlaneInterface.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)