Documentation 6b54b78464
Loading...
Searching...
No Matches
CFVMFlowSolverBase.hpp
Go to the documentation of this file.
1/*!
2 * \file CFVMFlowSolverBase.hpp
3 * \brief Base class template for all FVM flow solvers.
4 * \version 8.5.0 "Harrier"
5 *
6 * SU2 Project Website: https://su2code.github.io
7 *
8 * The SU2 Project is maintained by the SU2 Foundation
9 * (http://su2foundation.org)
10 *
11 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
12 *
13 * SU2 is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation; either
16 * version 2.1 of the License, or (at your option) any later version.
17 *
18 * SU2 is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
25 */
26
27#pragma once
28
29#include "../../../Common/include/parallelization/omp_structure.hpp"
30#include "../../../Common/include/toolboxes/geometry_toolbox.hpp"
31#include "CSolver.hpp"
32
33class CNumericsSIMD;
34
35template <class VariableType, ENUM_REGIME FlowRegime>
37 private:
38 static void recursiveAssign() {}
39
40 template<class U, class V, class... Ts>
41 static void recursiveAssign(U& d, const V& s, Ts&&... otherPairs) {
42 d = s;
43 recursiveAssign(otherPairs...);
44 }
45
46 protected:
47 /*!< \brief Object with indices of primitive variables. */
48 const typename VariableType::template CIndices<unsigned short> prim_idx;
49
50 static constexpr size_t MAXNDIM = 3; /*!< \brief Max number of space dimensions, used in some static arrays. */
51 static constexpr size_t MAXNVAR = VariableType::MAXNVAR; /*!< \brief Max number of variables, for static arrays. */
52
53 static constexpr size_t OMP_MAX_SIZE = 512; /*!< \brief Max chunk size for light point loops. */
54 static constexpr size_t OMP_MIN_SIZE = 32; /*!< \brief Min chunk size for edge loops (max is color group size). */
55
56 unsigned long omp_chunk_size; /*!< \brief Chunk size used in light point loops. */
57
58 su2activevector EdgeMassFluxes; /*!< \brief Mass fluxes across each edge, for discretization of transported scalars. */
59
60 /*!
61 * \brief Utility to set the value of a member variables safely, and so that the new values are seen by all threads.
62 * \param[in] lhsRhsPairs - Pairs of destination and source e.g. a,0,b,-1.
63 */
64 template<class... Ts>
65 static void ompMasterAssignBarrier(Ts&&... lhsRhsPairs) {
66 SU2_OMP_SAFE_GLOBAL_ACCESS(recursiveAssign(lhsRhsPairs...);)
67 }
68
69 su2double Mach_Inf = 0.0; /*!< \brief Mach number at the infinity. */
70 su2double Density_Inf = 0.0; /*!< \brief Density at the infinity. */
71 su2double Energy_Inf = 0.0; /*!< \brief Energy at the infinity. */
72 su2double Temperature_Inf = 0.0; /*!< \brief Temperature at the infinity. */
73 su2double Enthalpy_Inf = 0.0; /*!< \brief Enthalpy at the infinity. */
74 su2double Pressure_Inf = 0.0; /*!< \brief Pressure at the infinity. */
75 su2double* Velocity_Inf = nullptr; /*!< \brief Flow Velocity vector at the infinity. */
76
77 su2double Viscosity_Inf; /*!< \brief Viscosity at the infinity. */
78 su2double Tke_Inf; /*!< \brief Turbulent kinetic energy at the infinity. */
79
80 su2double StrainMag_Max; /*!< \brief Maximum Strain Rate magnitude. */
81 su2double Omega_Max; /*!< \brief Maximum Omega. */
82
83 su2double Global_Delta_Time = 0.0, /*!< \brief Time-step for TIME_STEPPING time marching strategy. */
84 Global_Delta_UnstTimeND = 0.0; /*!< \brief Unsteady time step for the dual time strategy. */
85
86 unsigned long ErrorCounter = 0; /*!< \brief Counter for number of un-physical states. */
87
88 /*!
89 * \brief Auxilary types to store common aero coefficients (avoids repeating oneself so much).
90 */
92 su2double* CD = nullptr; /*!< \brief Drag coefficient. */
93 su2double* CL = nullptr; /*!< \brief Lift coefficient. */
94 su2double* CSF = nullptr; /*!< \brief Sideforce coefficient. */
95 su2double* CEff = nullptr; /*!< \brief Efficiency (Cl/Cd). */
96 su2double* CFx = nullptr; /*!< \brief x Force coefficient. */
97 su2double* CFy = nullptr; /*!< \brief y Force coefficient. */
98 su2double* CFz = nullptr; /*!< \brief z Force coefficient. */
99 su2double* CMx = nullptr; /*!< \brief x Moment coefficient. */
100 su2double* CMy = nullptr; /*!< \brief y Moment coefficient. */
101 su2double* CMz = nullptr; /*!< \brief z Moment coefficient. */
102 su2double* CoPx = nullptr; /*!< \brief x Moment coefficient. */
103 su2double* CoPy = nullptr; /*!< \brief y Moment coefficient. */
104 su2double* CoPz = nullptr; /*!< \brief z Moment coefficient. */
105 su2double* CT = nullptr; /*!< \brief Thrust coefficient. */
106 su2double* CQ = nullptr; /*!< \brief Torque coefficient. */
107 su2double* CMerit = nullptr; /*!< \brief Rotor Figure of Merit. */
108 int _size = 0; /*!< \brief Array size. */
109
110 void allocate(int size); /*!< \brief Allocates arrays. */
111
112 /*!< \brief Sets all values to zero at a particular index. */
113 void setZero(int i) {
114 CD[i] = CL[i] = CSF[i] = CEff[i] = 0.0;
115 CFx[i] = CFy[i] = CFz[i] = CMx[i] = 0.0;
116 CMy[i] = CMz[i] = CoPx[i] = CoPy[i] = 0.0;
117 CoPz[i] = CT[i] = CQ[i] = CMerit[i] = 0.0;
118 }
119
120 /*!< \brief Sets all values to zero for all indices. */
121 void setZero() {
123 for (int i = 0; i < _size; ++i) setZero(i);
125 }
126
128 if (size) allocate(size);
129 }
130
132 };
133
134 /*!
135 * \brief Scalar version of the coefficients type.
136 */
137 struct AeroCoeffs {
139
140 void setZero() {
141 CD = CL = CSF = CEff = CFx = CFy = CFz = CMx = CMy = CMz = CoPx = CoPy = CoPz = CT = CQ = CMerit = 0.0;
142 }
143
145 };
146
147 AeroCoeffsArray InvCoeff; /*!< \brief Inviscid pressure contributions for each boundary. */
148 AeroCoeffsArray SurfaceInvCoeff; /*!< \brief Inviscid pressure contributions for each monitoring boundary. */
149 AeroCoeffs AllBoundInvCoeff; /*!< \brief Total pressure contribution for all the boundaries. */
150
151 AeroCoeffsArray MntCoeff; /*!< \brief Inviscid momentum contributions for each boundary. */
152 AeroCoeffsArray SurfaceMntCoeff; /*!< \brief Inviscid momentum contributions for each monitoring boundary. */
153 AeroCoeffs AllBoundMntCoeff; /*!< \brief Total momentum contribution for all the boundaries. */
154
155 AeroCoeffsArray ViscCoeff; /*!< \brief Viscous contributions for each boundary. */
156 AeroCoeffsArray SurfaceViscCoeff; /*!< \brief Viscous contributions for each monitoring boundary. */
157 AeroCoeffs AllBoundViscCoeff; /*!< \brief Total pressure contribution for all the boundaries. */
158
159 AeroCoeffsArray SurfaceCoeff; /*!< \brief Totals for each monitoring surface. */
160 AeroCoeffs TotalCoeff; /*!< \brief Totals for all boundaries. */
161
162 su2double AeroCoeffForceRef = 1.0; /*!< \brief Reference force for aerodynamic coefficients. */
163 su2double DynamicPressureRef = 1.0; /*!< \brief Reference dynamic pressure. */
164
165 su2double Total_CpDiff = 0.0; /*!< \brief Total Equivalent Area coefficient for all the boundaries. */
166 su2double Total_HeatFluxDiff = 0.0; /*!< \brief Total Equivalent Area coefficient for all the boundaries. */
167 su2double Total_CEquivArea = 0.0; /*!< \brief Total Equivalent Area coefficient for all the boundaries. */
168 su2double Total_MassFlowRate = 0.0; /*!< \brief Total Mass Flow Rate on monitored boundaries. */
169 su2double Total_CNearFieldOF = 0.0; /*!< \brief Total Near-Field Pressure coefficient for all the boundaries. */
170 su2double Total_Heat = 0.0; /*!< \brief Total heat load for all the boundaries. */
171 su2double Total_MaxHeat = 0.0; /*!< \brief Maximum heat flux on all boundaries. */
172 su2double AllBound_CNearFieldOF_Inv = 0.0; /*!< \brief Near-Field press coeff (inviscid) for all the boundaries. */
173 vector<su2double> CNearFieldOF_Inv; /*!< \brief Near field pressure (inviscid) for each boundary. */
174 vector<su2double> Surface_HF_Visc; /*!< \brief Total (integrated) heat flux for each monitored surface. */
175 vector<su2double> Surface_MaxHF_Visc; /*!< \brief Maximum heat flux for each monitored surface. */
176 vector<su2double> HF_Visc; /*!< \brief Heat load (viscous contribution) for each boundary. */
177 vector<su2double> MaxHF_Visc; /*!< \brief Maximum heat flux (viscous contribution) for each boundary. */
178 su2double AllBound_HF_Visc = 0.0; /*!< \brief Heat load (viscous contribution) for all the boundaries. */
179 su2double AllBound_MaxHF_Visc = 0.0; /*!< \brief Maximum heat flux (viscous contribution) for all boundaries. */
180
181 vector<vector<su2double> > Inlet_Ptotal; /*!< \brief Value of the Total P. */
182 vector<vector<su2double> > Inlet_Ttotal; /*!< \brief Value of the Total T. */
183 vector<su2activematrix> Inlet_FlowDir; /*!< \brief Value of the Flow Direction. */
184 vector<vector<su2double> > HeatFlux; /*!< \brief Heat transfer coefficient for each boundary and vertex. */
185 vector<vector<su2double> > HeatFluxTarget; /*!< \brief Heat transfer coefficient for each boundary and vertex. */
186 vector<su2activematrix> CharacPrimVar; /*!< \brief Value of the characteristic variables at each boundary. */
187 vector<su2activematrix> CSkinFriction; /*!< \brief Skin friction coefficient for each boundary and vertex. */
188 vector<vector<su2double> > WallShearStress; /*!< \brief Wall Shear Stress for each boundary and vertex. */
189 vector<su2activematrix> HeatConjugateVar; /*!< \brief CHT variables for each boundary and vertex. */
190 vector<vector<su2double> > CPressure; /*!< \brief Pressure coefficient for each boundary and vertex. */
191 vector<vector<su2double> > CPressureTarget; /*!< \brief Target Pressure coefficient for each boundary and vertex. */
192 vector<vector<su2double> > YPlus; /*!< \brief Yplus for each boundary and vertex. */
193 vector<vector<su2double> > UTau; /*!< \brief UTau for each boundary and vertex. */
194 vector<vector<su2double> > EddyViscWall; /*!< \brief Eddy viscosuty at the wall for each boundary and vertex. */
195
196 bool space_centered; /*!< \brief True if space centered scheme used. */
197 bool euler_implicit; /*!< \brief True if euler implicit scheme used. */
198 bool least_squares; /*!< \brief True if computing gradients by least squares. */
199 su2double Gamma; /*!< \brief Fluid's Gamma constant (ratio of specific heats). */
200 su2double Gamma_Minus_One; /*!< \brief Fluids's Gamma - 1.0 . */
201
202 /*--- Sliding meshes variables ---*/
203
204 vector<su2matrix<su2double*> > SlidingState; // vector of matrix of pointers... inner dim alloc'd elsewhere (welcome, to the twilight zone)
205 vector<vector<int> > SlidingStateNodes;
206
207 /*--- Shallow copy of grid coloring for OpenMP parallelization. ---*/
208
209#ifdef HAVE_OMP
210 vector<GridColor<> > EdgeColoring; /*!< \brief Edge colors. */
211 bool ReducerStrategy = false; /*!< \brief If the reducer strategy is in use. */
212#else
213 array<DummyGridColor<>, 1> EdgeColoring;
214 /*--- Never use the reducer strategy if compiling for MPI-only. ---*/
215 static constexpr bool ReducerStrategy = false;
216#endif
217
218 /*--- Edge fluxes, for OpenMP parallelization of difficult-to-color grids.
219 * We first store the fluxes and then compute the sum for each cell.
220 * This strategy is thread-safe but lower performance than writting to both
221 * end points of each edge, so we only use it when necessary, i.e. when the
222 * coloring does not allow "enough" parallelism. ---*/
223
224 CSysVector<su2double> EdgeFluxes; /*!< \brief Flux across each edge. */
225
226 CNumericsSIMD* edgeNumerics = nullptr; /*!< \brief Object for edge flux computation. */
227
228 /*!
229 * \brief The highest level in the variable hierarchy the DERIVED solver can safely use.
230 */
231 VariableType* nodes = nullptr;
232
233 /*!
234 * \brief Return nodes to allow CSolver::base_nodes to be set.
235 */
236 inline CVariable* GetBaseClassPointerToNodes() final { return nodes; }
237
238 /*!
239 * \brief Protected constructor, this class is not directly instantiable.
240 */
241 CFVMFlowSolverBase(const CGeometry& geometry, const CConfig& config)
242 : CSolver(), prim_idx(geometry.GetnDim(), config.GetnSpecies()) {}
243
244 /*!
245 * \brief Set reference values for pressure, forces, etc., e.g. "AeroCoeffForceRef".
246 * \note Implement this method in the derived class and call it in its constructor.
247 * Duplicating this type of information has caused bugs (I know because I fixed them).
248 */
249 virtual void SetReferenceValues(const CConfig& config) = 0;
250
251 /*!
252 * \brief Allocate member variables.
253 */
254 void Allocate(const CConfig& config);
255
256 /*!
257 * \brief Allocate small member variables that ideally should not be used.
258 */
260
261 /*!
262 * \brief Communicate the initial solver state.
263 */
264 void CommunicateInitialState(CGeometry* geometry, const CConfig* config);
265
266 /*!
267 * \brief Initialize thread parallel variables.
268 */
269 void HybridParallelInitialization(const CConfig& config, CGeometry& geometry);
270
271 /*!
272 * \brief Move solution to previous time levels (for restarts).
273 */
274 void PushSolutionBackInTime(unsigned long TimeIter, bool restart, bool rans, CSolver*** solver_container,
275 CGeometry** geometry, CConfig* config);
276
277 /*!
278 * \brief Evaluate common part of objective function to all solvers.
279 */
280 su2double EvaluateCommonObjFunc(const CConfig& config) const;
281
282 /*!
283 * \brief Method to compute convective and viscous residual contribution using vectorized numerics.
284 */
285 void EdgeFluxResidual(const CGeometry *geometry, const CSolver* const* solvers, CConfig *config);
286
287 /*!
288 * \brief Sum the edge fluxes for each cell to populate the residual vector, only used on coarse grids.
289 */
290 void SumEdgeFluxes(const CGeometry* geometry);
291
292 /*!
293 * \brief Sums edge fluxes (if required) and computes the global error counter.
294 * \param[in] pausePreacc - Whether preaccumulation was paused durin.
295 * \param[in] localCounter - Thread-local error counter.
296 * \param[in,out] config - Used to set the global error counter.
297 */
298 inline void FinalizeResidualComputation(const CGeometry *geometry, bool pausePreacc,
299 unsigned long localCounter, CConfig* config) {
301
302 /*--- Restore preaccumulation and adjoint evaluation state. ---*/
303 AD::ResumePreaccumulation(pausePreacc);
305
306 if (ReducerStrategy) {
307 SumEdgeFluxes(geometry);
308 if (config->GetKind_TimeIntScheme() == EULER_IMPLICIT) {
310 }
311 }
312
313 /*--- Warning message about non-physical reconstructions. ---*/
314 if ((MGLevel == MESH_0) && (config->GetComm_Level() == COMM_FULL)) {
315 /*--- Add counter results for all threads. ---*/
316 atomicAdd(localCounter, ErrorCounter);
317
318 /*--- Add counter results for all ranks. ---*/
320 localCounter = ErrorCounter;
323 }
325 }
326 }
327
328 /*!
329 * \brief Computes and sets the required auxilliary vars (and gradients) for axisymmetric flow.
330 */
331 void ComputeAxisymmetricAuxGradients(CGeometry *geometry, const CConfig* config);
332
333 /*!
334 * \brief Instantiate a SIMD numerics object.
335 */
336 inline virtual void InstantiateEdgeNumerics(const CSolver* const* solvers, const CConfig* config) {}
337
338 /*!
339 * \brief Compute the viscous contribution for a particular edge.
340 * \note The convective residual methods include a call to this for each edge, this allows convective and
341 * viscous loops to be "fused". Only the residual is applied here, the Jacobians are returned so that
342 * the caller can update the system matrix in a single operation together with the convective part
343 * (a requirement of quantized matrix storage).
344 * \param[in] iEdge - Edge for which the flux and Jacobians are to be computed.
345 * \param[in] geometry - Geometrical definition of the problem.
346 * \param[in] solver_container - Container vector with all the solutions.
347 * \param[in] numerics - Description of the numerical method.
348 * \param[in] config - Definition of the particular problem.
349 * \return The viscous Jacobians (null for inviscid solvers).
350 */
351 inline virtual CNumerics::ResidualType<> Viscous_Residual(unsigned long iEdge, CGeometry *geometry,
352 CSolver **solver_container, CNumerics *numerics,
353 CConfig *config) {
354 return CNumerics::ResidualType<>(nullptr, nullptr, nullptr);
355 }
356 CNumerics::ResidualType<> Viscous_Residual_impl(unsigned long iEdge, CGeometry *geometry,
357 CSolver **solver_container, CNumerics *numerics, CConfig *config);
358 using CSolver::Viscous_Residual; /*--- Silence warning ---*/
359
360 /*!
361 * \brief Update the Jacobian for one edge with the fused convective and viscous contributions.
362 * \note Both contributions must be applied at once because in quantized mode the
363 * off-diagonal blocks of the matrix can only be overwritten, not accumulated.
364 * \param[in] iEdge - Edge index for the off-diagonal blocks.
365 * \param[in] iPoint, jPoint - Points connected by the edge (diagonal blocks).
366 * \param[in] conv - Convective residual/Jacobians (added to i, subtracted from j).
367 * \param[in] visc - Viscous residual/Jacobians (subtracted from i, added to j), may hold null Jacobians.
368 */
369 inline void UpdateJacobian(unsigned long iEdge, unsigned long iPoint, unsigned long jPoint,
370 const CNumerics::ResidualType<>& conv, const CNumerics::ResidualType<>& visc) {
371 /*--- Lazy element-wise difference, presented with the [i][j] access the matrix expects. ---*/
372 struct CJacobianDifference {
373 const su2double* const* conv;
374 const su2double* const* visc;
375 struct Row {
376 const su2double *c, *v;
377 su2double operator[](unsigned long j) const { return c[j] - v[j]; }
378 };
379 Row operator[](unsigned long i) const { return {conv[i], visc[i]}; }
380 };
381 if (visc.jacobian_i != nullptr) {
382 const CJacobianDifference jac_i{conv.jacobian_i, visc.jacobian_i};
383 const CJacobianDifference jac_j{conv.jacobian_j, visc.jacobian_j};
384 if (ReducerStrategy) Jacobian.SetBlocks(iEdge, jac_i, jac_j);
385 else Jacobian.UpdateBlocks<true>(iEdge, iPoint, jPoint, jac_i, jac_j);
386 } else {
388 else Jacobian.UpdateBlocks<true>(iEdge, iPoint, jPoint, conv.jacobian_i, conv.jacobian_j);
389 }
390 }
391
392 /*!
393 * \brief Compute a suitable under-relaxation parameter to limit the change in the solution variables over a nonlinear
394 * iteration for stability.
395 */
396 virtual void ComputeUnderRelaxationFactor(const CConfig* config) {
397 SU2_MPI::Error("Not implemented for this solver.", CURRENT_FUNCTION);
398 }
399
400 /*!
401 * \brief General implementation to load a flow solution from a restart file.
402 * \param[in] geometry - Geometrical definition of the problem.
403 * \param[in] solver - Container vector with all of the solvers.
404 * \param[in] config - Definition of the particular problem.
405 * \param[in] iter - Current external iteration number.
406 * \param[in] update_geo - Flag for updating coords and grid velocity.
407 * \param[in] RestartSolution - Optional buffer to load restart vars into,
408 * this allows default values to be given when nVar > nVar_Restart.
409 * \param[in] nVar_Restart - Number of restart variables, if 0 defaults to nVar.
410 */
411 void LoadRestart_impl(CGeometry **geometry, CSolver ***solver, CConfig *config, int iter, bool update_geo,
412 su2double* RestartSolution = nullptr, unsigned short nVar_Restart = 0);
413
414 /*!
415 * \brief Generic implementation to compute the time step based on CFL and conv/visc eigenvalues.
416 * \param[in] geometry - Geometrical definition of the problem.
417 * \param[in] solver_container - Container vector with all the solutions.
418 * \param[in] config - Definition of the particular problem.
419 * \param[in] iMesh - Index of the mesh in multigrid computations.
420 * \param[in] Iteration - Value of the current iteration.
421 * \tparam SoundSpeedFunc - Function object to compute speed of sound.
422 * \tparam LambdaViscFunc - Function object to compute the viscous lambda.
423 * \note Both functors need to implement (nodes,iPoint,jPoint) for edges, and (nodes,iPoint) for vertices.
424 */
425 template<class SoundSpeedFunc, class LambdaViscFunc>
426 FORCEINLINE void SetTime_Step_impl(const SoundSpeedFunc& soundSpeed,
427 const LambdaViscFunc& lambdaVisc,
428 CGeometry *geometry,
429 CSolver **solver_container,
430 CConfig *config,
431 unsigned short iMesh,
432 unsigned long Iteration) {
433
434 const bool viscous = config->GetViscous();
435 const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
436 const bool time_stepping = (config->GetTime_Marching() == TIME_MARCHING::TIME_STEPPING);
437 const bool dual_time = (config->GetTime_Marching() == TIME_MARCHING::DT_STEPPING_1ST) ||
439 const su2double K_v = 0.25;
440
441 /*--- Init thread-shared variables to compute min/max values.
442 * Critical sections are used for this instead of reduction
443 * clauses for compatibility with OpenMP 2.0 (Windows...). ---*/
444
446
447 /*--- Loop domain points. ---*/
448
450 for (auto iPoint = 0ul; iPoint < nPointDomain; ++iPoint) {
451
452 /*--- Set maximum eigenvalues to zero. ---*/
453
454 nodes->SetMax_Lambda_Inv(iPoint,0.0);
455
456 if (viscous)
457 nodes->SetMax_Lambda_Visc(iPoint,0.0);
458
459 /*--- Loop over the neighbors of point i. ---*/
460
461 for (unsigned short iNeigh = 0; iNeigh < geometry->nodes->GetnPoint(iPoint); ++iNeigh)
462 {
463 auto jPoint = geometry->nodes->GetPoint(iPoint,iNeigh);
464
465 auto iEdge = geometry->nodes->GetEdge(iPoint,iNeigh);
466 auto Normal = geometry->edges->GetNormal(iEdge);
467 auto Area2 = GeometryToolbox::SquaredNorm(nDim, Normal);
468
469 /*--- Mean Values ---*/
470
471 su2double Mean_ProjVel = 0.5 * (nodes->GetProjVel(iPoint,Normal) + nodes->GetProjVel(jPoint,Normal));
472 su2double Mean_SoundSpeed = soundSpeed(*nodes, iPoint, jPoint) * sqrt(Area2);
473
474 /*--- Adjustment for grid movement ---*/
475
476 if (dynamic_grid) {
477 const su2double *GridVel_i = geometry->nodes->GetGridVel(iPoint);
478 const su2double *GridVel_j = geometry->nodes->GetGridVel(jPoint);
479
480 for (unsigned short iDim = 0; iDim < nDim; iDim++)
481 Mean_ProjVel -= 0.5 * (GridVel_i[iDim] + GridVel_j[iDim]) * Normal[iDim];
482 }
483
484 /*--- Inviscid contribution ---*/
485
486 su2double Lambda = fabs(Mean_ProjVel) + Mean_SoundSpeed;
487 nodes->AddMax_Lambda_Inv(iPoint,Lambda);
488
489 /*--- Viscous contribution ---*/
490
491 if (!viscous) continue;
492
493 Lambda = lambdaVisc(*nodes, iPoint, jPoint) * Area2;
494 nodes->AddMax_Lambda_Visc(iPoint, Lambda);
495 }
496
497 }
499
500 /*--- Loop boundary edges ---*/
501
502 for (unsigned short iMarker = 0; iMarker < geometry->GetnMarker(); iMarker++) {
503 if ((config->GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY) &&
504 (config->GetMarker_All_KindBC(iMarker) != SYMMETRY_PLANE) &&
505 (config->GetMarker_All_KindBC(iMarker) != EULER_WALL) &&
506 (config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) &&
507 (config->GetMarker_All_KindBC(iMarker) != PERIODIC_BOUNDARY)) {
508
510 for (auto iVertex = 0ul; iVertex < geometry->GetnVertex(iMarker); iVertex++) {
511
512 /*--- Point identification, Normal vector and area ---*/
513
514 auto iPoint = geometry->vertex[iMarker][iVertex]->GetNode();
515
516 if (!geometry->nodes->GetDomain(iPoint)) continue;
517
518 auto Normal = geometry->vertex[iMarker][iVertex]->GetNormal();
519 auto Area2 = GeometryToolbox::SquaredNorm(nDim, Normal);
520
521 /*--- Mean Values ---*/
522
523 su2double ProjVel = nodes->GetProjVel(iPoint,Normal);
524 su2double SoundSpeed = soundSpeed(*nodes, iPoint) * sqrt(Area2);
525
526 /*--- Adjustment for grid movement ---*/
527
528 if (dynamic_grid) {
529 ProjVel -= GeometryToolbox::DotProduct(nDim, Normal, geometry->nodes->GetGridVel(iPoint));
530 }
531
532 /*--- Inviscid contribution ---*/
533
534 su2double Lambda = fabs(ProjVel) + SoundSpeed;
535 nodes->AddMax_Lambda_Inv(iPoint, Lambda);
536
537 /*--- Viscous contribution ---*/
538
539 if (!viscous) continue;
540
541 Lambda = lambdaVisc(*nodes,iPoint) * Area2;
542 nodes->AddMax_Lambda_Visc(iPoint, Lambda);
543 }
545 }
546 }
547
548 /*--- Each element uses their own speed, steady state simulation. ---*/
549 {
550 /*--- Thread-local variables for min/max reduction. ---*/
551 su2double minDt = 1e30, maxDt = 0.0;
552
553 SU2_OMP_FOR_(schedule(static,omp_chunk_size) SU2_NOWAIT)
554 for (auto iPoint = 0ul; iPoint < nPointDomain; iPoint++) {
555
556 su2double Vol = geometry->nodes->GetVolume(iPoint);
557
558 if (Vol != 0.0) {
559 su2double Local_Delta_Time = nodes->GetLocalCFL(iPoint)*Vol / nodes->GetMax_Lambda_Inv(iPoint);
560
561 if(viscous) {
562 su2double dt_visc = nodes->GetLocalCFL(iPoint)*K_v*Vol*Vol / nodes->GetMax_Lambda_Visc(iPoint);
563 Local_Delta_Time = min(Local_Delta_Time, dt_visc);
564 }
565
566 minDt = min(minDt, Local_Delta_Time);
567 maxDt = max(maxDt, Local_Delta_Time);
568
569 nodes->SetDelta_Time(iPoint, min(Local_Delta_Time, config->GetMax_DeltaTime()));
570 }
571 else {
572 nodes->SetDelta_Time(iPoint,0.0);
573 }
574 }
576
577 /*--- Min/max over threads. ---*/
580 }
581
582 /*--- Compute the min/max dt (in parallel, now over mpi ranks). ---*/
583
585 if (config->GetComm_Level() == COMM_FULL) {
586 su2double rbuf_time;
588 Min_Delta_Time = rbuf_time;
589
591 Max_Delta_Time = rbuf_time;
592 }
595
596 /*--- For exact time solution use the minimum delta time of the whole mesh. ---*/
597 if (time_stepping) {
598
599 /*--- If the unsteady CFL is set to zero, it uses the defined unsteady time step,
600 * otherwise it computes the time step based on the unsteady CFL. ---*/
601
603 {
604 if (config->GetUnst_CFL() == 0.0) {
606 }
607 else {
609 }
611
613 }
615
616 /*--- Sets the regular CFL equal to the unsteady CFL. ---*/
617
619 for (auto iPoint = 0ul; iPoint < nPointDomain; iPoint++) {
620 nodes->SetLocalCFL(iPoint, config->GetUnst_CFL());
621 nodes->SetDelta_Time(iPoint, Global_Delta_Time);
622 }
624
625 }
626
627 /*--- Recompute the unsteady time step for the dual time strategy if the unsteady CFL is different from 0.
628 * This is only done once because in dual time the time step cannot be variable. ---*/
629
630 if (dual_time && (Iteration == config->GetRestart_Iter()) && (config->GetUnst_CFL() != 0.0) && (iMesh == MESH_0)) {
631
632 /*--- Thread-local variable for reduction. ---*/
633 su2double glbDtND = 1e30;
634
635 SU2_OMP_FOR_(schedule(static,omp_chunk_size) SU2_NOWAIT)
636 for (auto iPoint = 0ul; iPoint < nPointDomain; iPoint++) {
637 glbDtND = min(glbDtND, config->GetUnst_CFL()*Global_Delta_Time / nodes->GetLocalCFL(iPoint));
638 }
641
643 {
645 Global_Delta_UnstTimeND = glbDtND;
646
648 }
650 }
651
652 /*--- The pseudo local time (explicit integration) cannot be greater than the physical time ---*/
653
654 if (dual_time && !implicit) {
656 for (auto iPoint = 0ul; iPoint < nPointDomain; iPoint++) {
657 su2double dt = min((2.0/3.0)*config->GetDelta_UnstTimeND(), nodes->GetDelta_Time(iPoint));
658 nodes->SetDelta_Time(iPoint, dt);
659 }
661 }
662 }
663
664 /*!
665 * \brief Compute the max eigenvalue, gemeric implementation.
666 * \param[in] geometry - Geometrical definition of the problem.
667 * \param[in] config - Definition of the particular problem.
668 * \tparam SoundSpeedFunc - Function object to compute speed of sound.
669 * \note Functor needs to implement (nodes,iPoint,jPoint) for edges, and (nodes,iPoint) for vertices.
670 */
671 template<class SoundSpeedFunc>
672 FORCEINLINE void SetMax_Eigenvalue_impl(const SoundSpeedFunc& soundSpeed, CGeometry *geometry, const CConfig *config) {
673
674 /*--- Loop domain points. ---*/
675
677 for (unsigned long iPoint = 0; iPoint < nPointDomain; ++iPoint) {
678
679 /*--- Set eigenvalues to zero. ---*/
680 nodes->SetLambda(iPoint,0.0);
681
682 /*--- Loop over the neighbors of point i. ---*/
683 for (unsigned short iNeigh = 0; iNeigh < geometry->nodes->GetnPoint(iPoint); ++iNeigh)
684 {
685 auto jPoint = geometry->nodes->GetPoint(iPoint, iNeigh);
686
687 auto iEdge = geometry->nodes->GetEdge(iPoint, iNeigh);
688 auto Normal = geometry->edges->GetNormal(iEdge);
689 su2double Area = GeometryToolbox::Norm(nDim, Normal);
690
691 /*--- Mean Values ---*/
692
693 su2double Mean_ProjVel = 0.5 * (nodes->GetProjVel(iPoint,Normal) + nodes->GetProjVel(jPoint,Normal));
694 su2double Mean_SoundSpeed = soundSpeed(*nodes, iPoint, jPoint) * Area;
695
696 /*--- Adjustment for grid movement ---*/
697
698 if (dynamic_grid) {
699 const su2double *GridVel_i = geometry->nodes->GetGridVel(iPoint);
700 const su2double *GridVel_j = geometry->nodes->GetGridVel(jPoint);
701
702 for (unsigned short iDim = 0; iDim < nDim; iDim++)
703 Mean_ProjVel -= 0.5 * (GridVel_i[iDim] + GridVel_j[iDim]) * Normal[iDim];
704 }
705
706 /*--- Inviscid contribution ---*/
707
708 nodes->AddLambda(iPoint, fabs(Mean_ProjVel) + Mean_SoundSpeed);
709 }
710 }
712
713 /*--- Loop boundary edges ---*/
714
715 for (unsigned short iMarker = 0; iMarker < geometry->GetnMarker(); iMarker++) {
716 if ((config->GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY) &&
717 (config->GetMarker_All_KindBC(iMarker) != SYMMETRY_PLANE) &&
718 (config->GetMarker_All_KindBC(iMarker) != EULER_WALL) &&
719 (config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) &&
720 (config->GetMarker_All_KindBC(iMarker) != PERIODIC_BOUNDARY)) {
721
723 for (unsigned long iVertex = 0; iVertex < geometry->GetnVertex(iMarker); iVertex++) {
724
725 /*--- Point identification, Normal vector and area ---*/
726
727 auto iPoint = geometry->vertex[iMarker][iVertex]->GetNode();
728
729 if (!geometry->nodes->GetDomain(iPoint)) continue;
730
731 auto Normal = geometry->vertex[iMarker][iVertex]->GetNormal();
732 su2double Area = GeometryToolbox::Norm(nDim, Normal);
733
734 /*--- Mean Values ---*/
735
736 su2double Mean_ProjVel = nodes->GetProjVel(iPoint,Normal);
737 su2double Mean_SoundSpeed = soundSpeed(*nodes, iPoint) * Area;
738
739 /*--- Adjustment for grid movement ---*/
740
741 if (dynamic_grid) {
742 Mean_ProjVel -= GeometryToolbox::DotProduct(nDim, Normal, geometry->nodes->GetGridVel(iPoint));
743 }
744
745 /*--- Inviscid contribution ---*/
746
747 nodes->AddLambda(iPoint, fabs(Mean_ProjVel) + Mean_SoundSpeed);
748 }
750 }
751 }
752
753 /*--- Correct the eigenvalue values across any periodic boundaries. ---*/
754
755 for (unsigned short iPeriodic = 1; iPeriodic <= config->GetnMarker_Periodic()/2; iPeriodic++) {
756 InitiatePeriodicComms(geometry, config, iPeriodic, PERIODIC_MAX_EIG);
757 CompletePeriodicComms(geometry, config, iPeriodic, PERIODIC_MAX_EIG);
758 }
759
760 /*--- MPI parallelization ---*/
761
764 }
765
766 /*!
767 * \brief Compute the dissipation sensor for centered schemes.
768 * \param[in] geometry - Geometrical definition of the problem.
769 * \param[in] config - Definition of the particular problem.
770 * \tparam SensVarFunc - Function object implementing (nodes, iPoint) to return the sensor variable, e.g. pressure.
771 */
772 template<class SensVarFunc>
773 FORCEINLINE void SetCentered_Dissipation_Sensor_impl(const SensVarFunc& sensVar,
774 CGeometry *geometry, const CConfig *config) {
775 const bool msw = config->GetKind_Upwind_Flow() == UPWIND::MSW;
776
777 /*--- We can access memory more efficiently if there are no periodic boundaries. ---*/
778
779 const bool isPeriodic = (config->GetnMarker_Periodic() > 0);
780
781 /*--- Loop domain points. ---*/
782
784 for (unsigned long iPoint = 0; iPoint < nPointDomain; ++iPoint) {
785
786 const bool boundary_i = geometry->nodes->GetPhysicalBoundary(iPoint);
787 const su2double sensVar_i = sensVar(*nodes, iPoint);
788
789 /*--- Initialize. ---*/
790 iPoint_UndLapl[iPoint] = 0;
791 jPoint_UndLapl[iPoint] = msw ? 1 : 0;
792
793 /*--- Loop over the neighbors of point i. ---*/
794 for (auto jPoint : geometry->nodes->GetPoints(iPoint))
795 {
796 bool boundary_j = geometry->nodes->GetPhysicalBoundary(jPoint);
797
798 /*--- If iPoint is boundary it only takes contributions from other boundary points. ---*/
799 if (boundary_i && !boundary_j) continue;
800
801 su2double sensVar_j = sensVar(*nodes, jPoint);
802
803 if (msw) {
804 /*--- More conservative formulation (triggered by large gradient instead of large laplacian).
805 * From "Development of an Unstructured Navier-Stokes Solver For Hypersonic Nonequilibrium
806 * Aerothermodynamics". ---*/
807 iPoint_UndLapl[iPoint] = fmax(iPoint_UndLapl[iPoint], fabs(sensVar_j - sensVar_i) / fmin(sensVar_j, sensVar_i));
808 } else {
809 /*--- Jameson dissipation sensor, add variable difference and variable sum. ---*/
810 iPoint_UndLapl[iPoint] += sensVar_j - sensVar_i;
811 jPoint_UndLapl[iPoint] += sensVar_j + sensVar_i;
812 }
813 }
814
815 if (!isPeriodic) {
816 /*--- Every neighbor is accounted for, sensor can be computed. ---*/
817 nodes->SetSensor(iPoint, fabs(iPoint_UndLapl[iPoint]) / jPoint_UndLapl[iPoint]);
818 }
819 }
821
822 if (isPeriodic) {
823 /*--- Correct the sensor values across any periodic boundaries. ---*/
824
825 for (unsigned short iPeriodic = 1; iPeriodic <= config->GetnMarker_Periodic()/2; iPeriodic++) {
826 InitiatePeriodicComms(geometry, config, iPeriodic, PERIODIC_SENSOR);
827 CompletePeriodicComms(geometry, config, iPeriodic, PERIODIC_SENSOR);
828 }
829
830 /*--- Set final pressure switch for each point ---*/
831
833 for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++)
834 nodes->SetSensor(iPoint, fabs(iPoint_UndLapl[iPoint]) / jPoint_UndLapl[iPoint]);
836 }
837
838 /*--- MPI parallelization ---*/
839
840 InitiateComms(geometry, config, MPI_QUANTITIES::SENSOR);
841 CompleteComms(geometry, config, MPI_QUANTITIES::SENSOR);
842
843 }
844
845 /*!
846 * \brief Generic implementation of explicit iterations with a preconditioner.
847 * \note The preconditioner is a functor implementing the methods:
848 * - compute(config, iPoint): Should prepare the preconditioner for iPoint.
849 * - apply(iVar, residual[], resTruncError[]): Apply it to compute the iVar update.
850 * See Explicit_Iteration for the general form of the preconditioner.
851 */
852 template<ENUM_TIME_INT IntegrationType, class ResidualPrecond>
853 void Explicit_Iteration_impl(ResidualPrecond& preconditioner, CGeometry *geometry,
854 CSolver **solver_container, CConfig *config, unsigned short iRKStep) {
855
856 static_assert(IntegrationType == CLASSICAL_RK4_EXPLICIT ||
857 IntegrationType == RUNGE_KUTTA_EXPLICIT ||
858 IntegrationType == EULER_EXPLICIT);
859
860 const bool adjoint = config->GetContinuous_Adjoint();
861
862 const su2double RK_AlphaCoeff = config->Get_Alpha_RKStep(iRKStep);
863
864 /*--- Hard-coded classical RK4 coefficients. Will be added to config. ---*/
865 const su2double RK_FuncCoeff[] = {1.0/6.0, 1.0/3.0, 1.0/3.0, 1.0/6.0};
866 const su2double RK_TimeCoeff[] = {0.5, 0.5, 1.0, 1.0};
867
868 /*--- Local residual variables for current thread ---*/
869 su2double resMax[MAXNVAR] = {0.0}, resRMS[MAXNVAR] = {0.0};
870 unsigned long idxMax[MAXNVAR] = {0};
871
872 /*--- Update the solution and residuals ---*/
873
874 if (!adjoint) {
875 SU2_OMP_FOR_(schedule(static,omp_chunk_size) SU2_NOWAIT)
876 for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) {
877
878 su2double Vol = geometry->nodes->GetVolume(iPoint) + geometry->nodes->GetPeriodicVolume(iPoint);
879 su2double Delta = nodes->GetDelta_Time(iPoint) / Vol;
880
881 const su2double* Res_TruncError = nodes->GetResTruncError(iPoint);
882 const su2double* Residual = LinSysRes.GetBlock(iPoint);
883
884 preconditioner.compute(config, iPoint);
885
886 for (unsigned short iVar = 0; iVar < nVar; iVar++) {
887
888 su2double Res = preconditioner.apply(iVar, Residual, Res_TruncError);
889
890 /*--- "Static" switch which should be optimized at compile time. ---*/
891 switch(IntegrationType) {
892
893 case EULER_EXPLICIT:
894 nodes->AddSolution(iPoint,iVar, -Res*Delta);
895 break;
896
898 nodes->AddSolution(iPoint, iVar, -Res*Delta*RK_AlphaCoeff);
899 break;
900
902 {
903 su2double tmp_time = -1.0*RK_TimeCoeff[iRKStep]*Delta;
904 su2double tmp_func = -1.0*RK_FuncCoeff[iRKStep]*Delta;
905
906 if (iRKStep < 3) {
907 /* Base Solution Update */
908 nodes->AddSolution(iPoint,iVar, tmp_time*Res);
909
910 /* New Solution Update */
911 nodes->AddSolution_New(iPoint,iVar, tmp_func*Res);
912 } else {
913 nodes->SetSolution(iPoint, iVar, nodes->GetSolution_New(iPoint, iVar) + tmp_func*Res);
914 }
915 }
916 break;
917 }
918
919 /*--- Update residual information for current thread. ---*/
920 ResidualReductions_PerThread(iPoint, iVar, Res, resRMS, resMax, idxMax);
921 }
922 }
924 /*--- Reduce residual information over all threads in this rank. ---*/
925 ResidualReductions_FromAllThreads(geometry, config, resRMS, resMax, idxMax);
926
927 }
928
929 /*--- MPI solution ---*/
930
931 InitiateComms(geometry, config, MPI_QUANTITIES::SOLUTION);
932 CompleteComms(geometry, config, MPI_QUANTITIES::SOLUTION);
933
934 if (!adjoint) {
935 /*--- For verification cases, compute the global error metrics. ---*/
936 ComputeVerificationError(geometry, config);
937 }
938
939 }
940
941 /*!
942 * \brief Generic implementation of explicit iterations without preconditioner.
943 */
944 template<ENUM_TIME_INT IntegrationType>
945 FORCEINLINE void Explicit_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep) {
946 struct Identity {
947 FORCEINLINE void compute(const CConfig*, unsigned long) {}
948 FORCEINLINE su2double apply(unsigned short iVar, const su2double* res, const su2double* resTrunc) {
949 return res[iVar] + resTrunc[iVar];
950 }
951 } precond;
952
953 Explicit_Iteration_impl<IntegrationType>(precond, geometry, solver_container, config, iRKStep);
954 }
955
956 /*!
957 * \brief Generic implementation to prepare an implicit iteration with an optional preconditioner applied to the diagonal.
958 * \tparam DiagonalPrecond - A function object implementing:
959 * - active: A boolean variable to determine if the preconditioner should be used.
960 * - (config, iPoint, delta): Compute and return a matrix type compatible with the Jacobian matrix,
961 * where "delta" is V/dt.
962 */
963 template<class DiagonalPrecond>
964 void PrepareImplicitIteration_impl(DiagonalPrecond& preconditioner, CGeometry *geometry, CConfig *config) {
965
966 const bool implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT);
967
968 /*--- Local residual variables for current thread ---*/
969 su2double resMax[MAXNVAR] = {0.0}, resRMS[MAXNVAR] = {0.0};
970 unsigned long idxMax[MAXNVAR] = {0};
971
972 /*--- Add pseudotime term to Jacobian. ---*/
973
974 if (implicit) {
975 SU2_OMP_FOR_(schedule(static,omp_chunk_size) SU2_NOWAIT)
976 for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) {
977
978 /*--- Modify matrix diagonal to improve diagonal dominance. ---*/
979
980 if (nodes->GetDelta_Time(iPoint) != 0.0) {
981
982 su2double Vol = geometry->nodes->GetVolume(iPoint) + geometry->nodes->GetPeriodicVolume(iPoint);
983
984 su2double Delta = Vol / nodes->GetDelta_Time(iPoint);
985
986 if (preconditioner.active)
987 Jacobian.AddBlock2Diag(iPoint, preconditioner(config, iPoint, Delta));
988 else
989 Jacobian.AddVal2Diag(iPoint, Delta);
990 }
991 else {
992 Jacobian.SetVal2Diag(iPoint, 1.0);
993 }
994 }
996 }
997
998 /*--- Right hand side of the system (-Residual) and initial guess (x = 0) ---*/
999
1000 SU2_OMP_FOR_(schedule(static,omp_chunk_size) SU2_NOWAIT)
1001 for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) {
1002
1003 /*--- Multigrid contribution to residual. ---*/
1004
1005 su2double* local_Res_TruncError = nodes->GetResTruncError(iPoint);
1006
1007 if (nodes->GetDelta_Time(iPoint) == 0.0) {
1008 for (unsigned short iVar = 0; iVar < nVar; iVar++) {
1009 LinSysRes(iPoint,iVar) = 0.0;
1010 local_Res_TruncError[iVar] = 0.0;
1011 }
1012 }
1013
1014 for (unsigned short iVar = 0; iVar < nVar; iVar++) {
1015 LinSysRes(iPoint, iVar) = -(LinSysRes(iPoint, iVar) + local_Res_TruncError[iVar]);
1016 LinSysSol(iPoint, iVar) = 0.0;
1017
1018 /*--- "Add" residual at (iPoint,iVar) to local residual variables. ---*/
1019 ResidualReductions_PerThread(iPoint, iVar, LinSysRes(iPoint, iVar), resRMS, resMax, idxMax);
1020 }
1021 }
1023
1024 /*--- "Add" residuals from all threads to global residual variables. ---*/
1025 ResidualReductions_FromAllThreads(geometry, config, resRMS, resMax, idxMax);
1026
1027 }
1028
1029 /*!
1030 * \brief Evaluate the vorticity and strain rate magnitude.
1031 */
1032 void ComputeVorticityAndStrainMag(const CConfig& config, const CGeometry *geometry, unsigned short iMesh);
1033
1034 /*!
1035 * \brief Destructor.
1036 */
1038
1039 public:
1040
1041 /*!
1042 * \brief Set the new solution variables to the current solution value for classical RK.
1043 */
1044 inline void Set_NewSolution() final { nodes->SetSolution_New(); }
1045
1046 /*!
1047 * \brief Load a solution from a restart file.
1048 * \param[in] geometry - Geometrical definition of the problem.
1049 * \param[in] solver - Container vector with all of the solvers.
1050 * \param[in] config - Definition of the particular problem.
1051 * \param[in] iter - Current external iteration number.
1052 * \param[in] update_geo - Flag for updating coords and grid velocity.
1053 */
1054 void LoadRestart(CGeometry **geometry, CSolver ***solver, CConfig *config, int iter, bool update_geo) override;
1055
1056 /*!
1057 * \brief Set the initial condition for the Euler Equations.
1058 * \param[in] geometry - Geometrical definition of the problem.
1059 * \param[in] solver_container - Container with all the solutions.
1060 * \param[in] config - Definition of the particular problem.
1061 * \param[in] ExtIter - External iteration.
1062 */
1063 void SetInitialCondition(CGeometry **geometry, CSolver ***solver_container, CConfig *config, unsigned long ExtIter) override;
1064
1065 /*!
1066 * \brief Compute the gradient of the primitive variables using Green-Gauss method,
1067 * and stores the result in the <i>Gradient_Primitive</i> variable.
1068 * \param[in] geometry - Geometrical definition of the problem.
1069 * \param[in] config - Definition of the particular problem.
1070 * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction.
1071 */
1072 void SetPrimitive_Gradient_GG(CGeometry* geometry, const CConfig* config, bool reconstruction = false) override;
1073
1074 /*!
1075 * \brief Compute the gradient of the primitive variables using a Least-Squares method,
1076 * and stores the result in the <i>Gradient_Primitive</i> variable.
1077 * \param[in] geometry - Geometrical definition of the problem.
1078 * \param[in] config - Definition of the particular problem.
1079 * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction.
1080 */
1081 void SetPrimitive_Gradient_LS(CGeometry* geometry, const CConfig* config, bool reconstruction = false) final;
1082
1083 /*!
1084 * \brief Compute the limiter of the primitive variables.
1085 * \param[in] geometry - Geometrical definition of the problem.
1086 * \param[in] config - Definition of the particular problem.
1087 */
1088 void SetPrimitive_Limiter(CGeometry* geometry, const CConfig* config) final;
1089
1090 /*!
1091 * \brief Implementation of implicit Euler iteration.
1092 */
1093 void ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config) final;
1094
1095 /*!
1096 * \brief Complete an implicit iteration.
1097 * \param[in] geometry - Geometrical definition of the problem.
1098 * \param[in] config - Definition of the particular problem.
1099 */
1100 void CompleteImplicitIteration(CGeometry *geometry, CSolver**, CConfig *config) final;
1101
1102 /*!
1103 * \brief Set the total residual adding the term that comes from the Dual Time Strategy.
1104 * \param[in] geometry - Geometrical definition of the problem.
1105 * \param[in] solver_container - Container vector with all the solutions.
1106 * \param[in] config - Definition of the particular problem.
1107 * \param[in] iRKStep - Current step of the Runge-Kutta iteration.
1108 * \param[in] iMesh - Index of the mesh in multigrid computations.
1109 * \param[in] RunTime_EqSystem - System of equations which is going to be solved.
1110 */
1111 void SetResidual_DualTime(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep,
1112 unsigned short iMesh, unsigned short RunTime_EqSystem) override;
1113
1114 /*!
1115 * \brief Set a uniform inlet profile
1116 *
1117 * The values at the inlet are set to match the values specified for
1118 * inlets in the configuration file.
1119 *
1120 * \param[in] config - Definition of the particular problem.
1121 * \param[in] iMarker - Surface marker where the coefficient is computed.
1122 */
1123 void SetUniformInlet(const CConfig* config, unsigned short iMarker) final;
1124
1125 /*!
1126 * \brief Store of a set of provided inlet profile values at a vertex.
1127 * \param[in] val_inlet - vector containing the inlet values for the current vertex.
1128 * \param[in] iMarker - Index of the surface marker.
1129 * \param[in] iVertex - Vertex of the marker <i>iMarker</i> where the inlet is being set.
1130 */
1131 void SetInletAtVertex(const su2double* val_inlet, unsigned short iMarker, unsigned long iVertex) final;
1132
1133 /*!
1134 * \brief Get the set of values imposed at an inlet.
1135 * \param[in] iMarker - Index of the surface marker.
1136 * \param[in] iVertex - Vertex of the marker <i>iMarker</i> where the inlet is being set.
1137 * \param[in] geometry - Geometrical definition of the problem.
1138 * \param[in,out] val_inlet - vector returning the inlet values for the current vertex.
1139 * \return Value of the face area at the vertex.
1140 */
1141 su2double GetInletAtVertex(unsigned short iMarker, unsigned long iVertex,
1142 const CGeometry* geometry, su2double* val_inlet) const final;
1143
1144 /*!
1145 * \author T. Kattmann
1146 * \brief Impose via the residual the Euler wall boundary condition.
1147 * \param[in] geometry - Geometrical definition of the problem.
1148 * \param[in] solver_container - Container vector with all the solutions.
1149 * \param[in] conv_numerics - Description of the numerical method.
1150 * \param[in] visc_numerics - Description of the numerical method.
1151 * \param[in] config - Definition of the particular problem.
1152 * \param[in] val_marker - Surface marker where the boundary condition is applied.
1153 */
1154 inline void BC_Euler_Wall(CGeometry* geometry, CSolver** solver_container, CNumerics* conv_numerics,
1155 CNumerics* visc_numerics, CConfig* config, unsigned short val_marker) final {
1156 /*--- Call the equivalent symmetry plane boundary condition. ---*/
1157 BC_Sym_Plane(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker);
1158 }
1159
1160 void MultigridProjectEulerWall(CGeometry* geometry, const CConfig* config, bool use_solution_old) override;
1161
1162 /*!
1163 * \author T. Kattmann
1164 * \brief Impose the symmetry boundary condition using the residual.
1165 * \param[in] geometry - Geometrical definition of the problem.
1166 * \param[in] solver_container - Container vector with all the solutions.
1167 * \param[in] conv_numerics - Description of the numerical method.
1168 * \param[in] visc_numerics - Description of the numerical method.
1169 * \param[in] config - Definition of the particular problem.
1170 * \param[in] val_marker - Surface marker where the boundary condition is applied.
1171 */
1172 void BC_Sym_Plane(CGeometry* geometry, CSolver** solver_container, CNumerics* conv_numerics, CNumerics* visc_numerics,
1173 CConfig* config, unsigned short val_marker) override;
1174
1175 /*!
1176 * \brief Impose a periodic boundary condition by summing contributions from the complete control volume.
1177 * \param[in] geometry - Geometrical definition of the problem.
1178 * \param[in] solver_container - Container vector with all the solutions.
1179 * \param[in] numerics - Description of the numerical method.
1180 * \param[in] config - Definition of the particular problem.
1181 */
1182 void BC_Periodic(CGeometry* geometry, CSolver** solver_container, CNumerics* numerics, CConfig* config) final;
1183
1184 /*!
1185 * \brief Impose the interface state across sliding meshes.
1186 * \param[in] geometry - Geometrical definition of the problem.
1187 * \param[in] solver_container - Container vector with all the solutions.
1188 * \param[in] conv_numerics - Description of the numerical method.
1189 * \param[in] visc_numerics - Description of the numerical method.
1190 * \param[in] config - Definition of the particular problem.
1191 */
1192 void BC_Fluid_Interface(CGeometry* geometry, CSolver** solver_container, CNumerics* conv_numerics,
1193 CNumerics* visc_numerics, CConfig* config) final;
1194
1195 /*!
1196 * \brief Impose a custom or verification boundary condition.
1197 * \param[in] geometry - Geometrical definition of the problem.
1198 * \param[in] solver_container - Container vector with all the solutions.
1199 * \param[in] conv_numerics - Description of the convective numerical method.
1200 * \param[in] visc_numerics - Description of the viscous numerical method.
1201 * \param[in] config - Definition of the particular problem.
1202 * \param[in] val_marker - Surface marker where the boundary condition is applied.
1203 */
1204 void BC_Custom(CGeometry* geometry, CSolver** solver_container, CNumerics* conv_numerics, CNumerics* visc_numerics,
1205 CConfig* config, unsigned short val_marker) final;
1206
1207 /*!
1208 * \brief Compute the density at the infinity.
1209 * \return Value of the density at the infinity.
1210 */
1211 inline su2double GetDensity_Inf(void) const final { return Density_Inf; }
1212
1213 /*!
1214 * \brief Compute 2-norm of the velocity at the infinity.
1215 * \return Value of the 2-norm of the velocity at the infinity.
1216 */
1218
1219 /*!
1220 * \brief Compute the pressure at the infinity.
1221 * \return Value of the pressure at the infinity.
1222 */
1223 inline su2double GetPressure_Inf(void) const final { return Pressure_Inf; }
1224
1225 /*!
1226 * \brief Get the temperature value at infinity.
1227 * \return Value of the temperature at infinity.
1228 */
1229 inline su2double GetTemperature_Inf(void) const { return Temperature_Inf; }
1230
1231 /*!
1232 * \brief Get the velocity at the infinity.
1233 * \param[in] val_dim - Index of the velocity vector.
1234 * \return Value of the velocity at the infinity.
1235 */
1236 inline su2double GetVelocity_Inf(unsigned short val_dim) const final { return Velocity_Inf[val_dim]; }
1237
1238 /*!
1239 * \brief Get the velocity at the infinity.
1240 * \return Value of the velocity at the infinity.
1241 */
1242 inline su2double* GetVelocity_Inf(void) final { return Velocity_Inf; }
1243
1244 /*!
1245 * \brief Set the velocity at infinity.
1246 * \param[in] val_dim - Index of the velocity vector.
1247 * \param[in] val_velocity - Value of the velocity.
1248 */
1249 inline void SetVelocity_Inf(unsigned short val_dim, su2double val_velocity) final {
1250 Velocity_Inf[val_dim] = val_velocity;
1251 }
1252
1253 /*!
1254 * \brief Compute the density multiply by energy at the infinity.
1255 * \return Value of the density multiply by energy at the infinity.
1256 */
1257 inline su2double GetDensity_Energy_Inf(void) const final { return Density_Inf * Energy_Inf; }
1258
1259 /*!
1260 * \brief Set the freestream pressure.
1261 * \param[in] Value of freestream pressure.
1262 */
1263 inline void SetPressure_Inf(su2double p_inf) final { Pressure_Inf = p_inf; }
1264
1265 /*!
1266 * \brief Set the freestream temperature.
1267 * \param[in] Value of freestream temperature.
1268 */
1269 inline void SetTemperature_Inf(su2double t_inf) final { Temperature_Inf = t_inf; }
1270
1271 /*!
1272 * \brief Set the freestream temperature.
1273 * \param[in] Value of freestream temperature.
1274 */
1275 inline void SetDensity_Inf(su2double rho_inf) final { Density_Inf = rho_inf; }
1276
1277 /*!
1278 * \brief Compute the viscosity at the infinity.
1279 * \return Value of the viscosity at the infinity.
1280 */
1281 inline su2double GetViscosity_Inf(void) const final { return Viscosity_Inf; }
1282
1283 /*!
1284 * \brief Get the turbulent kinetic energy at the infinity.
1285 * \return Value of the turbulent kinetic energy at the infinity.
1286 */
1287 inline su2double GetTke_Inf(void) const final { return Tke_Inf; }
1288
1289 /*!
1290 * \brief Get the max Omega.
1291 * \return Value of the max Omega.
1292 */
1293 inline su2double GetOmega_Max(void) const final { return Omega_Max; }
1294
1295 /*!
1296 * \brief Get the max Strain rate magnitude.
1297 * \return Value of the max Strain rate magnitude.
1298 */
1299 inline su2double GetStrainMag_Max(void) const final { return StrainMag_Max; }
1300
1301 /*!
1302 * \brief Provide the non dimensional lift coefficient (inviscid contribution).
1303 * \param val_marker Surface where the coefficient is going to be computed.
1304 * \return Value of the lift coefficient (inviscid contribution) on the surface <i>val_marker</i>.
1305 */
1306 inline su2double GetCL_Inv(unsigned short val_marker) const final { return InvCoeff.CL[val_marker]; }
1307
1308 /*!
1309 * \brief Provide the non dimensional drag coefficient (inviscid contribution).
1310 * \param val_marker Surface where the coeficient is going to be computed.
1311 * \return Value of the drag coefficient (inviscid contribution) on the surface <i>val_marker</i>.
1312 */
1313 inline su2double GetCD_Inv(unsigned short val_marker) const final { return InvCoeff.CD[val_marker]; }
1314
1315 /*!
1316 * \brief Provide the non dimensional lift coefficient.
1317 * \param[in] val_marker - Surface marker where the coefficient is computed.
1318 * \return Value of the lift coefficient on the surface <i>val_marker</i>.
1319 */
1320 inline su2double GetSurface_CL(unsigned short val_marker) const final { return SurfaceCoeff.CL[val_marker]; }
1321
1322 /*!
1323 * \brief Provide the non dimensional drag coefficient.
1324 * \param[in] val_marker - Surface marker where the coefficient is computed.
1325 * \return Value of the drag coefficient on the surface <i>val_marker</i>.
1326 */
1327 inline su2double GetSurface_CD(unsigned short val_marker) const final { return SurfaceCoeff.CD[val_marker]; }
1328
1329 /*!
1330 * \brief Provide the non dimensional side-force coefficient.
1331 * \param[in] val_marker - Surface marker where the coefficient is computed.
1332 * \return Value of the side-force coefficient on the surface <i>val_marker</i>.
1333 */
1334 inline su2double GetSurface_CSF(unsigned short val_marker) const final { return SurfaceCoeff.CSF[val_marker]; }
1335
1336 /*!
1337 * \brief Provide the non dimensional side-force coefficient.
1338 * \param[in] val_marker - Surface marker where the coefficient is computed.
1339 * \return Value of the side-force coefficient on the surface <i>val_marker</i>.
1340 */
1341 inline su2double GetSurface_CEff(unsigned short val_marker) const final { return SurfaceCoeff.CEff[val_marker]; }
1342
1343 /*!
1344 * \brief Provide the non dimensional x force coefficient.
1345 * \param[in] val_marker - Surface marker where the coefficient is computed.
1346 * \return Value of the x force coefficient on the surface <i>val_marker</i>.
1347 */
1348 inline su2double GetSurface_CFx(unsigned short val_marker) const final { return SurfaceCoeff.CFx[val_marker]; }
1349
1350 /*!
1351 * \brief Provide the non dimensional y force coefficient.
1352 * \param[in] val_marker - Surface marker where the coefficient is computed.
1353 * \return Value of the y force coefficient on the surface <i>val_marker</i>.
1354 */
1355 inline su2double GetSurface_CFy(unsigned short val_marker) const final { return SurfaceCoeff.CFy[val_marker]; }
1356
1357 /*!
1358 * \brief Provide the non dimensional z force coefficient.
1359 * \param[in] val_marker - Surface marker where the coefficient is computed.
1360 * \return Value of the z force coefficient on the surface <i>val_marker</i>.
1361 */
1362 inline su2double GetSurface_CFz(unsigned short val_marker) const final { return SurfaceCoeff.CFz[val_marker]; }
1363
1364 /*!
1365 * \brief Provide the non dimensional x moment coefficient.
1366 * \param[in] val_marker - Surface marker where the coefficient is computed.
1367 * \return Value of the x moment coefficient on the surface <i>val_marker</i>.
1368 */
1369 inline su2double GetSurface_CMx(unsigned short val_marker) const final { return SurfaceCoeff.CMx[val_marker]; }
1370
1371 /*!
1372 * \brief Provide the non dimensional y moment coefficient.
1373 * \param[in] val_marker - Surface marker where the coefficient is computed.
1374 * \return Value of the y moment coefficient on the surface <i>val_marker</i>.
1375 */
1376 inline su2double GetSurface_CMy(unsigned short val_marker) const final { return SurfaceCoeff.CMy[val_marker]; }
1377
1378 /*!
1379 * \brief Provide the non dimensional z moment coefficient.
1380 * \param[in] val_marker - Surface marker where the coefficient is computed.
1381 * \return Value of the z moment coefficient on the surface <i>val_marker</i>.
1382 */
1383 inline su2double GetSurface_CMz(unsigned short val_marker) const final { return SurfaceCoeff.CMz[val_marker]; }
1384
1385 /*!
1386 * \brief Provide the non dimensional lift coefficient.
1387 * \param[in] val_marker - Surface marker where the coefficient is computed.
1388 * \return Value of the lift coefficient on the surface <i>val_marker</i>.
1389 */
1390 inline su2double GetSurface_CL_Inv(unsigned short val_marker) const final { return SurfaceInvCoeff.CL[val_marker]; }
1391
1392 /*!
1393 * \brief Provide the non dimensional drag coefficient.
1394 * \param[in] val_marker - Surface marker where the coefficient is computed.
1395 * \return Value of the drag coefficient on the surface <i>val_marker</i>.
1396 */
1397 inline su2double GetSurface_CD_Inv(unsigned short val_marker) const final { return SurfaceInvCoeff.CD[val_marker]; }
1398
1399 /*!
1400 * \brief Provide the non dimensional side-force coefficient.
1401 * \param[in] val_marker - Surface marker where the coefficient is computed.
1402 * \return Value of the side-force coefficient on the surface <i>val_marker</i>.
1403 */
1404 inline su2double GetSurface_CSF_Inv(unsigned short val_marker) const final { return SurfaceInvCoeff.CSF[val_marker]; }
1405
1406 /*!
1407 * \brief Provide the non dimensional side-force coefficient.
1408 * \param[in] val_marker - Surface marker where the coefficient is computed.
1409 * \return Value of the side-force coefficient on the surface <i>val_marker</i>.
1410 */
1411 inline su2double GetSurface_CEff_Inv(unsigned short val_marker) const final {
1412 return SurfaceInvCoeff.CEff[val_marker];
1413 }
1414
1415 /*!
1416 * \brief Provide the non dimensional x force coefficient.
1417 * \param[in] val_marker - Surface marker where the coefficient is computed.
1418 * \return Value of the x force coefficient on the surface <i>val_marker</i>.
1419 */
1420 inline su2double GetSurface_CFx_Inv(unsigned short val_marker) const final { return SurfaceInvCoeff.CFx[val_marker]; }
1421
1422 /*!
1423 * \brief Provide the non dimensional y force coefficient.
1424 * \param[in] val_marker - Surface marker where the coefficient is computed.
1425 * \return Value of the y force coefficient on the surface <i>val_marker</i>.
1426 */
1427 inline su2double GetSurface_CFy_Inv(unsigned short val_marker) const final { return SurfaceInvCoeff.CFy[val_marker]; }
1428
1429 /*!
1430 * \brief Provide the non dimensional z force coefficient.
1431 * \param[in] val_marker - Surface marker where the coefficient is computed.
1432 * \return Value of the z force coefficient on the surface <i>val_marker</i>.
1433 */
1434 inline su2double GetSurface_CFz_Inv(unsigned short val_marker) const final { return SurfaceInvCoeff.CFz[val_marker]; }
1435
1436 /*!
1437 * \brief Provide the non dimensional x moment coefficient.
1438 * \param[in] val_marker - Surface marker where the coefficient is computed.
1439 * \return Value of the x moment coefficient on the surface <i>val_marker</i>.
1440 */
1441 inline su2double GetSurface_CMx_Inv(unsigned short val_marker) const final { return SurfaceInvCoeff.CMx[val_marker]; }
1442
1443 /*!
1444 * \brief Provide the non dimensional y moment coefficient.
1445 * \param[in] val_marker - Surface marker where the coefficient is computed.
1446 * \return Value of the y moment coefficient on the surface <i>val_marker</i>.
1447 */
1448 inline su2double GetSurface_CMy_Inv(unsigned short val_marker) const final { return SurfaceInvCoeff.CMy[val_marker]; }
1449
1450 /*!
1451 * \brief Provide the non dimensional z moment coefficient.
1452 * \param[in] val_marker - Surface marker where the coefficient is computed.
1453 * \return Value of the z moment coefficient on the surface <i>val_marker</i>.
1454 */
1455 inline su2double GetSurface_CMz_Inv(unsigned short val_marker) const final { return SurfaceInvCoeff.CMz[val_marker]; }
1456
1457 /*!
1458 * \brief Provide the non dimensional lift coefficient.
1459 * \param[in] val_marker - Surface marker where the coefficient is computed.
1460 * \return Value of the lift coefficient on the surface <i>val_marker</i>.
1461 */
1462 inline su2double GetSurface_CL_Mnt(unsigned short val_marker) const final { return SurfaceMntCoeff.CL[val_marker]; }
1463
1464 /*!
1465 * \brief Provide the non dimensional drag coefficient.
1466 * \param[in] val_marker - Surface marker where the coefficient is computed.
1467 * \return Value of the drag coefficient on the surface <i>val_marker</i>.
1468 */
1469 inline su2double GetSurface_CD_Mnt(unsigned short val_marker) const final { return SurfaceMntCoeff.CD[val_marker]; }
1470
1471 /*!
1472 * \brief Provide the non dimensional side-force coefficient.
1473 * \param[in] val_marker - Surface marker where the coefficient is computed.
1474 * \return Value of the side-force coefficient on the surface <i>val_marker</i>.
1475 */
1476 inline su2double GetSurface_CSF_Mnt(unsigned short val_marker) const final { return SurfaceMntCoeff.CSF[val_marker]; }
1477
1478 /*!
1479 * \brief Provide the non dimensional side-force coefficient.
1480 * \param[in] val_marker - Surface marker where the coefficient is computed.
1481 * \return Value of the side-force coefficient on the surface <i>val_marker</i>.
1482 */
1483 inline su2double GetSurface_CEff_Mnt(unsigned short val_marker) const final {
1484 return SurfaceMntCoeff.CEff[val_marker];
1485 }
1486
1487 /*!
1488 * \brief Provide the non dimensional x force coefficient.
1489 * \param[in] val_marker - Surface marker where the coefficient is computed.
1490 * \return Value of the x force coefficient on the surface <i>val_marker</i>.
1491 */
1492 inline su2double GetSurface_CFx_Mnt(unsigned short val_marker) const final { return SurfaceMntCoeff.CFx[val_marker]; }
1493
1494 /*!
1495 * \brief Provide the non dimensional y force coefficient.
1496 * \param[in] val_marker - Surface marker where the coefficient is computed.
1497 * \return Value of the y force coefficient on the surface <i>val_marker</i>.
1498 */
1499 inline su2double GetSurface_CFy_Mnt(unsigned short val_marker) const final { return SurfaceMntCoeff.CFy[val_marker]; }
1500
1501 /*!
1502 * \brief Provide the non dimensional z force coefficient.
1503 * \param[in] val_marker - Surface marker where the coefficient is computed.
1504 * \return Value of the z force coefficient on the surface <i>val_marker</i>.
1505 */
1506 inline su2double GetSurface_CFz_Mnt(unsigned short val_marker) const final { return SurfaceMntCoeff.CFz[val_marker]; }
1507
1508 /*!
1509 * \brief Provide the non dimensional x moment coefficient.
1510 * \param[in] val_marker - Surface marker where the coefficient is computed.
1511 * \return Value of the x moment coefficient on the surface <i>val_marker</i>.
1512 */
1513 inline su2double GetSurface_CMx_Mnt(unsigned short val_marker) const final { return SurfaceMntCoeff.CMx[val_marker]; }
1514
1515 /*!
1516 * \brief Provide the non dimensional y moment coefficient.
1517 * \param[in] val_marker - Surface marker where the coefficient is computed.
1518 * \return Value of the y moment coefficient on the surface <i>val_marker</i>.
1519 */
1520 inline su2double GetSurface_CMy_Mnt(unsigned short val_marker) const final { return SurfaceMntCoeff.CMy[val_marker]; }
1521
1522 /*!
1523 * \brief Provide the non dimensional z moment coefficient.
1524 * \param[in] val_marker - Surface marker where the coefficient is computed.
1525 * \return Value of the z moment coefficient on the surface <i>val_marker</i>.
1526 */
1527 inline su2double GetSurface_CMz_Mnt(unsigned short val_marker) const final { return SurfaceMntCoeff.CMz[val_marker]; }
1528
1529 /*!
1530 * \brief Provide the non dimensional sideforce coefficient (inviscid contribution).
1531 * \param val_marker Surface where the coeficient is going to be computed.
1532 * \return Value of the sideforce coefficient (inviscid contribution) on the surface <i>val_marker</i>.
1533 */
1534 inline su2double GetCSF_Inv(unsigned short val_marker) const final { return InvCoeff.CSF[val_marker]; }
1535
1536 /*!
1537 * \brief Provide the non dimensional efficiency coefficient (inviscid contribution).
1538 * \param val_marker Surface where the coeficient is going to be computed.
1539 * \return Value of the efficiency coefficient (inviscid contribution) on the surface <i>val_marker</i>.
1540 */
1541 inline su2double GetCEff_Inv(unsigned short val_marker) const final { return InvCoeff.CEff[val_marker]; }
1542
1543 /*!
1544 * \brief Provide the total (inviscid + viscous) non dimensional sideforce coefficient.
1545 * \return Value of the sideforce coefficient (inviscid + viscous contribution).
1546 */
1547 inline su2double GetTotal_CSF() const final { return TotalCoeff.CSF; }
1548
1549 /*!
1550 * \brief Provide the total (inviscid + viscous) non dimensional efficiency coefficient.
1551 * \return Value of the efficiency coefficient (inviscid + viscous contribution).
1552 */
1553 inline su2double GetTotal_CEff() const final { return TotalCoeff.CEff; }
1554
1555 /*!
1556 * \brief Get the reference force used to compute CL, CD, etc.
1557 */
1559
1560 /*!
1561 * \brief Get the reference dynamic pressure, for Cp, Cf, etc.
1562 */
1564
1565 /*!
1566 * \brief Provide the total (inviscid + viscous) non dimensional lift coefficient.
1567 * \return Value of the lift coefficient (inviscid + viscous contribution).
1568 */
1569 inline su2double GetTotal_CL() const final { return TotalCoeff.CL; }
1570
1571 /*!
1572 * \brief Provide the total (inviscid + viscous) non dimensional drag coefficient.
1573 * \return Value of the drag coefficient (inviscid + viscous contribution).
1574 */
1575 inline su2double GetTotal_CD() const final { return TotalCoeff.CD; }
1576
1577 /*!
1578 * \brief Provide the total (inviscid + viscous) non dimensional x moment coefficient.
1579 * \return Value of the moment x coefficient (inviscid + viscous contribution).
1580 */
1581 inline su2double GetTotal_CMx() const final { return TotalCoeff.CMx; }
1582
1583 /*!
1584 * \brief Provide the total (inviscid + viscous) non dimensional y moment coefficient.
1585 * \return Value of the moment y coefficient (inviscid + viscous contribution).
1586 */
1587 inline su2double GetTotal_CMy() const final { return TotalCoeff.CMy; }
1588
1589 /*!
1590 * \brief Provide the total (inviscid + viscous) non dimensional z moment coefficient.
1591 * \return Value of the moment z coefficient (inviscid + viscous contribution).
1592 */
1593 inline su2double GetTotal_CMz() const final { return TotalCoeff.CMz; }
1594
1595 /*!
1596 * \brief Provide the total (inviscid + viscous) non dimensional x moment coefficient.
1597 * \return Value of the moment x coefficient (inviscid + viscous contribution).
1598 */
1599 inline su2double GetTotal_CoPx() const final { return TotalCoeff.CoPx; }
1600
1601 /*!
1602 * \brief Provide the total (inviscid + viscous) non dimensional y moment coefficient.
1603 * \return Value of the moment y coefficient (inviscid + viscous contribution).
1604 */
1605 inline su2double GetTotal_CoPy() const final { return TotalCoeff.CoPy; }
1606
1607 /*!
1608 * \brief Provide the total (inviscid + viscous) non dimensional z moment coefficient.
1609 * \return Value of the moment z coefficient (inviscid + viscous contribution).
1610 */
1611 inline su2double GetTotal_CoPz() const final { return TotalCoeff.CoPz; }
1612
1613 /*!
1614 * \brief Provide the total (inviscid + viscous) non dimensional x force coefficient.
1615 * \return Value of the force x coefficient (inviscid + viscous contribution).
1616 */
1617 inline su2double GetTotal_CFx() const final { return TotalCoeff.CFx; }
1618
1619 /*!
1620 * \brief Provide the total (inviscid + viscous) non dimensional y force coefficient.
1621 * \return Value of the force y coefficient (inviscid + viscous contribution).
1622 */
1623 inline su2double GetTotal_CFy() const final { return TotalCoeff.CFy; }
1624
1625 /*!
1626 * \brief Provide the total (inviscid + viscous) non dimensional z force coefficient.
1627 * \return Value of the force z coefficient (inviscid + viscous contribution).
1628 */
1629 inline su2double GetTotal_CFz() const final { return TotalCoeff.CFz; }
1630
1631 /*!
1632 * \brief Provide the total (inviscid + viscous) non dimensional thrust coefficient.
1633 * \return Value of the rotor efficiency coefficient (inviscid + viscous contribution).
1634 */
1635 inline su2double GetTotal_CT() const final { return TotalCoeff.CT; }
1636
1637 /*!
1638 * \brief Store the total (inviscid + viscous) non dimensional thrust coefficient.
1639 * \param[in] val_Total_CT - Value of the total thrust coefficient.
1640 */
1641 inline void SetTotal_CT(su2double val_Total_CT) final { TotalCoeff.CT = val_Total_CT; }
1642
1643 /*!
1644 * \brief Provide the total (inviscid + viscous) non dimensional torque coefficient.
1645 * \return Value of the rotor efficiency coefficient (inviscid + viscous contribution).
1646 */
1647 inline su2double GetTotal_CQ() const final { return TotalCoeff.CQ; }
1648
1649 /*!
1650 * \brief Store the total (inviscid + viscous) non dimensional torque coefficient.
1651 * \param[in] val_Total_CQ - Value of the total torque coefficient.
1652 */
1653 inline void SetTotal_CQ(su2double val_Total_CQ) final { TotalCoeff.CQ = val_Total_CQ; }
1654
1655 /*!
1656 * \brief Provide the total (inviscid + viscous) non dimensional rotor Figure of Merit.
1657 * \return Value of the rotor efficiency coefficient (inviscid + viscous contribution).
1658 */
1659 inline su2double GetTotal_CMerit() const final { return TotalCoeff.CMerit; }
1660
1661 /*!
1662 * \brief Store the total (inviscid + viscous) non dimensional drag coefficient.
1663 * \param[in] val_Total_CD - Value of the total drag coefficient.
1664 */
1665 inline void SetTotal_CD(su2double val_Total_CD) final { TotalCoeff.CD = val_Total_CD; }
1666
1667 /*!
1668 * \brief Store the total (inviscid + viscous) non dimensional lift coefficient.
1669 * \param[in] val_Total_CL - Value of the total lift coefficient.
1670 */
1671 inline void SetTotal_CL(su2double val_Total_CL) final { TotalCoeff.CL = val_Total_CL; }
1672
1673 /*!
1674 * \brief Get the inviscid contribution to the lift coefficient.
1675 * \return Value of the lift coefficient (inviscid contribution).
1676 */
1677 inline su2double GetAllBound_CL_Inv() const final { return AllBoundInvCoeff.CL; }
1678
1679 /*!
1680 * \brief Get the inviscid contribution to the drag coefficient.
1681 * \return Value of the drag coefficient (inviscid contribution).
1682 */
1683 inline su2double GetAllBound_CD_Inv() const final { return AllBoundInvCoeff.CD; }
1684
1685 /*!
1686 * \brief Get the inviscid contribution to the sideforce coefficient.
1687 * \return Value of the sideforce coefficient (inviscid contribution).
1688 */
1689 inline su2double GetAllBound_CSF_Inv() const final { return AllBoundInvCoeff.CSF; }
1690
1691 /*!
1692 * \brief Get the inviscid contribution to the efficiency coefficient.
1693 * \return Value of the efficiency coefficient (inviscid contribution).
1694 */
1695 inline su2double GetAllBound_CEff_Inv() const final { return AllBoundInvCoeff.CEff; }
1696
1697 /*!
1698 * \brief Get the inviscid contribution to the efficiency coefficient.
1699 * \return Value of the efficiency coefficient (inviscid contribution).
1700 */
1701 inline su2double GetAllBound_CMx_Inv() const final { return AllBoundInvCoeff.CMx; }
1702
1703 /*!
1704 * \brief Get the inviscid contribution to the efficiency coefficient.
1705 * \return Value of the efficiency coefficient (inviscid contribution).
1706 */
1707 inline su2double GetAllBound_CMy_Inv() const final { return AllBoundInvCoeff.CMy; }
1708
1709 /*!
1710 * \brief Get the inviscid contribution to the efficiency coefficient.
1711 * \return Value of the efficiency coefficient (inviscid contribution).
1712 */
1713 inline su2double GetAllBound_CMz_Inv() const final { return AllBoundInvCoeff.CMz; }
1714
1715 /*!
1716 * \brief Get the inviscid contribution to the efficiency coefficient.
1717 * \return Value of the efficiency coefficient (inviscid contribution).
1718 */
1719 inline su2double GetAllBound_CoPx_Inv() const final { return AllBoundInvCoeff.CoPx; }
1720
1721 /*!
1722 * \brief Get the inviscid contribution to the efficiency coefficient.
1723 * \return Value of the efficiency coefficient (inviscid contribution).
1724 */
1725 inline su2double GetAllBound_CoPy_Inv() const final { return AllBoundInvCoeff.CoPy; }
1726
1727 /*!
1728 * \brief Get the inviscid contribution to the efficiency coefficient.
1729 * \return Value of the efficiency coefficient (inviscid contribution).
1730 */
1731 inline su2double GetAllBound_CoPz_Inv() const final { return AllBoundInvCoeff.CoPz; }
1732
1733 /*!
1734 * \brief Get the inviscid contribution to the efficiency coefficient.
1735 * \return Value of the efficiency coefficient (inviscid contribution).
1736 */
1737 inline su2double GetAllBound_CFx_Inv() const final { return AllBoundInvCoeff.CFx; }
1738
1739 /*!
1740 * \brief Get the inviscid contribution to the efficiency coefficient.
1741 * \return Value of the efficiency coefficient (inviscid contribution).
1742 */
1743 inline su2double GetAllBound_CFy_Inv() const final { return AllBoundInvCoeff.CFy; }
1744
1745 /*!
1746 * \brief Get the inviscid contribution to the efficiency coefficient.
1747 * \return Value of the efficiency coefficient (inviscid contribution).
1748 */
1749 inline su2double GetAllBound_CFz_Inv() const final { return AllBoundInvCoeff.CFz; }
1750
1751 /*!
1752 * \brief Get the inviscid contribution to the lift coefficient.
1753 * \return Value of the lift coefficient (inviscid contribution).
1754 */
1755 inline su2double GetAllBound_CL_Mnt() const final { return AllBoundMntCoeff.CL; }
1756
1757 /*!
1758 * \brief Get the inviscid contribution to the drag coefficient.
1759 * \return Value of the drag coefficient (inviscid contribution).
1760 */
1761 inline su2double GetAllBound_CD_Mnt() const final { return AllBoundMntCoeff.CD; }
1762
1763 /*!
1764 * \brief Get the inviscid contribution to the sideforce coefficient.
1765 * \return Value of the sideforce coefficient (inviscid contribution).
1766 */
1767 inline su2double GetAllBound_CSF_Mnt() const final { return AllBoundMntCoeff.CSF; }
1768
1769 /*!
1770 * \brief Get the inviscid contribution to the efficiency coefficient.
1771 * \return Value of the efficiency coefficient (inviscid contribution).
1772 */
1773 inline su2double GetAllBound_CEff_Mnt() const final { return AllBoundMntCoeff.CEff; }
1774
1775 /*!
1776 * \brief Get the inviscid contribution to the efficiency coefficient.
1777 * \return Value of the efficiency coefficient (inviscid contribution).
1778 */
1779 inline su2double GetAllBound_CMx_Mnt() const final { return AllBoundMntCoeff.CMx; }
1780
1781 /*!
1782 * \brief Get the inviscid contribution to the efficiency coefficient.
1783 * \return Value of the efficiency coefficient (inviscid contribution).
1784 */
1785 inline su2double GetAllBound_CMy_Mnt() const final { return AllBoundMntCoeff.CMy; }
1786
1787 /*!
1788 * \brief Get the inviscid contribution to the efficiency coefficient.
1789 * \return Value of the efficiency coefficient (inviscid contribution).
1790 */
1791 inline su2double GetAllBound_CMz_Mnt() const final { return AllBoundMntCoeff.CMz; }
1792
1793 /*!
1794 * \brief Get the inviscid contribution to the efficiency coefficient.
1795 * \return Value of the efficiency coefficient (inviscid contribution).
1796 */
1797 inline su2double GetAllBound_CoPx_Mnt() const final { return AllBoundMntCoeff.CoPx; }
1798
1799 /*!
1800 * \brief Get the inviscid contribution to the efficiency coefficient.
1801 * \return Value of the efficiency coefficient (inviscid contribution).
1802 */
1803 inline su2double GetAllBound_CoPy_Mnt() const final { return AllBoundMntCoeff.CoPy; }
1804
1805 /*!
1806 * \brief Get the inviscid contribution to the efficiency coefficient.
1807 * \return Value of the efficiency coefficient (inviscid contribution).
1808 */
1809 inline su2double GetAllBound_CoPz_Mnt() const final { return AllBoundMntCoeff.CoPz; }
1810
1811 /*!
1812 * \brief Get the inviscid contribution to the efficiency coefficient.
1813 * \return Value of the efficiency coefficient (inviscid contribution).
1814 */
1815 inline su2double GetAllBound_CFx_Mnt() const final { return AllBoundMntCoeff.CFx; }
1816
1817 /*!
1818 * \brief Get the inviscid contribution to the efficiency coefficient.
1819 * \return Value of the efficiency coefficient (inviscid contribution).
1820 */
1821 inline su2double GetAllBound_CFy_Mnt() const final { return AllBoundMntCoeff.CFy; }
1822
1823 /*!
1824 * \brief Get the inviscid contribution to the efficiency coefficient.
1825 * \return Value of the efficiency coefficient (inviscid contribution).
1826 */
1827 inline su2double GetAllBound_CFz_Mnt() const final { return AllBoundMntCoeff.CFz; }
1828
1829 /*!
1830 * \brief Provide the non dimensional lift coefficient.
1831 * \param[in] val_marker - Surface marker where the coefficient is computed.
1832 * \return Value of the lift coefficient on the surface <i>val_marker</i>.
1833 */
1834 inline su2double GetSurface_CL_Visc(unsigned short val_marker) const final { return SurfaceViscCoeff.CL[val_marker]; }
1835
1836 /*!
1837 * \brief Provide the non dimensional drag coefficient.
1838 * \param[in] val_marker - Surface marker where the coefficient is computed.
1839 * \return Value of the drag coefficient on the surface <i>val_marker</i>.
1840 */
1841 inline su2double GetSurface_CD_Visc(unsigned short val_marker) const final { return SurfaceViscCoeff.CD[val_marker]; }
1842
1843 /*!
1844 * \brief Provide the non dimensional side-force coefficient.
1845 * \param[in] val_marker - Surface marker where the coefficient is computed.
1846 * \return Value of the side-force coefficient on the surface <i>val_marker</i>.
1847 */
1848 inline su2double GetSurface_CSF_Visc(unsigned short val_marker) const final {
1849 return SurfaceViscCoeff.CSF[val_marker];
1850 }
1851
1852 /*!
1853 * \brief Provide the non dimensional side-force coefficient.
1854 * \param[in] val_marker - Surface marker where the coefficient is computed.
1855 * \return Value of the side-force coefficient on the surface <i>val_marker</i>.
1856 */
1857 inline su2double GetSurface_CEff_Visc(unsigned short val_marker) const final {
1858 return SurfaceViscCoeff.CEff[val_marker];
1859 }
1860
1861 /*!
1862 * \brief Provide the non dimensional x force coefficient.
1863 * \param[in] val_marker - Surface marker where the coefficient is computed.
1864 * \return Value of the x force coefficient on the surface <i>val_marker</i>.
1865 */
1866 inline su2double GetSurface_CFx_Visc(unsigned short val_marker) const final {
1867 return SurfaceViscCoeff.CFx[val_marker];
1868 }
1869
1870 /*!
1871 * \brief Provide the non dimensional y force coefficient.
1872 * \param[in] val_marker - Surface marker where the coefficient is computed.
1873 * \return Value of the y force coefficient on the surface <i>val_marker</i>.
1874 */
1875 inline su2double GetSurface_CFy_Visc(unsigned short val_marker) const final {
1876 return SurfaceViscCoeff.CFy[val_marker];
1877 }
1878
1879 /*!
1880 * \brief Provide the non dimensional z force coefficient.
1881 * \param[in] val_marker - Surface marker where the coefficient is computed.
1882 * \return Value of the z force coefficient on the surface <i>val_marker</i>.
1883 */
1884 inline su2double GetSurface_CFz_Visc(unsigned short val_marker) const final {
1885 return SurfaceViscCoeff.CFz[val_marker];
1886 }
1887
1888 /*!
1889 * \brief Provide the non dimensional x moment coefficient.
1890 * \param[in] val_marker - Surface marker where the coefficient is computed.
1891 * \return Value of the x moment coefficient on the surface <i>val_marker</i>.
1892 */
1893 inline su2double GetSurface_CMx_Visc(unsigned short val_marker) const final {
1894 return SurfaceViscCoeff.CMx[val_marker];
1895 }
1896
1897 /*!
1898 * \brief Provide the non dimensional y moment coefficient.
1899 * \param[in] val_marker - Surface marker where the coefficient is computed.
1900 * \return Value of the y moment coefficient on the surface <i>val_marker</i>.
1901 */
1902 inline su2double GetSurface_CMy_Visc(unsigned short val_marker) const final {
1903 return SurfaceViscCoeff.CMy[val_marker];
1904 }
1905
1906 /*!
1907 * \brief Provide the non dimensional z moment coefficient.
1908 * \param[in] val_marker - Surface marker where the coefficient is computed.
1909 * \return Value of the z moment coefficient on the surface <i>val_marker</i>.
1910 */
1911 inline su2double GetSurface_CMz_Visc(unsigned short val_marker) const final {
1912 return SurfaceViscCoeff.CMz[val_marker];
1913 }
1914
1915 /*!
1916 * \brief Get the inviscid contribution to the lift coefficient.
1917 * \return Value of the lift coefficient (inviscid contribution).
1918 */
1919 inline su2double GetAllBound_CL_Visc() const final { return AllBoundViscCoeff.CL; }
1920
1921 /*!
1922 * \brief Get the inviscid contribution to the drag coefficient.
1923 * \return Value of the drag coefficient (inviscid contribution).
1924 */
1925 inline su2double GetAllBound_CD_Visc() const final { return AllBoundViscCoeff.CD; }
1926
1927 /*!
1928 * \brief Get the inviscid contribution to the sideforce coefficient.
1929 * \return Value of the sideforce coefficient (inviscid contribution).
1930 */
1931 inline su2double GetAllBound_CSF_Visc() const final { return AllBoundViscCoeff.CSF; }
1932
1933 /*!
1934 * \brief Get the inviscid contribution to the efficiency coefficient.
1935 * \return Value of the efficiency coefficient (inviscid contribution).
1936 */
1938
1939 /*!
1940 * \brief Get the inviscid contribution to the efficiency coefficient.
1941 * \return Value of the efficiency coefficient (inviscid contribution).
1942 */
1943 inline su2double GetAllBound_CMx_Visc() const final { return AllBoundViscCoeff.CMx; }
1944
1945 /*!
1946 * \brief Get the inviscid contribution to the efficiency coefficient.
1947 * \return Value of the efficiency coefficient (inviscid contribution).
1948 */
1949 inline su2double GetAllBound_CMy_Visc() const final { return AllBoundViscCoeff.CMy; }
1950
1951 /*!
1952 * \brief Get the inviscid contribution to the efficiency coefficient.
1953 * \return Value of the efficiency coefficient (inviscid contribution).
1954 */
1955 inline su2double GetAllBound_CMz_Visc() const final { return AllBoundViscCoeff.CMz; }
1956
1957 /*!
1958 * \brief Get the inviscid contribution to the efficiency coefficient.
1959 * \return Value of the efficiency coefficient (inviscid contribution).
1960 */
1962
1963 /*!
1964 * \brief Get the inviscid contribution to the efficiency coefficient.
1965 * \return Value of the efficiency coefficient (inviscid contribution).
1966 */
1968
1969 /*!
1970 * \brief Get the inviscid contribution to the efficiency coefficient.
1971 * \return Value of the efficiency coefficient (inviscid contribution).
1972 */
1974
1975 /*!
1976 * \brief Get the inviscid contribution to the efficiency coefficient.
1977 * \return Value of the efficiency coefficient (inviscid contribution).
1978 */
1979 inline su2double GetAllBound_CFx_Visc() const final { return AllBoundViscCoeff.CFx; }
1980
1981 /*!
1982 * \brief Get the inviscid contribution to the efficiency coefficient.
1983 * \return Value of the efficiency coefficient (inviscid contribution).
1984 */
1985 inline su2double GetAllBound_CFy_Visc() const final { return AllBoundViscCoeff.CFy; }
1986
1987 /*!
1988 * \brief Get the inviscid contribution to the efficiency coefficient.
1989 * \return Value of the efficiency coefficient (inviscid contribution).
1990 */
1991 inline su2double GetAllBound_CFz_Visc() const final { return AllBoundViscCoeff.CFz; }
1992
1993 /*!
1994 * \brief Get the non dimensional lift coefficient (viscous contribution).
1995 * \param[in] val_marker - Surface marker where the coefficient is computed.
1996 * \return Value of the lift coefficient (viscous contribution) on the surface <i>val_marker</i>.
1997 */
1998 inline su2double GetCL_Visc(unsigned short val_marker) const final { return ViscCoeff.CL[val_marker]; }
1999
2000 /*!
2001 * \brief Get the non dimensional sideforce coefficient (viscous contribution).
2002 * \param[in] val_marker - Surface marker where the coefficient is computed.
2003 * \return Value of the sideforce coefficient (viscous contribution) on the surface <i>val_marker</i>.
2004 */
2005 inline su2double GetCSF_Visc(unsigned short val_marker) const final { return ViscCoeff.CSF[val_marker]; }
2006
2007 /*!
2008 * \brief Get the non dimensional drag coefficient (viscous contribution).
2009 * \param[in] val_marker - Surface marker where the coefficient is computed.
2010 * \return Value of the drag coefficient (viscous contribution) on the surface <i>val_marker</i>.
2011 */
2012 inline su2double GetCD_Visc(unsigned short val_marker) const final { return ViscCoeff.CD[val_marker]; }
2013
2014 /*!
2015 * \brief Get the total heat flux.
2016 * \param[in] val_marker - Surface marker where the heat flux is computed.
2017 * \return Value of the integrated heat flux (viscous contribution) on the surface <i>val_marker</i>.
2018 */
2019 inline su2double GetSurface_HF_Visc(unsigned short val_marker) const final { return Surface_HF_Visc[val_marker]; }
2020
2021 /*!
2022 * \brief Get the maximum (per surface) heat flux.
2023 * \param[in] val_marker - Surface marker where the heat flux is computed.
2024 * \return Value of the maximum heat flux (viscous contribution) on the surface <i>val_marker</i>.
2025 */
2026 inline su2double GetSurface_MaxHF_Visc(unsigned short val_marker) const final {
2027 return Surface_MaxHF_Visc[val_marker];
2028 }
2029
2030 /*!
2031 * \brief Set the value of the Equivalent Area coefficient.
2032 * \param[in] val_cequivarea - Value of the Equivalent Area coefficient.
2033 */
2034 inline void SetTotal_CpDiff(su2double val_pressure) final { Total_CpDiff = val_pressure; }
2035
2036 /*!
2037 * \brief Set the value of the Equivalent Area coefficient.
2038 * \param[in] val_cequivarea - Value of the Equivalent Area coefficient.
2039 */
2040 inline void SetTotal_HeatFluxDiff(su2double val_heat) final { Total_HeatFluxDiff = val_heat; }
2041
2042 /*!
2043 * \brief Set the value of the Equivalent Area coefficient.
2044 * \param[in] val_equiv - Value of the Equivalent Area coefficient.
2045 */
2046 inline void SetTotal_CEquivArea(su2double val_equiv) final { Total_CEquivArea = val_equiv; }
2047
2048 /*!
2049 * \brief Set the value of the Near-Field pressure oefficient.
2050 * \param[in] val_cnearfieldpress - Value of the Near-Field pressure coefficient.
2051 */
2052 inline void SetTotal_CNearFieldOF(su2double val_cnearfieldpress) final { Total_CNearFieldOF = val_cnearfieldpress; }
2053
2054 /*!
2055 * \brief Provide the total (inviscid + viscous) non dimensional Equivalent Area coefficient.
2056 * \return Value of the Equivalent Area coefficient (inviscid + viscous contribution).
2057 */
2058 inline su2double GetTotal_CpDiff() const final { return Total_CpDiff; }
2059
2060 /*!
2061 * \brief Provide the total (inviscid + viscous) non dimensional Equivalent Area coefficient.
2062 * \return Value of the Equivalent Area coefficient (inviscid + viscous contribution).
2063 */
2064 inline su2double GetTotal_HeatFluxDiff() const final { return Total_HeatFluxDiff; }
2065
2066 /*!
2067 * \brief Provide the total (inviscid + viscous) non dimensional Equivalent Area coefficient.
2068 * \return Value of the Equivalent Area coefficient (inviscid + viscous contribution).
2069 */
2070 inline su2double GetTotal_CEquivArea() const final { return Total_CEquivArea; }
2071
2072 /*!
2073 * \brief Provide the total heat load.
2074 * \return Value of the heat load (viscous contribution).
2075 */
2076 inline su2double GetTotal_HeatFlux() const final { return Total_Heat; }
2077
2078 /*!
2079 * \brief Provide the total heat load.
2080 * \return Value of the heat load (viscous contribution).
2081 */
2082 inline su2double GetTotal_MaxHeatFlux() const final { return Total_MaxHeat; }
2083
2084 /*!
2085 * \brief Store the total heat load.
2086 * \param[in] val_Total_Heat - Value of the heat load.
2087 */
2088 inline void SetTotal_HeatFlux(su2double val_Total_Heat) final { Total_Heat = val_Total_Heat; }
2089
2090 /*!
2091 * \brief Store the total heat load.
2092 * \param[in] val_Total_Heat - Value of the heat load.
2093 */
2094 inline void SetTotal_MaxHeatFlux(su2double val_Total_MaxHeat) final { Total_MaxHeat = val_Total_MaxHeat; }
2095
2096 /*!
2097 * \brief Provide the Pressure coefficient.
2098 * \param[in] val_marker - Surface marker where the coefficient is computed.
2099 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
2100 * \return Value of the pressure coefficient.
2101 */
2102 inline su2double GetCPressure(unsigned short val_marker, unsigned long val_vertex) const final {
2103 return CPressure[val_marker][val_vertex];
2104 }
2105
2106 /*!
2107 * \brief Provide the Target Pressure coefficient.
2108 * \param[in] val_marker - Surface marker where the coefficient is computed.
2109 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
2110 * \return Value of the pressure coefficient.
2111 */
2112 inline su2double GetCPressureTarget(unsigned short val_marker, unsigned long val_vertex) const final {
2113 return CPressureTarget[val_marker][val_vertex];
2114 }
2115
2116 /*!
2117 * \brief Set the value of the target Pressure coefficient.
2118 * \param[in] val_marker - Surface marker where the coefficient is computed.
2119 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
2120 * \return Value of the pressure coefficient.
2121 */
2122 inline void SetCPressureTarget(unsigned short val_marker, unsigned long val_vertex, su2double val_pressure) final {
2123 CPressureTarget[val_marker][val_vertex] = val_pressure;
2124 }
2125
2126 /*!
2127 * \brief Value of the characteristic variables at the boundaries.
2128 * \param[in] val_marker - Surface marker where the coefficient is computed.
2129 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
2130 * \return Value of the pressure coefficient.
2131 */
2132 inline su2double* GetCharacPrimVar(unsigned short val_marker, unsigned long val_vertex) final {
2133 return CharacPrimVar[val_marker][val_vertex];
2134 }
2135
2136 /*!
2137 * \brief Value of the characteristic variables at the boundaries.
2138 * \param[in] val_marker - Surface marker where the coefficient is computed.
2139 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
2140 * \return Value of the pressure coefficient.
2141 */
2142 inline void SetCharacPrimVar(unsigned short val_marker, unsigned long val_vertex, unsigned short val_var,
2143 su2double val_value) final {
2144 CharacPrimVar[val_marker][val_vertex][val_var] = val_value;
2145 }
2146
2147 /*!
2148 * \brief Value of the total temperature at an inlet boundary.
2149 * \param[in] val_marker - Surface marker where the total temperature is evaluated.
2150 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the total temperature is evaluated.
2151 * \return Value of the total temperature
2152 */
2153 inline su2double GetInletTtotal(unsigned short val_marker, unsigned long val_vertex) const final {
2154 return Inlet_Ttotal[val_marker][val_vertex];
2155 }
2156
2157 /*!
2158 * \brief Value of the total pressure at an inlet boundary.
2159 * \param[in] val_marker - Surface marker where the total pressure is evaluated.
2160 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the total pressure is evaluated.
2161 * \return Value of the total pressure
2162 */
2163 inline su2double GetInletPtotal(unsigned short val_marker, unsigned long val_vertex) const final {
2164 return Inlet_Ptotal[val_marker][val_vertex];
2165 }
2166
2167 /*!
2168 * \brief A component of the unit vector representing the flow direction at an inlet boundary.
2169 * \param[in] val_marker - Surface marker where the flow direction is evaluated
2170 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the flow direction is evaluated
2171 * \param[in] val_dim - The component of the flow direction unit vector to be evaluated
2172 * \return Component of a unit vector representing the flow direction.
2173 */
2174 inline su2double GetInletFlowDir(unsigned short val_marker, unsigned long val_vertex,
2175 unsigned short val_dim) const final {
2176 return Inlet_FlowDir[val_marker][val_vertex][val_dim];
2177 }
2178
2179 /*!
2180 * \brief Set the value of the total temperature at an inlet boundary.
2181 * \param[in] val_marker - Surface marker where the total temperature is set.
2182 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the total temperature is set.
2183 * \param[in] val_ttotal - Value of the total temperature
2184 */
2185 inline void SetInletTtotal(unsigned short val_marker, unsigned long val_vertex, su2double val_ttotal) final {
2186 /*--- Since this call can be accessed indirectly using python, do some error
2187 * checking to prevent segmentation faults ---*/
2188 if (val_marker >= nMarker)
2189 SU2_MPI::Error("Out-of-bounds marker index used on inlet.", CURRENT_FUNCTION);
2190 else if (val_vertex >= nVertex[val_marker])
2191 SU2_MPI::Error("Out-of-bounds vertex index used on inlet.", CURRENT_FUNCTION);
2192 else
2193 Inlet_Ttotal[val_marker][val_vertex] = val_ttotal;
2194 }
2195
2196 /*!
2197 * \brief Set the value of the total pressure at an inlet boundary.
2198 * \param[in] val_marker - Surface marker where the total pressure is set.
2199 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the total pressure is set.
2200 * \param[in] val_ptotal - Value of the total pressure
2201 */
2202 inline void SetInletPtotal(unsigned short val_marker, unsigned long val_vertex, su2double val_ptotal) final {
2203 /*--- Since this call can be accessed indirectly using python, do some error
2204 * checking to prevent segmentation faults ---*/
2205 if (val_marker >= nMarker)
2206 SU2_MPI::Error("Out-of-bounds marker index used on inlet.", CURRENT_FUNCTION);
2207 else if (val_vertex >= nVertex[val_marker])
2208 SU2_MPI::Error("Out-of-bounds vertex index used on inlet.", CURRENT_FUNCTION);
2209 else
2210 Inlet_Ptotal[val_marker][val_vertex] = val_ptotal;
2211 }
2212
2213 /*!
2214 * \brief Set a component of the unit vector representing the flow direction at an inlet boundary.
2215 * \param[in] val_marker - Surface marker where the flow direction is set.
2216 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the flow direction is set.
2217 * \param[in] val_dim - The component of the flow direction unit vector to be set
2218 * \param[in] val_flowdir - Component of a unit vector representing the flow direction.
2219 */
2220 inline void SetInletFlowDir(unsigned short val_marker, unsigned long val_vertex, unsigned short val_dim,
2221 su2double val_flowdir) final {
2222 /*--- Since this call can be accessed indirectly using python, do some error
2223 * checking to prevent segmentation faults ---*/
2224 if (val_marker >= nMarker)
2225 SU2_MPI::Error("Out-of-bounds marker index used on inlet.", CURRENT_FUNCTION);
2226 else if (val_vertex >= nVertex[val_marker])
2227 SU2_MPI::Error("Out-of-bounds vertex index used on inlet.", CURRENT_FUNCTION);
2228 else
2229 Inlet_FlowDir[val_marker][val_vertex][val_dim] = val_flowdir;
2230 }
2231
2232 /*!
2233 * \brief Update the multi-grid structure for the customized boundary conditions.
2234 * \param geometry_container - Geometrical definition.
2235 * \param solver_container - Solver definition.
2236 * \param config - Definition of the particular problem.
2237 */
2238 void UpdateCustomBoundaryConditions(CGeometry **geometry_container, CSolver ***solver_container,
2239 CConfig *config) final;
2240
2241 /*!
2242 * \brief Updates the components of the farfield velocity vector.
2243 */
2244 inline void UpdateFarfieldVelocity(const CConfig* config) final {
2245 /*--- Retrieve the AoA and AoS (degrees) ---*/
2246 const su2double AoA = config->GetAoA() * PI_NUMBER / 180.0;
2247 const su2double AoS = config->GetAoS() * PI_NUMBER / 180.0;
2248 /*--- Update the freestream velocity vector at the farfield
2249 * Compute the new freestream velocity with the updated AoA,
2250 * "Velocity_Inf" is shared with config. ---*/
2251
2252 const su2double Vel_Infty_Mag = GeometryToolbox::Norm(nDim, Velocity_Inf);
2253
2254 if (nDim == 2) {
2255 Velocity_Inf[0] = cos(AoA) * Vel_Infty_Mag;
2256 Velocity_Inf[1] = sin(AoA) * Vel_Infty_Mag;
2257 } else {
2258 Velocity_Inf[0] = cos(AoA) * cos(AoS) * Vel_Infty_Mag;
2259 Velocity_Inf[1] = sin(AoS) * Vel_Infty_Mag;
2260 Velocity_Inf[2] = sin(AoA) * cos(AoS) * Vel_Infty_Mag;
2261 }
2262 }
2263
2264 /*!
2265 * \brief Compute the global error measures (L2, Linf) for verification cases.
2266 * \param[in] geometry - Geometrical definition.
2267 * \param[in] config - Definition of the particular problem.
2268 */
2269 void ComputeVerificationError(CGeometry* geometry, CConfig* config) final;
2270
2271 /*!
2272 * \brief Print verification error to screen, derived solvers must define this.
2273 * \param[in] config - Definition of the particular problem.
2274 */
2275 virtual void PrintVerificationError(const CConfig* config) const = 0;
2276
2277 /*!
2278 * \brief Compute the pressure forces and all the adimensional coefficients.
2279 * \param[in] geometry - Geometrical definition of the problem.
2280 * \param[in] config - Definition of the particular problem.
2281 */
2282 void Pressure_Forces(const CGeometry* geometry, const CConfig* config) final;
2283
2284 /*!
2285 * \brief Compute the pressure forces and all the adimensional coefficients.
2286 * \param[in] geometry - Geometrical definition of the problem.
2287 * \param[in] config - Definition of the particular problem.
2288 */
2289 void Momentum_Forces(const CGeometry* geometry, const CConfig* config) final;
2290
2291 /*!
2292 * \brief Compute the viscous forces and all the addimensional coefficients.
2293 * \param[in] geometry - Geometrical definition of the problem.
2294 * \param[in] config - Definition of the particular problem.
2295 */
2296 void Friction_Forces(const CGeometry* geometry, const CConfig* config) final;
2297
2298 /*!
2299 * \brief Compute the buffet sensor.
2300 * \param[in] geometry - Geometrical definition of the problem.
2301 * \param[in] config - Definition of the particular problem.
2302 */
2303 inline virtual void Buffet_Monitoring(const CGeometry *geometry, const CConfig *config) { }
2304
2305 /*!
2306 * \brief Allocates the final pointer of SlidingState depending on how many donor vertex donate to it.
2307 * That number is stored in SlidingStateNodes[val_marker][val_vertex].
2308 * \param[in] val_marker - marker index
2309 * \param[in] val_vertex - vertex index
2310 */
2311 inline void SetSlidingStateStructure(unsigned short val_marker, unsigned long val_vertex) final {
2312 for (int iVar = 0; iVar < nPrimVar + 1; iVar++) {
2313 if (SlidingState[val_marker][val_vertex][iVar] != nullptr) delete[] SlidingState[val_marker][val_vertex][iVar];
2314 }
2315
2316 for (int iVar = 0; iVar < nPrimVar + 1; iVar++)
2317 SlidingState[val_marker][val_vertex][iVar] = new su2double[GetnSlidingStates(val_marker, val_vertex)];
2318 }
2319
2320 /*!
2321 * \brief Set the outer state for fluid interface nodes.
2322 * \param[in] val_marker - marker index
2323 * \param[in] val_vertex - vertex index
2324 * \param[in] val_state - requested state component
2325 * \param[in] donor_index - index of the donor node to set
2326 * \param[in] component - set value
2327 */
2328 inline void SetSlidingState(unsigned short val_marker, unsigned long val_vertex, unsigned short val_state,
2329 unsigned long donor_index, su2double component) final {
2330 SlidingState[val_marker][val_vertex][val_state][donor_index] = component;
2331 }
2332
2333 /*!
2334 * \brief Set the number of outer state for fluid interface nodes.
2335 * \param[in] val_marker - marker index
2336 * \param[in] val_vertex - vertex index
2337 * \param[in] value - number of outer states
2338 */
2339 inline void SetnSlidingStates(unsigned short val_marker, unsigned long val_vertex, int value) final {
2340 SlidingStateNodes[val_marker][val_vertex] = value;
2341 }
2342
2343 /*!
2344 * \brief Get the number of outer state for fluid interface nodes.
2345 * \param[in] val_marker - marker index
2346 * \param[in] val_vertex - vertex index
2347 */
2348 inline int GetnSlidingStates(unsigned short val_marker, unsigned long val_vertex) const final {
2349 return SlidingStateNodes[val_marker][val_vertex];
2350 }
2351
2352 /*!
2353 * \brief Get the outer state for fluid interface nodes.
2354 * \param[in] val_marker - marker index
2355 * \param[in] val_vertex - vertex index
2356 * \param[in] val_state - requested state component
2357 * \param[in] donor_index- index of the donor node to get
2358 */
2359 inline su2double GetSlidingState(unsigned short val_marker, unsigned long val_vertex, unsigned short val_state,
2360 unsigned long donor_index) const final {
2361 return SlidingState[val_marker][val_vertex][val_state][donor_index];
2362 }
2363
2364 /*!
2365 * \brief Set the conjugate heat variables.
2366 * \param[in] val_marker - marker index
2367 * \param[in] val_vertex - vertex index
2368 * \param[in] pos_var - variable position (in vector of all conjugate heat variables)
2369 * \param[in] relaxation factor - relaxation factor for the change of the variables
2370 * \param[in] val_var - value of the variable
2371 */
2372 inline void SetConjugateHeatVariable(unsigned short val_marker, unsigned long val_vertex, unsigned short pos_var,
2373 su2double relaxation_factor, su2double val_var) final {
2374 HeatConjugateVar[val_marker][val_vertex][pos_var] =
2375 relaxation_factor * val_var + (1.0 - relaxation_factor) * HeatConjugateVar[val_marker][val_vertex][pos_var];
2376 }
2377
2378 /*!
2379 * \brief Set the conjugate heat variables.
2380 * \param[in] val_marker - marker index
2381 * \param[in] val_vertex - vertex index
2382 * \param[in] pos_var - variable position (in vector of all conjugate heat variables)
2383 */
2384 inline su2double GetConjugateHeatVariable(unsigned short val_marker, unsigned long val_vertex,
2385 unsigned short pos_var) const final {
2386 return HeatConjugateVar[val_marker][val_vertex][pos_var];
2387 }
2388
2389 /*!
2390 * \brief Get the skin friction coefficient.
2391 * \param[in] val_marker - Surface marker where the coefficient is computed.
2392 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
2393 * \return Value of the skin friction coefficient.
2394 */
2395 inline su2double GetCSkinFriction(unsigned short val_marker, unsigned long val_vertex,
2396 unsigned short val_dim) const final {
2397 return CSkinFriction[val_marker](val_vertex,val_dim);
2398 }
2399
2400 /*!
2401 * \brief Get the wall shear stress.
2402 * \param[in] val_marker - Surface marker where the wall shear stress is computed.
2403 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the wall shear stress is evaluated.
2404 * \return Value of the wall shear stress.
2405 */
2406 inline su2double GetWallShearStress(unsigned short val_marker, unsigned long val_vertex) const final {
2407 return WallShearStress[val_marker][val_vertex];
2408 }
2409
2410 /*!
2411 * \brief Get the heat flux.
2412 * \param[in] val_marker - Surface marker where the coefficient is computed.
2413 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
2414 * \return Value of the heat transfer coefficient.
2415 */
2416 inline su2double GetHeatFlux(unsigned short val_marker, unsigned long val_vertex) const final {
2417 return HeatFlux[val_marker][val_vertex];
2418 }
2419
2420 /*!
2421 * \brief Get the skin friction coefficient.
2422 * \param[in] val_marker - Surface marker where the coefficient is computed.
2423 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
2424 * \return Value of the heat transfer coefficient.
2425 */
2426 inline su2double GetHeatFluxTarget(unsigned short val_marker, unsigned long val_vertex) const final {
2427 return HeatFluxTarget[val_marker][val_vertex];
2428 }
2429
2430 /*!
2431 * \brief Set the value of the target Pressure coefficient.
2432 * \param[in] val_marker - Surface marker where the coefficient is computed.
2433 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
2434 * \return Value of the pressure coefficient.
2435 */
2436 inline void SetHeatFluxTarget(unsigned short val_marker, unsigned long val_vertex, su2double val_heat) final {
2437 HeatFluxTarget[val_marker][val_vertex] = val_heat;
2438 }
2439
2440 /*!
2441 * \brief Get the y plus.
2442 * \param[in] val_marker - Surface marker where the coefficient is computed.
2443 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
2444 * \return Value of the y plus.
2445 */
2446 inline su2double GetYPlus(unsigned short val_marker, unsigned long val_vertex) const final {
2447 return YPlus[val_marker][val_vertex];
2448 }
2449
2450 /*!
2451 * \brief Get the u_tau .
2452 * \param[in] val_marker - Surface marker where the coefficient is computed.
2453 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
2454 * \return Value of the u_tau.
2455 */
2456 inline su2double GetUTau(unsigned short val_marker, unsigned long val_vertex) const final {
2457 return UTau[val_marker][val_vertex];
2458 }
2459
2460 /*!
2461 * \brief Get the eddy viscosity at the wall (wall functions).
2462 * \param[in] val_marker - Surface marker where the coefficient is computed.
2463 * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
2464 * \return Value of the eddy viscosity.
2465 */
2466 inline su2double GetEddyViscWall(unsigned short val_marker, unsigned long val_vertex) const final {
2467 return EddyViscWall[val_marker][val_vertex];
2468 }
2469
2470 /*!
2471 * \brief Get the mass fluxes across the edges (computed and stored during the discretization of convective fluxes).
2472 */
2473 inline const su2activevector* GetEdgeMassFluxes() const final { return &EdgeMassFluxes; }
2474
2475};
Headers of the CSolver class which is inherited by all of the other solvers.
A templated matrix/vector-like object.
Definition C2DContainer.hpp:374
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
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
UPWIND GetKind_Upwind_Flow(void) const
Get the kind of upwind convective numerical scheme for the flow equations.
Definition CConfig.hpp:4928
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
bool GetContinuous_Adjoint(void) const
Determines if problem is adjoint.
Definition CConfig.hpp:6902
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 Get_Alpha_RKStep(unsigned short val_step) const
Get the alpha (convective) coefficients for the Runge-Kutta integration scheme.
Definition CConfig.hpp:3465
unsigned short GetnMarker_Periodic(void) const
Get the total number of periodic markers.
Definition CConfig.hpp:3309
su2double GetDelta_UnstTime(void) const
If we are prforming an unsteady simulation, there is only one value of the time step for the complete...
Definition CConfig.hpp:6201
void SetDelta_UnstTimeND(su2double val_delta_unsttimend)
Set the value of the unsteadty time step using the CFL number.
Definition CConfig.hpp:6207
void SetNonphysical_Reconstr(unsigned long val_nonphys_reconstr)
Set the current number of non-physical reconstructions for 2nd-order upwinding.
Definition CConfig.hpp:9236
unsigned short GetComm_Level(void) const
Get the level of MPI communications to be performed.
Definition CConfig.hpp:9930
su2double GetMax_DeltaTime(void) const
Get the Courant Friedrich Levi number for unsteady simulations.
Definition CConfig.hpp:3014
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_TimeIntScheme(void) const
Get the kind of time integration method.
Definition CConfig.hpp:4732
bool GetViscous(void) const
Determines if problem is viscous.
Definition CConfig.hpp:6908
unsigned short GetMarker_All_KindBC(unsigned short val_marker) const
Get the kind of boundary for each marker.
Definition CConfig.hpp:3556
su2double GetUnst_CFL(void) const
Get the Courant Friedrich Levi number for unsteady simulations.
Definition CConfig.hpp:3002
unsigned long GetRestart_Iter(void) const
Get the restart iteration.
Definition CConfig.hpp:9912
void GetNormal(unsigned long iEdge, T &normal) const
Copy the the normal vector of a face.
Definition CEdge.hpp:161
Definition CFVMFlowSolverBase.hpp:36
su2double * Velocity_Inf
Flow Velocity vector at the infinity.
Definition CFVMFlowSolverBase.hpp:75
su2double GetTotal_CMx() const final
Provide the total (inviscid + viscous) non dimensional x moment coefficient.
Definition CFVMFlowSolverBase.hpp:1581
su2double GetAllBound_CL_Visc() const final
Get the inviscid contribution to the lift coefficient.
Definition CFVMFlowSolverBase.hpp:1919
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
su2double GetStrainMag_Max(void) const final
Get the max Strain rate magnitude.
Definition CFVMFlowSolverBase.hpp:1299
AeroCoeffsArray SurfaceCoeff
Totals for each monitoring surface.
Definition CFVMFlowSolverBase.hpp:159
void SetTotal_CL(su2double val_Total_CL) final
Store the total (inviscid + viscous) non dimensional lift coefficient.
Definition CFVMFlowSolverBase.hpp:1671
void SetCPressureTarget(unsigned short val_marker, unsigned long val_vertex, su2double val_pressure) final
Set the value of the target Pressure coefficient.
Definition CFVMFlowSolverBase.hpp:2122
AeroCoeffsArray SurfaceViscCoeff
Viscous contributions for each monitoring boundary.
Definition CFVMFlowSolverBase.hpp:156
su2double GetCD_Visc(unsigned short val_marker) const final
Get the non dimensional drag coefficient (viscous contribution).
Definition CFVMFlowSolverBase.hpp:2012
void UpdateFarfieldVelocity(const CConfig *config) final
Updates the components of the farfield velocity vector.
Definition CFVMFlowSolverBase.hpp:2244
su2double GetAllBound_CoPy_Mnt() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1803
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 GetSurface_CMx_Inv(unsigned short val_marker) const final
Provide the non dimensional x moment coefficient.
Definition CFVMFlowSolverBase.hpp:1441
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
su2double GetAllBound_CL_Inv() const final
Get the inviscid contribution to the lift coefficient.
Definition CFVMFlowSolverBase.hpp:1677
su2double GetYPlus(unsigned short val_marker, unsigned long val_vertex) const final
Get the y plus.
Definition CFVMFlowSolverBase.hpp:2446
su2double GetPressure_Inf(void) const final
Compute the pressure at the infinity.
Definition CFVMFlowSolverBase.hpp:1223
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
su2double GetAllBound_CD_Inv() const final
Get the inviscid contribution to the drag coefficient.
Definition CFVMFlowSolverBase.hpp:1683
su2double GetCL_Inv(unsigned short val_marker) const final
Provide the non dimensional lift coefficient (inviscid contribution).
Definition CFVMFlowSolverBase.hpp:1306
su2double GetConjugateHeatVariable(unsigned short val_marker, unsigned long val_vertex, unsigned short pos_var) const final
Set the conjugate heat variables.
Definition CFVMFlowSolverBase.hpp:2384
su2double GetSurface_CFy_Mnt(unsigned short val_marker) const final
Provide the non dimensional y force coefficient.
Definition CFVMFlowSolverBase.hpp:1499
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 GetInletTtotal(unsigned short val_marker, unsigned long val_vertex) const final
Value of the total temperature at an inlet boundary.
Definition CFVMFlowSolverBase.hpp:2153
su2double GetInletPtotal(unsigned short val_marker, unsigned long val_vertex) const final
Value of the total pressure at an inlet boundary.
Definition CFVMFlowSolverBase.hpp:2163
su2double GetCD_Inv(unsigned short val_marker) const final
Provide the non dimensional drag coefficient (inviscid contribution).
Definition CFVMFlowSolverBase.hpp:1313
su2double GetTotal_CFy() const final
Provide the total (inviscid + viscous) non dimensional y force coefficient.
Definition CFVMFlowSolverBase.hpp:1623
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
su2double GetAllBound_CEff_Visc() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1937
vector< su2activematrix > Inlet_FlowDir
Value of the Flow Direction.
Definition CFVMFlowSolverBase.hpp:183
su2double GetSurface_CEff(unsigned short val_marker) const final
Provide the non dimensional side-force coefficient.
Definition CFVMFlowSolverBase.hpp:1341
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 Set_NewSolution() final
Set the new solution variables to the current solution value for classical RK.
Definition CFVMFlowSolverBase.hpp:1044
void CompleteImplicitIteration(CGeometry *geometry, CSolver **, CConfig *config) final
Complete an implicit iteration.
Definition CFVMFlowSolverBase.inl:588
su2double GetAllBound_CD_Visc() const final
Get the inviscid contribution to the drag coefficient.
Definition CFVMFlowSolverBase.hpp:1925
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
su2double GetCPressure(unsigned short val_marker, unsigned long val_vertex) const final
Provide the Pressure coefficient.
Definition CFVMFlowSolverBase.hpp:2102
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
void SetTotal_CNearFieldOF(su2double val_cnearfieldpress) final
Set the value of the Near-Field pressure oefficient.
Definition CFVMFlowSolverBase.hpp:2052
su2double GetSurface_CD_Visc(unsigned short val_marker) const final
Provide the non dimensional drag coefficient.
Definition CFVMFlowSolverBase.hpp:1841
su2double GetAllBound_CFy_Visc() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1985
void SetSlidingStateStructure(unsigned short val_marker, unsigned long val_vertex) final
Allocates the final pointer of SlidingState depending on how many donor vertex donate to it....
Definition CFVMFlowSolverBase.hpp:2311
su2double GetSurface_CL_Visc(unsigned short val_marker) const final
Provide the non dimensional lift coefficient.
Definition CFVMFlowSolverBase.hpp:1834
su2double GetReferenceDynamicPressure() const final
Get the reference dynamic pressure, for Cp, Cf, etc.
Definition CFVMFlowSolverBase.hpp:1563
vector< su2activematrix > HeatConjugateVar
CHT variables for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:189
void SetTotal_CEquivArea(su2double val_equiv) final
Set the value of the Equivalent Area coefficient.
Definition CFVMFlowSolverBase.hpp:2046
su2double GetTotal_CoPx() const final
Provide the total (inviscid + viscous) non dimensional x moment coefficient.
Definition CFVMFlowSolverBase.hpp:1599
su2double GetTotal_CEquivArea() const final
Provide the total (inviscid + viscous) non dimensional Equivalent Area coefficient.
Definition CFVMFlowSolverBase.hpp:2070
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
su2double Gamma_Minus_One
Fluids's Gamma - 1.0 .
Definition CFVMFlowSolverBase.hpp:200
su2double GetTotal_CD() const final
Provide the total (inviscid + viscous) non dimensional drag coefficient.
Definition CFVMFlowSolverBase.hpp:1575
su2double GetAllBound_CL_Mnt() const final
Get the inviscid contribution to the lift coefficient.
Definition CFVMFlowSolverBase.hpp:1755
su2double GetWallShearStress(unsigned short val_marker, unsigned long val_vertex) const final
Get the wall shear stress.
Definition CFVMFlowSolverBase.hpp:2406
su2double Viscosity_Inf
Viscosity at the infinity.
Definition CFVMFlowSolverBase.hpp:77
su2double GetAllBound_CSF_Mnt() const final
Get the inviscid contribution to the sideforce coefficient.
Definition CFVMFlowSolverBase.hpp:1767
su2double GetSurface_CD_Inv(unsigned short val_marker) const final
Provide the non dimensional drag coefficient.
Definition CFVMFlowSolverBase.hpp:1397
su2double Total_MassFlowRate
Total Mass Flow Rate on monitored boundaries.
Definition CFVMFlowSolverBase.hpp:168
su2double GetSurface_CFy(unsigned short val_marker) const final
Provide the non dimensional y force coefficient.
Definition CFVMFlowSolverBase.hpp:1355
su2double GetCPressureTarget(unsigned short val_marker, unsigned long val_vertex) const final
Provide the Target Pressure coefficient.
Definition CFVMFlowSolverBase.hpp:2112
array< DummyGridColor<>, 1 > EdgeColoring
Definition CFVMFlowSolverBase.hpp:213
void SetInletPtotal(unsigned short val_marker, unsigned long val_vertex, su2double val_ptotal) final
Set the value of the total pressure at an inlet boundary.
Definition CFVMFlowSolverBase.hpp:2202
static constexpr size_t OMP_MAX_SIZE
Max chunk size for light point loops.
Definition CFVMFlowSolverBase.hpp:53
su2double GetCSF_Visc(unsigned short val_marker) const final
Get the non dimensional sideforce coefficient (viscous contribution).
Definition CFVMFlowSolverBase.hpp:2005
su2double GetSurface_CFz_Inv(unsigned short val_marker) const final
Provide the non dimensional z force coefficient.
Definition CFVMFlowSolverBase.hpp:1434
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
void UpdateJacobian(unsigned long iEdge, unsigned long iPoint, unsigned long jPoint, const CNumerics::ResidualType<> &conv, const CNumerics::ResidualType<> &visc)
Update the Jacobian for one edge with the fused convective and viscous contributions.
Definition CFVMFlowSolverBase.hpp:369
su2double GetAllBound_CEff_Mnt() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1773
su2double GetTotal_CMz() const final
Provide the total (inviscid + viscous) non dimensional z moment coefficient.
Definition CFVMFlowSolverBase.hpp:1593
su2double GetSurface_CMy_Inv(unsigned short val_marker) const final
Provide the non dimensional y moment coefficient.
Definition CFVMFlowSolverBase.hpp:1448
su2double Mach_Inf
Mach number at the infinity.
Definition CFVMFlowSolverBase.hpp:69
void PrepareImplicitIteration_impl(DiagonalPrecond &preconditioner, CGeometry *geometry, CConfig *config)
Generic implementation to prepare an implicit iteration with an optional preconditioner applied to th...
Definition CFVMFlowSolverBase.hpp:964
bool space_centered
True if space centered scheme used.
Definition CFVMFlowSolverBase.hpp:196
su2double GetTotal_CoPy() const final
Provide the total (inviscid + viscous) non dimensional y moment coefficient.
Definition CFVMFlowSolverBase.hpp:1605
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
void SetTotal_HeatFluxDiff(su2double val_heat) final
Set the value of the Equivalent Area coefficient.
Definition CFVMFlowSolverBase.hpp:2040
su2double GetSurface_CSF_Visc(unsigned short val_marker) const final
Provide the non dimensional side-force coefficient.
Definition CFVMFlowSolverBase.hpp:1848
su2double GetHeatFlux(unsigned short val_marker, unsigned long val_vertex) const final
Get the heat flux.
Definition CFVMFlowSolverBase.hpp:2416
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
su2double GetSurface_CMx(unsigned short val_marker) const final
Provide the non dimensional x moment coefficient.
Definition CFVMFlowSolverBase.hpp:1369
su2double GetSurface_CMz(unsigned short val_marker) const final
Provide the non dimensional z moment coefficient.
Definition CFVMFlowSolverBase.hpp:1383
su2double GetAllBound_CoPz_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1731
VariableType * nodes
The highest level in the variable hierarchy the DERIVED solver can safely use.
Definition CFVMFlowSolverBase.hpp:231
void SetCharacPrimVar(unsigned short val_marker, unsigned long val_vertex, unsigned short val_var, su2double val_value) final
Value of the characteristic variables at the boundaries.
Definition CFVMFlowSolverBase.hpp:2142
su2double GetSurface_CFx_Visc(unsigned short val_marker) const final
Provide the non dimensional x force coefficient.
Definition CFVMFlowSolverBase.hpp:1866
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
void SetTotal_MaxHeatFlux(su2double val_Total_MaxHeat) final
Store the total heat load.
Definition CFVMFlowSolverBase.hpp:2094
void SetConjugateHeatVariable(unsigned short val_marker, unsigned long val_vertex, unsigned short pos_var, su2double relaxation_factor, su2double val_var) final
Set the conjugate heat variables.
Definition CFVMFlowSolverBase.hpp:2372
su2double GetSurface_CEff_Visc(unsigned short val_marker) const final
Provide the non dimensional side-force coefficient.
Definition CFVMFlowSolverBase.hpp:1857
su2double GetSurface_CSF(unsigned short val_marker) const final
Provide the non dimensional side-force coefficient.
Definition CFVMFlowSolverBase.hpp:1334
su2double GetVelocity_Inf(unsigned short val_dim) const final
Get the velocity at the infinity.
Definition CFVMFlowSolverBase.hpp:1236
vector< vector< su2double > > YPlus
Yplus for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:192
su2double GetAllBound_CMx_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1701
void SetTotal_CQ(su2double val_Total_CQ) final
Store the total (inviscid + viscous) non dimensional torque coefficient.
Definition CFVMFlowSolverBase.hpp:1653
AeroCoeffsArray SurfaceMntCoeff
Inviscid momentum contributions for each monitoring boundary.
Definition CFVMFlowSolverBase.hpp:152
su2double Energy_Inf
Energy at the infinity.
Definition CFVMFlowSolverBase.hpp:71
void SetnSlidingStates(unsigned short val_marker, unsigned long val_vertex, int value) final
Set the number of outer state for fluid interface nodes.
Definition CFVMFlowSolverBase.hpp:2339
virtual CNumerics::ResidualType Viscous_Residual(unsigned long iEdge, CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config)
Compute the viscous contribution for a particular edge.
Definition CFVMFlowSolverBase.hpp:351
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
su2double GetAllBound_CMy_Mnt() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1785
su2double GetAllBound_CFz_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1749
su2double DynamicPressureRef
Reference dynamic pressure.
Definition CFVMFlowSolverBase.hpp:163
void SetPressure_Inf(su2double p_inf) final
Set the freestream pressure.
Definition CFVMFlowSolverBase.hpp:1263
su2double GetAllBound_CoPx_Mnt() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1797
su2double GetSurface_CSF_Inv(unsigned short val_marker) const final
Provide the non dimensional side-force coefficient.
Definition CFVMFlowSolverBase.hpp:1404
su2double GetSurface_CMz_Inv(unsigned short val_marker) const final
Provide the non dimensional z moment coefficient.
Definition CFVMFlowSolverBase.hpp:1455
su2double GetOmega_Max(void) const final
Get the max Omega.
Definition CFVMFlowSolverBase.hpp:1293
su2double GetCEff_Inv(unsigned short val_marker) const final
Provide the non dimensional efficiency coefficient (inviscid contribution).
Definition CFVMFlowSolverBase.hpp:1541
AeroCoeffsArray SurfaceInvCoeff
Inviscid pressure contributions for each monitoring boundary.
Definition CFVMFlowSolverBase.hpp:148
AeroCoeffsArray ViscCoeff
Viscous contributions for each boundary.
Definition CFVMFlowSolverBase.hpp:155
su2double GetAllBound_CFz_Mnt() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1827
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
su2double GetSurface_CFx_Inv(unsigned short val_marker) const final
Provide the non dimensional x force coefficient.
Definition CFVMFlowSolverBase.hpp:1420
AeroCoeffs AllBoundInvCoeff
Total pressure contribution for all the boundaries.
Definition CFVMFlowSolverBase.hpp:149
su2double GetCSF_Inv(unsigned short val_marker) const final
Provide the non dimensional sideforce coefficient (inviscid contribution).
Definition CFVMFlowSolverBase.hpp:1534
su2double GetTotal_CpDiff() const final
Provide the total (inviscid + viscous) non dimensional Equivalent Area coefficient.
Definition CFVMFlowSolverBase.hpp:2058
su2double GetSurface_CMx_Mnt(unsigned short val_marker) const final
Provide the non dimensional x moment coefficient.
Definition CFVMFlowSolverBase.hpp:1513
su2double GetAllBound_CFy_Mnt() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1821
su2double GetSurface_CMy_Visc(unsigned short val_marker) const final
Provide the non dimensional y moment coefficient.
Definition CFVMFlowSolverBase.hpp:1902
void SetDensity_Inf(su2double rho_inf) final
Set the freestream temperature.
Definition CFVMFlowSolverBase.hpp:1275
su2double * GetVelocity_Inf(void) final
Get the velocity at the infinity.
Definition CFVMFlowSolverBase.hpp:1242
su2double GetSurface_CMz_Visc(unsigned short val_marker) const final
Provide the non dimensional z moment coefficient.
Definition CFVMFlowSolverBase.hpp:1911
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
su2double GetAllBound_CFx_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1737
su2double GetSurface_HF_Visc(unsigned short val_marker) const final
Get the total heat flux.
Definition CFVMFlowSolverBase.hpp:2019
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.
su2double GetTke_Inf(void) const final
Get the turbulent kinetic energy at the infinity.
Definition CFVMFlowSolverBase.hpp:1287
su2double GetSurface_CFz_Mnt(unsigned short val_marker) const final
Provide the non dimensional z force coefficient.
Definition CFVMFlowSolverBase.hpp:1506
vector< su2double > Surface_HF_Visc
Total (integrated) heat flux for each monitored surface.
Definition CFVMFlowSolverBase.hpp:174
su2double GetHeatFluxTarget(unsigned short val_marker, unsigned long val_vertex) const final
Get the skin friction coefficient.
Definition CFVMFlowSolverBase.hpp:2426
su2double Enthalpy_Inf
Enthalpy at the infinity.
Definition CFVMFlowSolverBase.hpp:73
su2double GetSurface_CMz_Mnt(unsigned short val_marker) const final
Provide the non dimensional z moment coefficient.
Definition CFVMFlowSolverBase.hpp:1527
su2double GetTotal_CT() const final
Provide the total (inviscid + viscous) non dimensional thrust coefficient.
Definition CFVMFlowSolverBase.hpp:1635
su2double Global_Delta_Time
Time-step for TIME_STEPPING time marching strategy.
Definition CFVMFlowSolverBase.hpp:83
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
su2double GetAllBound_CSF_Visc() const final
Get the inviscid contribution to the sideforce coefficient.
Definition CFVMFlowSolverBase.hpp:1931
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
su2double GetSurface_CMy_Mnt(unsigned short val_marker) const final
Provide the non dimensional y moment coefficient.
Definition CFVMFlowSolverBase.hpp:1520
su2double GetAllBound_CFz_Visc() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1991
vector< su2double > CNearFieldOF_Inv
Near field pressure (inviscid) for each boundary.
Definition CFVMFlowSolverBase.hpp:173
su2double GetSurface_MaxHF_Visc(unsigned short val_marker) const final
Get the maximum (per surface) heat flux.
Definition CFVMFlowSolverBase.hpp:2026
su2double GetTotal_CFx() const final
Provide the total (inviscid + viscous) non dimensional x force coefficient.
Definition CFVMFlowSolverBase.hpp:1617
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 GetSurface_CL_Mnt(unsigned short val_marker) const final
Provide the non dimensional lift coefficient.
Definition CFVMFlowSolverBase.hpp:1462
su2double GetAllBound_CMz_Mnt() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1791
void SetTotal_CpDiff(su2double val_pressure) final
Set the value of the Equivalent Area coefficient.
Definition CFVMFlowSolverBase.hpp:2034
void SetInletTtotal(unsigned short val_marker, unsigned long val_vertex, su2double val_ttotal) final
Set the value of the total temperature at an inlet boundary.
Definition CFVMFlowSolverBase.hpp:2185
su2double Total_CpDiff
Total Equivalent Area coefficient for all the boundaries.
Definition CFVMFlowSolverBase.hpp:165
su2double GetTotal_HeatFlux() const final
Provide the total heat load.
Definition CFVMFlowSolverBase.hpp:2076
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
su2double GetDensity_Energy_Inf(void) const final
Compute the density multiply by energy at the infinity.
Definition CFVMFlowSolverBase.hpp:1257
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
su2double GetAllBound_CMx_Visc() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1943
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
su2double GetAllBound_CoPz_Mnt() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1809
void SetTotal_CD(su2double val_Total_CD) final
Store the total (inviscid + viscous) non dimensional drag coefficient.
Definition CFVMFlowSolverBase.hpp:1665
su2double GetInletFlowDir(unsigned short val_marker, unsigned long val_vertex, unsigned short val_dim) const final
A component of the unit vector representing the flow direction at an inlet boundary.
Definition CFVMFlowSolverBase.hpp:2174
void SetTotal_HeatFlux(su2double val_Total_Heat) final
Store the total heat load.
Definition CFVMFlowSolverBase.hpp:2088
su2double GetAllBound_CFx_Visc() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1979
void SetSlidingState(unsigned short val_marker, unsigned long val_vertex, unsigned short val_state, unsigned long donor_index, su2double component) final
Set the outer state for fluid interface nodes.
Definition CFVMFlowSolverBase.hpp:2328
su2double GetAllBound_CSF_Inv() const final
Get the inviscid contribution to the sideforce coefficient.
Definition CFVMFlowSolverBase.hpp:1689
vector< vector< su2double > > HeatFlux
Heat transfer coefficient for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:184
vector< su2matrix< su2double * > > SlidingState
Definition CFVMFlowSolverBase.hpp:204
su2double GetAllBound_CoPy_Visc() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1967
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
su2double GetSurface_CEff_Inv(unsigned short val_marker) const final
Provide the non dimensional side-force coefficient.
Definition CFVMFlowSolverBase.hpp:1411
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
su2double GetTotal_CoPz() const final
Provide the total (inviscid + viscous) non dimensional z moment coefficient.
Definition CFVMFlowSolverBase.hpp:1611
su2double GetSurface_CFx_Mnt(unsigned short val_marker) const final
Provide the non dimensional x force coefficient.
Definition CFVMFlowSolverBase.hpp:1492
su2double GetAllBound_CoPx_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1719
vector< su2activematrix > CharacPrimVar
Value of the characteristic variables at each boundary.
Definition CFVMFlowSolverBase.hpp:186
su2double GetAllBound_CoPz_Visc() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1973
su2double GetTotal_CFz() const final
Provide the total (inviscid + viscous) non dimensional z force coefficient.
Definition CFVMFlowSolverBase.hpp:1629
su2double GetEddyViscWall(unsigned short val_marker, unsigned long val_vertex) const final
Get the eddy viscosity at the wall (wall functions).
Definition CFVMFlowSolverBase.hpp:2466
su2double GetSurface_CMx_Visc(unsigned short val_marker) const final
Provide the non dimensional x moment coefficient.
Definition CFVMFlowSolverBase.hpp:1893
su2double GetSurface_CFz_Visc(unsigned short val_marker) const final
Provide the non dimensional z force coefficient.
Definition CFVMFlowSolverBase.hpp:1884
su2double GetTotal_CEff() const final
Provide the total (inviscid + viscous) non dimensional efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1553
su2double GetSurface_CFx(unsigned short val_marker) const final
Provide the non dimensional x force coefficient.
Definition CFVMFlowSolverBase.hpp:1348
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
su2double GetAllBound_CMx_Mnt() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1779
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 Tke_Inf
Turbulent kinetic energy at the infinity.
Definition CFVMFlowSolverBase.hpp:78
su2double GetSurface_CSF_Mnt(unsigned short val_marker) const final
Provide the non dimensional side-force coefficient.
Definition CFVMFlowSolverBase.hpp:1476
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
su2double GetAllBound_CMz_Visc() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1955
void SetInletFlowDir(unsigned short val_marker, unsigned long val_vertex, unsigned short val_dim, su2double val_flowdir) final
Set a component of the unit vector representing the flow direction at an inlet boundary.
Definition CFVMFlowSolverBase.hpp:2220
void BC_Euler_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) final
Impose via the residual the Euler wall boundary condition.
Definition CFVMFlowSolverBase.hpp:1154
su2double GetUTau(unsigned short val_marker, unsigned long val_vertex) const final
Get the u_tau .
Definition CFVMFlowSolverBase.hpp:2456
void Explicit_Iteration_impl(ResidualPrecond &preconditioner, CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep)
Generic implementation of explicit iterations with a preconditioner.
Definition CFVMFlowSolverBase.hpp:853
su2double GetModVelocity_Inf(void) const final
Compute 2-norm of the velocity at the infinity.
Definition CFVMFlowSolverBase.hpp:1217
~CFVMFlowSolverBase()
Destructor.
Definition CFVMFlowSolverBase.inl:372
unsigned long omp_chunk_size
Chunk size used in light point loops.
Definition CFVMFlowSolverBase.hpp:56
su2double GetAllBound_CD_Mnt() const final
Get the inviscid contribution to the drag coefficient.
Definition CFVMFlowSolverBase.hpp:1761
su2double GetTotal_CL() const final
Provide the total (inviscid + viscous) non dimensional lift coefficient.
Definition CFVMFlowSolverBase.hpp:1569
su2double GetSurface_CL_Inv(unsigned short val_marker) const final
Provide the non dimensional lift coefficient.
Definition CFVMFlowSolverBase.hpp:1390
su2double GetSurface_CFz(unsigned short val_marker) const final
Provide the non dimensional z force coefficient.
Definition CFVMFlowSolverBase.hpp:1362
AeroCoeffsArray InvCoeff
Inviscid pressure contributions for each boundary.
Definition CFVMFlowSolverBase.hpp:147
su2double GetAllBound_CMy_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1707
const su2activevector * GetEdgeMassFluxes() const final
Get the mass fluxes across the edges (computed and stored during the discretization of convective flu...
Definition CFVMFlowSolverBase.hpp:2473
su2double GetSurface_CL(unsigned short val_marker) const final
Provide the non dimensional lift coefficient.
Definition CFVMFlowSolverBase.hpp:1320
static constexpr bool ReducerStrategy
Definition CFVMFlowSolverBase.hpp:215
void SetTotal_CT(su2double val_Total_CT) final
Store the total (inviscid + viscous) non dimensional thrust coefficient.
Definition CFVMFlowSolverBase.hpp:1641
su2double GetSurface_CD_Mnt(unsigned short val_marker) const final
Provide the non dimensional drag coefficient.
Definition CFVMFlowSolverBase.hpp:1469
void SetVelocity_Inf(unsigned short val_dim, su2double val_velocity) final
Set the velocity at infinity.
Definition CFVMFlowSolverBase.hpp:1249
void SetHeatFluxTarget(unsigned short val_marker, unsigned long val_vertex, su2double val_heat) final
Set the value of the target Pressure coefficient.
Definition CFVMFlowSolverBase.hpp:2436
void SetTime_Step_impl(const SoundSpeedFunc &soundSpeed, const LambdaViscFunc &lambdaVisc, CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned long Iteration)
Generic implementation to compute the time step based on CFL and conv/visc eigenvalues.
Definition CFVMFlowSolverBase.hpp:426
su2double Temperature_Inf
Temperature at the infinity.
Definition CFVMFlowSolverBase.hpp:72
su2double GetTotal_CSF() const final
Provide the total (inviscid + viscous) non dimensional sideforce coefficient.
Definition CFVMFlowSolverBase.hpp:1547
su2double GetAllBound_CoPy_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1725
su2double GetTotal_CQ() const final
Provide the total (inviscid + viscous) non dimensional torque coefficient.
Definition CFVMFlowSolverBase.hpp:1647
su2double GetAllBound_CFx_Mnt() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1815
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
su2double GetDensity_Inf(void) const final
Compute the density at the infinity.
Definition CFVMFlowSolverBase.hpp:1211
su2double GetSurface_CEff_Mnt(unsigned short val_marker) const final
Provide the non dimensional side-force coefficient.
Definition CFVMFlowSolverBase.hpp:1483
vector< vector< su2double > > WallShearStress
Wall Shear Stress for each boundary and vertex.
Definition CFVMFlowSolverBase.hpp:188
su2double GetAllBound_CEff_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1695
void SetTemperature_Inf(su2double t_inf) final
Set the freestream temperature.
Definition CFVMFlowSolverBase.hpp:1269
su2double GetCSkinFriction(unsigned short val_marker, unsigned long val_vertex, unsigned short val_dim) const final
Get the skin friction coefficient.
Definition CFVMFlowSolverBase.hpp:2395
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
CFVMFlowSolverBase(const CGeometry &geometry, const CConfig &config)
Protected constructor, this class is not directly instantiable.
Definition CFVMFlowSolverBase.hpp:241
void SetMax_Eigenvalue_impl(const SoundSpeedFunc &soundSpeed, CGeometry *geometry, const CConfig *config)
Compute the max eigenvalue, gemeric implementation.
Definition CFVMFlowSolverBase.hpp:672
su2double GetAllBound_CFy_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1743
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
CVariable * GetBaseClassPointerToNodes() final
Return nodes to allow CSolver::base_nodes to be set.
Definition CFVMFlowSolverBase.hpp:236
su2double GetSurface_CMy(unsigned short val_marker) const final
Provide the non dimensional y moment coefficient.
Definition CFVMFlowSolverBase.hpp:1376
void CommunicateInitialState(CGeometry *geometry, const CConfig *config)
Communicate the initial solver state.
Definition CFVMFlowSolverBase.inl:245
su2double GetAllBound_CMz_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1713
static constexpr size_t OMP_MIN_SIZE
Min chunk size for edge loops (max is color group size).
Definition CFVMFlowSolverBase.hpp:54
su2double GetAllBound_CoPx_Visc() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1961
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
su2double GetTotal_CMerit() const final
Provide the total (inviscid + viscous) non dimensional rotor Figure of Merit.
Definition CFVMFlowSolverBase.hpp:1659
void ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config) final
Implementation of implicit Euler iteration.
Definition CFVMFlowSolverBase.inl:618
su2double GetSurface_CFy_Visc(unsigned short val_marker) const final
Provide the non dimensional y force coefficient.
Definition CFVMFlowSolverBase.hpp:1875
void Explicit_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep)
Generic implementation of explicit iterations without preconditioner.
Definition CFVMFlowSolverBase.hpp:945
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 GetTotal_MaxHeatFlux() const final
Provide the total heat load.
Definition CFVMFlowSolverBase.hpp:2082
su2double GetSurface_CD(unsigned short val_marker) const final
Provide the non dimensional drag coefficient.
Definition CFVMFlowSolverBase.hpp:1327
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 Density_Inf
Density at the infinity.
Definition CFVMFlowSolverBase.hpp:70
su2double GetViscosity_Inf(void) const final
Compute the viscosity at the infinity.
Definition CFVMFlowSolverBase.hpp:1281
su2double GetSurface_CFy_Inv(unsigned short val_marker) const final
Provide the non dimensional y force coefficient.
Definition CFVMFlowSolverBase.hpp:1427
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
su2double GetAllBound_CMy_Visc() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFVMFlowSolverBase.hpp:1949
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
su2double Gamma
Fluid's Gamma constant (ratio of specific heats).
Definition CFVMFlowSolverBase.hpp:199
su2double GetTotal_HeatFluxDiff() const final
Provide the total (inviscid + viscous) non dimensional Equivalent Area coefficient.
Definition CFVMFlowSolverBase.hpp:2064
su2double GetCL_Visc(unsigned short val_marker) const final
Get the non dimensional lift coefficient (viscous contribution).
Definition CFVMFlowSolverBase.hpp:1998
void ComputeVorticityAndStrainMag(const CConfig &config, const CGeometry *geometry, unsigned short iMesh)
Evaluate the vorticity and strain rate magnitude.
Definition CFVMFlowSolverBase.inl:644
su2double GetTemperature_Inf(void) const
Get the temperature value at infinity.
Definition CFVMFlowSolverBase.hpp:1229
su2double GetAeroCoeffsReferenceForce() const final
Get the reference force used to compute CL, CD, etc.
Definition CFVMFlowSolverBase.hpp:1558
su2double Omega_Max
Maximum Omega.
Definition CFVMFlowSolverBase.hpp:81
su2double Global_Delta_UnstTimeND
Unsteady time step for the dual time strategy.
Definition CFVMFlowSolverBase.hpp:84
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 SetCentered_Dissipation_Sensor_impl(const SensVarFunc &sensVar, CGeometry *geometry, const CConfig *config)
Compute the dissipation sensor for centered schemes.
Definition CFVMFlowSolverBase.hpp:773
su2double GetTotal_CMy() const final
Provide the total (inviscid + viscous) non dimensional y moment coefficient.
Definition CFVMFlowSolverBase.hpp:1587
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
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
CPoint * nodes
Node vector (dual grid information).
Definition CGeometry.hpp:253
CVertex *** vertex
Boundary Vertex vector (dual grid information).
Definition CGeometry.hpp:255
unsigned short GetnMarker() const
Get number of markers.
Definition CGeometry.hpp:623
CEdge * edges
Edge vector (dual grid information).
Definition CGeometry.hpp:254
Base class to define the interface.
Definition CNumericsSIMD.hpp:50
Class for defining the numerical methods.
Definition CNumerics.hpp:48
const CCompressedSparsePatternUL & GetPoints() const
Get the entire point adjacency information in compressed format (CSR).
Definition CPoint.hpp:241
su2double & GetPeriodicVolume(unsigned long iPoint)
Get the missing component of area or volume for a control volume on a periodic marker.
Definition CPoint.hpp:579
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
bool GetDomain(unsigned long iPoint) const
For parallel computation, its indicates if a point must be computed or not.
Definition CPoint.hpp:423
bool GetPhysicalBoundary(unsigned long iPoint) const
Provides information about if a point belong to the physical boundaries (without MPI).
Definition CPoint.hpp:367
su2double & GetVolume(unsigned long iPoint)
Get area or volume of the control volume.
Definition CPoint.hpp:557
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
Definition CSolver.hpp:71
CSysMatrix< su2mixedfloat > Jacobian
Complete sparse Jacobian structure for implicit computations.
Definition CSolver.hpp:201
vector< unsigned long > nVertex
Store nVertex at each marker for deallocation.
Definition CSolver.hpp:146
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
unsigned short nDim
Number of dimensions of the problem.
Definition CSolver.hpp:90
su2double Min_Delta_Time
Minimum value of the delta time for all the control volumes.
Definition CSolver.hpp:94
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
int size
MPI Size.
Definition CSolver.hpp:76
CSysVector< su2double > LinSysSol
vector to store iterative solution of implicit linear system.
Definition CSolver.hpp:199
static void ResidualReductions_PerThread(unsigned long iPoint, unsigned short iVar, su2double res, su2double *resRMS, su2double *resMax, unsigned long *idxMax)
"Add" residual at (iPoint,iVar) to residual variables local to the thread.
Definition CSolver.hpp:4439
unsigned short MGLevel
Multigrid level of this solver object.
Definition CSolver.hpp:78
virtual void Viscous_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep)
A virtual member.
Definition CSolver.hpp:1641
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
su2double Max_Delta_Time
Maximum value of the delta time for all the control volumes.
Definition CSolver.hpp:93
unsigned long nPointDomain
Number of points of the computational grid.
Definition CSolver.hpp:92
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
unsigned short nPrimVar
Number of primitive variables of the problem.
Definition CSolver.hpp:86
bool dynamic_grid
Flag that determines whether the grid is dynamic (moving or deforming + grid velocities).
Definition CSolver.hpp:153
su2activevector jPoint_UndLapl
Auxiliary variable for the undivided Laplacians.
Definition CSolver.hpp:138
su2double * Residual
Auxiliary nVar vector.
Definition CSolver.hpp:112
void ResidualReductions_FromAllThreads(const CGeometry *geometry, const CConfig *config, const su2double *resRMS, const su2double *resMax, const unsigned long *idxMax)
"Add" local residual variables of all threads to compute global residual variables.
Definition CSolver.hpp:4452
unsigned long nMarker
Total number of markers using the grid information.
Definition CSolver.hpp:145
bool adjoint
Boolean to determine whether solver is initialized as a direct or an adjoint solver.
Definition CSolver.hpp:77
void SetVal2Diag(unsigned long block_i, OtherType val_matrix)
Sets the specified value to the diagonal of the (i, i) subblock of the matrix-by-blocks structure.
Definition CSysMatrix.hpp:1261
void SetDiagonalAsColumnSum()
Sets the diagonal entries of the matrix as the sum of the blocks in the corresponding column.
Definition CSysMatrix.cpp:1677
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 UpdateBlocks(unsigned long iEdge, unsigned long iPoint, unsigned long jPoint, const MatrixType &block_i, const MatrixType &block_j, OtherType scale=1)
Update 4 blocks ii, ij, ji, jj (add to i* sub from j*).
Definition CSysMatrix.hpp:903
void SetBlocks(simd::Array< I, N > iEdge, simd::Array< I, N > iPoint, simd::Array< I, N > jPoint, const MatTypeSIMD &block_i, const MatTypeSIMD &block_j, simd::Array< F, N > mask=1)
SIMD version, does the update for multiple edges and points.
Definition CSysMatrix.hpp:960
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
Class for holding and manipulating vectors needed by linear solvers.
Definition CSysVector.hpp:195
ScalarType * GetBlock(unsigned long iPoint)
Get pointer to a block.
Definition CSysVector.hpp:600
Main class for defining the variables.
Definition CVariable.hpp:50
void GetNormal(su2double *val_normal) const override
Copy the the normal vector of a face.
Definition CVertex.hpp:94
unsigned long GetNode() const
Get the node of the vertex.
Definition CVertex.hpp:70
#define FORCEINLINE
Definition code_config.hpp:44
passivedouble su2double
Definition code_config.hpp:181
T DotProduct(Int nDim, const T *a, const T *b)
Definition geometry_toolbox.hpp:65
T SquaredNorm(Int nDim, const T *a)
Definition geometry_toolbox.hpp:73
T Norm(Int nDim, const T *a)
Definition geometry_toolbox.hpp:79
FORCEINLINE ARRAY_T sqrt(const ARRAY_T &x)
Definition special_vectorization.hpp:116
#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
void ResumePreaccumulation(bool wasActive)
Resume the use of preaccumulation.
Definition ad_structure.hpp:399
void EndNoSharedReading()
End the "no shared reading" adjoint evaluation mode.
Definition ad_structure.hpp:409
#define BEGIN_SU2_OMP_SAFE_GLOBAL_ACCESS
Definition omp_structure.hpp:187
#define END_SU2_OMP_FOR
Definition omp_structure.hpp:158
#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
void atomicMin(const T &local, T &shared)
Definition omp_structure.hpp:322
#define SU2_OMP_FOR_DYN(CHUNK)
Definition omp_structure.hpp:150
void atomicAdd(T rhs, T &lhs)
Atomically update a (shared) lhs value with a (local) rhs value.
Definition omp_structure.hpp:263
#define SU2_OMP_SAFE_GLOBAL_ACCESS(...)
Definition omp_structure.hpp:197
void atomicMax(const T &local, T &shared)
Definition omp_structure.hpp:305
#define SU2_OMP_FOR_STAT(CHUNK)
Definition omp_structure.hpp:151
const int MASTER_NODE
Master node for MPI parallelization.
Definition option_structure.hpp:112
@ EULER_IMPLICIT
Implicit Euler time integration definition.
Definition option_structure.hpp:1711
@ CLASSICAL_RK4_EXPLICIT
Classical RK4 time integration definition.
Definition option_structure.hpp:1712
@ RUNGE_KUTTA_EXPLICIT
Explicit Runge-Kutta time integration definition.
Definition option_structure.hpp:1709
@ EULER_EXPLICIT
Explicit Euler time integration definition.
Definition option_structure.hpp:1710
@ MSW
Modified Steger-Warming method.
const unsigned int MESH_0
Definition of the finest grid level.
Definition option_structure.hpp:88
@ V
Menter k-w SST model with vorticity production terms.
constexpr passivedouble PI_NUMBER
Pi number (not using M_PI to avoid Windows issues).
Definition option_structure.hpp:108
@ 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).
@ TIME_STEPPING
Use a time stepping strategy for unsteady computations.
@ COMM_FULL
Perform all MPI communications.
Definition option_structure.hpp:2912
@ INTERNAL_BOUNDARY
Internal Boundary definition.
Definition option_structure.hpp:1840
@ EULER_WALL
Boundary Euler wall definition.
Definition option_structure.hpp:1815
@ SYMMETRY_PLANE
Boundary symmetry plane definition.
Definition option_structure.hpp:1817
@ NEARFIELD_BOUNDARY
Near-Field boundary definition.
Definition option_structure.hpp:1821
@ PERIODIC_BOUNDARY
Periodic boundary definition.
Definition option_structure.hpp:1820
@ PERIODIC_SENSOR
Dissipation sensor communication (periodic only).
Definition option_structure.hpp:2850
@ PERIODIC_MAX_EIG
Maximum eigenvalue communication (periodic only).
Definition option_structure.hpp:2849
@ MAX_EIGENVALUE
Maximum eigenvalue communication.
@ SENSOR
Dissipation sensor communication.
@ SOLUTION
Conservative solution communication.
Auxilary types to store common aero coefficients (avoids repeating oneself so much).
Definition CFVMFlowSolverBase.hpp:91
su2double * CQ
Torque coefficient.
Definition CFVMFlowSolverBase.hpp:106
AeroCoeffsArray(int size=0)
Definition CFVMFlowSolverBase.hpp:127
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
Scalar version of the coefficients type.
Definition CFVMFlowSolverBase.hpp:137
su2double CFz
Definition CFVMFlowSolverBase.hpp:138
su2double CFx
Definition CFVMFlowSolverBase.hpp:138
su2double CMerit
Definition CFVMFlowSolverBase.hpp:138
su2double CMy
Definition CFVMFlowSolverBase.hpp:138
su2double CMx
Definition CFVMFlowSolverBase.hpp:138
su2double CoPx
Definition CFVMFlowSolverBase.hpp:138
su2double CEff
Definition CFVMFlowSolverBase.hpp:138
su2double CT
Definition CFVMFlowSolverBase.hpp:138
su2double CQ
Definition CFVMFlowSolverBase.hpp:138
su2double CSF
Definition CFVMFlowSolverBase.hpp:138
su2double CD
Definition CFVMFlowSolverBase.hpp:138
su2double CoPz
Definition CFVMFlowSolverBase.hpp:138
AeroCoeffs()
Definition CFVMFlowSolverBase.hpp:144
void setZero()
Definition CFVMFlowSolverBase.hpp:140
su2double CFy
Definition CFVMFlowSolverBase.hpp:138
su2double CoPy
Definition CFVMFlowSolverBase.hpp:138
su2double CMz
Definition CFVMFlowSolverBase.hpp:138
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
const Matrix_t jacobian_i
Definition CNumerics.hpp:220
const Matrix_t jacobian_j
Definition CNumerics.hpp:221
#define SU2_ZONE_SCOPED
Definition tracy_structure.hpp:39