-
Notifications
You must be signed in to change notification settings - Fork 877
[WIP] pywrapper - custom source terms for all solvers #2388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
5875625
cc3dfab
b407a27
ce0b61e
d8d30a4
488efa0
40e1d97
b77fd09
4904b19
d4ac82b
1e64b8d
3429530
51b0b44
ce99e01
eb98506
11e6c7a
a845d20
33603e3
dd8462d
a3439f9
cd581f4
dc65d47
2003b18
effe99d
0b073b0
e623a4b
c86a630
7de32c9
b8aebc8
10a653a
82290f8
c4a0487
e711ed0
64b3761
a5013c6
d85d1fd
efb048a
6470580
fee5e1a
a1a0d7b
98c7a4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -550,7 +550,7 @@ enum ENUM_FLUIDMODEL { | |
FLUID_MIXTURE = 9, /*!< \brief Species mixture model. */ | ||
COOLPROP = 10, /*!< \brief Thermodynamics library. */ | ||
FLUID_FLAMELET = 11, /*!< \brief lookup table (LUT) method for premixed flamelets. */ | ||
DATADRIVEN_FLUID = 12, /*!< \brief multi-layer perceptron driven fluid model. */ | ||
DATADRIVEN_FLUID = 12, /*!< \brief multi-layer perceptron driven fluid model. */ | ||
}; | ||
static const MapType<std::string, ENUM_FLUIDMODEL> FluidModel_Map = { | ||
MakePair("STANDARD_AIR", STANDARD_AIR) | ||
|
@@ -1961,6 +1961,20 @@ static const MapType<std::string, INLET_TYPE> Inlet_Map = { | |
MakePair("PRESSURE_INLET", INLET_TYPE::PRESSURE_INLET) | ||
}; | ||
|
||
|
||
/*! | ||
* \brief Types species wall boundary treatments | ||
*/ | ||
enum class WALL_SPECIES_TYPE { | ||
FLUX, /*!< \brief User specifies total pressure, total temperature, and flow direction. */ | ||
VALUE, /*!< \brief User specifies density and velocity (mass flow). */ | ||
}; | ||
|
||
static const MapType<std::string, WALL_SPECIES_TYPE> Wall_Species_Map = { | ||
MakePair("FLUX", WALL_SPECIES_TYPE::FLUX) | ||
MakePair("VALUE", WALL_SPECIES_TYPE::VALUE) | ||
}; | ||
|
||
/*! | ||
* \brief Types outlet boundary treatments | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -495,6 +495,30 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
option_map.insert(pair<string, COptionBase *>(name, val)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
void CConfig::addWallSpeciesOption(const string& name, unsigned short & nMarker_Wall_Species, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
string * & Marker_Wall_Species, su2double** & wall_species_val, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
unsigned short & nSpecies_per_Wall) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
assert(option_map.find(name) == option_map.end()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
all_options.insert(pair<string, bool>(name, true)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
COptionBase* val = new COptionStringValuesList<su2double*>(name, nMarker_Wall_Species, Marker_Wall_Species, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wall_species_val, nSpecies_per_Wall); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
option_map.insert(pair<string, COptionBase *>(name, val)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
void CConfig::addWallSpeciesType(const string& name, unsigned short & nMarker_Wall_Species, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//string * & Marker_Wall_Species, WALL_SPECIES_TYPE** & wall_species_type, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
string * & Marker_Wall_Species, unsigned short** & wall_species_type, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
unsigned short & nSpecies_per_Wall) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
assert(option_map.find(name) == option_map.end()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
all_options.insert(pair<string, bool>(name, true)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//COptionBase* val = new COptionStringValuesList<<static_cast>(unsigned short)WALL_SPECIES_TYPE*>(name, nMarker_Wall_Species, Marker_Wall_Species, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
COptionBase* val = new COptionStringValuesList<unsigned short*>(name, nMarker_Wall_Species, Marker_Wall_Species, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wall_species_type, nSpecies_per_Wall); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
option_map.insert(pair<string, COptionBase *>(name, val)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
void CConfig::addInletTurbOption(const string& name, unsigned short& nMarker_Inlet_Turb, string*& Marker_Inlet_Turb, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
su2double**& Turb_Properties_val, unsigned short& nTurb_Properties) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
assert(option_map.find(name) == option_map.end()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -891,6 +915,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Inlet_FlowDir = nullptr; Inlet_Temperature = nullptr; Inlet_Pressure = nullptr; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Inlet_Velocity = nullptr; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Outlet_Pressure = nullptr; Inlet_SpeciesVal = nullptr; Inlet_TurbVal = nullptr; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wall_SpeciesVal = nullptr; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/*--- Engine Boundary Condition settings ---*/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -982,6 +1007,8 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Kind_Inc_Inlet = nullptr; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Kind_Inc_Outlet = nullptr; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wall_SpeciesType = nullptr; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Kind_ObjFunc = nullptr; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Weight_ObjFunc = nullptr; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -1571,6 +1598,8 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
addEnumOption("INLET_TYPE", Kind_Inlet, Inlet_Map, INLET_TYPE::TOTAL_CONDITIONS); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/*!\brief INC_INLET_TYPE \n DESCRIPTION: List of inlet types for incompressible flows. List length must match number of inlet markers. Options: VELOCITY_INLET, PRESSURE_INLET, INPUT_FILE. \ingroup Config*/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
addEnumListOption("INC_INLET_TYPE", nInc_Inlet, Kind_Inc_Inlet, Inlet_Map); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
addBoolOption("SPECIFIED_INLET_PROFILE", Inlet_From_File, false); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/*!\brief INLET_FILENAME \n DESCRIPTION: Input file for a specified inlet profile (w/ extension) \n DEFAULT: inlet.dat \ingroup Config*/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
addStringOption("INLET_FILENAME", Inlet_Filename, string("inlet.dat")); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -1590,6 +1619,10 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/*!\brief MARKER_INLET_SPECIES \n DESCRIPTION: Inlet Species boundary marker(s) with the following format | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Inlet Species: (inlet_marker, Species1, Species2, ..., SpeciesN-1, inlet_marker2, Species1, Species2, ...) */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
addInletSpeciesOption("MARKER_INLET_SPECIES",nMarker_Inlet_Species, Marker_Inlet_Species, Inlet_SpeciesVal, nSpecies_per_Inlet); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
addWallSpeciesOption("MARKER_WALL_SPECIES" ,nMarker_Wall_Species , Marker_Wall_Species , Wall_SpeciesVal , nSpecies_per_Wall); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
addWallSpeciesType("WALL_SPECIES_TYPE" ,nMarker_Wall_Species , Marker_Wall_Species , Wall_SpeciesType , nSpecies_per_Wall); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/*!\brief MARKER_INLET_TURBULENT \n DESCRIPTION: Inlet Turbulence boundary marker(s) with the following format | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Inlet Turbulent: (inlet_marker, TurbulentIntensity1, ViscosityRatio1, inlet_marker2, TurbulentIntensity2, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ViscosityRatio2, ...) */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -5578,12 +5611,14 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CURRENT_FUNCTION); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// Helper function that checks scalar variable bounds, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto checkScalarBounds = [&](su2double scalar, const string& name, su2double lowerBound, su2double upperBound) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (scalar < lowerBound || scalar > upperBound) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SU2_MPI::Error(string("Variable: ") + name + string(", is out of bounds."), CURRENT_FUNCTION); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cout << "Note: we do not check boudns for scalars anymore." << endl; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// auto checkScalarBounds = [&](su2double scalar, const string& name, su2double lowerBound, su2double upperBound) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// if (scalar < lowerBound || scalar > upperBound) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// SU2_MPI::Error(string("Variable: ") + name + string(", is out of bounds."), CURRENT_FUNCTION); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/*--- Some options have to provide as many entries as there are additional species equations. ---*/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check noticeCode scanning / CodeQL Commented-out code Note
This comment appears to contain commented-out code.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/*--- Fill a vector with the entires and then check if each element is equal to the first one. ---*/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::vector<unsigned short> nSpecies_options; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nSpecies_options.push_back(nSpecies_Init); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -5603,25 +5638,26 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/*--- Check whether some variables (or their sums) are in physical bounds. [0,1] for species related quantities. ---*/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/*--- Note, only for species transport, not for flamelet model ---*/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (Kind_Species_Model == SPECIES_MODEL::SPECIES_TRANSPORT) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
su2double Species_Init_Sum = 0.0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for (unsigned short iSpecies = 0; iSpecies < nSpecies; iSpecies++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
checkScalarBounds(Species_Init[iSpecies], "SPECIES_INIT individual", 0.0, 1.0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Species_Init_Sum += Species_Init[iSpecies]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
checkScalarBounds(Species_Init_Sum, "SPECIES_INIT sum", 0.0, 1.0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for (iMarker = 0; iMarker < nMarker_Inlet_Species; iMarker++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
su2double Inlet_SpeciesVal_Sum = 0.0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for (unsigned short iSpecies = 0; iSpecies < nSpecies; iSpecies++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
checkScalarBounds(Inlet_SpeciesVal[iMarker][iSpecies], "MARKER_INLET_SPECIES individual", 0.0, 1.0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Inlet_SpeciesVal_Sum += Inlet_SpeciesVal[iMarker][iSpecies]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
checkScalarBounds(Inlet_SpeciesVal_Sum, "MARKER_INLET_SPECIES sum", 0.0, 1.0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cout << "warning: no bounds checked for species" << endl; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// if (Kind_Species_Model == SPECIES_MODEL::SPECIES_TRANSPORT) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// su2double Species_Init_Sum = 0.0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// for (unsigned short iSpecies = 0; iSpecies < nSpecies; iSpecies++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// checkScalarBounds(Species_Init[iSpecies], "SPECIES_INIT individual", 0.0, 1.0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// Species_Init_Sum += Species_Init[iSpecies]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// checkScalarBounds(Species_Init_Sum, "SPECIES_INIT sum", 0.0, 1.0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// for (iMarker = 0; iMarker < nMarker_Inlet_Species; iMarker++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+5644
to
+5650
Check noticeCode scanning / CodeQL Commented-out code Note
This comment appears to contain commented-out code.
Copilot AutofixAI 9 days ago To resolve the issue, we will remove the commented-out code entirely. This approach is appropriate because the surrounding comments and Steps to fix:
Suggested changeset
1
Common/src/CConfig.cpp
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Positive FeedbackNegative Feedback
Refresh and try again.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// su2double Inlet_SpeciesVal_Sum = 0.0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// for (unsigned short iSpecies = 0; iSpecies < nSpecies; iSpecies++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// checkScalarBounds(Inlet_SpeciesVal[iMarker][iSpecies], "MARKER_INLET_SPECIES individual", 0.0, 1.0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// Inlet_SpeciesVal_Sum += Inlet_SpeciesVal[iMarker][iSpecies]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// checkScalarBounds(Inlet_SpeciesVal_Sum, "MARKER_INLET_SPECIES sum", 0.0, 1.0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} // species transport checks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check noticeCode scanning / CodeQL Commented-out code Note
This comment appears to contain commented-out code.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/*--- Define some variables for flamelet model. ---*/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (Kind_Species_Model == SPECIES_MODEL::FLAMELET) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -5644,7 +5680,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_FarField, iMarker_SymWall, iMarker_PerBound, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_NearFieldBound, iMarker_Fluid_InterfaceBound, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_Inlet, iMarker_Riemann, iMarker_Giles, iMarker_Outlet, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_Smoluchowski_Maxwell, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_Smoluchowski_Maxwell, iMarker_Wall, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_Isothermal,iMarker_HeatFlux,iMarker_HeatTansfer, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_EngineInflow, iMarker_EngineExhaust, iMarker_Damper, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_Displacement, iMarker_Load, iMarker_Internal, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -6206,7 +6242,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
unsigned short iMarker_Euler, iMarker_Custom, iMarker_FarField, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_SymWall, iMarker_PerBound, iMarker_NearFieldBound, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_Fluid_InterfaceBound, iMarker_Inlet, iMarker_Riemann, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_Fluid_InterfaceBound, iMarker_Inlet, iMarker_Riemann, iMarker_Wall, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_Deform_Mesh, iMarker_Deform_Mesh_Sym_Plane, iMarker_Fluid_Load, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_Smoluchowski_Maxwell, iWall_Catalytic, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMarker_Giles, iMarker_Outlet, iMarker_Isothermal, iMarker_HeatFlux, iMarker_HeatTransfer, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -7537,7 +7573,14 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BoundaryTable.PrintFooter(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (nMarker_Wall_Species != 0) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BoundaryTable << "Species Wall boundary"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for (iMarker_Wall = 0; iMarker_Wall < nMarker_Wall_Species; iMarker_Wall++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BoundaryTable << Marker_Wall_Species[iMarker_Wall]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (iMarker_Wall < nMarker_Wall_Species-1) BoundaryTable << " "; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BoundaryTable.PrintFooter(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (nMarker_Riemann != 0) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BoundaryTable << "Riemann boundary"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for (iMarker_Riemann = 0; iMarker_Riemann < nMarker_Riemann; iMarker_Riemann++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -9028,14 +9071,24 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return Exhaust_Pressure_Target[iMarker_EngineExhaust]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
INLET_TYPE CConfig::GetKind_Inc_Inlet(const string& val_marker) const { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
unsigned short iMarker_Inlet; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for (iMarker_Inlet = 0; iMarker_Inlet < nMarker_Inlet; iMarker_Inlet++) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (Marker_Inlet[iMarker_Inlet] == val_marker) break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return Kind_Inc_Inlet[iMarker_Inlet]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//WALL_SPECIES_TYPE* CConfig::GetKind_Wall_Species(const string& val_marker) const { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// unsigned short * CConfig::GetKind_Wall_Species(const string& val_marker) const { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// unsigned short iMarker_Wall_Species; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// for (iMarker_Wall_Species = 0; iMarker_Wall_Species < nMarker_Wall_Species; iMarker_Wall_Species++) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// if (Marker_Wall_Species[iMarker_Wall_Species] == val_marker) break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// return Wall_SpeciesType[iMarker_Wall_Species]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
INC_OUTLET_TYPE CConfig::GetKind_Inc_Outlet(const string& val_marker) const { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check noticeCode scanning / CodeQL Commented-out code Note
This comment appears to contain commented-out code.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
unsigned short iMarker_Outlet; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for (iMarker_Outlet = 0; iMarker_Outlet < nMarker_Outlet; iMarker_Outlet++) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (Marker_Outlet[iMarker_Outlet] == val_marker) break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -9098,6 +9151,20 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return Inlet_SpeciesVal[iMarker_Inlet_Species]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const su2double* CConfig::GetWall_SpeciesVal(const string& val_marker) const { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
unsigned short iMarker_Wall_Species; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for (iMarker_Wall_Species = 0; iMarker_Wall_Species < nMarker_Wall_Species; iMarker_Wall_Species++) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (Marker_Wall_Species[iMarker_Wall_Species] == val_marker) break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return Wall_SpeciesVal[iMarker_Wall_Species]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//const WALL_SPECIES_TYPE* CConfig::GetWall_SpeciesType(const string& val_marker) const { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const unsigned short* CConfig::GetWall_SpeciesType(const string& val_marker) const { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
unsigned short iMarker_Wall_Species; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check noticeCode scanning / CodeQL Commented-out code Note
This comment appears to contain commented-out code.
Copilot AutofixAI 9 days ago To fix the issue, we should either remove the commented-out code entirely or reinstate it if it is still relevant. In this case, since the function
Suggested changeset
1
Common/src/CConfig.cpp
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Positive FeedbackNegative Feedback
Refresh and try again.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for (iMarker_Wall_Species = 0; iMarker_Wall_Species < nMarker_Wall_Species; iMarker_Wall_Species++) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (Marker_Wall_Species[iMarker_Wall_Species] == val_marker) break; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return Wall_SpeciesType[iMarker_Wall_Species]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const su2double* CConfig::GetInlet_TurbVal(const string& val_marker) const { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/*--- If Turbulent Inlet is not provided for the marker, return free stream values. ---*/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for (auto iMarker = 0u; iMarker < nMarker_Inlet_Turb; iMarker++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Check notice
Code scanning / CodeQL
Commented-out code Note
Copilot Autofix
AI 9 days ago
To resolve the issue, we need to either remove the commented-out code or reinstate it as active code. Since there is no context indicating that the commented-out line is necessary or relevant, the best approach is to remove it entirely. This will improve code readability and eliminate potential confusion for developers.