Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
fdcfd8a
Implementation of mass flow outlet in Giles BC
Feb 8, 2024
7d4d4ed
Added TURBO_INTERFACE_KIND options and updated interface preprocesing
Feb 13, 2024
71c2279
Remove some unecssary code
Feb 13, 2024
b8dd1c4
Updated testcases
Feb 13, 2024
42abd3f
Removing unused variable
Feb 13, 2024
ca911a4
cleanup
Feb 13, 2024
2ff8fca
Implement method based on continuity
Mar 6, 2024
c66f7ad
Change machine performance variable names
Mar 6, 2024
5852f8c
Unused var
Mar 6, 2024
b7fe757
Fix in mass flow outlet calculation
Mar 19, 2024
8152334
Merge branch 'su2code:master' into feature_turbo_interfaces
joshkellyjak May 8, 2024
dd3b4b0
Merge branch 'develop' into feature_turbo_interfaces
joshkellyjak May 8, 2024
b253dc0
Revert to previous 'dampning' method
joshkellyjak May 8, 2024
0346d0c
Revert "Revert to previous 'dampning' method"
joshkellyjak May 8, 2024
df1a1c0
Merge branch 'develop' into pr/2209
May 8, 2024
ecf4239
Merge branch 'develop' into feature_turbo_interfaces
joshkellyjak May 8, 2024
dc744ad
revert to previous 'dampning' method
May 8, 2024
5201d80
removing some unused vars
May 8, 2024
c8447a6
Add averaged quantities to recording (those which are used and commun…
oleburghardt Jul 2, 2024
01bdada
Merge branch 'feature_turbo_interfaces' of https://github.com/joshkel…
Jul 10, 2024
2c9a2fb
Merge remote-tracking branch 'origin/fix_turbo_ramps' into pr/2209
Jul 10, 2024
af8b1c1
Changes for comments
Jul 10, 2024
eb2b40d
Merge branch 'develop' into feature_turbo_interfaces
bigfooted Jul 10, 2024
0fcf22f
Remove need more multiple specification of boundary markers
Jul 16, 2024
68cde3e
White spaces and defaults options
Jul 16, 2024
c3ddd76
Merge branch 'develop' into feature_turbo_interfaces
EvertBunschoten Jul 16, 2024
3f20abe
Bug fix for when one type of interface is specified
Jul 16, 2024
f33ce99
Merge branch 'feature_turbo_interfaces' of https://github.com/joshkel…
Jul 16, 2024
250f556
Remove superfluous options from reg test configs
Jul 16, 2024
20aff4e
Releasing resources
Jul 16, 2024
0d6fc3c
formatting
Jul 16, 2024
8d3f866
heap after use
Jul 16, 2024
8b7ca1b
Remove Marker_Turbomachinery
Jul 16, 2024
eeb7ec7
fix for asan
Jul 16, 2024
aac4bab
Potential fix
Jul 17, 2024
deae2a9
a mistake
Jul 17, 2024
3b88222
Potential fix
Jul 17, 2024
8252f0d
Potential fix
Jul 17, 2024
fd6d5cb
Merge branch 'develop' into pr/2209
Jul 18, 2024
4313913
Merge branch 'develop' into feature_turbo_interfaces
bigfooted Jul 29, 2024
374abdd
Cleanup Giles BC initial commit
Aug 9, 2024
e0877eb
missing break
Aug 9, 2024
fe95eef
Cleanup MP implementation initial commit
Aug 14, 2024
bbd399e
Merge branch 'develop' into feature_mz_adjoint_for_turbo
joshkellyjak Aug 14, 2024
6b4c180
Merge remote-tracking branch 'origin/feature_mz_adjoint_for_turbo' in…
Aug 14, 2024
d6eba63
Merge branch 'feature_turbo_interfaces' of https://github.com/joshkel…
Aug 14, 2024
9b4498c
Merge branch 'develop' into feature_turbo_interfaces
joshkellyjak Aug 14, 2024
55d4d16
Modification of some comments
Aug 29, 2024
e1eba79
Fixed MP bug added additional outputs
Sep 4, 2024
9324146
Merge branch 'develop' into feature_turbo_interfaces
joshkellyjak Sep 4, 2024
05f9d23
Revert "Merge remote-tracking branch 'origin/feature_mz_adjoint_for_t…
Sep 4, 2024
9db6939
Changes for comments and reversion error fix
Sep 4, 2024
d106401
Some changes after discussions
Sep 4, 2024
ef3416a
This hopefully resolves the merge error I was having
Sep 4, 2024
7f50852
submodule updates
Sep 4, 2024
4c7327d
Revert changes in Giles BC that have persisted
Sep 4, 2024
c5872c4
Resolving releasing resources warning
Sep 5, 2024
b1e2a56
Merge branch 'develop' into feature_resolve_merge_turbo_interfaces
joshkellyjak Sep 5, 2024
52d8ca9
Actually releasing resources
Sep 5, 2024
c903463
Merge branch 'feature_resolve_merge_turbo_interfaces' of https://gith…
Sep 5, 2024
bfcc97c
release
Sep 5, 2024
da798e7
Merge branch 'develop' into feature_resolve_merge_turbo_interfaces
joshkellyjak Sep 6, 2024
b2cfab0
Added test case, additional turbo outputs and fixed formatting
Sep 11, 2024
1951aaa
Removing some debugging code
Sep 11, 2024
384686a
typo
Sep 11, 2024
2177010
rename
Sep 11, 2024
f6c3535
Update reg test values
Sep 12, 2024
6b57e55
Update Github workflows
Sep 13, 2024
2483e10
Update Github workflows
Sep 13, 2024
1b4b9d6
Update reg test values to match gh calcs
Sep 13, 2024
ee45af5
Asan, Tsan workflows
Sep 14, 2024
7e3647e
Changes for comments
Sep 17, 2024
1560c6b
Fix heap buffer overflow error
Sep 23, 2024
a0d961b
Clearing resources
Sep 23, 2024
c85ad36
formatting
Sep 23, 2024
7af597d
Merge branch 'develop' into feature_resolve_merge_turbo_interfaces
joshkellyjak Sep 23, 2024
7e2f13a
Update cfg file option for consistency
Sep 23, 2024
e5f6cae
Merge branch 'feature_resolve_merge_turbo_interfaces' of https://gith…
Sep 23, 2024
1ea89f0
Update APU reg test
Sep 23, 2024
252c4c5
Merge branch 'develop' into feature_resolve_merge_turbo_interfaces
joshkellyjak Sep 23, 2024
0e6bb4a
Update regression workflow
Sep 24, 2024
a2f67e8
Merge branch 'feature_resolve_merge_turbo_interfaces' of https://gith…
Sep 24, 2024
f34b5bf
Changes for comments
Sep 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class CConfig {
*Marker_MixingPlaneInterface, /*!< \brief MixingPlane interface boundary markers. */
*Marker_TurboBoundIn, /*!< \brief Turbomachinery performance boundary markers. */
*Marker_TurboBoundOut, /*!< \brief Turbomachinery performance boundary donor markers. */
*Marker_Turbomachinery, /*!< \breif Turbomachinery markers */
*Marker_NearFieldBound, /*!< \brief Near Field boundaries markers. */
*Marker_Deform_Mesh, /*!< \brief Deformable markers at the boundary. */
*Marker_Deform_Mesh_Sym_Plane, /*!< \brief Marker with symmetric deformation. */
Expand Down Expand Up @@ -443,6 +444,7 @@ class CConfig {

TURBO_PERF_KIND *Kind_TurboPerf; /*!< \brief Kind of turbomachynery architecture.*/
TURBOMACHINERY_TYPE *Kind_TurboMachinery;
su2vector<TURBO_INTERFACE_KIND> Kind_TurboInterface;

/* Gradient smoothing options */
su2double SmoothingEps1; /*!< \brief Parameter for the identity part in gradient smoothing. */
Expand All @@ -466,6 +468,7 @@ class CConfig {
unsigned short* nDV_Value; /*!< \brief Number of values for each design variable (might be different than 1 if we allow arbitrary movement). */
unsigned short nFFDBox; /*!< \brief Number of ffd boxes. */
unsigned short nTurboMachineryKind; /*!< \brief Number turbomachinery types specified. */
unsigned short nTurboInterfaces; /*!< \brief Number of turbomachiery interfaces */
unsigned short nParamDV; /*!< \brief Number of parameters of the design variable. */
string DV_Filename; /*!< \brief Filename for providing surface positions from an external parameterization. */
string DV_Unordered_Sens_Filename; /*!< \brief Filename of volume sensitivities in an unordered ASCII format. */
Expand Down Expand Up @@ -746,6 +749,7 @@ class CConfig {
*Marker_All_Turbomachinery, /*!< \brief Global index for Turbomachinery markers using the grid information. */
*Marker_All_TurbomachineryFlag, /*!< \brief Global index for Turbomachinery markers flag using the grid information. */
*Marker_All_MixingPlaneInterface, /*!< \brief Global index for MixingPlane interface markers using the grid information. */
*Marker_All_Giles, /*!< \brief Global index for Giles markers using the grid information. */
*Marker_All_DV, /*!< \brief Global index for design variable markers using the grid information. */
*Marker_All_Moving, /*!< \brief Global index for moving surfaces using the grid information. */
*Marker_All_Deform_Mesh, /*!< \brief Global index for deformable markers at the boundary. */
Expand All @@ -763,6 +767,7 @@ class CConfig {
*Marker_CfgFile_Turbomachinery, /*!< \brief Global index for Turbomachinery using the config information. */
*Marker_CfgFile_TurbomachineryFlag, /*!< \brief Global index for Turbomachinery flag using the config information. */
*Marker_CfgFile_MixingPlaneInterface, /*!< \brief Global index for MixingPlane interface using the config information. */
*Marker_CfgFile_Giles, /*!< \brief Global index for Giles markers flag using the config information. */
*Marker_CfgFile_Moving, /*!< \brief Global index for moving surfaces using the config information. */
*Marker_CfgFile_Deform_Mesh, /*!< \brief Global index for deformable markers at the boundary. */
*Marker_CfgFile_Deform_Mesh_Sym_Plane, /*!< \brief Global index for markers with symmetric deformations. */
Expand Down Expand Up @@ -1375,7 +1380,7 @@ class CConfig {
su2double** & RotCenter, su2double** & RotAngles, su2double** & Translation);

void addTurboPerfOption(const string & name, unsigned short & nMarker_TurboPerf,
string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut);
string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut, string* & Marker_Turbomachinery);

void addActDiskOption(const string & name,
unsigned short & nMarker_ActDiskInlet, unsigned short & nMarker_ActDiskOutlet, string* & Marker_ActDiskInlet, string* & Marker_ActDiskOutlet,
Expand Down Expand Up @@ -3513,6 +3518,13 @@ class CConfig {
*/
void SetMarker_All_MixingPlaneInterface(unsigned short val_marker, unsigned short val_mixpla_interface) { Marker_All_MixingPlaneInterface[val_marker] = val_mixpla_interface; }

/*!
* \brief Set if a marker <i>val_marker</i> is part of the Giles boundary (read from the config file).
* \param[in] val_marker - Index of the marker in which we are interested.
* \param[in] val_giles - 0 if not part of the Giles boundary or greater than 1 if it is part.
*/
void SetMarker_All_Giles(unsigned short val_marker, unsigned short val_giles) { Marker_All_Giles[val_marker] = val_giles; }
Comment thread
pcarruscag marked this conversation as resolved.

/*!
* \brief Set if a marker <i>val_marker</i> is going to be affected by design variables <i>val_moving</i>
* (read from the config file).
Expand Down Expand Up @@ -3659,6 +3671,13 @@ class CConfig {
*/
unsigned short GetMarker_All_TurbomachineryFlag(unsigned short val_marker) const { return Marker_All_TurbomachineryFlag[val_marker]; }

/*!
* \brief Get the Giles boundary information for a marker <i>val_marker</i>.
* \param[in] val_marker value of the marker on the grid.
* \return 0 if is not part of the MixingPlane Interface and greater than 1 if it is part.
*/
unsigned short GetMarker_All_Giles(unsigned short val_marker) const { return Marker_All_Giles[val_marker]; }

/*!
* \brief Get the number of FSI interface markers <i>val_marker</i>.
* \param[in] void.
Expand Down Expand Up @@ -5335,6 +5354,12 @@ class CConfig {
*/
TURBO_PERF_KIND GetKind_TurboPerf(unsigned short val_iZone) const { return Kind_TurboPerf[val_iZone]; };

/*!
* \brief gets interface kind for an interface marker in turbomachinery problem
* \return interface kind
*/
TURBO_INTERFACE_KIND GetKind_TurboInterface(unsigned short interfaceIndex) const { return Kind_TurboInterface[interfaceIndex]; }

/*!
* \brief get outlet bounds name for Turbomachinery performance calculation.
* \return name of the bound.
Expand Down Expand Up @@ -6398,6 +6423,12 @@ class CConfig {
*/
unsigned short GetMarker_CfgFile_MixingPlaneInterface(const string& val_marker) const;

/*!
* \brief Get the Giles boundary information from the config definition for the marker <i>val_marker</i>.
* \return Plotting information of the boundary in the config information for the marker <i>val_marker</i>.
*/
unsigned short GetMarker_CfgFile_Giles(const string& val_marker) const;

/*!
* \brief Get the DV information from the config definition for the marker <i>val_marker</i>.
* \return DV information of the boundary in the config information for the marker <i>val_marker</i>.
Expand Down
18 changes: 17 additions & 1 deletion Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1622,6 +1622,7 @@ enum BC_TYPE {
FLUID_INTERFACE = 39, /*!< \brief Domain interface definition. */
DISP_DIR_BOUNDARY = 40, /*!< \brief Boundary displacement definition. */
DAMPER_BOUNDARY = 41, /*!< \brief Damper. */
MIXING_PLANE_INTERFACE = 42, /*< \breif Mxing plane */
CHT_WALL_INTERFACE = 50, /*!< \brief Domain interface definition. */
SMOLUCHOWSKI_MAXWELL = 55, /*!< \brief Smoluchoski/Maxwell wall boundary condition. */
SEND_RECEIVE = 99, /*!< \brief Boundary send-receive definition. */
Expand Down Expand Up @@ -1752,7 +1753,8 @@ enum RIEMANN_TYPE {
TOTAL_CONDITIONS_PT_1D = 11,
STATIC_PRESSURE_1D = 12,
MIXING_IN_1D = 13,
MIXING_OUT_1D =14
MIXING_OUT_1D = 14,
MASS_FLOW_OUTLET = 15
};
static const MapType<std::string, RIEMANN_TYPE> Riemann_Map = {
MakePair("TOTAL_CONDITIONS_PT", TOTAL_CONDITIONS_PT)
Expand All @@ -1769,6 +1771,7 @@ static const MapType<std::string, RIEMANN_TYPE> Riemann_Map = {
MakePair("RADIAL_EQUILIBRIUM", RADIAL_EQUILIBRIUM)
MakePair("TOTAL_CONDITIONS_PT_1D", TOTAL_CONDITIONS_PT_1D)
MakePair("STATIC_PRESSURE_1D", STATIC_PRESSURE_1D)
MakePair("MASS_FLOW_OUTLET", MASS_FLOW_OUTLET)
};

static const MapType<std::string, RIEMANN_TYPE> Giles_Map = {
Expand All @@ -1786,6 +1789,7 @@ static const MapType<std::string, RIEMANN_TYPE> Giles_Map = {
MakePair("RADIAL_EQUILIBRIUM", RADIAL_EQUILIBRIUM)
MakePair("TOTAL_CONDITIONS_PT_1D", TOTAL_CONDITIONS_PT_1D)
MakePair("STATIC_PRESSURE_1D", STATIC_PRESSURE_1D)
MakePair("MASS_FLOW_OUTLET", MASS_FLOW_OUTLET)
};

/*!
Expand Down Expand Up @@ -1862,6 +1866,18 @@ static const MapType<std::string, TURBO_PERF_KIND> TurboPerfKind_Map = {
MakePair("PROPELLOR", TURBO_PERF_KIND::PROPELLOR)
};

/*!
* \brief Types of Turbomachinery interfaces.
*/
enum class TURBO_INTERFACE_KIND{
MIXING_PLANE = ENUM_TRANSFER::MIXING_PLANE,
FROZEN_ROTOR = ENUM_TRANSFER::SLIDING_INTERFACE,
};
static const MapType<std::string, TURBO_INTERFACE_KIND> TurboInterfaceKind_Map = {
MakePair("MIXING_PLANE", TURBO_INTERFACE_KIND::MIXING_PLANE)
MakePair("FROZEN_ROTOR", TURBO_INTERFACE_KIND::FROZEN_ROTOR)
};

/*!
* \brief Types of Turbomachinery performance flag.
*/
Expand Down
16 changes: 14 additions & 2 deletions Common/include/option_structure.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1606,11 +1606,15 @@ class COptionTurboPerformance : public COptionBase {
unsigned short& size;
string*& marker_turboIn;
string*& marker_turboOut;
string*& markers;

public:
COptionTurboPerformance(const string option_field_name, unsigned short& nMarker_TurboPerf,
string*& Marker_TurboBoundIn, string*& Marker_TurboBoundOut)
: size(nMarker_TurboPerf), marker_turboIn(Marker_TurboBoundIn), marker_turboOut(Marker_TurboBoundOut) {
string*& Marker_TurboBoundIn, string*& Marker_TurboBoundOut, string*& Marker_Turbomachinery)
: size(nMarker_TurboPerf),
marker_turboIn(Marker_TurboBoundIn),
marker_turboOut(Marker_TurboBoundOut),
markers(Marker_Turbomachinery) {
this->name = option_field_name;
}

Comment thread
pcarruscag marked this conversation as resolved.
Expand All @@ -1624,6 +1628,7 @@ class COptionTurboPerformance : public COptionBase {
this->size = 0;
this->marker_turboIn = nullptr;
this->marker_turboOut = nullptr;
this->markers = nullptr;
return "";
}

Expand All @@ -1634,10 +1639,16 @@ class COptionTurboPerformance : public COptionBase {
this->size = 0;
this->marker_turboIn = nullptr;
this->marker_turboOut = nullptr;
this->markers = nullptr;
;
return newstring;
}

this->markers = new string[totalVals];
Comment thread
pcarruscag marked this conversation as resolved.
for (unsigned long i = 0; i < totalVals; i++) {
this->markers[i].assign(option_value[i]);
}

unsigned long nVals = totalVals / mod_num;
this->size = nVals;
this->marker_turboIn = new string[nVals];
Expand All @@ -1654,6 +1665,7 @@ class COptionTurboPerformance : public COptionBase {
this->size = 0;
this->marker_turboIn = nullptr;
this->marker_turboOut = nullptr;
this->markers = nullptr;
}
};

Expand Down
66 changes: 61 additions & 5 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,10 @@ void CConfig::addPeriodicOption(const string & name, unsigned short & nMarker_Pe
}

void CConfig::addTurboPerfOption(const string & name, unsigned short & nMarker_TurboPerf,
string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut) {
string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut, string* & Marker_Turbomachinery) {
assert(option_map.find(name) == option_map.end());
all_options.insert(pair<string, bool>(name, true));
COptionBase* val = new COptionTurboPerformance(name, nMarker_TurboPerf, Marker_TurboBoundIn, Marker_TurboBoundOut);
COptionBase* val = new COptionTurboPerformance(name, nMarker_TurboPerf, Marker_TurboBoundIn, Marker_TurboBoundOut, Marker_Turbomachinery);
option_map.insert(pair<string, COptionBase *>(name, val));
}

Expand Down Expand Up @@ -1037,6 +1037,7 @@ void CConfig::SetPointersNull() {
Marker_MixingPlaneInterface = nullptr;
Marker_TurboBoundIn = nullptr;
Marker_TurboBoundOut = nullptr;
Marker_Turbomachinery = nullptr;
Marker_Giles = nullptr;
Marker_Shroud = nullptr;

Expand Down Expand Up @@ -1633,8 +1634,8 @@ void CConfig::SetConfig_Options() {
addStringListOption("MARKER_MIXINGPLANE_INTERFACE", nMarker_MixingPlaneInterface, Marker_MixingPlaneInterface);
/*!\brief TURBULENT_MIXINGPLANE \n DESCRIPTION: Activate mixing plane also for turbulent quantities \ingroup Config*/
addBoolOption("TURBULENT_MIXINGPLANE", turbMixingPlane, false);
/*!\brief MARKER_TURBOMACHINERY \n DESCRIPTION: Identify the inflow and outflow boundaries in which the turbomachinery settings are applied. \ingroup Config*/
addTurboPerfOption("MARKER_TURBOMACHINERY", nMarker_Turbomachinery, Marker_TurboBoundIn, Marker_TurboBoundOut);
/*!\brief MARKER_TURBOMACHINERY \n DESCRIPTION: Identify the boundaries for which the turbomachinery settings are applied. \ingroup Config*/
addTurboPerfOption("MARKER_TURBOMACHINERY", nMarker_Turbomachinery, Marker_TurboBoundIn, Marker_TurboBoundOut, Marker_Turbomachinery);
/*!\brief NUM_SPANWISE_SECTIONS \n DESCRIPTION: Integer number of spanwise sections to compute 3D turbo BC and Performance for turbomachinery */
addUnsignedShortOption("NUM_SPANWISE_SECTIONS", nSpanWiseSections_User, 1);
/*!\brief SPANWISE_KIND \n DESCRIPTION: type of algorithm to identify the span-wise sections at the turbo boundaries.
Expand Down Expand Up @@ -5663,6 +5664,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) {
Marker_All_Turbomachinery = new unsigned short[nMarker_All] (); // Store whether the boundary is in needed for Turbomachinery computations.
Marker_All_TurbomachineryFlag = new unsigned short[nMarker_All] (); // Store whether the boundary has a flag for Turbomachinery computations.
Marker_All_MixingPlaneInterface = new unsigned short[nMarker_All] (); // Store whether the boundary has a in the MixingPlane interface.
Marker_All_Giles = new unsigned short[nMarker_All] (); // Store whether the boundary has is a Giles boundary.
Marker_All_SobolevBC = new unsigned short[nMarker_All] (); // Store wether the boundary should apply to the gradient smoothing.

for (iMarker_All = 0; iMarker_All < nMarker_All; iMarker_All++) {
Expand All @@ -5688,6 +5690,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) {
Marker_CfgFile_Turbomachinery = new unsigned short[nMarker_CfgFile] ();
Marker_CfgFile_TurbomachineryFlag = new unsigned short[nMarker_CfgFile] ();
Marker_CfgFile_MixingPlaneInterface = new unsigned short[nMarker_CfgFile] ();
Marker_CfgFile_Giles = new unsigned short[nMarker_CfgFile] ();
Marker_CfgFile_PyCustom = new unsigned short[nMarker_CfgFile] ();
Marker_CfgFile_SobolevBC = new unsigned short[nMarker_CfgFile] ();

Expand Down Expand Up @@ -5808,7 +5811,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) {

for (iMarker_Fluid_InterfaceBound = 0; iMarker_Fluid_InterfaceBound < nMarker_Fluid_InterfaceBound; iMarker_Fluid_InterfaceBound++) {
Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Fluid_InterfaceBound[iMarker_Fluid_InterfaceBound];
Marker_CfgFile_KindBC[iMarker_CfgFile] = FLUID_INTERFACE;
Marker_CfgFile_KindBC[iMarker_CfgFile] = BC_TYPE::FLUID_INTERFACE;
iMarker_CfgFile++;
}

Expand Down Expand Up @@ -6034,6 +6037,17 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) {
}
}

/*--- Idenftification fo Giles Markers ---*/
// This is seperate from MP and Turbomachinery Markers as all mixing plane markers are Giles,
// but not all Giles markers are mixing plane
for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) {
Marker_CfgFile_Giles[iMarker_CfgFile] = NO;
for (iMarker_Giles = 0; iMarker_Giles < nMarker_Giles; iMarker_Giles++) {
if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_Giles[iMarker_Giles])
Marker_CfgFile_Giles[iMarker_CfgFile] = YES;
}
}

/*--- Identification of MixingPlane interface markers ---*/

for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) {
Expand All @@ -6045,6 +6059,37 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) {
Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = indexMarker;
}

/*--- Once we have identified the MixingPlane and Turbomachinery markers
* we next need to determine what type of interface between zones is
* used. It is convenient to do this here as it tidies up the interface
* preproccesing in CDriver ---*/
if (nMarker_Turbomachinery != 0) {
nTurboInterfaces = (nMarker_Turbomachinery - 1)*2; //Two markers per zone minus inlet & outlet
Kind_TurboInterface.resize(nTurboInterfaces);
/*--- Loop over all markers ---*/
for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) {
/*--- Identify mixing plane markers ---*/
if (Marker_MixingPlaneInterface != nullptr){ // Necessary in cases where no mixing plane interfaces are defined
if (Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] != 0) { //Is a mixing plane
/*--- Find which list position this marker is in turbomachinery markers ---*/
const auto* target = std::find(Marker_Turbomachinery, &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]);
const auto target_index = target - Marker_Turbomachinery;
/*--- Assert that we find the marker within the turbomachienry markers ---*/
assert(target != &Marker_Turbomachinery[nMarker_Turbomachinery*2-1]);
/*--- Assign the correct interface ---*/
Kind_TurboInterface[target_index-1] = TURBO_INTERFACE_KIND::MIXING_PLANE; // Need to subtract 1 from index as to not consider the inlet an interface
}
}
if (Marker_Fluid_InterfaceBound != nullptr){ // No fluid interfaces are defined in the config file (nullptr if no interfaces defined)
if (Marker_CfgFile_KindBC[iMarker_CfgFile] == BC_TYPE::FLUID_INTERFACE) { // iMarker_CfgFile is a fluid interface
const auto* target = std::find(Marker_Turbomachinery, &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]);
const auto target_index = target - Marker_Turbomachinery;
Kind_TurboInterface[target_index-1] = TURBO_INTERFACE_KIND::FROZEN_ROTOR;
}
}
}
}

for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) {
Marker_CfgFile_DV[iMarker_CfgFile] = NO;
for (iMarker_DV = 0; iMarker_DV < nMarker_DV; iMarker_DV++)
Expand Down Expand Up @@ -7938,6 +7983,13 @@ unsigned short CConfig::GetMarker_CfgFile_MixingPlaneInterface(const string& val
return Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile];
}

unsigned short CConfig::GetMarker_CfgFile_Giles(const string& val_marker) const {
unsigned short iMarker_CfgFile;
for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++)
if (Marker_CfgFile_TagBound[iMarker_CfgFile] == val_marker) break;
return Marker_CfgFile_Giles[iMarker_CfgFile];
}

unsigned short CConfig::GetMarker_CfgFile_DV(const string& val_marker) const {
unsigned short iMarker_CfgFile;
for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++)
Expand Down Expand Up @@ -8125,6 +8177,9 @@ CConfig::~CConfig() {
delete[] Marker_CfgFile_TurbomachineryFlag;
delete[] Marker_All_TurbomachineryFlag;

delete[] Marker_CfgFile_Giles;
delete[] Marker_All_Giles;

delete[] Marker_CfgFile_MixingPlaneInterface;
delete[] Marker_All_MixingPlaneInterface;

Expand Down Expand Up @@ -8265,6 +8320,7 @@ CConfig::~CConfig() {

delete [] Marker_TurboBoundIn;
delete [] Marker_TurboBoundOut;
delete [] Marker_Turbomachinery;
delete [] Marker_Riemann;
delete [] Marker_Giles;

Expand Down
Loading