29#include "../gradients/computeGradientsGreenGauss.hpp"
30#include "../gradients/computeGradientsLeastSquares.hpp"
31#include "../limiters/computeLimiters.hpp"
32#include "../numerics_simd/CNumericsSIMD.hpp"
35template <
class V, ENUM_REGIME R>
57template <
class V, ENUM_REGIME R>
77template <
class V, ENUM_REGIME R>
154 for (
unsigned long iMarker = 0; iMarker <
nMarker; iMarker++) {
188 constexpr auto nHeatConjugateVar = 4u;
193 for (
unsigned long iMarker = 0; iMarker <
nMarker; iMarker++)
195 nSolidVertex[iMarker] = 0;
211template <
class V, ENUM_REGIME R>
238 for (
auto iVar = 0u; iVar <
nVar; iVar++) {
244template <
class V, ENUM_REGIME R>
257 for (
unsigned short iPeriodic = 1; iPeriodic <= config->
GetnMarker_Periodic() / 2; iPeriodic++) {
274 for (
auto iPoint = 0ul; iPoint <
nPoint; iPoint++) {
275 nodes->SetLocalCFL(iPoint, CFL);
282template <
class V, ENUM_REGIME R>
293#ifdef CODI_REVERSE_TYPE
309 if (!coloring.empty()) {
313 auto nColor = coloring.getOuterSize();
316 for (
auto iColor = 0ul; iColor < nColor; ++iColor)
317 EdgeColoring.emplace_back(coloring.innerIdx(iColor), coloring.getNumNonZeros(iColor), groupSize);
329 cout <<
"WARNING: On " << numRanksUsingReducer <<
" MPI ranks the coloring efficiency was less than "
331 <<
" Those ranks will now use a fallback strategy, better performance may be possible\n"
332 <<
" with a different value of config option EDGE_COLORING_GROUP_SIZE (default 512)."
334 <<
"\n The memory usage of the discrete adjoint solver is higher when using the fallback."
339 cout <<
"All ranks use edge coloring." << endl;
347 const unsigned long coloredNumColors =
ReducerStrategy ? 0 : coloring.getOuterSize();
348 unsigned long maxColoredNumColors = 0;
352 unsigned long minColoredEdgeColorGroupSize = 1 << 30;
356 cout <<
"Among the ranks that use edge coloring,\n"
357 <<
" the minimum efficiency is " << minColoredParallelEff <<
",\n"
358 <<
" the maximum number of colors is " << maxColoredNumColors <<
",\n"
359 <<
" the minimum edge color group size is " << minColoredEdgeColorGroupSize <<
"." << endl;
371template <
class V, ENUM_REGIME R>
376 for (
auto ptr : mat)
delete [] ptr;
383template <
class V, ENUM_REGIME R>
385 bool reconstruction) {
388 const auto& primitives =
nodes->GetPrimitive();
389 auto& gradient = reconstruction ?
nodes->GetGradient_Reconstruction() :
nodes->GetGradient_Primitive();
396template <
class V, ENUM_REGIME R>
398 bool reconstruction) {
405 if (reconstruction) {
414 const auto& primitives =
nodes->GetPrimitive();
415 auto& rmatrix =
nodes->GetRmatrix();
416 auto& gradient = reconstruction ?
nodes->GetGradient_Reconstruction() :
nodes->GetGradient_Primitive();
423template <
class V, ENUM_REGIME R>
429 const auto& primitives =
nodes->GetPrimitive();
430 const auto& gradient =
nodes->GetGradient_Reconstruction();
431 auto& primMin =
nodes->GetSolution_Min();
432 auto& primMax =
nodes->GetSolution_Max();
433 auto& limiter =
nodes->GetLimiter_Primitive();
436 *geometry, *config, 0,
nPrimVarGrad, umusclKappa, primitives, gradient, primMin, primMax, limiter);
439template <
class V, ENUM_REGIME R>
446 const bool backscatter = config->
GetSBSParam().StochasticBackscatter;
451 if (tkeNeeded || backscatter) turbNodes = solver_container[
TURB_SOL]->
GetNodes();
466 nodes->GetPrimitive(jPoint));
469 nodes->GetSecondary(jPoint));
474 nodes->GetGradient_Primitive(jPoint));
486 for (
unsigned short iDim = 0; iDim <
nDim; iDim++)
490 for (
unsigned short iDim = 0; iDim <
nDim; iDim++)
505 nodes->GetTau_Wall(jPoint));
523template <
class V, ENUM_REGIME R>
539 if (!write_heads)
return;
551 for (
unsigned short iVar = 0; iVar <
nVar; iVar++) {
557 for (
unsigned long iPoint = 0; iPoint <
nPointDomain; iPoint++) {
563 vector<su2double> error(
nVar, 0.0);
567 for (
unsigned short iVar = 0; iVar <
nVar; iVar++) {
587template <
class V, ENUM_REGIME R>
597 for (
unsigned long iPoint = 0; iPoint <
nPointDomain; iPoint++) {
598 for (
unsigned short iVar = 0; iVar <
nVar; iVar++) {
599 nodes->AddSolution(iPoint, iVar,
nodes->GetUnderRelaxation(iPoint) *
LinSysSol(iPoint, iVar));
605 for (
unsigned short iPeriodic = 1; iPeriodic <= config->
GetnMarker_Periodic()/2; iPeriodic++) {
617template <
class V, ENUM_REGIME R>
643template <
class V, ENUM_REGIME R>
647 auto& StrainMag =
nodes->GetStrainMag();
651 su2double strainMax = 0.0, omegaMax = 0.0;
654 for (
unsigned long iPoint = 0; iPoint <
nPoint; ++iPoint) {
656 const auto VelocityGradient =
nodes->GetVelocityGradient(iPoint);
657 auto Vorticity =
nodes->GetVorticity(iPoint);
663 Vorticity[2] = VelocityGradient(1,0)-VelocityGradient(0,1);
666 Vorticity[0] = VelocityGradient(2,1)-VelocityGradient(1,2);
667 Vorticity[1] = -(VelocityGradient(2,0)-VelocityGradient(0,2));
678 StrainMag(iPoint) = 0.0;
682 for (
unsigned long iDim = 0; iDim <
nDim; iDim++) {
683 StrainMag(iPoint) +=
pow(VelocityGradient(iDim, iDim), 2);
686 StrainMag(iPoint) +=
pow(vy / y, 2);
691 StrainMag(iPoint) += 2.0*
pow(0.5*(VelocityGradient(0,1) + VelocityGradient(1,0)), 2);
694 StrainMag(iPoint) += 2.0*
pow(0.5*(VelocityGradient(0,2) + VelocityGradient(2,0)), 2);
695 StrainMag(iPoint) += 2.0*
pow(0.5*(VelocityGradient(1,2) + VelocityGradient(2,1)), 2);
698 StrainMag(iPoint) =
sqrt(2.0*StrainMag(iPoint));
704 strainMax = max(strainMax, StrainMag(iPoint));
727template <
class V, ENUM_REGIME R>
729 unsigned long iVertex) {
734 unsigned short T_position =
nDim;
735 unsigned short P_position =
nDim + 1;
736 unsigned short FlowDir_position =
nDim + 2;
745 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
746 Inlet_FlowDir[iMarker][iVertex][iDim] = val_inlet[FlowDir_position + iDim];
750template <
class V, ENUM_REGIME R>
755 const auto T_position =
nDim;
756 const auto P_position =
nDim + 1;
757 const auto FlowDir_position =
nDim + 2;
760 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
761 val_inlet[FlowDir_position + iDim] =
Inlet_FlowDir[iMarker][iVertex][iDim];
771template <
class V, ENUM_REGIME R>
781 for (
unsigned long iVertex = 0; iVertex <
nVertex[iMarker]; iVertex++) {
784 for (
unsigned short iDim = 0; iDim <
nDim; iDim++)
Inlet_FlowDir[iMarker][iVertex][iDim] = flow_dir[iDim];
792 for (
unsigned long iVertex = 0; iVertex <
nVertex[iMarker]; iVertex++) {
795 for (
unsigned short iDim = 0; iDim <
nDim; iDim++)
Inlet_FlowDir[iMarker][iVertex][iDim] = vel[iDim];
800 for (
unsigned long iVertex = 0; iVertex <
nVertex[iMarker]; iVertex++) {
803 for (
unsigned short iDim = 0; iDim <
nDim; iDim++)
Inlet_FlowDir[iMarker][iVertex][iDim] = 0.0;
808template <
class V, ENUM_REGIME R>
814 const CSolver* fine_solver{
nullptr};
815 CSolver* coarse_solver{
nullptr};
816 unsigned short marker{0};
817 unsigned short var{0};
819 su2double Get(
unsigned long vertex)
const {
822 }
else if (var == 1) {
823 return fine_solver->GetInletPtotal(marker, vertex);
825 return fine_solver->GetInletFlowDir(marker, vertex, var - 2);
828 void Set(
unsigned long vertex,
const su2double& val)
const {
830 coarse_solver->SetInletTtotal(marker, vertex, val);
831 }
else if (var == 1) {
832 coarse_solver->SetInletPtotal(marker, vertex, val);
834 coarse_solver->SetInletFlowDir(marker, vertex, var - 2, val);
838 for (
auto mg_coarse = 1u; mg_coarse <= config->
GetnMGLevels(); ++mg_coarse) {
839 const auto mg_fine = mg_coarse - 1;
840 inlet_values.fine_solver = solver_container[mg_fine][
FLOW_SOL];
841 inlet_values.coarse_solver = solver_container[mg_coarse][
FLOW_SOL];
843 for (
auto marker = 0u; marker < config->
GetnMarker_All(); ++marker) {
845 inlet_values.marker = marker;
846 for (inlet_values.var = 0; inlet_values.var < 2 +
nDim; ++inlet_values.var) {
853template <
class V, ENUM_REGIME R>
855 bool update_geo,
su2double* SolutionRestart,
856 unsigned short nVar_Restart) {
867 if (nVar_Restart == 0) nVar_Restart =
nVar;
871 unsigned short skipVars =
nDim;
875 restart_filename = config->
GetFilename(restart_filename,
".dat", iter);
878 restart_filename = config->
GetFilename(restart_filename,
".csv", iter);
884 auto notFound =
fields.end();
885 if (find(
fields.begin(), notFound,
string(
"\"Grid_Velocity_x\"")) == notFound) {
887 cout <<
"\nWARNING: The restart file does not contain grid velocities, these will be set to zero.\n" << endl;
888 steady_restart =
true;
894 unsigned long counter = 0;
902 if (iPoint_Local > -1) {
909 if (SolutionRestart ==
nullptr) {
910 for (
auto iVar = 0u; iVar < nVar_Restart; iVar++)
915 for (
auto iVar = 0u; iVar < nVar_Restart; iVar++)
917 nodes->SetSolution(iPoint_Local, SolutionRestart);
934 if (!steady_restart) {
936 index += skipVars + nVar_Restart + config->
GetnTurbVar();
937 for (
auto iDim = 0u; iDim <
nDim; iDim++) { GridVel[iDim] =
Restart_Data[index+iDim]; }
940 for (
auto iDim = 0u; iDim <
nDim; iDim++) {
949 if (static_fsi && update_geo) {
954 for (
auto iDim = 0u; iDim <
nDim; iDim++) {
967 SU2_MPI::Error(
string(
"The solution file ") + restart_filename +
string(
" does not match with the mesh file.\n") +
968 string(
"This can be caused by empty lines at the end of the file."),
CURRENT_FUNCTION);
980 for (
auto iMesh = 0u; iMesh <= config->
GetnMGLevels(); iMesh++) {
1010 for (
auto iMesh = 1u; iMesh <= config->
GetnMGLevels(); iMesh++) {
1041template <
class V, ENUM_REGIME R>
1043 CConfig *config,
int iter,
bool update_geo) {
1048template <
class V, ENUM_REGIME R>
1050 CConfig *config,
unsigned long TimeIter) {
1062 unsigned long iPoint;
1063 unsigned short iMesh;
1069 for (iMesh = 0; iMesh <= config->
GetnMGLevels(); iMesh++) {
1073 for (iPoint = 0; iPoint < geometry[iMesh]->
GetnPoint(); iPoint++) {
1099template <
class V, ENUM_REGIME R>
1108 for (
unsigned short iMesh = 0; iMesh <= config->
GetnMGLevels(); iMesh++) {
1139 for (
unsigned short iMesh = 0; iMesh <= config->
GetnMGLevels(); iMesh++) {
1149template <
class V, ENUM_REGIME FlowRegime>
1157 const auto iVel =
prim_idx.Velocity();
1167 for (
auto iVertex = 0ul; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
1168 const auto iPoint = geometry->
vertex[val_marker][iVertex]->
GetNode();
1181 for (
auto iDim = 0u; iDim <
nDim; iDim++) UnitNormal[iDim] = it->second[iDim];
1184 for (
auto iDim = 0u; iDim <
nDim; iDim++) UnitNormal[iDim] = Normal[iDim] / Area;
1195 for (
auto iDim = 0u; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
1198 for (
auto iVar = 0u; iVar <
nPrimVar; iVar++)
1199 V_reflected[iVar] =
nodes->GetPrimitive(iPoint, iVar);
1201 su2double ProjVelocity_i =
nodes->GetProjVel(iPoint, UnitNormal);
1205 for (
auto iDim = 0u; iDim <
nDim; iDim++)
1206 V_reflected[iDim + iVel] =
nodes->GetVelocity(iPoint, iDim) - ProjVelocity_i * UnitNormal[iDim];
1222 for (
auto iVar = iVel +
nDim; iVar <
nVar; iVar++) {
1223 LinSysRes(iPoint, iVar) += residual.residual[iVar];
1229 for (
auto iVar = 0u; iVar <
nVar; iVar++) {
1230 if (iVar < iVel || iVar >= iVel +
nDim) {
1231 for (
auto jVar = 0u; jVar <
nVar; jVar++) {
1247 for (
auto iDim = 0u; iDim <
nDim; iDim++) {
1251 for(
auto iDim = 0u; iDim <
nDim; iDim++) {
1253 gridVel[iDim] *=
nodes->GetDensity(iPoint);
1258 for (
auto iDim = 0u; iDim <
nDim; iDim++) {
1259 vp += (solutionOld[iVel + iDim] - gridVel[iDim]) * UnitNormal[iDim];
1261 for (
auto iDim = 0u; iDim <
nDim; iDim++) {
1262 solutionOld[iVel + iDim] -= vp * UnitNormal[iDim];
1267 for (
auto iDim = 0u; iDim <
nDim; iDim++) {
1268 normalRes +=
LinSysRes(iPoint, iVel + iDim) * UnitNormal[iDim];
1270 for (
auto iDim = 0u; iDim <
nDim; iDim++) {
1271 LinSysRes(iPoint, iVel + iDim) -= normalRes * UnitNormal[iDim];
1280 for (
auto iVar = 0u; iVar <
nVar; iVar++)
1281 mat[iVar *
nVar + iVar] = 1;
1282 for (
auto iDim = 0u; iDim <
nDim; iDim++)
1283 for (
auto jDim = 0u; jDim <
nDim; jDim++)
1284 mat[(iDim + iVel) *
nVar + jDim + iVel] -= UnitNormal[iDim] * UnitNormal[jDim];
1286 auto ModifyJacobian = [&](
const unsigned long jPoint) {
1290 for (
auto iVar = 0u; iVar <
nVar; iVar++)
1291 for (
auto jVar = 0u; jVar <
nVar; jVar++) jac[iVar *
nVar + jVar] = view(iVar, jVar);
1297 ModifyJacobian(iPoint);
1298 for (
size_t iNeigh = 0; iNeigh < geometry->
nodes->
GetnPoint(iPoint); ++iNeigh) {
1306 for (
auto iDim = 0u; iDim <
nDim; iDim++) {
1307 normalRes += Res_TruncError[iVel + iDim] * UnitNormal[iDim];
1309 for (
auto iDim = 0u; iDim <
nDim; iDim++) {
1310 Res_TruncError[iVel + iDim] -= normalRes * UnitNormal[iDim];
1317template <
class V, ENUM_REGIME R>
1328 for (
unsigned short iPeriodic = 1; iPeriodic <= config->
GetnMarker_Periodic() / 2; iPeriodic++) {
1334template <
class V, ENUM_REGIME FlowRegime>
1342 unsigned long iVertex, jVertex, iPoint, Point_Normal = 0;
1343 unsigned short iDim, iVar, jVar, iMarker, nDonorVertex;
1359 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
1362 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
1370 for (iVar = 0; iVar <
nVar; iVar++) {
1372 for (jVar = 0; jVar <
nVar; jVar++)
Jacobian_i[iVar][jVar] = 0.0;
1377 for (jVertex = 0; jVertex < nDonorVertex; jVertex++) {
1380 for (iVar = 0; iVar <
nPrimVar; iVar++) {
1381 PrimVar_i[iVar] =
nodes->GetPrimitive(iPoint, iVar);
1394 P_static = PrimVar_j[
nDim + 1];
1395 rho_static = PrimVar_j[
nDim + 2];
1407 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
1420 for (iVar = 0; iVar <
nVar; iVar++) {
1421 Residual[iVar] += weight * residual[iVar];
1422 for (jVar = 0; jVar <
nVar; jVar++)
Jacobian_i[iVar][jVar] += weight * residual.jacobian_i[iVar][jVar];
1435 for (iVar = 0; iVar <
nVar; iVar++) {
1437 for (jVar = 0; jVar <
nVar; jVar++)
Jacobian_i[iVar][jVar] = 0.0;
1442 for (jVertex = 0; jVertex < nDonorVertex; jVertex++) {
1462 nodes->GetGradient_Primitive(iPoint));
1476 for (iVar = 0; iVar <
nVar; iVar++) {
1477 Residual[iVar] += weight * residual[iVar];
1478 for (jVar = 0; jVar <
nVar; jVar++)
Jacobian_i[iVar][jVar] += weight * residual.jacobian_i[iVar][jVar];
1498template <
class V, ENUM_REGIME R>
1506 unsigned short iVar;
1507 unsigned long iVertex, iPoint;
1519 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
1542 nodes->SetRes_TruncErrorZero(iPoint);
1548 for (iVar = 0; iVar <
nVar; iVar++) {
1562template <
class V, ENUM_REGIME R>
1564 const CSolver*
const* solvers,
1571 SU2_MPI::Error(
"When using vectorization, the EDGE_COLORING_GROUP_SIZE must be divisible "
1583 unsigned long counterLocal = 0;
1592 bool pausePreacc =
false;
1604 bool in = (k+j < color.size);
1606 iEdge[j] = color.indices[k+j*in];
1616 counterLocal += (
nodes->NonPhysicalEdgeCounter[iEdge[j]] > 0);
1625template <
class V, ENUM_REGIME R>
1630 for (
unsigned long iPoint = 0; iPoint <
nPoint; ++iPoint) {
1644template <
class V, ENUM_REGIME FlowRegime>
1646 CConfig *config,
unsigned short iRKStep,
unsigned short iMesh,
1647 unsigned short RunTime_EqSystem) {
1650 unsigned short iVar, iMarker, iDim, iNeigh;
1651 unsigned long iPoint, jPoint, iEdge, iVertex;
1653 const su2double *U_time_nM1 =
nullptr, *U_time_n =
nullptr, *U_time_nP1 =
nullptr;
1654 su2double Volume_nM1, Volume_nP1, TimeStep;
1655 const su2double *Normal =
nullptr, *GridVel_i =
nullptr, *GridVel_j =
nullptr;
1681 U_time_nM1 =
nodes->GetSolution_time_n1(iPoint);
1682 U_time_n =
nodes->GetSolution_time_n(iPoint);
1683 U_time_nP1 =
nodes->GetSolution(iPoint);
1693 for (iVar = 0; iVar <
nVar; iVar++) {
1695 LinSysRes(iPoint,iVar) += (U_time_nP1[iVar] - U_time_n[iVar])*Volume_nP1 / TimeStep;
1697 LinSysRes(iPoint,iVar) += ( 3.0*U_time_nP1[iVar] - 4.0*U_time_n[iVar]
1698 +1.0*U_time_nM1[iVar])*Volume_nP1 / (2.0*TimeStep);
1727 U_time_n =
nodes->GetSolution_time_n(iPoint);
1729 for (iNeigh = 0; iNeigh < geometry->
nodes->
GetnPoint(iPoint); iNeigh++) {
1738 su2double dir = (iPoint < jPoint)? 0.5 : -0.5;
1741 for (iDim = 0; iDim <
nDim; iDim++)
1742 Residual_GCL += dir*(GridVel_i[iDim]+GridVel_j[iDim])*Normal[iDim];
1744 for (iVar = 0; iVar <
nVar; iVar++)
1745 LinSysRes(iPoint,iVar) += U_time_n[iVar]*Residual_GCL;
1752 for (iMarker = 0; iMarker < geometry->
GetnMarker(); iMarker++) {
1758 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
1773 for (iDim = 0; iDim <
nDim; iDim++)
1774 Residual_GCL -= 0.5*(GridVel_i[iDim]+GridVel_i[iDim])*Normal[iDim];
1778 U_time_n =
nodes->GetSolution_time_n(iPoint);
1779 for (iVar = 0; iVar <
nVar; iVar++)
1780 LinSysRes(iPoint,iVar) += U_time_n[iVar]*Residual_GCL;
1798 U_time_nM1 =
nodes->GetSolution_time_n1(iPoint);
1799 U_time_n =
nodes->GetSolution_time_n(iPoint);
1800 U_time_nP1 =
nodes->GetSolution(iPoint);
1813 for (iVar = 0; iVar <
nVar; iVar++) {
1815 LinSysRes(iPoint,iVar) += (U_time_nP1[iVar] - U_time_n[iVar])*(Volume_nP1/TimeStep);
1817 LinSysRes(iPoint,iVar) += (U_time_nP1[iVar] - U_time_n[iVar])*(3.0*Volume_nP1/(2.0*TimeStep))
1818 + (U_time_nM1[iVar] - U_time_n[iVar])*(Volume_nM1/(2.0*TimeStep));
1845inline bool IsMomentumBoundary(
unsigned short Boundary) {
1859inline int FindMonitoringIndex(
const CConfig* config,
unsigned long iMarker,
unsigned short Monitoring,
1860 std::array<su2double, 3>& Origin) {
1861 if (Monitoring !=
YES)
return -1;
1864 for (
int iMarker_Monitoring = 0; iMarker_Monitoring < nMarker_Monitoring; iMarker_Monitoring++) {
1867 return iMarker_Monitoring;
1886template <
class AeroCoeffsT,
class AeroCoeffsArrayT>
1887void AddCoeffContribution(
unsigned long iMarker,
int iMarker_Monitoring,
const AeroCoeffsT& partial,
1888 AeroCoeffsArrayT& coeffArray, AeroCoeffsT& allBoundCoeff, AeroCoeffsArrayT& surfaceCoeff) {
1890 coeffArray.CD[iMarker] += partial.CD;
1891 coeffArray.CL[iMarker] += partial.CL;
1892 coeffArray.CSF[iMarker] += partial.CSF;
1893 coeffArray.CFx[iMarker] += partial.CFx;
1894 coeffArray.CFy[iMarker] += partial.CFy;
1895 coeffArray.CFz[iMarker] += partial.CFz;
1896 coeffArray.CMx[iMarker] += partial.CMx;
1897 coeffArray.CMy[iMarker] += partial.CMy;
1898 coeffArray.CMz[iMarker] += partial.CMz;
1899 coeffArray.CoPx[iMarker] += partial.CoPx;
1900 coeffArray.CoPy[iMarker] += partial.CoPy;
1901 coeffArray.CoPz[iMarker] += partial.CoPz;
1902 coeffArray.CT[iMarker] += partial.CT;
1903 coeffArray.CQ[iMarker] += partial.CQ;
1905 allBoundCoeff.CD += partial.CD;
1906 allBoundCoeff.CL += partial.CL;
1907 allBoundCoeff.CSF += partial.CSF;
1908 allBoundCoeff.CFx += partial.CFx;
1909 allBoundCoeff.CFy += partial.CFy;
1910 allBoundCoeff.CFz += partial.CFz;
1911 allBoundCoeff.CMx += partial.CMx;
1912 allBoundCoeff.CMy += partial.CMy;
1913 allBoundCoeff.CMz += partial.CMz;
1914 allBoundCoeff.CoPx += partial.CoPx;
1915 allBoundCoeff.CoPy += partial.CoPy;
1916 allBoundCoeff.CoPz += partial.CoPz;
1917 allBoundCoeff.CT += partial.CT;
1918 allBoundCoeff.CQ += partial.CQ;
1922 if (iMarker_Monitoring >= 0) {
1923 surfaceCoeff.CL[iMarker_Monitoring] += partial.CL;
1924 surfaceCoeff.CD[iMarker_Monitoring] += partial.CD;
1925 surfaceCoeff.CSF[iMarker_Monitoring] += partial.CSF;
1926 surfaceCoeff.CFx[iMarker_Monitoring] += partial.CFx;
1927 surfaceCoeff.CFy[iMarker_Monitoring] += partial.CFy;
1928 surfaceCoeff.CFz[iMarker_Monitoring] += partial.CFz;
1929 surfaceCoeff.CMx[iMarker_Monitoring] += partial.CMx;
1930 surfaceCoeff.CMy[iMarker_Monitoring] += partial.CMy;
1931 surfaceCoeff.CMz[iMarker_Monitoring] += partial.CMz;
1955template <
class AeroCoeffsT>
1963 c.CD = Force[0] * CosAlpha + Force[1] * SinAlpha;
1964 c.CL = -Force[0] * SinAlpha + Force[1] * CosAlpha;
1966 c.CoPx = MomentZ_Force[1];
1967 c.CoPy = -MomentZ_Force[0];
1974 c.CD = Force[0] * CosAlpha * CosBeta + Force[1] * SinBeta + Force[2] * SinAlpha * CosBeta;
1975 c.CL = -Force[0] * SinAlpha + Force[2] * CosAlpha;
1976 c.CSF = -Force[0] * SinBeta * CosAlpha + Force[1] * CosBeta - Force[2] * SinBeta * SinAlpha;
1980 c.CoPx = -MomentY_Force[0];
1981 c.CoPz = MomentY_Force[2];
2012inline void MPIReduceSumInPlace(
su2double* x,
int n) {
2015 static vector<su2double> buffer;
2018 for (
int i = 0; i < n; ++i) x[i] = buffer[i];
2029template <
class AeroCoeffsT,
class AeroCoeffsArrayT>
2030void ReduceCoeffsMPI(
const CConfig* config, AeroCoeffsT& allBoundCoeff, AeroCoeffsArrayT& surfaceCoeff) {
2036 allBoundCoeff.CD = MPIReduceSum(allBoundCoeff.CD);
2037 allBoundCoeff.CL = MPIReduceSum(allBoundCoeff.CL);
2038 allBoundCoeff.CSF = MPIReduceSum(allBoundCoeff.CSF);
2039 allBoundCoeff.CEff = allBoundCoeff.CL / (allBoundCoeff.CD +
EPS);
2041 allBoundCoeff.CMx = MPIReduceSum(allBoundCoeff.CMx);
2042 allBoundCoeff.CMy = MPIReduceSum(allBoundCoeff.CMy);
2043 allBoundCoeff.CMz = MPIReduceSum(allBoundCoeff.CMz);
2045 allBoundCoeff.CoPx = MPIReduceSum(allBoundCoeff.CoPx);
2046 allBoundCoeff.CoPy = MPIReduceSum(allBoundCoeff.CoPy);
2047 allBoundCoeff.CoPz = MPIReduceSum(allBoundCoeff.CoPz);
2049 allBoundCoeff.CFx = MPIReduceSum(allBoundCoeff.CFx);
2050 allBoundCoeff.CFy = MPIReduceSum(allBoundCoeff.CFy);
2051 allBoundCoeff.CFz = MPIReduceSum(allBoundCoeff.CFz);
2053 allBoundCoeff.CT = MPIReduceSum(allBoundCoeff.CT);
2054 allBoundCoeff.CQ = MPIReduceSum(allBoundCoeff.CQ);
2055 allBoundCoeff.CMerit = allBoundCoeff.CT / (allBoundCoeff.CQ +
EPS);
2061 MPIReduceSumInPlace(surfaceCoeff.CL, nMarkerMon);
2062 MPIReduceSumInPlace(surfaceCoeff.CD, nMarkerMon);
2063 MPIReduceSumInPlace(surfaceCoeff.CSF, nMarkerMon);
2065 for (
int iMarker_Monitoring = 0; iMarker_Monitoring < nMarkerMon; iMarker_Monitoring++)
2066 surfaceCoeff.CEff[iMarker_Monitoring] =
2067 surfaceCoeff.CL[iMarker_Monitoring] / (surfaceCoeff.CD[iMarker_Monitoring] +
EPS);
2069 MPIReduceSumInPlace(surfaceCoeff.CFx, nMarkerMon);
2070 MPIReduceSumInPlace(surfaceCoeff.CFy, nMarkerMon);
2071 MPIReduceSumInPlace(surfaceCoeff.CFz, nMarkerMon);
2073 MPIReduceSumInPlace(surfaceCoeff.CMx, nMarkerMon);
2074 MPIReduceSumInPlace(surfaceCoeff.CMy, nMarkerMon);
2075 MPIReduceSumInPlace(surfaceCoeff.CMz, nMarkerMon);
2090template <
class AeroCoeffsT,
class AeroCoeffsArrayT>
2091void AccumulateTotalCoeffs(
const CConfig* config,
const AeroCoeffsT& allBoundCoeff,
2092 const AeroCoeffsArrayT& surfaceCoeff, AeroCoeffsT& total, AeroCoeffsArrayT& surfaceTotal,
2095 if (overwrite) dst = src;
2099 Update(total.CD, allBoundCoeff.CD);
2100 Update(total.CL, allBoundCoeff.CL);
2101 Update(total.CSF, allBoundCoeff.CSF);
2102 total.CEff = total.CL / (total.CD +
EPS);
2103 Update(total.CFx, allBoundCoeff.CFx);
2104 Update(total.CFy, allBoundCoeff.CFy);
2105 Update(total.CFz, allBoundCoeff.CFz);
2106 Update(total.CMx, allBoundCoeff.CMx);
2107 Update(total.CMy, allBoundCoeff.CMy);
2108 Update(total.CMz, allBoundCoeff.CMz);
2109 Update(total.CoPx, allBoundCoeff.CoPx);
2110 Update(total.CoPy, allBoundCoeff.CoPy);
2111 Update(total.CoPz, allBoundCoeff.CoPz);
2112 Update(total.CT, allBoundCoeff.CT);
2113 Update(total.CQ, allBoundCoeff.CQ);
2114 total.CMerit = total.CT / (total.CQ +
EPS);
2119 iMarker_Monitoring++) {
2120 Update(surfaceTotal.CL[iMarker_Monitoring], surfaceCoeff.CL[iMarker_Monitoring]);
2121 Update(surfaceTotal.CD[iMarker_Monitoring], surfaceCoeff.CD[iMarker_Monitoring]);
2122 Update(surfaceTotal.CSF[iMarker_Monitoring], surfaceCoeff.CSF[iMarker_Monitoring]);
2123 surfaceTotal.CEff[iMarker_Monitoring] =
2124 surfaceTotal.CL[iMarker_Monitoring] / (surfaceTotal.CD[iMarker_Monitoring] +
EPS);
2125 Update(surfaceTotal.CFx[iMarker_Monitoring], surfaceCoeff.CFx[iMarker_Monitoring]);
2126 Update(surfaceTotal.CFy[iMarker_Monitoring], surfaceCoeff.CFy[iMarker_Monitoring]);
2127 Update(surfaceTotal.CFz[iMarker_Monitoring], surfaceCoeff.CFz[iMarker_Monitoring]);
2128 Update(surfaceTotal.CMx[iMarker_Monitoring], surfaceCoeff.CMx[iMarker_Monitoring]);
2129 Update(surfaceTotal.CMy[iMarker_Monitoring], surfaceCoeff.CMy[iMarker_Monitoring]);
2130 Update(surfaceTotal.CMz[iMarker_Monitoring], surfaceCoeff.CMz[iMarker_Monitoring]);
2149 Moment[0] += (Force[2] * MomentDist[1] - Force[1] * MomentDist[2]) / RefLength;
2150 MomentX_Force[1] += (-Force[1] * Coord[2]);
2151 MomentX_Force[2] += (Force[2] * Coord[1]);
2153 Moment[1] += (Force[0] * MomentDist[2] - Force[2] * MomentDist[0]) / RefLength;
2154 MomentY_Force[2] += (-Force[2] * Coord[0]);
2155 MomentY_Force[0] += (Force[0] * Coord[2]);
2157 Moment[2] += (Force[1] * MomentDist[0] - Force[0] * MomentDist[1]) / RefLength;
2158 MomentZ_Force[0] += (-Force[0] * Coord[1]);
2159 MomentZ_Force[1] += (Force[1] * Coord[0]);
2164template <
class V, ENUM_REGIME FlowRegime>
2172 const su2double CosAlpha = cos(Alpha), SinAlpha = sin(Alpha), CosBeta = cos(Beta), SinBeta = sin(Beta);
2214 for (
unsigned long iMarker = 0; iMarker <
nMarker; iMarker++) {
2222 const int iMarker_Monitoring = FindMonitoringIndex(config, iMarker, Monitoring, Origin);
2232 for (
unsigned long iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
2233 const auto iPoint = geometry->
vertex[iMarker][iVertex]->
GetNode();
2237 CPressure[iMarker][iVertex] = (Pressure - RefPressure) * factor * RefArea;
2262 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
2263 Force[iDim] = -(Pressure -
Pressure_Inf) * Normal[iDim] * factor * AxiFactor;
2264 ForceInviscid[iDim] += Force[iDim];
2269 AccumulateMoment(
nDim, RefLength, Force, MomentDist, Coord, MomentInviscid, MomentX_Force, MomentY_Force,
2275 if (Monitoring ==
YES) {
2277 const auto partial = ComputeAeroCoeffsFromForceMoment<AeroCoeffs>(
2278 nDim, CosAlpha, SinAlpha, CosBeta, SinBeta, ForceInviscid, MomentInviscid, MomentX_Force, MomentY_Force,
2302 for (
unsigned long iMarker = 0; iMarker <
nMarker; iMarker++) {
2314 iMarker_Monitoring++) {
2337template <
class V, ENUM_REGIME FlowRegime>
2343 const su2double CosAlpha = cos(Alpha), SinAlpha = sin(Alpha), CosBeta = cos(Beta), SinBeta = sin(Beta);
2357 for (
unsigned long iMarker = 0; iMarker <
nMarker; iMarker++) {
2359 if (!IsMomentumBoundary(Boundary))
continue;
2365 const int iMarker_Monitoring = FindMonitoringIndex(config, iMarker, Monitoring, Origin);
2368 su2double MomentX_Force[3] = {0.0}, MomentY_Force[3] = {0.0}, MomentZ_Force[3] = {0.0};
2374 for (
unsigned long iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
2375 const auto iPoint = geometry->
vertex[iMarker][iVertex]->
GetNode();
2386 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
2387 Velocity[iDim] =
nodes->GetVelocity(iPoint, iDim);
2388 MomentDist[iDim] = Coord[iDim] - Origin[iDim];
2389 MassFlow -= Normal[iDim] * Velocity[iDim] * Density;
2400 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
2401 Force[iDim] = MassFlow * Velocity[iDim] * factor * AxiFactor;
2402 ForceMomentum[iDim] += Force[iDim];
2407 AccumulateMoment(
nDim, RefLength, Force, MomentDist, Coord, MomentMomentum, MomentX_Force, MomentY_Force,
2413 if (Monitoring ==
YES) {
2414 const auto partial = ComputeAeroCoeffsFromForceMoment<AeroCoeffs>(
2415 nDim, CosAlpha, SinAlpha, CosBeta, SinBeta, ForceMomentum, MomentMomentum, MomentX_Force, MomentY_Force,
2427 for (
unsigned long iMarker = 0; iMarker <
nMarker; iMarker++) {
2430 if (Monitoring ==
YES && IsMomentumBoundary(Boundary)) {
2439 iMarker_Monitoring++) {
2455template <
class V, ENUM_REGIME FlowRegime>
2460 constexpr int MaxNorm = 8;
2465 const su2double CosAlpha = cos(Alpha), SinAlpha = sin(Alpha), CosBeta = cos(Beta), SinBeta = sin(Beta);
2493 iMarker_Monitoring++) {
2500 for (
unsigned long iMarker = 0; iMarker <
nMarker; iMarker++) {
2512 for (
unsigned long iMarker = 0; iMarker <
nMarker; iMarker++) {
2521 const int iMarker_Monitoring = FindMonitoringIndex(config, iMarker, Monitoring, Origin);
2525 su2double HF_Visc_Local = 0.0, MaxHF_Visc_Local = 0.0;
2543 su2double Wall_HeatFlux_Value = 0.0, Twall = 0.0;
2544 if (!nemo && !py_custom) {
2558 for (
unsigned long iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
2559 const auto iPoint = geometry->
vertex[iMarker][iVertex]->
GetNode();
2567 const auto Grad_Vel =
nodes->GetVelocityGradient(iPoint);
2569 su2double Grad_Temp[3] = {0.0}, Grad_Temp_ve[3] = {0.0};
2570 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
2571 Grad_Temp[iDim] =
nodes->GetGradient_Primitive(iPoint,
prim_idx.Temperature(), iDim);
2572 if (nemo) Grad_Temp_ve[iDim] =
nodes->GetGradient_Primitive(iPoint,
prim_idx.Temperature_ve(), iDim);
2578 EddyViscosity =
nodes->GetEddyViscosity(iPoint);
2579 Viscosity += EddyViscosity;
2585 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
2586 UnitNormal[iDim] = Normal[iDim] / Area;
2600 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
2601 for (
unsigned short jDim = 0; jDim <
nDim; jDim++) {
2602 TauElem[iDim] += Tau[iDim][jDim] * UnitNormal[jDim];
2615 if (wallfunctions && (
YPlus[iMarker][iVertex] > minYPlus)){
2618 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
2619 TauTangent[iDim] *= scale;
2620 TauElem[iDim] *= scale;
2626 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
2627 CSkinFriction[iMarker](iVertex,iDim) = TauTangent[iDim] * factorFric;
2637 YPlus[iMarker][iVertex] = WallDistMod * FrictionVel * Density / Viscosity;
2645 thermal_conductivity =
nodes->GetThermalConductivity(iPoint);
2658 HeatFlux[iMarker][iVertex] = thermal_conductivity * (There - Twall_local) / dist_ij * RefHeatFlux;
2662 HeatFlux[iMarker][iVertex] = thermal_conductivity * dTdn * RefHeatFlux;
2666 const auto& thermal_conductivity_tr =
nodes->GetThermalConductivity(iPoint);
2667 const auto& thermal_conductivity_ve =
nodes->GetThermalConductivity_ve(iPoint);
2673 HeatFlux[iMarker][iVertex] = -(thermal_conductivity_tr*dTdn + thermal_conductivity_ve*dTvedn);
2679 const auto& Grad_PrimVar =
nodes->GetGradient_Primitive(iPoint);
2680 const auto& PrimVar =
nodes->GetPrimitive(iPoint);
2681 const auto& Ds =
nodes->GetDiffusionCoeff(iPoint);
2682 const auto& hs =
nodes->GetEnthalpys(iPoint);
2686 for (
auto iSpecies = 0u; iSpecies < nSpecies; iSpecies++) {
2687 for (
auto iDim = 0u; iDim <
nDim; iDim++) {
2688 su2double dYdn = 1.0/rho*(Grad_PrimVar[iSpecies][iDim] - PrimVar[iSpecies]*Grad_PrimVar[
prim_idx.Density()][iDim]/rho);
2689 sumJhs += rho*Ds[iSpecies]*hs[iSpecies]*dYdn*UnitNormal[iDim];
2693 HeatFlux[iMarker][iVertex] += sumJhs;
2709 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
2710 Force[iDim] = TauElem[iDim] * Area * factor * AxiFactor;
2711 ForceViscous[iDim] += Force[iDim];
2712 MomentDist[iDim] = Coord[iDim] - Origin[iDim];
2717 AccumulateMoment(
nDim, RefLength, Force, MomentDist, Coord, MomentViscous, MomentX_Force, MomentY_Force,
2720 HF_Visc_Local +=
HeatFlux[iMarker][iVertex] * Area;
2721 MaxHF_Visc_Local +=
pow(
HeatFlux[iMarker][iVertex], MaxNorm);
2730 if (Monitoring ==
YES) {
2731 const auto partial = ComputeAeroCoeffsFromForceMoment<AeroCoeffs>(
2732 nDim, CosAlpha, SinAlpha, CosBeta, SinBeta, ForceViscous, MomentViscous, MomentX_Force, MomentY_Force,
2740 HF_Visc[iMarker] += HF_Visc_Local;
2745 if (iMarker_Monitoring >= 0) {
2761 for (
unsigned long iMarker = 0; iMarker <
nMarker; iMarker++) {
2773 iMarker_Monitoring++) {
2795 hf =
pow(hf, 1.0 / MaxNorm);
2810template<
class V, ENUM_REGIME R>
2932template <
class V, ENUM_REGIME FlowRegime>
2938 for (
auto iPoint = 0ul; iPoint <
nPoint; iPoint++) {
2942 su2double Total_Viscosity =
nodes->GetLaminarViscosity(iPoint) +
nodes->GetEddyViscosity(iPoint);
2943 const auto VelocityGradient =
nodes->GetVelocityGradient(iPoint);
2946 su2double nu_v_on_y = Total_Viscosity*yVelocity/yCoord;
2947 nodes->SetAuxVar(iPoint, 0, nu_v_on_y);
2948 nodes->SetAuxVar(iPoint, 1, nu_v_on_y*yVelocity);
2949 nodes->SetAuxVar(iPoint, 2, nu_v_on_y*xVelocity);
2953 su2double dv_dr = VelocityGradient(1,1);
2954 su2double nu_dv_dr = Total_Viscosity * dv_dr;
2955 nodes->SetAuxVar(iPoint, 0, nu_dv_dr);
2956 nodes->SetAuxVar(iPoint, 1, 0.0);
2957 nodes->SetAuxVar(iPoint, 2, nu_dv_dr*xVelocity);
2972template <
class V, ENUM_REGIME FlowRegime>
2974 bool use_solution_old) {
2975 const auto iVel =
prim_idx.Velocity();
2978 for (
auto iMarker = 0u; iMarker < config->
GetnMarker_All(); iMarker++) {
2982 for (
auto iVertex = 0ul; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
2983 const auto iPoint = geometry->
vertex[iMarker][iVertex]->
GetNode();
2992 for (
auto iDim = 0u; iDim <
nDim; iDim++) UnitNormal[iDim] = it->second[iDim];
2997 if (Area <
EPS)
continue;
2998 for (
auto iDim = 0u; iDim <
nDim; iDim++) UnitNormal[iDim] = Normal[iDim] / Area;
3001 su2double* sol = use_solution_old ?
nodes->GetSolution_Old(iPoint) :
nodes->GetSolution(iPoint);
3008 for (
auto iDim = 0u; iDim <
nDim; iDim++)
3011 for (
auto iDim = 0u; iDim <
nDim; iDim++)
3012 gridVel[iDim] *=
nodes->GetDensity(iPoint);
3017 for (
auto iDim = 0u; iDim <
nDim; iDim++)
3018 momentum_n += (sol[iVel + iDim] - gridVel[iDim]) * UnitNormal[iDim];
3021 for (
auto iDim = 0u; iDim <
nDim; iDim++) sol[iVel + iDim] -= momentum_n * UnitNormal[iDim];
Base class template for all FVM flow solvers.
A templated matrix/vector-like object.
Definition C2DContainer.hpp:374
C2DContainer & resize(const Index_t size1, const Index_t size2=1) noexcept
Request a change of size.
Definition C2DContainer.hpp:541
static int GetRank()
Definition mpi_structure.hpp:524
static void Reduce(const void *sendbuf, void *recvbuf, int count, Datatype datatype, Op op, int root, Comm comm)
Definition mpi_structure.hpp:565
static Comm GetComm()
Definition mpi_structure.hpp:530
static void Allreduce(const void *sendbuf, void *recvbuf, int count, Datatype datatype, Op op, Comm comm)
Definition mpi_structure.hpp:570
static void Error(const std::string &ErrorMsg, const std::string &FunctionName)
Definition mpi_structure.cpp:131
static int GetSize()
Definition mpi_structure.hpp:526
Class, which serves as an interface to the BLAS functionalities needed.
Definition blas_structure.hpp:41
void gemm(const int M, const int N, const int K, const su2double *A, const su2double *B, su2double *C, const CConfig *config)
Function, which carries out a dense matrix product. It is a limited version of the BLAS gemm function...
Definition blas_structure.cpp:63
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
WALL_FUNCTIONS GetWallFunction_Treatment(const string &val_marker) const
Get the wall function treatment for the given boundary marker.
Definition CConfig.cpp:9949
unsigned short GetKind_GridMovement() const
Get the type of dynamic mesh motion. Each zone gets a config file.
Definition CConfig.hpp:6303
UPWIND GetKind_Upwind_Flow(void) const
Get the kind of upwind convective numerical scheme for the flow equations.
Definition CConfig.hpp:4928
unsigned long GetInnerIter(void) const
Get the current FSI iteration number.
Definition CConfig.hpp:3405
bool GetEnergy_Equation(void) const
Flag for whether to solve the energy equation for incompressible flows.
Definition CConfig.hpp:4106
su2double GetDelta_UnstTimeND(void) const
If we are prforming an unsteady simulation, there is only one value of the time step for the complete...
Definition CConfig.hpp:6187
unsigned short GetKind_FluidModel(void) const
Fluid model that we are using.
Definition CConfig.hpp:4083
bool GetMultizone_Residual(void) const
Check if the mesh read supports multiple zones.
Definition CConfig.hpp:9942
unsigned short GetnMGLevels(void) const
Get the number of multigrid levels.
Definition CConfig.hpp:2950
bool GetSteadyRestart(void) const
Identifies if we want to restart from a steady or an unsteady solution.
Definition CConfig.hpp:9346
string GetSolution_FileName(void) const
Get the name of the file with the solution of the flow problem.
Definition CConfig.hpp:5864
bool GetSolid_Wall(unsigned short iMarker) const
Determines whether a marker with index iMarker is a solid boundary.
Definition CConfig.cpp:8630
bool GetContinuous_Adjoint(void) const
Determines if problem is adjoint.
Definition CConfig.hpp:6902
su2double GetTemperature_Ref(void) const
Get the value of the reference temperature for non-dimensionalization.
Definition CConfig.hpp:1961
su2double GetAoS(void) const
Get the angle of sideslip of the body. It relates to the rotation of the aircraft centerline from the...
Definition CConfig.hpp:2938
su2double GetInletPtotal(const string &val_index) const
Get the total pressure at an inlet boundary.
Definition CConfig.cpp:9559
unsigned long GetEdgeColoringGroupSize(void) const
Get the size of the edge groups colored for OpenMP parallelization of edge loops.
Definition CConfig.hpp:10224
LIMITER GetKind_SlopeLimit_Flow(void) const
Get the method for limiting the spatial gradients.
Definition CConfig.hpp:4964
su2double GetCFL(unsigned short val_mesh) const
Get the Courant Friedrich Levi number for each grid.
Definition CConfig.hpp:2989
std::array< su2double, 3 > GetRefOriginMoment(unsigned short val_marker) const
Get reference origin for moment computation.
Definition CConfig.hpp:1604
su2double GetInlet_Pressure(const string &val_index) const
Get the pressure at a supersonic inlet boundary.
Definition CConfig.cpp:9587
su2double GetMUSCL_Kappa_Flow(void) const
Get the blending coefficient for the MUSCL scheme.
Definition CConfig.hpp:4795
su2double GetSurface_TotalPressure(unsigned short val_marker) const
Get the total pressure at an outlet boundary.
Definition CConfig.hpp:8650
TURB_MODEL GetKind_Turb_Model(void) const
Get the kind of the turbulence model.
Definition CConfig.hpp:4693
string GetMarker_Monitoring_TagBound(unsigned short val_marker) const
Get the name of the surface defined in the geometry file.
Definition CConfig.hpp:3521
unsigned short GetnMarker_All(void) const
Get the total number of boundary markers of the local process including send/receive domains.
Definition CConfig.hpp:3183
su2double GetPhysicalTime(void) const
Get the current physical time.
Definition CConfig.hpp:3417
bool GetAxisymmetric(void) const
Get information about the axisymmetric frame.
Definition CConfig.hpp:6692
su2double GetRefArea(void) const
Get the reference area for non dimensional coefficient computation. If the value from the is 0 then,...
Definition CConfig.hpp:2211
su2double GetSurface_SecondaryStrength(unsigned short val_marker) const
Get the secondary flow strength at the surface.
Definition CConfig.hpp:8622
unsigned short GetKind_TimeIntScheme_Flow(void) const
Get the kind of integration scheme (explicit or implicit) for the flow equations.
Definition CConfig.hpp:4816
su2double GetInlet_Temperature(const string &val_index) const
Get the temperature at a supersonic inlet boundary.
Definition CConfig.cpp:9580
unsigned short GetnTurbVar(void) const
Get the number of Turbulence Variables.
Definition CConfig.hpp:4687
su2double GetWeight_ObjFunc(unsigned short val_obj) const
Get the weight of objective function. There are several options: Drag coefficient,...
Definition CConfig.hpp:5615
SA_ParsedOptions GetSAParsedOptions() const
Get parsed SA option data structure.
Definition CConfig.hpp:10377
unsigned short GetnMarker_Monitoring(void) const
Get the total number of monitoring markers.
Definition CConfig.hpp:3267
unsigned short GetMarker_All_Monitoring(unsigned short val_marker) const
Get the monitoring information for a marker val_marker.
Definition CConfig.hpp:3748
SPECIES_MODEL GetKind_Species_Model(void) const
Get the kind of the species model.
Definition CConfig.hpp:4717
bool GetDeform_Mesh(void) const
Get information about whether the mesh will be deformed using pseudo linear elasticity.
Definition CConfig.hpp:4599
su2double GetSurface_SecondOverUniform(unsigned short val_marker) const
Get the relative secondary flow strength at the surface.
Definition CConfig.hpp:8629
su2double GetSurface_Temperature(unsigned short val_marker) const
Get the temperature at an outlet boundary.
Definition CConfig.hpp:8580
bool GetRead_Binary_Restart(void) const
Flag for whether binary SU2 native restart files are read.
Definition CConfig.hpp:5678
su2double GetSurface_Uniformity(unsigned short val_marker) const
Get the streamwise flow uniformity at the surface.
Definition CConfig.hpp:8615
unsigned short GetKind_Gradient_Method(void) const
Get the kind of method for computation of spatial gradients used for viscous and source terms.
Definition CConfig.hpp:4360
bool GetViscous_Wall(unsigned short iMarker) const
Determines whether a marker with index iMarker is a viscous no-slip boundary.
Definition CConfig.cpp:8610
pair< WALL_TYPE, su2double > GetWallRoughnessProperties(const string &val_marker) const
Get the type of wall and roughness height on a wall boundary (Heatflux or Isothermal).
Definition CConfig.cpp:9938
const CStochBackScatParam & GetSBSParam(void) const
Get the Stochastic BackScatter (SBS) model parameters.
Definition CConfig.hpp:9766
const su2double * GetInletFlowDir(const string &val_index) const
Get the flow direction unit vector at an inlet boundary.
Definition CConfig.cpp:9573
unsigned short GetnMarker_Periodic(void) const
Get the total number of periodic markers.
Definition CConfig.hpp:3309
bool GetGrid_Movement(void) const
Get information about the grid movement.
Definition CConfig.hpp:6268
unsigned short GetKind_ObjFunc(unsigned short val_obj=0) const
Get the kind of objective function. There are several options: Drag coefficient, Lift coefficient,...
Definition CConfig.hpp:5606
su2double GetWall_HeatFlux(const string &val_index) const
Get the wall heat flux on a constant heat flux boundary.
Definition CConfig.cpp:9911
const su2double * GetInlet_Velocity(const string &val_index) const
Get the velocity vector at a supersonic inlet boundary.
Definition CConfig.cpp:9594
unsigned short GetComm_Level(void) const
Get the level of MPI communications to be performed.
Definition CConfig.hpp:9930
su2double GetAoA(void) const
Get the angle of attack of the body. This is the angle between a reference line on a lifting body (of...
Definition CConfig.hpp:2881
su2double GetIsothermal_Temperature(const string &val_index) const
Get the wall temperature (static) at an isothermal boundary.
Definition CConfig.cpp:9902
su2double GetSurface_MassFlow(unsigned short val_marker) const
Get the massflow at an outlet boundary.
Definition CConfig.hpp:8566
bool GetDiscrete_Adjoint(void) const
Get the indicator whether we are solving an discrete adjoint problem.
Definition CConfig.hpp:9299
bool GetFSI_Simulation(void) const
Check if the simulation we are running is a FSI simulation.
Definition CConfig.hpp:9514
string GetMarker_All_TagBound(unsigned short val_marker) const
Get the index of the surface defined in the geometry file.
Definition CConfig.hpp:3473
su2double GetHeat_Flux_Ref(void) const
Get the reference value for the heat flux.
Definition CConfig.hpp:1835
TIME_MARCHING GetTime_Marching() const
Provides information about the time integration, and change the write in the output files information...
Definition CConfig.hpp:5648
unsigned short GetKind_ConvNumScheme_Flow(void) const
Get the kind of convective numerical scheme for the flow equations (centered or upwind).
Definition CConfig.hpp:4886
su2double GetwallModel_MinYPlus() const
Get the value of the minimum Y+ value below which the wall function is deactivated.
Definition CConfig.hpp:1924
unsigned short GetnSpecies() const
Provides the number of species present in the gas mixture.
Definition CConfig.hpp:5654
unsigned short GetMarker_All_PyCustom(unsigned short val_marker) const
Get the Python customization for a marker val_marker.
Definition CConfig.hpp:3881
unsigned short GetKind_TimeIntScheme(void) const
Get the kind of time integration method.
Definition CConfig.hpp:4732
unsigned long GetScreen_Wrt_Freq(unsigned short iter) const
GetScreen_Wrt_Freq_Inner.
Definition CConfig.hpp:10154
bool GetIntegrated_HeatFlux() const
Check if values passed to the BC_HeatFlux-Routine are already integrated.
Definition CConfig.hpp:9805
bool GetViscous(void) const
Determines if problem is viscous.
Definition CConfig.hpp:6908
su2double GetSurface_Pressure(unsigned short val_marker) const
Get the pressure at an outlet boundary.
Definition CConfig.hpp:8587
bool GetRestart_Flow(void) const
For some problems like adjoint or the linearized equations it is necessary to restart the flow soluti...
Definition CConfig.hpp:5743
su2double GetSurface_Species_0(unsigned short val_marker) const
Get avg species_0 at a boundary.
Definition CConfig.hpp:8664
unsigned short GetnRoughWall(void) const
Get the total number of rough markers.
Definition CConfig.hpp:3321
unsigned short GetMarker_All_KindBC(unsigned short val_marker) const
Get the kind of boundary for each marker.
Definition CConfig.hpp:3556
bool GetNEMOProblem(void) const
Return true if a NEMO solver is in use.
Definition CConfig.hpp:3994
bool GetEdgeColoringRelaxDiscAdj() const
Check if the discrete adjoint is allowed to relax the coloring, that is, allow smaller edge color gro...
Definition CConfig.hpp:10229
bool GetRestart(void) const
Provides the restart information.
Definition CConfig.hpp:5672
su2double GetSurface_PressureDrop(unsigned short val_marker) const
Get the pressure drop between two surfaces.
Definition CConfig.hpp:8657
su2double GetInletTtotal(const string &val_index) const
Get the total temperature at an inlet boundary.
Definition CConfig.cpp:9552
su2double GetSurface_MomentumDistortion(unsigned short val_marker) const
Get the momentum distortion at the surface.
Definition CConfig.hpp:8636
bool GetBounded_Scalar() const
Returns true if bounded scalar mode is used for any equation.
Definition CConfig.hpp:5172
unsigned long GetRestart_Iter(void) const
Get the restart iteration.
Definition CConfig.hpp:9912
bool GetCatalytic_Wall(unsigned short iMarker) const
Determines whether a marker with index iMarker is a catalytic boundary.
Definition CConfig.cpp:8619
su2double GetSurface_Species_Variance(unsigned short val_marker) const
Get the species variance at a boundary.
Definition CConfig.hpp:8671
unsigned short GetKind_Gradient_Method_Recon(void) const
Get the kind of method for computation of spatial gradients used for upwind reconstruction.
Definition CConfig.hpp:4366
string GetFilename(string filename, const string &ext, int Iter) const
Add any numbers necessary to the filename (iteration number, zone ID ...)
Definition CConfig.cpp:8890
su2double GetTemperature_FreeStreamND(void) const
Get the value of the non-dimensionalized freestream temperature.
Definition CConfig.hpp:2058
su2double GetRefLength(void) const
Get the reference length for computing moment (the default value is 1).
Definition CConfig.hpp:2480
void GetNormal(unsigned long iEdge, T &normal) const
Copy the the normal vector of a face.
Definition CEdge.hpp:161
unsigned long GetNode(unsigned long iEdge, unsigned long iNode) const
Get left/right node index defining the edge.
Definition CEdge.hpp:72
su2double AllBound_MaxHF_Visc
Maximum heat flux (viscous contribution) for all boundaries.
Definition CFVMFlowSolverBase.hpp:179
AeroCoeffs AllBoundMntCoeff
Total momentum contribution for all the boundaries.
Definition CFVMFlowSolverBase.hpp:153
vector< vector< su2double > > Inlet_Ttotal
Value of the Total T.
Definition CFVMFlowSolverBase.hpp:182
AeroCoeffsArray SurfaceCoeff
Totals for each monitoring surface.
Definition CFVMFlowSolverBase.hpp:159
AeroCoeffsArray SurfaceViscCoeff
Viscous contributions for each monitoring boundary.
Definition CFVMFlowSolverBase.hpp:156
void FinalizeResidualComputation(const CGeometry *geometry, bool pausePreacc, unsigned long localCounter, CConfig *config)
Sums edge fluxes (if required) and computes the global error counter.
Definition CFVMFlowSolverBase.hpp:298
su2double Total_Heat
Total heat load for all the boundaries.
Definition CFVMFlowSolverBase.hpp:170
su2double GetSlidingState(unsigned short val_marker, unsigned long val_vertex, unsigned short val_state, unsigned long donor_index) const final
Get the outer state for fluid interface nodes.
Definition CFVMFlowSolverBase.hpp:2359
vector< vector< su2double > > CPressureTarget
Target Pressure coefficient for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:191
void Pressure_Forces(const CGeometry *geometry, const CConfig *config) final
Compute the pressure forces and all the adimensional coefficients.
Definition CFVMFlowSolverBase.inl:2165
AeroCoeffs TotalCoeff
Totals for all boundaries.
Definition CFVMFlowSolverBase.hpp:160
static void ompMasterAssignBarrier(Ts &&... lhsRhsPairs)
Utility to set the value of a member variables safely, and so that the new values are seen by all thr...
Definition CFVMFlowSolverBase.hpp:65
su2double Total_CEquivArea
Total Equivalent Area coefficient for all the boundaries.
Definition CFVMFlowSolverBase.hpp:167
su2double GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, const CGeometry *geometry, su2double *val_inlet) const final
Get the set of values imposed at an inlet.
Definition CFVMFlowSolverBase.inl:751
void SetUniformInlet(const CConfig *config, unsigned short iMarker) final
Set a uniform inlet profile.
Definition CFVMFlowSolverBase.inl:772
vector< su2activematrix > Inlet_FlowDir
Value of the Flow Direction.
Definition CFVMFlowSolverBase.hpp:183
int GetnSlidingStates(unsigned short val_marker, unsigned long val_vertex) const final
Get the number of outer state for fluid interface nodes.
Definition CFVMFlowSolverBase.hpp:2348
void CompleteImplicitIteration(CGeometry *geometry, CSolver **, CConfig *config) final
Complete an implicit iteration.
Definition CFVMFlowSolverBase.inl:588
su2double Total_MaxHeat
Maximum heat flux on all boundaries.
Definition CFVMFlowSolverBase.hpp:171
void BC_Periodic(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config) final
Impose a periodic boundary condition by summing contributions from the complete control volume.
Definition CFVMFlowSolverBase.inl:1318
void SetInitialCondition(CGeometry **geometry, CSolver ***solver_container, CConfig *config, unsigned long ExtIter) override
Set the initial condition for the Euler Equations.
Definition CFVMFlowSolverBase.inl:1049
vector< su2activematrix > HeatConjugateVar
CHT variables for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:189
void AllocateTerribleLegacyTemporaryVariables()
Allocate small member variables that ideally should not be used.
Definition CFVMFlowSolverBase.inl:212
void LoadRestart(CGeometry **geometry, CSolver ***solver, CConfig *config, int iter, bool update_geo) override
Load a solution from a restart file.
Definition CFVMFlowSolverBase.inl:1042
array< DummyGridColor<>, 1 > EdgeColoring
Definition CFVMFlowSolverBase.hpp:213
static constexpr size_t OMP_MAX_SIZE
Max chunk size for light point loops.
Definition CFVMFlowSolverBase.hpp:53
vector< su2activematrix > CSkinFriction
Skin friction coefficient for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:187
bool least_squares
True if computing gradients by least squares.
Definition CFVMFlowSolverBase.hpp:198
bool space_centered
True if space centered scheme used.
Definition CFVMFlowSolverBase.hpp:196
unsigned long ErrorCounter
Counter for number of un-physical states.
Definition CFVMFlowSolverBase.hpp:86
su2double Total_HeatFluxDiff
Total Equivalent Area coefficient for all the boundaries.
Definition CFVMFlowSolverBase.hpp:166
CNumericsSIMD * edgeNumerics
Object for edge flux computation.
Definition CFVMFlowSolverBase.hpp:226
vector< su2double > Surface_MaxHF_Visc
Maximum heat flux for each monitored surface.
Definition CFVMFlowSolverBase.hpp:175
VariableType * nodes
The highest level in the variable hierarchy the DERIVED solver can safely use.
Definition CFVMFlowSolverBase.hpp:231
void BC_Custom(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) final
Impose a custom or verification boundary condition.
Definition CFVMFlowSolverBase.inl:1499
vector< vector< su2double > > YPlus
Yplus for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:192
AeroCoeffsArray SurfaceMntCoeff
Inviscid momentum contributions for each monitoring boundary.
Definition CFVMFlowSolverBase.hpp:152
virtual void ComputeUnderRelaxationFactor(const CConfig *config)
Compute a suitable under-relaxation parameter to limit the change in the solution variables over a no...
Definition CFVMFlowSolverBase.hpp:396
AeroCoeffsArray SurfaceInvCoeff
Inviscid pressure contributions for each monitoring boundary.
Definition CFVMFlowSolverBase.hpp:148
AeroCoeffsArray ViscCoeff
Viscous contributions for each boundary.
Definition CFVMFlowSolverBase.hpp:155
virtual void Buffet_Monitoring(const CGeometry *geometry, const CConfig *config)
Compute the buffet sensor.
Definition CFVMFlowSolverBase.hpp:2303
su2double Pressure_Inf
Pressure at the infinity.
Definition CFVMFlowSolverBase.hpp:74
void SetPrimitive_Limiter(CGeometry *geometry, const CConfig *config) final
Compute the limiter of the primitive variables.
Definition CFVMFlowSolverBase.inl:424
AeroCoeffs AllBoundInvCoeff
Total pressure contribution for all the boundaries.
Definition CFVMFlowSolverBase.hpp:149
AeroCoeffsArray MntCoeff
Inviscid momentum contributions for each boundary.
Definition CFVMFlowSolverBase.hpp:151
void Momentum_Forces(const CGeometry *geometry, const CConfig *config) final
Compute the pressure forces and all the adimensional coefficients.
Definition CFVMFlowSolverBase.inl:2338
void LoadRestart_impl(CGeometry **geometry, CSolver ***solver, CConfig *config, int iter, bool update_geo, su2double *RestartSolution=nullptr, unsigned short nVar_Restart=0)
General implementation to load a flow solution from a restart file.
Definition CFVMFlowSolverBase.inl:854
virtual void PrintVerificationError(const CConfig *config) const =0
Print verification error to screen, derived solvers must define this.
vector< su2double > Surface_HF_Visc
Total (integrated) heat flux for each monitored surface.
Definition CFVMFlowSolverBase.hpp:174
void EdgeFluxResidual(const CGeometry *geometry, const CSolver *const *solvers, CConfig *config)
Method to compute convective and viscous residual contribution using vectorized numerics.
Definition CFVMFlowSolverBase.inl:1563
void PushSolutionBackInTime(unsigned long TimeIter, bool restart, bool rans, CSolver ***solver_container, CGeometry **geometry, CConfig *config)
Move solution to previous time levels (for restarts).
Definition CFVMFlowSolverBase.inl:1100
su2double AeroCoeffForceRef
Reference force for aerodynamic coefficients.
Definition CFVMFlowSolverBase.hpp:162
vector< vector< int > > SlidingStateNodes
Definition CFVMFlowSolverBase.hpp:205
vector< su2double > CNearFieldOF_Inv
Near field pressure (inviscid) for each boundary.
Definition CFVMFlowSolverBase.hpp:173
CNumerics::ResidualType Viscous_Residual_impl(unsigned long iEdge, CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config)
Definition CFVMFlowSolverBase.inl:440
su2activevector EdgeMassFluxes
Mass fluxes across each edge, for discretization of transported scalars.
Definition CFVMFlowSolverBase.hpp:58
su2double Total_CpDiff
Total Equivalent Area coefficient for all the boundaries.
Definition CFVMFlowSolverBase.hpp:165
AeroCoeffs AllBoundViscCoeff
Total pressure contribution for all the boundaries.
Definition CFVMFlowSolverBase.hpp:157
void Allocate(const CConfig &config)
Allocate member variables.
Definition CFVMFlowSolverBase.inl:78
void MultigridProjectEulerWall(CGeometry *geometry, const CConfig *config, bool use_solution_old) override
Enforce Euler wall BC on a restricted or prolongated multigrid solution by projecting the momentum to...
Definition CFVMFlowSolverBase.inl:2973
virtual void SetReferenceValues(const CConfig &config)=0
Set reference values for pressure, forces, etc., e.g. "AeroCoeffForceRef".
void SetPrimitive_Gradient_LS(CGeometry *geometry, const CConfig *config, bool reconstruction=false) final
Compute the gradient of the primitive variables using a Least-Squares method, and stores the result i...
Definition CFVMFlowSolverBase.inl:397
vector< vector< su2double > > HeatFlux
Heat transfer coefficient for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:184
vector< su2matrix< su2double * > > SlidingState
Definition CFVMFlowSolverBase.hpp:204
vector< vector< su2double > > UTau
UTau for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:193
su2double * GetCharacPrimVar(unsigned short val_marker, unsigned long val_vertex) final
Value of the characteristic variables at the boundaries.
Definition CFVMFlowSolverBase.hpp:2132
void ComputeVerificationError(CGeometry *geometry, CConfig *config) final
Compute the global error measures (L2, Linf) for verification cases.
Definition CFVMFlowSolverBase.inl:524
vector< vector< su2double > > Inlet_Ptotal
Value of the Total P.
Definition CFVMFlowSolverBase.hpp:181
vector< su2activematrix > CharacPrimVar
Value of the characteristic variables at each boundary.
Definition CFVMFlowSolverBase.hpp:186
void BC_Fluid_Interface(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config) final
Impose the interface state across sliding meshes.
Definition CFVMFlowSolverBase.inl:1335
void BC_Sym_Plane(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose the symmetry boundary condition using the residual.
Definition CFVMFlowSolverBase.inl:1150
su2double EvaluateCommonObjFunc(const CConfig &config) const
Evaluate common part of objective function to all solvers.
Definition CFVMFlowSolverBase.inl:2811
void ComputeAxisymmetricAuxGradients(CGeometry *geometry, const CConfig *config)
Computes and sets the required auxilliary vars (and gradients) for axisymmetric flow.
Definition CFVMFlowSolverBase.inl:2933
void SumEdgeFluxes(const CGeometry *geometry)
Sum the edge fluxes for each cell to populate the residual vector, only used on coarse grids.
Definition CFVMFlowSolverBase.inl:1626
~CFVMFlowSolverBase()
Destructor.
Definition CFVMFlowSolverBase.inl:372
unsigned long omp_chunk_size
Chunk size used in light point loops.
Definition CFVMFlowSolverBase.hpp:56
AeroCoeffsArray InvCoeff
Inviscid pressure contributions for each boundary.
Definition CFVMFlowSolverBase.hpp:147
static constexpr bool ReducerStrategy
Definition CFVMFlowSolverBase.hpp:215
su2double AllBound_HF_Visc
Heat load (viscous contribution) for all the boundaries.
Definition CFVMFlowSolverBase.hpp:178
bool euler_implicit
True if euler implicit scheme used.
Definition CFVMFlowSolverBase.hpp:197
vector< vector< su2double > > WallShearStress
Wall Shear Stress for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:188
void UpdateCustomBoundaryConditions(CGeometry **geometry_container, CSolver ***solver_container, CConfig *config) final
Update the multi-grid structure for the customized boundary conditions.
Definition CFVMFlowSolverBase.inl:809
void HybridParallelInitialization(const CConfig &config, CGeometry &geometry)
Initialize thread parallel variables.
Definition CFVMFlowSolverBase.inl:283
static constexpr size_t MAXNVAR
Max number of variables, for static arrays.
Definition CFVMFlowSolverBase.hpp:51
void CommunicateInitialState(CGeometry *geometry, const CConfig *config)
Communicate the initial solver state.
Definition CFVMFlowSolverBase.inl:245
static constexpr size_t OMP_MIN_SIZE
Min chunk size for edge loops (max is color group size).
Definition CFVMFlowSolverBase.hpp:54
void SetPrimitive_Gradient_GG(CGeometry *geometry, const CConfig *config, bool reconstruction=false) override
Compute the gradient of the primitive variables using Green-Gauss method, and stores the result in th...
Definition CFVMFlowSolverBase.inl:384
void ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config) final
Implementation of implicit Euler iteration.
Definition CFVMFlowSolverBase.inl:618
static constexpr size_t MAXNDIM
Max number of space dimensions, used in some static arrays.
Definition CFVMFlowSolverBase.hpp:50
vector< vector< su2double > > EddyViscWall
Eddy viscosuty at the wall for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:194
su2double Total_CNearFieldOF
Total Near-Field Pressure coefficient for all the boundaries.
Definition CFVMFlowSolverBase.hpp:169
vector< vector< su2double > > CPressure
Pressure coefficient for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:190
su2double AllBound_CNearFieldOF_Inv
Near-Field press coeff (inviscid) for all the boundaries.
Definition CFVMFlowSolverBase.hpp:172
CSysVector< su2double > EdgeFluxes
Flux across each edge.
Definition CFVMFlowSolverBase.hpp:224
const VariableType::template CIndices< unsigned short > prim_idx
Object with indices of primitive variables.
Definition CFVMFlowSolverBase.hpp:48
vector< su2double > MaxHF_Visc
Maximum heat flux (viscous contribution) for each boundary.
Definition CFVMFlowSolverBase.hpp:177
void Friction_Forces(const CGeometry *geometry, const CConfig *config) final
Compute the viscous forces and all the addimensional coefficients.
Definition CFVMFlowSolverBase.inl:2456
virtual void InstantiateEdgeNumerics(const CSolver *const *solvers, const CConfig *config)
Instantiate a SIMD numerics object.
Definition CFVMFlowSolverBase.hpp:336
su2double StrainMag_Max
Maximum Strain Rate magnitude.
Definition CFVMFlowSolverBase.hpp:80
vector< su2double > HF_Visc
Heat load (viscous contribution) for each boundary.
Definition CFVMFlowSolverBase.hpp:176
void ComputeVorticityAndStrainMag(const CConfig &config, const CGeometry *geometry, unsigned short iMesh)
Evaluate the vorticity and strain rate magnitude.
Definition CFVMFlowSolverBase.inl:644
su2double Omega_Max
Maximum Omega.
Definition CFVMFlowSolverBase.hpp:81
vector< vector< su2double > > HeatFluxTarget
Heat transfer coefficient for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:185
void SetResidual_DualTime(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep, unsigned short iMesh, unsigned short RunTime_EqSystem) override
Set the total residual adding the term that comes from the Dual Time Strategy.
Definition CFVMFlowSolverBase.inl:1645
void SetInletAtVertex(const su2double *val_inlet, unsigned short iMarker, unsigned long iVertex) final
Store of a set of provided inlet profile values at a vertex.
Definition CFVMFlowSolverBase.inl:728
su2double GetdPdrho_e() const
Get fluid pressure partial derivative.
Definition CFluidModel.hpp:222
virtual void SetTDState_Prho(su2double P, su2double rho)
virtual member that would be different for each gas model implemented
Definition CFluidModel.hpp:321
su2double GetdPde_rho() const
Get fluid pressure partial derivative.
Definition CFluidModel.hpp:227
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
unsigned long GetnVertex(unsigned short val_marker) const
Get number of vertices.
Definition CGeometry.hpp:637
unsigned long GetEdgeColorGroupSize() const
Get the group size used in edge coloring.
Definition CGeometry.hpp:1928
const CCompressedSparsePatternUL & GetEdgeColoring(su2double *efficiency=nullptr, bool maximizeEdgeColorGroupSize=false)
Get the edge coloring.
Definition CGeometry.cpp:4161
unsigned long GetGlobal_nPointDomain() const
Retrieve total number of nodes in a simulation across all processors (excluding halos).
Definition CGeometry.hpp:605
static void UpdateGeometry(CGeometry **geometry_container, CConfig *config)
Update the multi-grid structure and the wall-distance.
Definition CGeometry.cpp:2730
unsigned long GetnPoint() const
Get number of points.
Definition CGeometry.hpp:587
vector< std::unordered_map< unsigned long, std::array< su2double, MAXNDIM > > > symmetryNormals
Bool if boundary-marker is straight(2D)/plane(3D) for each local marker.
Definition CGeometry.hpp:263
CPoint * nodes
Node vector (dual grid information).
Definition CGeometry.hpp:253
void CompleteComms(CGeometry *geometry, const CConfig *config, MPI_QUANTITIES commType)
Routine to complete the set of non-blocking communications launched by InitiateComms() and unpacking ...
Definition CGeometry.cpp:737
su2double GetCustomBoundaryTemperature(unsigned short val_marker, unsigned long val_vertex) const
Get the value of the customized temperature at a specified vertex on a specified marker.
Definition CGeometry.hpp:1739
void SetNaturalEdgeColoring()
Force the natural (sequential) edge coloring.
Definition CGeometry.cpp:4256
su2double GetSurfaceArea(const CConfig *config, unsigned short val_marker) const
Get global Surface Area to a local marker.
Definition CGeometry.cpp:2843
void SetMultiGridMarkerQuantity(const CGeometry *fine_grid, unsigned short val_marker, T &wall_quantity)
Set a representative wall value of the agglomerated control volumes on a particular boundary marker.
Definition CGeometry.hpp:1781
virtual long GetGlobal_to_Local_Point(unsigned long val_ipoint) const
A virtual member.
Definition CGeometry.hpp:1330
CVertex *** vertex
Boundary Vertex vector (dual grid information).
Definition CGeometry.hpp:255
unsigned long GetnEdge() const
Get number of edges.
Definition CGeometry.hpp:617
virtual void SetRestricted_GridVelocity(const CGeometry *fine_grid)
A virtual member.
Definition CGeometry.hpp:1130
unsigned short GetnDim() const
Get number of coordinates.
Definition CGeometry.hpp:575
unsigned short GetnMarker() const
Get number of markers.
Definition CGeometry.hpp:623
CEdge * edges
Edge vector (dual grid information).
Definition CGeometry.hpp:254
su2double GetCustomBoundaryHeatFlux(unsigned short val_marker, unsigned long val_vertex) const
Get the value of the customized normal heat flux at a specified vertex on a specified marker.
Definition CGeometry.hpp:1759
unsigned long * nVertex
Number of vertex for each marker.
Definition CGeometry.hpp:258
void InitiateComms(CGeometry *geometry, const CConfig *config, MPI_QUANTITIES commType) const
Routine to load a geometric quantity into the data structures for MPI point-to-point communication an...
Definition CGeometry.cpp:640
virtual void ComputeFlux(Int iEdge, const CConfig &config, const CGeometry &geometry, const CVariable &solution, UpdateType updateType, Double updateMask, CSysVector< su2double > &vector, SparseMatrixType &matrix, su2activevector *edgeMassFluxes) const =0
Interface for edge flux computation.
Class for defining the numerical methods.
Definition CNumerics.hpp:48
void SetPrimitive(const su2double *val_v_i, const su2double *val_v_j)
Set the value of the primitive variables.
Definition CNumerics.hpp:301
void SetSecondary(const su2double *val_s_i, const su2double *val_s_j)
Set the value of the primitive variables.
Definition CNumerics.hpp:311
static void ComputeStressTensor(size_t nDim, Mat1 &stress, const Mat2 &velgrad, Scalar viscosity, Scalar density=0.0, Scalar turb_ke=0.0, bool reynolds3x3=false)
Compute the stress tensor from the velocity gradients.
Definition CNumerics.hpp:494
virtual void SetTau_Wall(su2double val_tauwall_i, su2double val_tauwall_j)
Set the value of the Tauwall.
Definition CNumerics.hpp:1765
void SetLES_Mode(su2double val_lesMode_i, su2double val_lesMode_j)
Set the LES sensor for hybrid RANS-LES methods.
Definition CNumerics.hpp:938
void SetGridVel(const su2double *val_gridvel_i, const su2double *val_gridvel_j)
Set the velocity of the computational grid.
Definition CNumerics.hpp:987
void SetPrimVarGradient(CMatrixView< const su2double > val_primvar_grad_i, CMatrixView< const su2double > val_primvar_grad_j)
Set the gradient of the primitive variables.
Definition CNumerics.hpp:338
void SetStochVar(unsigned short iDim, su2double val_stochvar_i, su2double val_stochvar_j)
Set the stochastic variables from Langevin equations (Stochastic Backscatter Model).
Definition CNumerics.hpp:920
void SetCoord(const su2double *val_coord_i, const su2double *val_coord_j)
Set coordinates of the points.
Definition CNumerics.hpp:977
void SetNormal(const su2double *val_normal)
Set the value of the normal vector to the face between two points.
Definition CNumerics.hpp:1086
void SetDistance(su2double val_dist_i, su2double val_dist_j)
Set the value of the distance from the nearest wall.
Definition CNumerics.hpp:948
static void AddQCR(size_t nDim, const Mat1 &gradvel, Mat2 &tau, Scalar2 turb_fraction)
Add a correction using a Quadratic Constitutive Relation to the stress tensor.
Definition CNumerics.hpp:535
virtual void ComputeResidual(su2double *val_residual, CConfig *config)
Compute the numerical residual.
Definition CNumerics.hpp:1543
void SetTurbKineticEnergy(su2double val_turb_ke_i, su2double val_turb_ke_j)
Set the turbulent kinetic energy.
Definition CNumerics.hpp:909
void SetVolume_n()
Set the volume of the control volume at time n.
Definition CPoint.cpp:139
void SetCoord_n1()
Set the coordinates of the control volume at time n-1 to the ones in Coord_n.
Definition CPoint.cpp:179
CCompressedSparsePatternL::CInnerIter GetEdges(unsigned long iPoint) const
Get inner iterator to loop over neighbor edges.
Definition CPoint.hpp:296
unsigned long GetPoint(unsigned long iPoint, unsigned long npoint) const
Get all the points that compose the control volume.
Definition CPoint.hpp:264
long GetEdge(unsigned long iPoint, unsigned long nedge) const
Get all the edges that compose the control volume.
Definition CPoint.hpp:291
unsigned long GetGlobalIndex(unsigned long iPoint) const
Get the global index in a parallel computation.
Definition CPoint.hpp:452
void SetVolume_nM1()
Set the volume of the control volume at time n-1.
Definition CPoint.cpp:144
bool GetDomain(unsigned long iPoint) const
For parallel computation, its indicates if a point must be computed or not.
Definition CPoint.hpp:423
su2double GetCoord(unsigned long iPoint, unsigned long iDim) const
Get the coordinates dor the control volume.
Definition CPoint.hpp:158
su2double & GetVolume(unsigned long iPoint)
Get area or volume of the control volume.
Definition CPoint.hpp:557
void SetGridVel(unsigned long iPoint, unsigned long iDim, su2double gridvel)
Set the value of the grid velocity at the point.
Definition CPoint.hpp:829
unsigned short GetnPoint(unsigned long iPoint) const
Get the number of points that compose the control volume.
Definition CPoint.hpp:256
su2double * GetGridVel(unsigned long iPoint)
Get the value of the grid velocity at the point.
Definition CPoint.hpp:816
su2double GetVolume_nM1(unsigned long iPoint) const
Get the volume of the control volume at time n+1.
Definition CPoint.hpp:601
void SetCoord_n()
Set the coordinates of the control volume at time n to the ones in Coord.
Definition CPoint.cpp:174
void SetCoord(unsigned long iPoint, unsigned long iDim, su2double coord)
Set the coordinates for the control volume.
Definition CPoint.hpp:178
Definition CSolver.hpp:71
vector< string > fields
Definition CSolver.hpp:209
void Read_SU2_Restart_Binary(CGeometry *geometry, const CConfig *config, string val_filename)
Read a native SU2 restart file in binary format.
Definition CSolver.cpp:3142
su2activematrix Point_Max_Coord_BGS
Vector with pointers to the coords of the maximal residual for each variable.
Definition CSolver.hpp:105
CSysMatrix< su2mixedfloat > Jacobian
Complete sparse Jacobian structure for implicit computations.
Definition CSolver.hpp:201
unsigned short nPrimVarGrad
Number of primitive variables of the problem in the gradient computation.
Definition CSolver.hpp:87
su2double ** Jacobian_j
Auxiliary matrices for storing point to point Jacobians at point j.
Definition CSolver.hpp:129
vector< unsigned long > nVertex
Store nVertex at each marker for deallocation.
Definition CSolver.hpp:146
vector< unsigned long > Point_Max_BGS
Vector with the maximal residual for each variable.
Definition CSolver.hpp:103
void Restart_OldGeometry(CGeometry *geometry, CConfig *config) const
Load the geometries at the previous time states n and nM1.
Definition CSolver.cpp:2819
su2activematrix Point_Max_Coord
Vector with pointers to the coords of the maximal residual for each variable.
Definition CSolver.hpp:104
void InitiatePeriodicComms(CGeometry *geometry, const CConfig *config, unsigned short val_periodic_index, unsigned short commType)
Routine to load a solver quantity into the data structures for MPI periodic communication and to laun...
Definition CSolver.cpp:368
void SetRotatePeriodic(bool val_rotate_periodic)
Routine that sets the flag controlling solution rotation for periodic BCs.
Definition CSolver.hpp:4237
virtual su2double GetInletTtotal(unsigned short val_marker, unsigned long val_vertex) const
A virtual member.
Definition CSolver.hpp:2915
CSysSolve< su2mixedfloat > System
Linear solver/smoother.
Definition CSolver.hpp:202
unsigned short nDim
Number of dimensions of the problem.
Definition CSolver.hpp:90
su2double ** Jacobian_i
Auxiliary matrices for storing point to point Jacobians at point i.
Definition CSolver.hpp:128
su2double Total_Custom_ObjFunc
Total custom objective function.
Definition CSolver.hpp:107
void Read_SU2_Restart_ASCII(CGeometry *geometry, const CConfig *config, string val_filename)
Read a native SU2 restart file in ASCII format.
Definition CSolver.cpp:2979
virtual CFluidModel * GetFluidModel(void) const
Compute the pressure at the infinity.
Definition CSolver.hpp:359
virtual void PrepareImplicitIteration(CGeometry *geometry, CSolver **solver_container, CConfig *config)
A virtual member.
Definition CSolver.hpp:1470
virtual void LoadRestart(CGeometry **geometry, CSolver ***solver, CConfig *config, int val_iter, bool val_update_geo)
A virtual member.
Definition CSolver.hpp:3472
vector< int > Restart_Vars
Auxiliary structure for holding the number of variables and points in a restart.
Definition CSolver.hpp:140
void SetAuxVar_Gradient_LS(CGeometry *geometry, const CConfig *config)
Compute the Least Squares gradient of the auxiliary variable.
Definition CSolver.cpp:2336
void CompleteComms(CGeometry *geometry, const CConfig *config, MPI_QUANTITIES commType)
Routine to complete the set of non-blocking communications launched by InitiateComms() and unpacking ...
Definition CSolver.cpp:1724
CVerificationSolution * VerificationSolution
Verification solution class used within the solver.
Definition CSolver.hpp:207
int size
MPI Size.
Definition CSolver.hpp:76
CSysVector< su2double > LinSysSol
vector to store iterative solution of implicit linear system.
Definition CSolver.hpp:199
vector< passivedouble > Restart_Data
Auxiliary structure for holding the data values from a restart.
Definition CSolver.hpp:142
vector< su2activematrix > VertexTraction
Definition CSolver.hpp:155
su2double * Res_Conv
Auxiliary nVar vector for storing the convective residual.
Definition CSolver.hpp:121
vector< su2double > Residual_BGS
Vector with the mean residual for each variable for BGS subiterations.
Definition CSolver.hpp:100
su2double * Res_Sour
Auxiliary nVar vector for storing the viscous residual.
Definition CSolver.hpp:123
void SetIterLinSolver(unsigned short val_iterlinsolver)
Set number of linear solver iterations.
Definition CSolver.hpp:316
unsigned long nPoint
Number of points of the computational grid.
Definition CSolver.hpp:91
void SetResLinSolver(su2double val_reslinsolver)
Set the final linear solver residual.
Definition CSolver.hpp:322
vector< su2double > Residual_Max
Vector with the maximal residual for each variable.
Definition CSolver.hpp:99
void SetImplicitPeriodic(bool val_implicit_periodic)
Routine that sets the flag controlling implicit treatment for periodic BCs.
Definition CSolver.hpp:4231
vector< su2activematrix > VertexTractionAdjoint
Definition CSolver.hpp:156
int rank
MPI Rank.
Definition CSolver.hpp:75
unsigned short MGLevel
Multigrid level of this solver object.
Definition CSolver.hpp:78
su2double * Res_Visc
Auxiliary nVar vector for storing the viscous residual.
Definition CSolver.hpp:122
unsigned short nVar
Number of variables of the problem.
Definition CSolver.hpp:85
void CompletePeriodicComms(CGeometry *geometry, const CConfig *config, unsigned short val_periodic_index, unsigned short commType)
Routine to complete the set of non-blocking periodic communications launched by InitiatePeriodicComms...
Definition CSolver.cpp:1113
CSysVector< su2double > LinSysRes
vector to store iterative residual of implicit linear system.
Definition CSolver.hpp:200
void SetAuxVar_Gradient_GG(CGeometry *geometry, const CConfig *config)
Compute the Green-Gauss gradient of the auxiliary variable.
Definition CSolver.cpp:2326
su2double * Solution
Auxiliary nVar vector.
Definition CSolver.hpp:115
unsigned long nPointDomain
Number of points of the computational grid.
Definition CSolver.hpp:92
su2double * Solution_j
Auxiliary nVar vector for storing the solution at point j.
Definition CSolver.hpp:117
su2double * Solution_i
Auxiliary nVar vector for storing the solution at point i.
Definition CSolver.hpp:116
su2double Avg_CFL_Local
Average value of the CFL across all the control volumes.
Definition CSolver.hpp:97
void InitiateComms(CGeometry *geometry, const CConfig *config, MPI_QUANTITIES commType)
Routine to load a solver quantity into the data structures for MPI point-to-point communication and t...
Definition CSolver.cpp:1563
su2activevector iPoint_UndLapl
Auxiliary variable for the undivided Laplacians.
Definition CSolver.hpp:137
vector< su2double > Residual_Max_BGS
Vector with the maximal residual for each variable for BGS subiterations.
Definition CSolver.hpp:101
unsigned short nPrimVar
Number of primitive variables of the problem.
Definition CSolver.hpp:86
su2double Min_CFL_Local
Minimum value of the CFL across all the control volumes.
Definition CSolver.hpp:96
vector< su2double > Residual_RMS
Vector with the mean residual for each variable.
Definition CSolver.hpp:98
bool dynamic_grid
Flag that determines whether the grid is dynamic (moving or deforming + grid velocities).
Definition CSolver.hpp:153
static void MultigridRestriction(const CGeometry &geoFine, const su2activematrix &varsFine, const CGeometry &geoCoarse, su2activematrix &varsCoarse)
Interpolate variables to a coarser grid level.
Definition CSolver.hpp:4379
su2activevector jPoint_UndLapl
Auxiliary variable for the undivided Laplacians.
Definition CSolver.hpp:138
CVariable * GetNodes()
Allow outside access to the nodes of the solver, containing conservatives, primitives,...
Definition CSolver.hpp:229
su2double * Residual
Auxiliary nVar vector.
Definition CSolver.hpp:112
virtual void Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output)
A virtual member.
Definition CSolver.hpp:764
su2double Max_CFL_Local
Maximum value of the CFL across all the control volumes.
Definition CSolver.hpp:95
vector< unsigned long > Point_Max
Vector with the maximal residual for each variable.
Definition CSolver.hpp:102
su2double * Vector_i
Auxiliary nDim vector to do the reconstruction of the variables at point i.
Definition CSolver.hpp:119
su2double * Vector_j
Auxiliary nDim vector to do the reconstruction of the variables at point j.
Definition CSolver.hpp:120
unsigned long nMarker
Total number of markers using the grid information.
Definition CSolver.hpp:145
void DeleteValsRowi(unsigned long block_i, unsigned long row)
Deletes the values of a row of the sparse matrix.
Definition CSysMatrix.cpp:922
void SubtractBlock2Diag(unsigned long block_i, const OtherType &val_block)
Short-hand to AddBlock2Diag with alpha = -1, i.e. subtracts from the current diagonal.
Definition CSysMatrix.hpp:1226
void AddBlock2Diag(unsigned long block_i, const OtherType &val_block, T alpha=1.0)
Non overwrite version of SetBlock2Diag, also with scaling.
Definition CSysMatrix.hpp:1218
void SetBlock(unsigned long block_i, unsigned long block_j, MatrixType &val_block, std::decay_t< typename MatrixType::Scalar > alpha=1.0)
Set the value of a scaled block in the sparse matrix.
Definition CSysMatrix.hpp:820
const ScalarType * GetBlock(unsigned long block_i, unsigned long block_j) const
Get a pointer to the start of block "ij".
Definition CSysMatrix.hpp:760
void AddVal2Diag(unsigned long block_i, OtherType val_matrix)
Adds the specified value to the diagonal of the (i, i) subblock of the matrix-by-blocks structure.
Definition CSysMatrix.hpp:1237
CBlockView< const ScalarType > GetBlockView(unsigned long block_i, unsigned long block_j) const
Read-only view of block (block_i, block_j). In Q_LU_SGS mode values are decoded on access inside CBlo...
Definition CSysMatrix.hpp:785
ScalarType GetResidual() const
Get the final residual.
Definition CSysSolve.hpp:493
void SetxIsZero(bool isZero)
Assume the initial solution is 0 to save one product, or don't.
Definition CSysSolve.hpp:503
unsigned long Solve(MatrixType &Jacobian, const CSysVector< su2double > &LinSysRes, CSysVector< su2double > &LinSysSol, CGeometry *geometry, const CConfig *config)
Solve the linear system using a Krylov subspace method.
Definition CSysSolve.cpp:1406
void SubtractBlock(unsigned long iPoint, const VectorType &block)
Subtract "block" from the vector, see AddBlock.
Definition CSysVector.hpp:639
ScalarType * GetBlock(unsigned long iPoint)
Get pointer to a block.
Definition CSysVector.hpp:600
void SetBlock_Zero(unsigned long iPoint)
Set the values to zero for one block.
Definition CSysVector.hpp:607
void AddBlock(unsigned long iPoint, const VectorType &block, ScalarType alpha=1)
Add "block" to the vector, see SetBlock.
Definition CSysVector.hpp:631
Main class for defining the variables.
Definition CVariable.hpp:50
virtual su2double GetDES_LengthScale(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:394
virtual su2double GetLES_Mode(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:406
su2double GetSolution(unsigned long iPoint, unsigned long iVar) const
Get the solution.
Definition CVariable.hpp:248
void Set_Solution_time_n1()
Set the variable solution at time n-1.
Definition CVariable.cpp:119
virtual su2double GetLangevinSourceTerms(unsigned long iPoint, unsigned short iDim) const
A virtual member.
Definition CVariable.hpp:420
void Set_Solution_time_n()
Set the variable solution at time n.
Definition CVariable.cpp:114
void AddError_RMS(unsigned short val_var, su2double val_error)
Increments the global RMS error for verification cases.
Definition CVerificationSolution.hpp:142
void SetVerificationError(unsigned long nDOFsGlobal, CConfig *config)
Calculate the global error metrics for verification cases.
Definition CVerificationSolution.cpp:122
void AddError_Max(unsigned short val_var, su2double val_error, unsigned long val_point, const su2double *val_coord)
Increment the global maximum error for verification cases.
Definition CVerificationSolution.hpp:168
void SetError_Max(unsigned short val_var, su2double val_error, unsigned long val_point)
Set the global maximum error for verification cases.
Definition CVerificationSolution.hpp:156
void GetLocalError(const su2double *val_coords, const su2double val_t, const su2double *GetLocalErrorval_solution, su2double *val_error) const
Get the local error defined as the local solution minus the verification solution.
Definition CVerificationSolution.cpp:109
void GetInitialCondition(const su2double *val_coords, su2double *val_solution) const
Get the exact solution at the current position and t = 0.
Definition CVerificationSolution.cpp:88
virtual void GetBCState(const su2double *val_coords, const su2double val_t, su2double *val_solution) const
Get the boundary conditions state for an exact solution.
Definition CVerificationSolution.cpp:93
virtual bool ExactSolutionKnown(void) const
Whether or not the exact solution is known for this verification solution.
Definition CVerificationSolution.cpp:107
void SetError_RMS(unsigned short val_var, su2double val_error)
Set the global RMS error for verification cases.
Definition CVerificationSolution.hpp:135
void GetNormal(su2double *val_normal) const override
Copy the the normal vector of a face.
Definition CVertex.hpp:94
const su2double & GetNearestNeighborDistance() const
Get the distance to the nearest internal neighbor that is not a wall.
Definition CVertex.hpp:332
unsigned long GetNode() const
Get the node of the vertex.
Definition CVertex.hpp:70
unsigned long GetNormal_Neighbor() const
Get the value of the closest neighbor.
Definition CVertex.hpp:322
A simple SIMD type relying on implicit vectorization, i.e. done by the compiler, explicitly vectorize...
Definition vectorization.hpp:89
@ Size
Definition vectorization.hpp:95
uint32_t su2uint
Definition code_config.hpp:121
passivedouble su2double
Definition code_config.hpp:181
void AllocVectorOfVectors(size_t M, const IndexVector &N, VectorOfVector &X, Scalar val=0)
Allocate a vector of varying-size vectors and initialize with some value.
Definition container_decorators.hpp:275
void AllocVectorOfMatrices(size_t M, const IndexVector &N, size_t P, VectorOfMatrix &X, Scalar val=0)
Allocate a vector of matrices with varying row count, and initialize with some value.
Definition container_decorators.hpp:303
void computeLimiters(LIMITER LimiterKind, CSolver *solver, MPI_QUANTITIES kindMpiComm, PERIODIC_QUANTITIES kindPeriodicComm1, PERIODIC_QUANTITIES kindPeriodicComm2, CGeometry &geometry, const CConfig &config, size_t varBegin, size_t varEnd, su2double umusclKappa, const FieldType &field, const GradientType &gradient, FieldType &fieldMin, FieldType &fieldMax, FieldType &limiter)
A wrapper funtion that calls specialized implementations depending on "LimiterKind"....
Definition computeLimiters.hpp:39
void computeGradientsGreenGauss(CSolver *solver, MPI_QUANTITIES kindMpiComm, PERIODIC_QUANTITIES kindPeriodicComm, CGeometry &geometry, const CConfig &config, const FieldType &field, const size_t varBegin, const size_t varEnd, const int idxVel, GradientType &gradient)
Instantiations for 2D and 3D.
Definition computeGradientsGreenGauss.hpp:191
void computeGradientsLeastSquares(CSolver *solver, MPI_QUANTITIES kindMpiComm, PERIODIC_QUANTITIES kindPeriodicComm, CGeometry &geometry, const CConfig &config, bool weighted, const FieldType &field, const size_t varBegin, const size_t varEnd, const int idxVel, GradientType &gradient, RMatrixType &Rmatrix)
Instantiations for 2D and 3D.
Definition computeGradientsLeastSquares.hpp:340
FORCEINLINE ARRAY_T sqrt(const ARRAY_T &x)
Definition special_vectorization.hpp:116
FORCEINLINE ARRAY_T pow(const ARRAY_T &a, const ARRAY_T &b)
Definition special_vectorization.hpp:179
#define MPI_INT
Definition mpi_structure.hpp:491
#define MPI_MAX
Definition mpi_structure.hpp:490
#define CURRENT_FUNCTION
Definition mpi_structure.hpp:59
#define MPI_UNSIGNED_LONG
Definition mpi_structure.hpp:480
#define MPI_SUM
Definition mpi_structure.hpp:486
#define MPI_MIN
Definition mpi_structure.hpp:489
#define MPI_DOUBLE
Definition mpi_structure.hpp:484
bool PauseRecording()
Pause the recording of the operations and involved variables. If called, all operations occuring afte...
Definition ad_structure.hpp:69
void StartPreacc()
Starts a new preaccumulation section and sets the input variables.
Definition ad_structure.hpp:215
void EndPreacc()
Ends a preaccumulation section and computes the local Jacobi matrix of a code section using the varia...
Definition ad_structure.hpp:243
void SetPreaccOut(Ts &&... data)
Sets the scalar outputs of a preaccumulation section.
Definition ad_structure.hpp:222
void SetPreaccIn(Ts &&... data)
Sets the scalar inputs of a preaccumulation section.
Definition ad_structure.hpp:186
void StartNoSharedReading()
Begin a hybrid parallel adjoint evaluation mode that assumes an inherently safe reverse path.
Definition ad_structure.hpp:404
void EndNoSharedReading()
End the "no shared reading" adjoint evaluation mode.
Definition ad_structure.hpp:409
bool PausePreaccumulation()
Pause the use of preaccumulation.
Definition ad_structure.hpp:393
void ResumeRecording(bool wasActive)
Resume the recording of the operations and variables after the recording had been paused.
Definition ad_structure.hpp:74
passivedouble GetValue(const su2double &data)
Get the (primitive) value of the datatype (needs to be specialized for active types).
Definition datatype_structure.hpp:113
#define BEGIN_SU2_OMP_SAFE_GLOBAL_ACCESS
Definition omp_structure.hpp:187
#define END_SU2_OMP_FOR
Definition omp_structure.hpp:158
#define END_SU2_OMP_PARALLEL
Definition omp_structure.hpp:157
constexpr int omp_get_max_threads()
Maximum number of threads available.
Definition omp_structure.hpp:70
#define SU2_OMP_FOR_(ARGS)
Definition omp_structure.hpp:149
#define SU2_NOWAIT
Definition omp_structure.hpp:153
#define END_SU2_OMP_SAFE_GLOBAL_ACCESS
Definition omp_structure.hpp:192
#define END_SU2_OMP_MASTER
Definition omp_structure.hpp:155
#define SU2_OMP_BARRIER
Definition omp_structure.hpp:142
size_t computeStaticChunkSize(size_t totalWork, size_t numThreads, size_t maxChunkSize)
Compute a chunk size based on totalWork and number of threads such that all threads get the same numb...
Definition omp_structure.hpp:223
#define SU2_OMP_MASTER
Definition omp_structure.hpp:141
#define SU2_OMP_FOR_DYN(CHUNK)
Definition omp_structure.hpp:150
#define SU2_OMP_CRITICAL
Definition omp_structure.hpp:143
#define SU2_OMP_PARALLEL
Definition omp_structure.hpp:145
#define SU2_OMP_SAFE_GLOBAL_ACCESS(...)
Definition omp_structure.hpp:197
#define END_SU2_OMP_CRITICAL
Definition omp_structure.hpp:156
void atomicMax(const T &local, T &shared)
Definition omp_structure.hpp:305
#define SU2_OMP_FOR_STAT(CHUNK)
Definition omp_structure.hpp:151
constexpr size_t nextMultiple(size_t argument, size_t multiple)
Round up to next multiple.
Definition omp_structure.hpp:211
const int MASTER_NODE
Master node for MPI parallelization.
Definition option_structure.hpp:112
@ NONE
No wall function treatment, integration to the wall. Default behavior.
WALL_TYPE
types of wall boundary condition - smooth or rough
Definition option_structure.hpp:2216
@ YES
Boolean definition of yes.
Definition option_structure.hpp:284
@ EULER_IMPLICIT
Implicit Euler time integration definition.
Definition option_structure.hpp:1711
@ SPACE_CENTERED
Space centered convective numerical method.
Definition option_structure.hpp:632
@ MSW
Modified Steger-Warming method.
@ INCOMPRESSIBLE
Definition of incompressible solver.
@ COMPRESSIBLE
Definition of compressible solver.
@ SST
Kind of Turbulence model (Menter SST).
@ NONE
No turbulence model.
const unsigned int MESH_0
Definition of the finest grid level.
Definition option_structure.hpp:88
@ TOTAL_HEATFLUX
Total heat flux.
Definition option_structure.hpp:2231
@ FORCE_Y_COEFFICIENT
Y-direction force objective function definition.
Definition option_structure.hpp:2240
@ SURFACE_SPECIES_VARIANCE
Species Variance objective function definition.
Definition option_structure.hpp:2257
@ SURFACE_MASSFLOW
Mass Flow Rate objective function definition.
Definition option_structure.hpp:2249
@ TORQUE_COEFFICIENT
Torque objective function definition.
Definition option_structure.hpp:2243
@ MAXIMUM_HEATFLUX
Maximum heat flux.
Definition option_structure.hpp:2232
@ THRUST_COEFFICIENT
Thrust objective function definition.
Definition option_structure.hpp:2242
@ SURFACE_MOM_DISTORTION
Momentum distortion objective function definition.
Definition option_structure.hpp:2253
@ SURFACE_SECOND_OVER_UNIFORM
Secondary over uniformity (relative secondary strength) objective function definition.
Definition option_structure.hpp:2254
@ SURFACE_PRESSURE_DROP
Pressure drop objective function definition.
Definition option_structure.hpp:2255
@ MOMENT_X_COEFFICIENT
Pitching moment objective function definition.
Definition option_structure.hpp:2234
@ SIDEFORCE_COEFFICIENT
Side force objective function definition.
Definition option_structure.hpp:2227
@ LIFT_COEFFICIENT
Lift objective function definition.
Definition option_structure.hpp:2226
@ INVERSE_DESIGN_HEATFLUX
Heat flux objective function definition (inverse design).
Definition option_structure.hpp:2230
@ SURFACE_SECONDARY
Secondary flow strength objective function definition.
Definition option_structure.hpp:2252
@ SURFACE_SPECIES_0
Surface Avg. Species_0 objective function definition.
Definition option_structure.hpp:2256
@ INVERSE_DESIGN_PRESSURE
Pressure objective function definition (inverse design).
Definition option_structure.hpp:2229
@ EFFICIENCY
Efficiency objective function definition.
Definition option_structure.hpp:2228
@ FORCE_Z_COEFFICIENT
Z-direction force objective function definition.
Definition option_structure.hpp:2241
@ DRAG_COEFFICIENT
Drag objective function definition.
Definition option_structure.hpp:2225
@ SURFACE_TOTAL_PRESSURE
Total Pressure objective function definition.
Definition option_structure.hpp:2246
@ MOMENT_Y_COEFFICIENT
Rolling moment objective function definition.
Definition option_structure.hpp:2235
@ FORCE_X_COEFFICIENT
X-direction force objective function definition.
Definition option_structure.hpp:2239
@ SURFACE_STATIC_TEMPERATURE
Static Temperature objective function definition.
Definition option_structure.hpp:2248
@ CUSTOM_OBJFUNC
Custom objective function definition.
Definition option_structure.hpp:2258
@ EQUIVALENT_AREA
Equivalent area objective function definition.
Definition option_structure.hpp:2237
@ FIGURE_OF_MERIT
Rotor Figure of Merit objective function definition.
Definition option_structure.hpp:2244
@ SURFACE_STATIC_PRESSURE
Static Pressure objective function definition.
Definition option_structure.hpp:2247
@ SURFACE_UNIFORMITY
Flow uniformity objective function definition.
Definition option_structure.hpp:2251
@ MOMENT_Z_COEFFICIENT
Yawing objective function definition.
Definition option_structure.hpp:2236
@ RIGID_MOTION
Simulation with rigid mesh motion (plunging/pitching/rotation).
Definition option_structure.hpp:862
constexpr passivedouble PI_NUMBER
Pi number (not using M_PI to avoid Windows issues).
Definition option_structure.hpp:108
constexpr passivedouble COLORING_EFF_THRESH
Below this value fallback strategies are used instead.
Definition option_structure.hpp:270
@ DT_STEPPING_1ST
Use a dual time stepping strategy for unsteady computations (1st order).
@ DT_STEPPING_2ND
Use a dual time stepping strategy for unsteady computations (2nd order).
@ STEADY
A steady computation.
@ RUNTIME_FLOW_SYS
One-physics case, the code is solving the flow equations(Euler and Navier-Stokes).
Definition option_structure.hpp:559
constexpr passivedouble EPS
Error scale.
Definition option_structure.hpp:100
@ COMM_FULL
Perform all MPI communications.
Definition option_structure.hpp:2912
@ FLOW_SOL
Position of the mean flow solution in the solver container array.
Definition option_structure.hpp:577
@ TURB_SOL
Position of the turbulence model solution in the solver container array.
Definition option_structure.hpp:579
const int SINGLE_NODE
There is only a node in the MPI parallelization.
Definition option_structure.hpp:113
@ ENGINE_EXHAUST
Boundary nacelle exhaust.
Definition option_structure.hpp:1829
@ INTERNAL_BOUNDARY
Internal Boundary definition.
Definition option_structure.hpp:1840
@ EULER_WALL
Boundary Euler wall definition.
Definition option_structure.hpp:1815
@ ISOTHERMAL
No slip isothermal wall boundary condition.
Definition option_structure.hpp:1831
@ INLET_FLOW
Boundary inlet flow definition.
Definition option_structure.hpp:1818
@ ACTDISK_OUTLET
Actuator disk outlet boundary definition.
Definition option_structure.hpp:1835
@ OUTLET_FLOW
Boundary outlet flow definition.
Definition option_structure.hpp:1819
@ SUPERSONIC_INLET
Boundary supersonic inlet definition.
Definition option_structure.hpp:1826
@ ENGINE_INFLOW
Boundary nacelle inflow.
Definition option_structure.hpp:1828
@ HEAT_FLUX
No slip constant heat flux wall boundary condition.
Definition option_structure.hpp:1832
@ FLUID_INTERFACE
Domain interface definition.
Definition option_structure.hpp:1841
@ NEARFIELD_BOUNDARY
Near-Field boundary definition.
Definition option_structure.hpp:1821
@ ACTDISK_INLET
Actuator disk inlet boundary definition.
Definition option_structure.hpp:1834
@ PERIODIC_BOUNDARY
Periodic boundary definition.
Definition option_structure.hpp:1820
@ NONE
No scalar transport model.
@ IDEAL_GAS
Ideal gas model.
Definition option_structure.hpp:642
@ STANDARD_AIR
Standard air gas model.
Definition option_structure.hpp:641
const unsigned int NO_RK_ITER
No Runge-Kutta iteration.
Definition option_structure.hpp:84
PERIODIC_QUANTITIES
Vertex-based quantities exchanged during periodic marker communications.
Definition option_structure.hpp:2843
@ PERIODIC_PRIM_LS
Primitive gradient communication for weighted Least Squares (periodic only).
Definition option_structure.hpp:2854
@ PERIODIC_PRIM_ULS_R
Same but reconstruction.
Definition option_structure.hpp:2862
@ PERIODIC_IMPLICIT
Implicit update communication to ensure consistency across periodic boundaries.
Definition option_structure.hpp:2867
@ PERIODIC_PRIM_GG
Primitive gradient communication for Green-Gauss (periodic only).
Definition option_structure.hpp:2852
@ PERIODIC_PRIM_ULS
Primitive gradient communication for unweighted Least Squares (periodic only).
Definition option_structure.hpp:2856
@ PERIODIC_NEIGHBORS
Communication of the number of neighbors for centered schemes (periodic only).
Definition option_structure.hpp:2846
@ PERIODIC_PRIM_GG_R
Same but reconstruction.
Definition option_structure.hpp:2858
@ PERIODIC_RESIDUAL
Residual and Jacobian communication (periodic only).
Definition option_structure.hpp:2847
@ PERIODIC_LIM_PRIM_2
Primitive limiter communication phase 2 of 2 (periodic only).
Definition option_structure.hpp:2866
@ PERIODIC_LIM_PRIM_1
Primitive limiter communication phase 1 of 2 (periodic only).
Definition option_structure.hpp:2865
@ PERIODIC_VOLUME
Volume communication for summing total CV (periodic only).
Definition option_structure.hpp:2845
@ PERIODIC_PRIM_LS_R
Same but reconstruction.
Definition option_structure.hpp:2860
@ PRIMITIVE_GRAD_REC
Primitive reconstruction gradient communication.
@ PRIMITIVE_LIMITER
Primitive limiter communication.
@ GRID_VELOCITY
Grid velocity communication.
@ PRIMITIVE_GRADIENT
Primitive gradient communication.
@ SOLUTION
Conservative solution communication.
@ WEIGHTED_LEAST_SQUARES
Gradients computation using inverse-distance weighted least squares.
Definition option_structure.hpp:1782
@ GREEN_GAUSS
Gradient computation using Green-Gauss theorem.
Definition option_structure.hpp:1780
su2double * CQ
Torque coefficient.
Definition CFVMFlowSolverBase.hpp:106
su2double * CMz
z Moment coefficient.
Definition CFVMFlowSolverBase.hpp:101
su2double * CT
Thrust coefficient.
Definition CFVMFlowSolverBase.hpp:105
su2double * CoPz
z Moment coefficient.
Definition CFVMFlowSolverBase.hpp:104
su2double * CMy
y Moment coefficient.
Definition CFVMFlowSolverBase.hpp:100
su2double * CoPy
y Moment coefficient.
Definition CFVMFlowSolverBase.hpp:103
su2double * CFy
y Force coefficient.
Definition CFVMFlowSolverBase.hpp:97
su2double * CMx
x Moment coefficient.
Definition CFVMFlowSolverBase.hpp:99
void allocate(int size)
Allocates arrays.
Definition CFVMFlowSolverBase.inl:36
su2double * CD
Drag coefficient.
Definition CFVMFlowSolverBase.hpp:92
void setZero()
Definition CFVMFlowSolverBase.hpp:121
su2double * CMerit
Rotor Figure of Merit.
Definition CFVMFlowSolverBase.hpp:107
su2double * CoPx
x Moment coefficient.
Definition CFVMFlowSolverBase.hpp:102
su2double * CSF
Sideforce coefficient.
Definition CFVMFlowSolverBase.hpp:94
su2double * CEff
Efficiency (Cl/Cd).
Definition CFVMFlowSolverBase.hpp:95
su2double * CFz
z Force coefficient.
Definition CFVMFlowSolverBase.hpp:98
~AeroCoeffsArray()
Definition CFVMFlowSolverBase.inl:58
int _size
Array size.
Definition CFVMFlowSolverBase.hpp:108
su2double * CL
Lift coefficient.
Definition CFVMFlowSolverBase.hpp:93
su2double * CFx
x Force coefficient.
Definition CFVMFlowSolverBase.hpp:96
void setZero(int i)
Sets all values to zero for all indices.
Definition CFVMFlowSolverBase.hpp:113
su2double CMerit
Definition CFVMFlowSolverBase.hpp:138
su2double CEff
Definition CFVMFlowSolverBase.hpp:138
su2double CT
Definition CFVMFlowSolverBase.hpp:138
su2double CQ
Definition CFVMFlowSolverBase.hpp:138
su2double CD
Definition CFVMFlowSolverBase.hpp:138
void setZero()
Definition CFVMFlowSolverBase.hpp:140
su2double CL
Definition CFVMFlowSolverBase.hpp:138
Return type used in some "ComputeResidual" overloads to give a const-view of the internally stored fl...
Definition CNumerics.hpp:218
A way to represent natural coloring {0,1,2,...,size-1} with zero overhead (behaves like looping with ...
Definition graph_toolbox.hpp:684
bool qcr2000
Use QCR-2000.
Definition option_structure.hpp:1293
#define SU2_ZONE_SCOPED
Definition tracy_structure.hpp:39