Documentation 6b54b78464
Loading...
Searching...
No Matches
CVariable.hpp
Go to the documentation of this file.
1/*!
2 * \file CVariable.hpp
3 * \brief Declaration and inlines of the parent class for defining problem
4 variables, function definitions in file <i>CVariable.cpp</i>.
5 All variables are children of at least this class.
6 * \author F. Palacios, T. Economon
7 * \version 8.5.0 "Harrier"
8 *
9 * SU2 Project Website: https://su2code.github.io
10 *
11 * The SU2 Project is maintained by the SU2 Foundation
12 * (http://su2foundation.org)
13 *
14 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
15 *
16 * SU2 is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License as published by the Free Software Foundation; either
19 * version 2.1 of the License, or (at your option) any later version.
20 *
21 * SU2 is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
25 *
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
28 */
29
30#pragma once
31
32#include "../../../Common/include/parallelization/mpi_structure.hpp"
33
34#include <cmath>
35#include <iostream>
36#include <cstdlib>
37
38#include "../../../Common/include/CConfig.hpp"
39#include "../../../Common/include/containers/container_decorators.hpp"
40
41class CFluidModel;
42class CNEMOGas;
43
44/*!
45 * \class CVariable
46 * \ingroup Variable
47 * \brief Main class for defining the variables.
48 * \author F. Palacios
49 */
50class CVariable {
51protected:
54
55 MatrixType Solution; /*!< \brief Solution of the problem. */
56 MatrixType Solution_Old; /*!< \brief Old solution of the problem R-K. */
57
58 MatrixType UserDefinedSource; /*!< \brief User Defined Source of the problem. */
59
60 MatrixType External; /*!< \brief External (outer) contribution in discrete adjoint multizone problems. */
61
62 su2vector<bool> Non_Physical; /*!< \brief Non-physical points in the solution (force first order). */
64 Non_Physical_Counter; /*!< \brief Number of consecutive iterations that a point has been treated first-order.
65 After a specified number of successful reconstructions, the point can be returned to second-order. */
66
67 VectorType UnderRelaxation; /*!< \brief Value of the under-relaxation parameter local to the control volume. */
68 VectorType LocalCFL; /*!< \brief Value of the CFL number local to the control volume. */
69
70 MatrixType Solution_time_n; /*!< \brief Solution of the problem at time n for dual-time stepping technique. */
71 MatrixType Solution_time_n1; /*!< \brief Solution of the problem at time n-1 for dual-time stepping technique. */
72 VectorType Delta_Time; /*!< \brief Time step. */
73
74 CVectorOfMatrix Gradient; /*!< \brief Gradient of the solution of the problem. */
75 C3DDoubleMatrix Rmatrix; /*!< \brief Geometry-based matrix for weighted least squares gradient calculations. */
76
77 MatrixType Limiter; /*!< \brief Limiter of the solution of the problem. */
78 MatrixType Solution_Max; /*!< \brief Max solution for limiter computation. */
79 MatrixType Solution_Min; /*!< \brief Min solution for limiter computation. */
80
81 MatrixType AuxVar; /*!< \brief Auxiliary variable for gradient computation. */
82 CVectorOfMatrix Grad_AuxVar; /*!< \brief Gradient of the auxiliary variables of the problem. */
83
84 VectorType Max_Lambda_Inv; /*!< \brief Maximun inviscid eingenvalue. */
85 VectorType Max_Lambda_Visc; /*!< \brief Maximun viscous eingenvalue. */
86 VectorType Lambda; /*!< \brief Value of the eingenvalue. */
87
88 VectorType Sensor; /*!< \brief Pressure sensor for high order central scheme and Roe dissipation. */
89 MatrixType Undivided_Laplacian; /*!< \brief Undivided laplacian of the solution. */
90
91 MatrixType Res_TruncError; /*!< \brief Truncation error for multigrid cycle. */
92 MatrixType Residual_Old; /*!< \brief Auxiliary structure for residual smoothing. */
93 MatrixType Residual_Sum; /*!< \brief Auxiliary structure for residual smoothing. */
94
95 MatrixType Solution_BGS_k; /*!< \brief Old solution container for BGS iterations. */
96
97 su2matrix<AD::Identifier> AD_InputIndex; /*!< \brief Indices of Solution variables in the adjoint vector before solver iteration. */
98 su2matrix<AD::Identifier> AD_OutputIndex; /*!< \brief Indices of Solution variables in the adjoint vector after solver iteration. */
99
100 VectorType SolutionExtra; /*!< \brief Stores adjoint solution for extra solution variables.
101 Currently only streamwise periodic pressure-drop for massflow prescribed flows. */
102 VectorType ExternalExtra; /*!< \brief External storage for the adjoint value (i.e. for the OF mainly */
103
104 VectorType SolutionExtra_BGS_k; /*!< \brief Intermediate storage, enables cross term extraction as that is also pushed to Solution. */
105
106 unsigned long nPoint = 0; /*!< \brief Number of points in the domain. */
107 unsigned long nDim = 0; /*!< \brief Number of dimension of the problem. */
108 unsigned long nVar = 0; /*!< \brief Number of variables of the problem. */
109 unsigned long nPrimVar = 0; /*!< \brief Number of primitive variables. */
110 unsigned long nPrimVarGrad = 0; /*!< \brief Number of primitives for which a gradient is computed. */
111 unsigned long nSecondaryVar = 0; /*!< \brief Number of secondary variables. */
112 unsigned long nAuxVar = 0; /*!< \brief Number of auxiliary variables. */
113
114 /*!< \brief Handed out by the base implementations of the container accessors of fields only
115 * some models have, e.g. GetF1blending; a solver that has no such field never reads it. */
116 inline static const VectorType EmptyVector{};
117
118 /*--- Only allow default construction by derived classes. ---*/
119 CVariable() = default;
120
121 inline static void AssertOverride() {
122 assert(false && "A base method of CVariable was used, but it should have been overridden by the derived class.");
123 }
124
125 void RegisterContainer(bool input, su2activematrix& variable, su2matrix<AD::Identifier>* ad_index = nullptr) {
126 const auto nPoint = variable.rows();
128 for (unsigned long iPoint = 0; iPoint < nPoint; ++iPoint) {
129 for(unsigned long iVar=0; iVar<variable.cols(); ++iVar) {
130
131 if (input) AD::RegisterInput(variable(iPoint,iVar));
132 else AD::RegisterOutput(variable(iPoint,iVar));
133
134 if (ad_index) AD::SetIndex((*ad_index)(iPoint,iVar), variable(iPoint,iVar));
135 }
136 }
138 }
139
140 void RegisterContainer(bool input, su2activematrix& variable, su2matrix<AD::Identifier>& ad_index) {
141 RegisterContainer(input, variable, &ad_index);
142 }
143
144 void RegisterContainer(bool input, su2activevector& variable, su2vector<AD::Identifier>* ad_index = nullptr) {
145 const auto nPoint = variable.rows();
147 for (unsigned long iPoint = 0; iPoint < nPoint; ++iPoint) {
148
149 if (input) AD::RegisterInput(variable(iPoint));
150 else AD::RegisterOutput(variable(iPoint));
151
152 if (ad_index) AD::SetIndex((*ad_index)(iPoint), variable(iPoint));
153
154 }
156 }
157
158public:
159 /*--- Disable copy and assignment. ---*/
160 CVariable(const CVariable&) = delete;
161 CVariable(CVariable&&) = delete;
162 CVariable& operator= (const CVariable&) = delete;
164
165 /*!
166 * \overload
167 * \param[in] npoint - Number of points/nodes/vertices in the domain.
168 * \param[in] nvar - Number of variables of the problem.
169 * \param[in] config - Definition of the particular problem.
170 */
171 CVariable(unsigned long npoint, unsigned long nvar, const CConfig *config);
172
173 /*!
174 * \overload
175 * \param[in] npoint - Number of points/nodes/vertices in the domain.
176 * \param[in] ndim - Number of dimensions of the problem.
177 * \param[in] nvar - Number of variables of the problem.
178 * \param[in] config - Definition of the particular problem.
179 * \param[in] adjoint - True if derived class is an adjoint variable.
180 */
181 CVariable(unsigned long npoint, unsigned long ndim, unsigned long nvar, const CConfig *config, bool adjoint = false);
182
183 /*!
184 * \brief Destructor of the class.
185 */
186 virtual ~CVariable() = default;
187
188 /*!
189 * \brief Get the number of auxiliary variables.
190 */
191 inline unsigned long GetnAuxVar() const { return nAuxVar; }
192
193 /*!
194 * \brief Set the value of the solution, all variables.
195 * \param[in] iPoint - Point index.
196 * \param[in] solution - Solution of the problem.
197 */
198 inline void SetSolution(unsigned long iPoint, const su2double *solution) {
199 for (unsigned long iVar = 0; iVar < nVar; iVar++) Solution(iPoint,iVar) = solution[iVar];
200 }
201
202 /*!
203 * \brief Set the value of the solution, one variable.
204 * \param[in] iPoint - Point index.
205 * \param[in] iVar - Index of the variable.
206 * \param[in] solution - Value of the solution for the index <i>iVar</i>.
207 */
208 inline void SetSolution(unsigned long iPoint, unsigned long iVar, su2double solution) { Solution(iPoint,iVar) = solution; }
209
210 /*!
211 * \brief Add the value of the solution vector to the previous solution (incremental approach).
212 * \param[in] iPoint - Point index.
213 * \param[in] iVar - Index of the variable.
214 * \param[in] solution - Value of the solution for the index <i>iVar</i>.
215 */
216 inline void Add_DeltaSolution(unsigned long iPoint, unsigned long iVar, su2double solution) { Solution(iPoint,iVar) += solution; }
217
218 /*!
219 * \brief Set the value of the non-physical point.
220 * \param[in] iPoint - Point index.
221 * \param[in] value - identification of the non-physical point.
222 */
223 inline void SetNon_Physical(unsigned long iPoint, bool val_value) {
224 if (val_value) {
225 Non_Physical(iPoint) = val_value;
226 Non_Physical_Counter(iPoint) = 0;
227 } else {
228 Non_Physical_Counter(iPoint)++;
229 if (Non_Physical_Counter(iPoint) > 20) {
230 Non_Physical(iPoint) = false;
231 }
232 }
233 }
234
235 /*!
236 * \brief Get the value of the non-physical boolean at a point.
237 * \param[in] iPoint - Point index.
238 * \return Value of the Non-physical point.
239 */
240 inline bool GetNon_Physical(unsigned long iPoint) { return Non_Physical(iPoint); }
241
242 /*!
243 * \brief Get the solution.
244 * \param[in] iPoint - Point index.
245 * \param[in] iVar - Index of the variable.
246 * \return Value of the solution for the index <i>iVar</i>.
247 */
248 inline su2double GetSolution(unsigned long iPoint, unsigned long iVar) const { return Solution(iPoint,iVar); }
249
250 /*!
251 * \brief Get the old solution of the problem (Runge-Kutta method)
252 * \param[in] iPoint - Point index.
253 * \param[in] iVar - Index of the variable.
254 * \return Pointer to the old solution vector.
255 */
256 inline su2double GetSolution_Old(unsigned long iPoint, unsigned long iVar) const { return Solution_Old(iPoint,iVar); }
257
258 /*!
259 * \brief Set the value of the old solution.
260 * \param[in] iPoint - Point index.
261 * \param[in] solution_old - Pointer to the residual vector.
262 */
263 inline void SetSolution_Old(unsigned long iPoint, const su2double *solution_old) {
264 for (unsigned long iVar = 0; iVar < nVar; iVar++)
265 Solution_Old(iPoint,iVar) = solution_old[iVar];
266 }
267
268 /*!
269 * \overload
270 * \param[in] iVar - Index of the variable.
271 * \param[in] iPoint - Point index.
272 * \param[in] solution_old - Value of the old solution for the index <i>iVar</i>.
273 */
274 inline void SetSolution_Old(unsigned long iPoint, unsigned long iVar, su2double solution_old) { Solution_Old(iPoint,iVar) = solution_old; }
275
276 /*!
277 * \brief Set old variables to the value of the current variables.
278 */
279 void Set_OldSolution();
280
281 /*!
282 * \brief Set variables to the value of the old variables.
283 */
284 void Set_Solution();
285
286 /*!
287 * \brief Set the variable solution at time n.
288 */
289 void Set_Solution_time_n();
290
291 /*!
292 * \brief Set the variable solution at time n-1.
293 */
295
296 /*!
297 * \brief Set the variable solution at time n.
298 * \param[in] iPoint - Point index.
299 */
300 inline void Set_Solution_time_n(unsigned long iPoint, const su2double* val_sol) {
301 for (unsigned long iVar = 0; iVar < nVar; iVar++) Solution_time_n(iPoint,iVar) = val_sol[iVar];
302 }
303
304 /*!
305 * \brief Set the variable solution at time n-1.
306 * \param[in] iPoint - Point index.
307 */
308 inline void Set_Solution_time_n1(unsigned long iPoint, const su2double* val_sol) {
309 for (unsigned long iVar = 0; iVar < nVar; iVar++)
310 Solution_time_n1(iPoint,iVar) = val_sol[iVar];
311 }
312
313 /*!
314 * \brief Set the variable solution at time n.
315 * \param[in] iPoint - Point index.
316 */
317 inline void Set_Solution_time_n(unsigned long iPoint, unsigned long iVar, su2double val_sol) {
318 Solution_time_n(iPoint,iVar) = val_sol;
319 }
320
321 /*!
322 * \brief Set the variable solution at time n-1.
323 * \param[in] iPoint - Point index.
324 */
325 inline void Set_Solution_time_n1(unsigned long iPoint, unsigned long iVar, su2double val_sol) {
326 Solution_time_n1(iPoint,iVar) = val_sol;
327 }
328
329 /*!
330 * \brief Virtual Member. Specify a vector to set the velocity components of the solution.
331 * Multiplied by density for compressible cases.
332 * \param[in] iPoint - Point index.
333 * \param[in] val_vector - Pointer to the vector.
334 */
335 inline virtual void SetVelSolutionVector(unsigned long iPoint, const su2double *val_vector) { }
336
337 /*!
338 * \brief Add a value to the solution.
339 * \param[in] iPoint - Point index.
340 * \param[in] iVar - Number of the variable.
341 * \param[in] solution - Value that we want to add to the solution.
342 */
343 inline void AddSolution(unsigned long iPoint, unsigned long iVar, su2double solution) {
344 Solution(iPoint, iVar) = Solution_Old(iPoint, iVar) + solution;
345 }
346
347 /*!
348 * \brief Add a value to the solution.
349 * \param[in] iPoint - Point index.
350 * \param[in] solution - Value that we want to add to the solution.
351 */
352 inline void AddSolution(unsigned long iPoint, const su2double *solution) {
353 for (unsigned long iVar = 0; iVar < nVar; iVar++) Solution(iPoint, iVar) += solution[iVar];
354 }
355
356 /*!
357 * \brief A virtual member.
358 * \param[in] iPoint - Point index.
359 * \param[in] iVar - Index of the variable.
360 * \return Pointer to the old solution vector.
361 */
362 inline virtual su2double GetSolution_New(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
363
364 /*!
365 * \brief A virtual member.
366 * \param[in] iPoint - Point index.
367 */
368 inline virtual su2double GetRoe_Dissipation(unsigned long iPoint) const { return 0.0; }
369
370 /*!
371 * \brief A virtual member.
372 * \param[in] iPoint - Point index.
373 */
374 inline virtual void SetRoe_Dissipation(unsigned long iPoint, su2double val_dissipation) {}
375
376 /*!
377 * \brief A virtual member.
378 * \param[in] iPoint - Point index.
379 */
380 inline virtual void SetRoe_Dissipation_FD(unsigned long iPoint, su2double val_wall_dist) {}
381
382 /*!
383 * \brief A virtual member.
384 * \param[in] iPoint - Point index.
385 * \param[in] val_delta - A scalar measure of the grid size
386 * \param[in] val_const_DES - The DES constant (C_DES)
387 */
388 inline virtual void SetRoe_Dissipation_NTS(unsigned long iPoint, su2double val_delta, su2double val_const_DES) {}
389
390 /*!
391 * \brief A virtual member.
392 * \param[in] iPoint - Point index.
393 */
394 inline virtual su2double GetDES_LengthScale(unsigned long iPoint) const { return 0.0; }
395
396 /*!
397 * \brief A virtual member.
398 * \param[in] iPoint - Point index.
399 */
400 inline virtual void SetDES_LengthScale(unsigned long iPoint, su2double val_des_lengthscale) {}
401
402 /*!
403 * \brief A virtual member.
404 * \param[in] iPoint - Point index.
405 */
406 inline virtual su2double GetLES_Mode(unsigned long iPoint) const { return 0.0; }
407
408 /*!
409 * \brief A virtual member.
410 * \param[in] iPoint - Point index.
411 * \param[in] val_les_mode - Value of the LES sensor.
412 */
413 inline virtual void SetLES_Mode(unsigned long iPoint, su2double val_les_mode) {}
414
415 /*!
416 * \brief A virtual member.
417 * \param[in] iPoint - Point index.
418 * \param[in] iDim - Dimension index.
419 */
420 inline virtual su2double GetLangevinSourceTerms(unsigned long iPoint, unsigned short iDim) const { return 0.0; }
421
422 /*!
423 * \brief A virtual member.
424 * \param[in] iPoint - Point index.
425 * \param[in] iDim - Dimension index.
426 * \param[in] val_stochSource - Source term in Langevin equations.
427 */
428 inline virtual void SetLangevinSourceTerms(unsigned long iPoint, unsigned short iDim, su2double val_stochSource) {}
429
430 /*!
431 * \brief A virtual member.
432 * \param[in] iPoint - Point index.
433 * \param[in] val_integral - Value of the integral.
434 */
435 inline virtual void SetBesselIntegral(unsigned long iPoint, su2double val_integral) {}
436
437 /*!
438 * \brief A virtual member.
439 */
440 inline virtual su2double GetBesselIntegral(unsigned long iPoint) const { return 0.0; }
441
442 /*!
443 * \brief A virtual member.
444 * \param[in] iPoint - Point index.
445 */
446 virtual void SetSolution_New() {}
447
448 /*!
449 * \brief Set external contributions to zero.
450 */
451 void SetExternalZero();
452
453 /*!
454 * \brief Set Dual-time derivative contributions to the external.
455 */
456 inline virtual void Set_External_To_DualTimeDer() { SetExternalZero(); }
457
458 /*!
459 * \brief A virtual member.
460 * \param[in] iPoint - Point index.
461 * \param[in] iVar - Number of the variable.
462 * \param[in] solution - Value that we want to add to the solution.
463 */
464 inline virtual void AddSolution_New(unsigned long iPoint, unsigned long iVar, su2double solution) {}
465
466 /*!
467 * \brief Add a value to the External vector.
468 * \param[in] iPoint - Point index.
469 * \param[in] val_sol - vector that has to be added component-wise
470 */
471 inline void Add_External(unsigned long iPoint, const su2double* val_sol) {
472 for(unsigned long iVar = 0; iVar < nVar; iVar++) External(iPoint,iVar) += val_sol[iVar];
473 }
474
475 /*!
476 * \brief Store the adjoint solution of the extra adjoint into the external container.
477 */
479 assert(SolutionExtra.size() == ExternalExtra.size());
480 for (auto iEntry = 0ul; iEntry < SolutionExtra.size(); iEntry++)
481 ExternalExtra[iEntry] = SolutionExtra[iEntry];
482 }
483
484 /*!
485 * \brief Add the external contribution to the solution for the extra adjoint solutions.
486 */
488 assert(SolutionExtra.size() == ExternalExtra.size());
489 for (auto iEntry = 0ul; iEntry < SolutionExtra.size(); iEntry++)
490 SolutionExtra[iEntry] += ExternalExtra[iEntry];
491 }
492
493 /*!
494 * \brief Return the extra adjoint solution.
495 * \return Reference to extra adjoint solution.
496 */
498 inline const VectorType& GetSolutionExtra() const { return SolutionExtra; }
499
500 /*!
501 * \brief Update the variables using a conservative format.
502 * \param[in] iPoint - Point index.
503 * \param[in] iVar - Index of the variable.
504 * \param[in] solution - Value of the solution change.
505 * \param[in] lowerlimit - Lower value for Solution clipping.
506 * \param[in] upperlimit - Upper value for Solution clipping.
507 * \param[in] Sol2Conservative - Factor multiplied to Solution to get transported variable.
508 * \param[in] Sol2Conservative_old - Factor multiplied to Solution to get transported variable, of the previous Iteration.
509 */
510 inline void AddClippedSolution(unsigned long iPoint, unsigned long iVar, su2double solution,
511 su2double lowerlimit, su2double upperlimit,
512 su2double Sol2Conservative = 1.0, su2double Sol2Conservative_old = 1.0) {
513
514 su2double val_new = (Solution_Old(iPoint,iVar)*Sol2Conservative_old + solution)/Sol2Conservative;
515 Solution(iPoint,iVar) = min(max(val_new, lowerlimit), upperlimit);
516 }
517
518 /*!
519 * \brief Get the entire solution of the problem.
520 * \return Reference to the solution matrix.
521 */
522 inline const MatrixType& GetSolution() const { return Solution; }
523 inline MatrixType& GetSolution() { return Solution; }
524
525 /*!
526 * \brief Get the solution of the problem.
527 * \param[in] iPoint - Point index.
528 * \return Pointer to the solution vector.
529 */
530 inline su2double *GetSolution(unsigned long iPoint) { return Solution[iPoint]; }
531
532 /*!
533 * \brief Get the entire User Define Source of the problem.
534 * \return Reference to the solution matrix.
535 */
536 inline const MatrixType& GetUserDefinedSource() const { return UserDefinedSource; }
538
539 /*!
540 * \brief Get the old solution of the problem (Runge-Kutta method)
541 * \param[in] iPoint - Point index.
542 * \return Pointer to the old solution vector.
543 */
544 inline su2double *GetSolution_Old(unsigned long iPoint) { return Solution_Old[iPoint]; }
545
546 /*!
547 * \brief Get the external contributions of the problem.
548 * \param[in] iPoint - Point index.
549 * \return Pointer to the External row for iPoint.
550 */
551 inline const su2double *Get_External(unsigned long iPoint) const { return External[iPoint]; }
552 inline const MatrixType& Get_External() const { return External; }
553
554 /*!
555 * \brief Get the solution at time n.
556 * \param[in] iPoint - Point index.
557 * \return Pointer to the solution (at time n) vector.
558 */
559 inline su2double *GetSolution_time_n(unsigned long iPoint) { return Solution_time_n[iPoint]; }
561
562 /*!
563 * \brief Get the solution at time n-1.
564 * \param[in] iPoint - Point index.
565 * \return Pointer to the solution (at time n-1) vector.
566 */
567 inline su2double *GetSolution_time_n1(unsigned long iPoint) { return Solution_time_n1[iPoint]; }
569
570 /*!
571 * \brief Set the value of the old residual.
572 * \param[in] iPoint - Point index.
573 * \param[in] val_residual_old - Pointer to the residual vector.
574 */
575 inline void SetResidual_Old(unsigned long iPoint, const su2double *val_residual_old) {
576 for (unsigned long iVar = 0; iVar < nVar; iVar++)
577 Residual_Old(iPoint,iVar) = val_residual_old[iVar];
578 }
579
580 /*!
581 * \brief Add a value to the summed residual vector.
582 * \param[in] iPoint - Point index.
583 * \param[in] val_residual - Pointer to the residual vector.
584 */
585 inline void AddResidual_Sum(unsigned long iPoint, const su2double *val_residual) {
586 for (unsigned long iVar = 0; iVar < nVar; iVar++)
587 Residual_Sum(iPoint,iVar) += val_residual[iVar];
588 }
589
590 /*!
591 * \brief Set summed residual vector to zero value.
592 */
593 inline void SetResidualSumZero(unsigned long iPoint) {
594 for (unsigned long iVar = 0; iVar < nVar; iVar++) Residual_Sum(iPoint,iVar) = 0.0;
595 }
596
597 /*!
598 * \brief Get the value of the summed residual.
599 * \param[in] iPoint - Point index.
600 * \return Pointer to the summed residual.
601 */
602 inline su2double *GetResidual_Sum(unsigned long iPoint) { return Residual_Sum[iPoint]; }
603
604 /*!
605 * \brief Get the value of the old residual.
606 * \param[in] iPoint - Point index.
607 * \return Pointer to the old residual.
608 */
609 inline su2double *GetResidual_Old(unsigned long iPoint) { return Residual_Old[iPoint]; }
610
611 /*!
612 * \brief Get the value of the summed residual.
613 * \param[in] iPoint - Point index.
614 * \param[in] val_residual - Pointer to the summed residual.
615 */
616 inline void GetResidual_Sum(unsigned long iPoint, su2double *val_residual) const {
617 for (unsigned long iVar = 0; iVar < nVar; iVar++)
618 val_residual[iVar] = Residual_Sum(iPoint,iVar);
619 }
620
621 /*!
622 * \brief Set the value of the under-relaxation parameter for the current control volume (CV).
623 * \param[in] iPoint - Point index.
624 * \param[in] val_under_relaxation - the input value of the under-relaxation parameter for this CV.
625 */
626 inline void SetUnderRelaxation(unsigned long iPoint, su2double val_under_relaxation) { UnderRelaxation(iPoint) = val_under_relaxation; }
627
628 /*!
629 * \brief Get the value of the under-relaxation parameter for the current control volume (CV).
630 * \param[in] iPoint - Point index.
631 * \return Value of the under-relaxation parameter for this CV.
632 */
633 inline su2double GetUnderRelaxation(unsigned long iPoint) const { return UnderRelaxation(iPoint); }
634
635 /*!
636 * \brief Set the value of the local CFL number for the current control volume (CV).
637 * \param[in] iPoint - Point index.
638 * \param[in] val_cfl - the input value of the local CFL number for this CV.
639 */
640 inline void SetLocalCFL(unsigned long iPoint, su2double val_cfl) { LocalCFL(iPoint) = val_cfl; }
641
642 /*!
643 * \brief Get the value of the local CFL number for the current control volume (CV).
644 * \param[in] iPoint - Point index.
645 * \return Value of the local CFL number for this CV.
646 */
647 inline su2double GetLocalCFL(unsigned long iPoint) const { return LocalCFL(iPoint); }
648
649 /*!
650 * \brief Get the entire Aux matrix of the problem.
651 * \return Reference to the aux var matrix.
652 */
653 inline const MatrixType& GetAuxVar(void) const { return AuxVar; }
654
655 /*!
656 * \brief Get the Aux var value at Point i, variable j.
657 */
658 inline su2double GetAuxVar(unsigned long iPoint, unsigned long iVar = 0) const { return AuxVar(iPoint,iVar); }
659
660 /*!
661 * \brief Set auxiliary variables.
662 * \param[in] iPoint - Point index.
663 * \param[in] iVar - Varriable indexs
664 * \param[in] val_auxvar - Value of the auxiliar variable.
665 */
666 inline void SetAuxVar(unsigned long iPoint, unsigned long iVar, const su2double auxvar) {
667 AuxVar(iPoint,iVar) = auxvar;
668 }
669
670 /*!
671 * \brief Set value of auxillary gradients.
672 * \param[in] iPoint - Point index.
673 * \param[in] iVar - Index of the variable.
674 * \param[in] iDim - Index of the dimension.
675 * \param[in] value - Value of the gradient.
676 */
677 inline void SetAuxVarGradient(unsigned long iPoint, unsigned long iVar, unsigned long iDim, su2double value) {
678 Grad_AuxVar(iPoint,iVar,iDim) = value;
679 }
680
681 /*!
682 * \brief Get the gradient of the auxilary variables.
683 * \return Reference to gradient.
684 */
686 inline const CVectorOfMatrix& GetAuxVarGradient(void) const { return Grad_AuxVar; }
687
688 /*!
689 * \brief Get the value of the auxilliary gradient.
690 * \param[in] iPoint - Point index.
691 * \param[in] iVar - Index of the variable.
692 * \param[in] iDim - Index of the dimension.
693 * \return Value of the solution gradient.
694 */
695 inline su2double GetAuxVarGradient(unsigned long iPoint, unsigned long iVar, unsigned long iDim) const {
696 return Grad_AuxVar(iPoint,iVar,iDim);
697 }
698
699 /*!
700 * \brief Get the value of the auxilliary gradient.
701 * \param[in] iPoint - Point index.
702 * \return Value of the solution gradient.
703 */
704 inline CMatrixView<su2double> GetAuxVarGradient(unsigned long iPoint) {
705 return Grad_AuxVar[iPoint];
706 }
707
708 /*!
709 * \brief Add a value to the truncation error.
710 * \param[in] iPoint - Point index.
711 * \param[in] val_truncation_error - Value that we want to add to the truncation error.
712 */
713 inline void AddRes_TruncError(unsigned long iPoint, const su2double *val_truncation_error) {
714 for (unsigned long iVar = 0; iVar < nVar; iVar++)
715 Res_TruncError(iPoint, iVar) += val_truncation_error[iVar];
716 }
717
718 /*!
719 * \brief Subtract a value to the truncation error.
720 * \param[in] iPoint - Point index.
721 * \param[in] val_truncation_error - Value that we want to subtract to the truncation error.
722 */
723 inline void SubtractRes_TruncError(unsigned long iPoint, const su2double *val_truncation_error) {
724 for (unsigned long iVar = 0; iVar < nVar; iVar++)
725 Res_TruncError(iPoint, iVar) -= val_truncation_error[iVar];
726 }
727
728 /*!
729 * \brief Set the truncation error to zero.
730 * \param[in] iPoint - Point index.
731 */
732 inline void SetRes_TruncErrorZero(unsigned long iPoint) {
733 for (unsigned long iVar = 0; iVar < nVar; iVar++) Res_TruncError(iPoint, iVar) = 0.0;
734 }
735
736 /*!
737 * \brief Set the truncation error to zero.
738 * \param[in] iPoint - Point index.
739 */
740 inline void SetVal_ResTruncError_Zero(unsigned long iPoint, unsigned long iVar) {Res_TruncError(iPoint, iVar) = 0.0;}
741
742 /*!
743 * \brief Set the momentum part of the truncation error to zero.
744 * \param[in] iPoint - Point index.
745 */
746 inline virtual void SetVel_ResTruncError_Zero(unsigned long iPoint) { }
747
748 /*!
749 * \brief Set the velocity of the truncation error to zero.
750 * \param[in] iPoint - Point index.
751 */
752 inline void SetEnergy_ResTruncError_Zero(unsigned long iPoint) { Res_TruncError(iPoint,nDim+1) = 0.0;}
753
754 /*!
755 * \brief Get the truncation error.
756 * \param[in] iPoint - Point index.
757 * \return Pointer to the truncation error.
758 */
759 inline su2double *GetResTruncError(unsigned long iPoint) { return Res_TruncError[iPoint]; }
760
761 /*!
762 * \brief Get the truncation error.
763 * \param[in] iPoint - Point index.
764 * \param[in] val_trunc_error - Pointer to the truncation error.
765 */
766 inline void GetResTruncError(unsigned long iPoint, su2double *val_trunc_error) const {
767 for (unsigned long iVar = 0; iVar < nVar; iVar++)
768 val_trunc_error[iVar] = Res_TruncError(iPoint, iVar);
769 }
770
771 /*!
772 * \brief Set the truncation error.
773 * \param[in] iPoint - Point index.
774 * \param[in] val_trunc_error - Pointer to the truncation error.
775 */
776 inline void SetResTruncError(unsigned long iPoint, su2double *val_trunc_error) {
777 for (unsigned long iVar = 0; iVar < nVar; iVar++)
778 Res_TruncError(iPoint, iVar) = val_trunc_error[iVar];
779 }
780
781 /*!
782 * \brief Set the gradient of the solution.
783 * \param[in] iPoint - Point index.
784 * \param[in] gradient - Gradient of the solution.
785 */
786 inline void SetGradient(unsigned long iPoint, su2double **gradient) {
787 for (unsigned long iVar = 0; iVar < nVar; iVar++)
788 for (unsigned long iDim = 0; iDim < nDim; iDim++)
789 Gradient(iPoint,iVar,iDim) = gradient[iVar][iDim];
790 }
791
792 /*!
793 * \brief Get the gradient of the entire solution.
794 * \return Reference to gradient.
795 */
796 inline CVectorOfMatrix& GetGradient(void) { return Gradient; }
797 inline const CVectorOfMatrix& GetGradient(void) const { return Gradient; }
798
799 /*!
800 * \brief Get the value of the solution gradient.
801 * \param[in] iPoint - Point index.
802 * \return Value of the gradient solution.
803 */
804 inline CMatrixView<su2double> GetGradient(unsigned long iPoint) { return Gradient[iPoint]; }
805
806 /*!
807 * \brief Get the value of the solution gradient.
808 * \param[in] iPoint - Point index.
809 * \param[in] iVar - Index of the variable.
810 * \param[in] iDim - Index of the dimension.
811 * \return Value of the solution gradient.
812 */
813 inline su2double GetGradient(unsigned long iPoint, unsigned long iVar, unsigned long iDim) const { return Gradient(iPoint,iVar,iDim); }
814
815 /*!
816 * \brief Add <i>value</i> to the Rmatrix for least squares gradient calculations.
817 * \param[in] iPoint - Point index.
818 * \param[in] iDim - Index of the dimension.
819 * \param[in] jDim - Index of the dimension.
820 * \param[in] value - Value of the Rmatrix entry.
821 */
822 inline void AddRmatrix(unsigned long iPoint, unsigned long iDim, unsigned long jDim, su2double value) { Rmatrix(iPoint,iDim,jDim) += value; }
823
824 /*!
825 * \brief Get the value of the Rmatrix entry for least squares gradient calculations.
826 * \param[in] iPoint - Point index.
827 * \param[in] iDim - Index of the dimension.
828 * \param[in] jDim - Index of the dimension.
829 * \return Value of the Rmatrix entry.
830 */
831 inline su2double GetRmatrix(unsigned long iPoint, unsigned long iDim, unsigned long jDim) const { return Rmatrix(iPoint,iDim,jDim); }
832
833 /*!
834 * \brief Get the value Rmatrix for the entire domain.
835 * \return Reference to the Rmatrix.
836 */
837 inline C3DDoubleMatrix& GetRmatrix(void) { return Rmatrix; }
838
839 /*!
840 * \brief Get the slope limiter.
841 * \return Reference to the limiters vector.
842 */
843 inline MatrixType& GetLimiter(void) { return Limiter; }
844 inline const MatrixType& GetLimiter(void) const { return Limiter; }
845
846 /*!
847 * \brief Get the value of the slope limiter.
848 * \param[in] iPoint - Point index.
849 * \return Pointer to the limiters vector.
850 */
851 inline su2double *GetLimiter(unsigned long iPoint) { return Limiter[iPoint]; }
852
853 /*!
854 * \brief Get the value of the slope limiter.
855 * \param[in] iPoint - Point index.
856 * \param[in] iVar - Index of the variable.
857 * \return Value of the limiter vector for the variable <i>iVar</i>.
858 */
859 inline su2double GetLimiter(unsigned long iPoint, unsigned long iVar) const { return Limiter(iPoint,iVar); }
860
861 /*!
862 * \brief Get the min solution.
863 * \return Value of the min solution for the domain.
864 */
866 inline const MatrixType& GetSolution_Max() const { return Solution_Max; }
867
868 /*!
869 * \brief Get the min solution.
870 * \return Value of the min solution for the domain.
871 */
873 inline const MatrixType& GetSolution_Min() const { return Solution_Min; }
874
875 /*!
876 * \brief Set the value of the time step.
877 * \param[in] iPoint - Point index.
878 * \param[in] val_delta_time - Value of the time step.
879 */
880 inline void SetDelta_Time(unsigned long iPoint, su2double val_delta_time) { Delta_Time(iPoint) = val_delta_time; }
881
882 /*!
883 * \brief Get the value of the time step.
884 * \param[in] iPoint - Point index.
885 * \return Value of the time step.
886 */
887 inline su2double GetDelta_Time(unsigned long iPoint) const {return Delta_Time(iPoint); }
888
889 /*!
890 * \brief Set the value of the maximum eigenvalue for the inviscid terms of the PDE.
891 * \param[in] iPoint - Point index.
892 * \param[in] val_max_lambda - Value of the maximum eigenvalue for the inviscid terms of the PDE.
893 */
894 inline void SetMax_Lambda_Inv(unsigned long iPoint, su2double val_max_lambda) { Max_Lambda_Inv(iPoint) = val_max_lambda; }
895
896 /*!
897 * \brief Set the value of the maximum eigenvalue for the viscous terms of the PDE.
898 * \param[in] iPoint - Point index.
899 * \param[in] val_max_lambda - Value of the maximum eigenvalue for the viscous terms of the PDE.
900 */
901 inline void SetMax_Lambda_Visc(unsigned long iPoint, su2double val_max_lambda) { Max_Lambda_Visc(iPoint) = val_max_lambda; }
902
903 /*!
904 * \brief Add a value to the maximum eigenvalue for the inviscid terms of the PDE.
905 * \param[in] iPoint - Point index.
906 * \param[in] val_max_lambda - Value of the maximum eigenvalue for the inviscid terms of the PDE.
907 */
908 inline void AddMax_Lambda_Inv(unsigned long iPoint, su2double val_max_lambda) { Max_Lambda_Inv(iPoint) += val_max_lambda; }
909
910 /*!
911 * \brief Add a value to the maximum eigenvalue for the viscous terms of the PDE.
912 * \param[in] iPoint - Point index.
913 * \param[in] val_max_lambda - Value of the maximum eigenvalue for the viscous terms of the PDE.
914 */
915 inline void AddMax_Lambda_Visc(unsigned long iPoint, su2double val_max_lambda) { Max_Lambda_Visc(iPoint) += val_max_lambda; }
916
917 /*!
918 * \brief Get the value of the maximum eigenvalue for the inviscid terms of the PDE.
919 * \param[in] iPoint - Point index.
920 * \return the value of the maximum eigenvalue for the inviscid terms of the PDE.
921 */
922 inline su2double GetMax_Lambda_Inv(unsigned long iPoint) const { return Max_Lambda_Inv(iPoint); }
923
924 /*!
925 * \brief Get the value of the maximum eigenvalue for the viscous terms of the PDE.
926 * \param[in] iPoint - Point index.
927 * \return the value of the maximum eigenvalue for the viscous terms of the PDE.
928 */
929 inline su2double GetMax_Lambda_Visc(unsigned long iPoint) const { return Max_Lambda_Visc(iPoint); }
930
931 /*!
932 * \brief Set the value of the spectral radius.
933 * \param[in] iPoint - Point index.
934 * \param[in] val_lambda - Value of the spectral radius.
935 */
936 inline void SetLambda(unsigned long iPoint, su2double val_lambda) { Lambda(iPoint) = val_lambda; }
937
938 /*!
939 * \brief Add the value of the spectral radius.
940 * \param[in] iPoint - Point index.
941 * \param[in] val_lambda - Value of the spectral radius.
942 */
943 inline void AddLambda(unsigned long iPoint, su2double val_lambda) { Lambda(iPoint) += val_lambda; }
944
945 /*!
946 * \brief Get the value of the spectral radius.
947 * \param[in] iPoint - Point index.
948 * \return Value of the spectral radius.
949 */
950 inline su2double GetLambda(unsigned long iPoint) const { return Lambda(iPoint); }
951 inline const VectorType& GetLambda() const { return Lambda; }
952
953 /*!
954 * \brief Set pressure sensor.
955 * \param[in] iPoint - Point index.
956 * \param[in] val_sensor - Value of the pressure sensor.
957 */
958 inline void SetSensor(unsigned long iPoint, su2double val_sensor) { Sensor(iPoint) = val_sensor; }
959
960 /*!
961 * \brief Get the pressure sensor.
962 * \param[in] iPoint - Point index.
963 * \return Value of the pressure sensor.
964 */
965 inline su2double GetSensor(unsigned long iPoint) const { return Sensor(iPoint); }
966 inline const VectorType& GetSensor() const { return Sensor; }
967
968 /*!
969 * \brief Increment the value of the undivided laplacian of the solution.
970 * \param[in] iPoint - Point index.
971 * \param[in] iVar - Variable of the undivided laplacian.
972 * \param[in] val_und_lapl - Value of the undivided solution.
973 */
974 inline void AddUnd_Lapl(unsigned long iPoint, unsigned long iVar, su2double val_und_lapl) {
975 Undivided_Laplacian(iPoint, iVar) += val_und_lapl;
976 }
977
978 /*!
979 * \brief Set a value to the undivided laplacian.
980 * \param[in] iPoint - Point index.
981 * \param[in] iVar - Variable of the undivided laplacian.
982 * \param[in] val_und_lapl - Value of the undivided laplacian.
983 */
984 inline void SetUnd_Lapl(unsigned long iPoint, unsigned long iVar, su2double val_und_lapl) {
985 Undivided_Laplacian(iPoint, iVar) = val_und_lapl;
986 }
987
988 /*!
989 * \brief Get the undivided laplacian of the solution.
990 * \param[in] iPoint - Point index.
991 * \return Pointer to the undivided laplacian vector.
992 */
993 inline su2double *GetUndivided_Laplacian(unsigned long iPoint) { return Undivided_Laplacian[iPoint]; }
994
995 /*!
996 * \brief Get the undivided laplacian of the solution.
997 * \param[in] iPoint - Point index.
998 * \param[in] iVar - Variable of the undivided laplacian.
999 * \return Value of the undivided laplacian vector.
1000 */
1001 inline su2double GetUndivided_Laplacian(unsigned long iPoint, unsigned long iVar) const { return Undivided_Laplacian(iPoint, iVar); }
1003
1004 /*!
1005 * \brief A virtual member.
1006 * \param[in] iPoint - Point index.
1007 * \return Value of the flow density.
1008 */
1009 inline virtual su2double GetDensity(unsigned long iPoint) const { return 0.0; }
1010
1011 /*!
1012 * \brief A virtual member.
1013 * \param[in] iPoint - Point index.
1014 * \return Value of the flow density.
1015 */
1016 inline virtual su2double GetDensity(unsigned long iPoint, unsigned long val_iSpecies) const { return 0.0; }
1017
1018 /*!
1019 * \brief A virtual member.
1020 * \param[in] iPoint - Point index.
1021 * \param[in] val_Species - Index of species s.
1022 * \return Value of the mass fraction of species s.
1023 */
1024 inline virtual su2double GetMassFraction(unsigned long iPoint, unsigned long val_Species) const { return 0.0; }
1025
1026 /*!
1027 * \brief Get the species enthalpy.
1028 * \return Value of the species enthalpy.
1029 */
1030 inline virtual su2double* GetEnthalpys(unsigned long iPoint) { return nullptr; }
1031
1032 /*!
1033 * \brief A virtual member.
1034 * \param[in] iPoint - Point index.
1035 * \return Value of the flow energy.
1036 */
1037 inline virtual su2double GetEnergy(unsigned long iPoint) const { return 0.0; }
1038
1039 /*!
1040 * \brief A virtual member.
1041 * \param[in] iPoint - Point index.
1042 * \return Pointer to the force projection vector.
1043 */
1044 inline virtual su2double *GetForceProj_Vector(unsigned long iPoint) { return nullptr; }
1045
1046 /*!
1047 * \brief A virtual member.
1048 * \param[in] iPoint - Point index.
1049 * \return Pointer to the objective function source.
1050 */
1051 inline virtual su2double *GetObjFuncSource(unsigned long iPoint) { return nullptr; }
1052
1053 /*!
1054 * \brief A virtual member.
1055 * \param[in] iPoint - Point index.
1056 * \return Value of the eddy viscosity.
1057 */
1058 inline virtual su2double GetEddyViscosity(unsigned long iPoint) const { return 0.0; }
1059
1060 /*!
1061 * \brief A virtual member.
1062 * \param[in] iPoint - Point index.
1063 * \return Value of the flow enthalpy.
1064 */
1065 inline virtual su2double GetEnthalpy(unsigned long iPoint) const { return 0.0; }
1066
1067 /*!
1068 * \brief A virtual member.
1069 * \param[in] iPoint - Point index.
1070 * \return Value of the flow pressure.
1071 */
1072 inline virtual su2double GetPressure(unsigned long iPoint) const { return 0.0; }
1073
1074 /*!
1075 * \brief A virtual member.
1076 * \param[in] iPoint - Point index.
1077 * \param[in] val_vector - Direction of projection.
1078 * \return Value of the projected velocity.
1079 */
1080 inline virtual su2double GetProjVel(unsigned long iPoint, const su2double *val_vector) const { return 0.0; }
1081
1082 /*!
1083 * \brief A virtual member.
1084 * \param[in] iPoint - Point index.
1085 * \return Value of the sound speed.
1086 */
1087 inline virtual su2double GetSoundSpeed(unsigned long iPoint) const { return 0.0; }
1088
1089 /*!
1090 * \brief A virtual member.
1091 * \param[in] iPoint - Point index.
1092 * \return Value of the beta for the incompressible flow.
1093 */
1094 inline virtual su2double GetBetaInc2(unsigned long iPoint) const { return 0.0; }
1095
1096 /*!
1097 * \brief A virtual member.
1098 * \return Value of the temperature.
1099 */
1100 inline virtual su2double GetTemperature(unsigned long iPoint) const { return 0.0; }
1101
1102 /*!
1103 * \brief A virtual member.
1104 * \param[in] iPoint - Point index.
1105 * \return Value of the vibrational-electronic temperature.
1106 */
1107 inline virtual su2double GetTemperature_ve(unsigned long iPoint) const { return 0.0; }
1108
1109 /*!
1110 * \brief A virtual member -- Get the mixture specific heat at constant volume (trans.-rot.).
1111 * \param[in] iPoint - Point index.
1112 * \return \f$\rho C^{t-r}_{v} \f$
1113 */
1114 inline virtual su2double GetRhoCv_tr(unsigned long iPoint) const { return 0.0; }
1115
1116 /*!
1117 * \brief A virtual member -- Get the mixture specific heat at constant volume (vib.-el.).
1118 * \param[in] iPoint - Point index.
1119 * \return \f$\rho C^{v-e}_{v} \f$
1120 */
1121 inline virtual su2double GetRhoCv_ve(unsigned long iPoint) const { return 0.0; }
1122
1123 /*!
1124 * \brief A virtual member.
1125 * \param[in] iPoint - Point index.
1126 * \param[in] iDim - Index of the dimension.
1127 * \return Value of the velocity for the dimension <i>iDim</i>.
1128 */
1129 inline virtual su2double GetVelocity(unsigned long iPoint, unsigned long iDim) const { return 0.0; }
1130
1131 /*!
1132 * \brief A virtual member.
1133 * \param[in] iPoint - Point index.
1134 * \return Value of the velocity gradient.
1135 */
1136 inline virtual CMatrixView<const su2double> GetVelocityGradient(unsigned long iPoint) const {
1138 }
1139
1140 /*!
1141 * \brief A virtual member.
1142 * \param[in] iPoint - Point index.
1143 * \return Norm 2 of the velocity vector.
1144 */
1145 inline virtual su2double GetVelocity2(unsigned long iPoint) const { return 0.0; }
1146
1147 /*!
1148 * \brief A virtual member.
1149 * \param[in] iPoint - Point index.
1150 * \return The laminar viscosity of the flow.
1151 */
1152 inline virtual su2double GetLaminarViscosity(unsigned long iPoint) const { return 0.0; }
1153
1154 /*!
1155 * \brief A virtual member.
1156 * \param[in] iPoint - Point index.
1157 * \return Value of the species diffusion coefficient.
1158 */
1159 inline virtual su2double* GetDiffusionCoeff(unsigned long iPoint) {return nullptr; }
1160
1161 /*!
1162 * \brief A virtual member.
1163 * \param[in] iPoint - Point index.
1164 * \return Value of the thermal conductivity (translational/rotational)
1165 */
1166 inline virtual su2double GetThermalConductivity(unsigned long iPoint) const { return 0.0; }
1167
1168 /*!
1169 * \brief A virtual member.
1170 * \param[in] iPoint - Point index.
1171 * \return Value of the mass diffusivity.
1172 */
1173 inline virtual su2double GetDiffusivity(unsigned long iPoint, unsigned short val_ivar) const { return 0.0; }
1174
1175 /*!
1176 * \brief A virtual member.
1177 * \param[in] iPoint - Point index.
1178 * \return Value of the specific heat at constant P
1179 */
1180 inline virtual su2double GetSpecificHeatCp(unsigned long iPoint) const { return 0.0; }
1181
1182 /*!
1183 * \brief A virtual member.
1184 * \param[in] iPoint - Point index.
1185 * \return Value of the specific heat at constant V
1186 */
1187 inline virtual su2double GetSpecificHeatCv(unsigned long iPoint) const { return 0.0; }
1188
1189 /*!
1190 * \brief A virtual member.
1191 * \param[in] iPoint - Point index.
1192 * \return Value of the thermal conductivity (vibrational)
1193 */
1194 inline virtual su2double GetThermalConductivity_ve(unsigned long iPoint) const { return 0.0; }
1195
1196 /*!
1197 * \brief A virtual member.
1198 * \param[in] iPoint - Point index.
1199 * \return Sets separation intermittency
1200 */
1201 inline virtual void SetGammaSep(unsigned long iPoint, su2double gamma_sep) {}
1202
1203 /*!
1204 * \brief A virtual member.
1205 * \param[in] iPoint - Point index.
1206 * \return Sets Effective intermittency
1207 */
1208 inline virtual void SetGammaEff(unsigned long iPoint) {}
1209
1210 /*!
1211 * \brief A virtual member.
1212 * \param[in] iPoint - Point index.
1213 * \return Value of the vorticity.
1214 */
1215 inline virtual su2double *GetVorticity(unsigned long iPoint) { return nullptr; }
1216 inline virtual const su2double *GetVorticity(unsigned long iPoint) const { return nullptr; }
1217
1218 /*!
1219 * \brief A virtual member.
1220 * \param[in] iPoint - Point index.
1221 * \return Value of strain rate magnitude.
1222 */
1223 inline virtual su2double GetStrainMag(unsigned long iPoint) const { return 0.0; }
1224
1225 /*!
1226 * \brief A virtual member.
1227 * \param[in] iPoint - Point index.
1228 * \param[in] val_ForceProj_Vector - Pointer to the force projection vector.
1229 */
1230 inline virtual void SetForceProj_Vector(unsigned long iPoint, const su2double *val_ForceProj_Vector) {}
1231
1232 /*!
1233 * \brief A virtual member.
1234 * \param[in] iPoint - Point index.
1235 * \param[in] val_SetObjFuncSource - Pointer to the objective function source.
1236 */
1237 inline virtual void SetObjFuncSource(unsigned long iPoint, const su2double *val_SetObjFuncSource) {}
1238
1239 /*!
1240 * \brief A virtual member.
1241 * \param[in] iPoint - Point index.
1242 * \return Value of the gamma_BC of B-C transition model.
1243 */
1244 inline virtual su2double GetGammaBC(unsigned long iPoint) const { return 0.0; }
1245
1246 /*!
1247 * \brief A virtual member.
1248 * \param[in] iPoint - Point index.
1249 */
1250 inline virtual void SetGammaBC(unsigned long iPoint, su2double val_gamma) {}
1251
1252 /*!
1253 * \brief A virtual member.
1254 * \param[in] iPoint - Point index.
1255 * \param[in] eddy_visc - Value of the eddy viscosity.
1256 */
1257 inline virtual void SetEddyViscosity(unsigned long iPoint, su2double eddy_visc) {}
1258
1259 /*!
1260 * \brief A virtual member.
1261 * \param[in] iPoint - Point index.
1262 */
1263 inline virtual void SetEnthalpy(unsigned long iPoint) {}
1264
1265 /*!
1266 * \brief A virtual member.
1267 * \param[in] iPoint - Point index.
1268 */
1269 inline virtual bool SetPrimVar(unsigned long iPoint, CConfig *config) { return true; }
1270
1271 /*!
1272 * \brief A virtual member.
1273 * \param[in] iPoint - Point index.
1274 */
1275 inline virtual bool SetPrimVar(unsigned long iPoint, CFluidModel *FluidModel) { return true; }
1276
1277 /*!
1278 * \brief A virtual member.
1279 * \param[in] iPoint - Point index.
1280 * \param[in] fluidmodel - fluid model.
1281 */
1282 inline virtual bool SetPrimVar(unsigned long iPoint, CNEMOGas *fluidmodel) {return false;}
1283
1284 /*!
1285 * \brief A virtual member.
1286 */
1287 inline virtual void SetSecondaryVar(unsigned long iPoint, CFluidModel *FluidModel) {}
1288
1289 /*!
1290 * \brief A virtual member.
1291 */
1292 inline virtual bool SetPrimVar(unsigned long iPoint, su2double SharpEdge_Distance, bool check, CConfig *config) { return true; }
1293
1294 /*!
1295 * \brief A virtual member.
1296 */
1297 inline virtual bool SetPrimVar(unsigned long iPoint, su2double eddy_visc, su2double turb_ke, CConfig *config) { return true; }
1298
1299 /*!
1300 * \brief A virtual member.
1301 */
1302 inline virtual bool SetPrimVar(unsigned long iPoint, su2double eddy_visc, su2double turb_ke, CFluidModel *FluidModel) { return true; }
1303
1304 /*!
1305 * \brief A virtual member.
1306 */
1307 inline virtual bool SetPrimVar(unsigned long iPoint, su2double Density_Inf, CConfig *config) { return true; }
1308
1309 /*!
1310 * \brief A virtual member.
1311 */
1312 inline virtual bool SetPrimVar(unsigned long iPoint, su2double Density_Inf, su2double Viscosity_Inf,
1313 su2double eddy_visc, su2double turb_ke, CConfig *config) {return true; }
1314
1315 /*!
1316 * \brief Get the primitive variables for all points.
1317 * \return Reference to primitives.
1318 */
1319 inline virtual const MatrixType& GetPrimitive() const { AssertOverride(); return Solution; }
1320
1321 /*!
1322 * \brief A virtual member.
1323 */
1324 inline virtual su2double GetPrimitive(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
1325
1326 /*!
1327 * \brief A virtual member.
1328 */
1329 inline virtual void SetPrimitive(unsigned long iPoint, unsigned long iVar, su2double val_prim) {}
1330
1331 /*!
1332 * \brief A virtual member.
1333 */
1334 inline virtual void SetPrimitive(unsigned long iPoint, const su2double *val_prim) {}
1335
1336 /*!
1337 * \brief A virtual member.
1338 */
1339 inline virtual su2double *GetPrimitive(unsigned long iPoint) { return nullptr; }
1340
1341 /*!
1342 * \brief A virtual member.
1343 */
1344 inline virtual su2double GetSecondary(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
1345
1346 /*!
1347 * \brief A virtual member.
1348 */
1349 inline virtual void SetSecondary(unsigned long iPoint, unsigned long iVar, su2double val_secondary) {}
1350
1351 /*!
1352 * \brief A virtual member.
1353 */
1354 inline virtual void SetSecondary(unsigned long iPoint, const su2double *val_secondary) {}
1355
1356 /*!
1357 * \brief A virtual member.
1358 */
1359 inline virtual void SetdPdrho_e(unsigned long iPoint, su2double dPdrho_e) {}
1360
1361 /*!
1362 * \brief A virtual member.
1363 */
1364 inline virtual void SetdPde_rho(unsigned long iPoint, su2double dPde_rho) {}
1365
1366 /*!
1367 * \brief A virtual member.
1368 */
1369 inline virtual void SetdTdrho_e(unsigned long iPoint, su2double dTdrho_e) {}
1370
1371 /*!
1372 * \brief A virtual member.
1373 */
1374 inline virtual void SetdTde_rho(unsigned long iPoint, su2double dTde_rho) {}
1375
1376 /*!
1377 * \brief A virtual member.
1378 */
1379 inline virtual void Setdmudrho_T(unsigned long iPoint, su2double dmudrho_T) {}
1380
1381 /*!
1382 * \brief A virtual member.
1383 */
1384 inline virtual void SetdmudT_rho(unsigned long iPoint, su2double dmudT_rho) {}
1385
1386 /*!
1387 * \brief A virtual member.
1388 */
1389 inline virtual void Setdktdrho_T(unsigned long iPoint, su2double dktdrho_T) {}
1390
1391 /*!
1392 * \brief A virtual member.
1393 */
1394 inline virtual void SetdktdT_rho(unsigned long iPoint, su2double dktdT_rho) {}
1395
1396 /*!
1397 * \brief A virtual member.
1398 */
1399 inline virtual su2double *GetSecondary(unsigned long iPoint) { return nullptr; }
1400
1401 /*!
1402 * \brief A virtual member.
1403 */
1404 inline virtual bool SetDensity(unsigned long iPoint, su2double val_density) { return false; }
1405
1406 /*!
1407 * \brief A virtual member.
1408 */
1409 inline virtual bool SetDensity(unsigned long iPoint) { return false; }
1410
1411 /*!
1412 * \brief A virtual member.
1413 */
1414 inline virtual void SetPressure(unsigned long iPoint) {}
1415
1416 /*!
1417 * \brief A virtual member.
1418 */
1419 inline virtual void SetVelocity(unsigned long iPoint) {}
1420
1421 /*!
1422 * \brief A virtual member.
1423 */
1424 inline virtual void SetBetaInc2(unsigned long iPoint, su2double val_betainc2) {}
1425
1426 /*!
1427 * \brief A virtual member.
1428 * \param[in] val_phi - Value of the adjoint velocity.
1429 */
1430 inline virtual void SetPhi_Old(unsigned long iPoint, const su2double *val_phi) {}
1431
1432 /*!
1433 * \brief A virtual member.
1434 * \param[in] Gamma - Ratio of Specific heats
1435 */
1436 inline virtual bool SetPressure(unsigned long iPoint, su2double Gamma) { return false; }
1437
1438 /*!
1439 * \brief A virtual member.
1440 * \param[in] config
1441 */
1442 inline virtual bool SetPressure(unsigned long iPoint, CConfig *config) { return false; }
1443
1444 /*!
1445 * \brief A virtual member.
1446 */
1447 inline virtual bool SetPressure(unsigned long iPoint, su2double Gamma, su2double turb_ke) { return false; }
1448
1449 /*!
1450 * \brief A virtual member.
1451 */
1452 inline virtual su2double *GetdPdU(unsigned long iPoint) { return nullptr; }
1453
1454 /*!
1455 * \brief A virtual member.
1456 */
1457 inline virtual su2double *GetdTdU(unsigned long iPoint) { return nullptr; }
1458
1459 /*!
1460 * \brief A virtual member.
1461 */
1462 inline virtual su2double *GetdTvedU(unsigned long iPoint) { return nullptr; }
1463
1464 /*!
1465 * \brief A virtual member.
1466 */
1467 inline virtual bool SetSoundSpeed(unsigned long iPoint, su2double soundspeed2) { return false; }
1468
1469 /*!
1470 * \brief A virtual member.
1471 * \param[in] Gas_Constant - Value of the Gas Constant
1472 */
1473 inline virtual bool SetTemperature(unsigned long iPoint, su2double Gas_Constant) { return false; }
1474
1475 /*!
1476 * \brief Sets the vibrational electronic temperature of the flow.
1477 * \return Value of the temperature of the flow.
1478 */
1479 inline virtual bool SetTemperature_ve(unsigned long iPoint, su2double val_Tve) { return false; }
1480
1481 /*!
1482 * \brief A virtual member.
1483 * \param[in] config - Configuration parameters.
1484 */
1485 inline virtual bool SetTemperature(unsigned long iPoint, CConfig *config) { return false; }
1486
1487 /*!
1488 * \brief A virtual member.
1489 * \param[in] config - Configuration parameters.
1490 */
1491 inline virtual void SetPrimitive(unsigned long iPoint, CConfig *config) {}
1492
1493 /*!
1494 * \brief Set the thermal coefficient.
1495 * \param[in] config - Configuration parameters.
1496 */
1497 inline virtual void SetThermalCoeff(unsigned long iPoint, CConfig *config) {}
1498
1499 /*!
1500 * \brief A virtual member.
1501 */
1502 inline virtual void SetStress_FEM(unsigned long iPoint, unsigned long iVar, su2double val_stress) {}
1503
1504 /*!
1505 * \brief A virtual member.
1506 */
1507 inline virtual void AddStress_FEM(unsigned long iPoint, unsigned long iVar, su2double val_stress) {}
1508
1509 /*!
1510 * \brief A virtual member.
1511 */
1512 inline virtual const su2double *GetStress_FEM(unsigned long iPoint) const {return nullptr;}
1513
1514 /*!
1515 * \brief A virtual member.
1516 */
1517 inline virtual void SetVonMises_Stress(unsigned long iPoint, su2double val_stress) {}
1518
1519 /*!
1520 * \brief A virtual member.
1521 */
1522 inline virtual su2double GetVonMises_Stress(unsigned long iPoint) const { return 0.0; }
1523
1524 /*!
1525 * \brief A virtual member.
1526 */
1527 inline virtual void Add_SurfaceLoad_Res(unsigned long iPoint, const su2double *val_surfForce) {}
1528
1529 /*!
1530 * \brief A virtual member.
1531 */
1532 inline virtual su2double Get_SurfaceLoad_Res(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
1533
1534 /*!
1535 * \brief A virtual member.
1536 */
1537 inline virtual void Clear_SurfaceLoad_Res() {}
1538
1539 /*!
1540 * \brief A virtual member.
1541 */
1542 virtual void Set_SurfaceLoad_Res_n() {}
1543
1544 /*!
1545 * \brief A virtual member.
1546 */
1547 inline virtual su2double Get_SurfaceLoad_Res_n(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
1548
1549 /*!
1550 * \brief A virtual member.
1551 */
1552 inline virtual void Add_BodyForces_Res(unsigned long iPoint, const su2double *val_bodyForce) {}
1553
1554 /*!
1555 * \brief A virtual member.
1556 */
1557 inline virtual su2double Get_BodyForces_Res(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
1558
1559 /*!
1560 * \brief A virtual member.
1561 */
1562 inline virtual void Clear_BodyForces_Res(unsigned long iPoint) {}
1563
1564 /*!
1565 * \brief A virtual member.
1566 */
1567 inline virtual void Set_FlowTraction(unsigned long iPoint, const su2double *val_flowTraction) {}
1568
1569 /*!
1570 * \brief A virtual member.
1571 */
1572 inline virtual void Add_FlowTraction(unsigned long iPoint, const su2double *val_flowTraction) {}
1573
1574 /*!
1575 * \brief A virtual member.
1576 */
1577 inline virtual su2double Get_FlowTraction(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
1578
1579 /*!
1580 * \brief A virtual member.
1581 */
1582 virtual void Set_FlowTraction_n() {}
1583
1584 /*!
1585 * \brief A virtual member.
1586 */
1587 inline virtual su2double Get_FlowTraction_n(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
1588
1589 /*!
1590 * \brief A virtual member.
1591 */
1592 inline virtual void Set_isVertex(unsigned long iPoint, bool isVertex) {}
1593
1594 /*!
1595 * \brief A virtual member.
1596 */
1597 inline virtual bool Get_isVertex(unsigned long iPoint) const { return false; }
1598
1599 /*!
1600 * \brief A virtual member.
1601 */
1602 inline virtual void SetVelocity2(unsigned long iPoint) {}
1603
1604 /*!
1605 * \brief A virtual member.
1606 * \param[in] val_velocity - Pointer to the velocity.
1607 */
1608 inline virtual void SetVelocity_Old(unsigned long iPoint, const su2double *val_velocity) {}
1609
1610 /*!
1611 * \brief A virtual member.
1612 * \param[in] laminarViscosity
1613 */
1614 inline virtual void SetLaminarViscosity(unsigned long iPoint, su2double laminarViscosity) {}
1615
1616 /*!
1617 * \brief A virtual member.
1618 * \param[in] config - Definition of the particular problem.
1619 */
1620 inline virtual void SetLaminarViscosity(unsigned long iPoint, CConfig *config) {}
1621
1622 /*!
1623 * \brief A virtual member.
1624 * \param[in] thermalConductivity
1625 */
1626 inline virtual void SetThermalConductivity(unsigned long iPoint, su2double thermalConductivity) {}
1627
1628 /*!
1629 * \brief A virtual member.
1630 * \param[in] config - Definition of the particular problem.
1631 */
1632 inline virtual void SetThermalConductivity(unsigned long iPoint, CConfig *config) {}
1633
1634 /*!
1635 * \brief A virtual member.
1636 * \param[in] Cp - Constant pressure specific heat.
1637 */
1638 inline virtual void SetSpecificHeatCp(unsigned long iPoint, su2double Cp) {}
1639
1640 /*!
1641 * \brief A virtual member.
1642 * \param[in] Cv - Constant volume specific heat.
1643 */
1644 inline virtual void SetSpecificHeatCv(unsigned long iPoint, su2double Cv) {}
1645
1646 /*!
1647 * \brief A virtual member.
1648 */
1649 inline virtual void SetVelSolutionDVector(unsigned long iPoint) {}
1650
1651 /*!
1652 * \brief A virtual member.
1653 * \param[in] iVar - Index of the variable.
1654 * \param[in] iDim - Index of the dimension.
1655 * \return Value of the primitive variables gradient.
1656 */
1657 inline virtual su2double GetGradient_Primitive(unsigned long iPoint, unsigned long iVar, unsigned long iDim) const { return 0.0; }
1658
1659 /*!
1660 * \brief Get the primitive variable gradients for all points.
1661 * \return Reference to primitive variable gradient.
1662 */
1664 inline virtual const CVectorOfMatrix& GetGradient_Primitive() const { AssertOverride(); return Gradient; }
1665
1666 /*!
1667 * \brief Get the primitive variables limiter.
1668 * \return Primitive variables limiter for the entire domain.
1669 */
1671 inline virtual const MatrixType& GetLimiter_Primitive() const { AssertOverride(); return Limiter; }
1672
1673 /*!
1674 * \brief A virtual member.
1675 * \param[in] iVar - Index of the variable.
1676 * \return Value of the primitive variables gradient.
1677 */
1678 inline virtual su2double GetLimiter_Primitive(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
1679
1680 /*!
1681 * \brief A virtual member.
1682 * \return Value of the primitive variables gradient.
1683 */
1684 inline virtual CMatrixView<su2double> GetGradient_Primitive(unsigned long iPoint, unsigned long iVar=0) { return nullptr; }
1685
1686 /*!
1687 * \brief A virtual member.
1688 * \return Value of the primitive variables gradient.
1689 */
1690 inline virtual su2double *GetLimiter_Primitive(unsigned long iPoint) { return nullptr; }
1691
1692 /*!
1693 * \brief Get the value of the primitive gradient for MUSCL reconstruction.
1694 * \return Value of the primitive gradient for MUSCL reconstruction.
1695 */
1696 inline virtual CMatrixView<su2double> GetGradient_Reconstruction(unsigned long iPoint) { return nullptr; }
1697
1698 /*!
1699 * \brief Get the reconstruction gradient for primitive variable at all points.
1700 * \return Reference to variable reconstruction gradient.
1701 */
1703 inline virtual const CVectorOfMatrix& GetGradient_Reconstruction() const { AssertOverride(); return Gradient; }
1704
1705 /*!
1706 * \brief Set the blending function for the blending of k-w and k-eps.
1707 * \param[in] val_viscosity - Value of the vicosity.
1708 * \param[in] val_density - Value of the density.
1709 * \param[in] val_dist - Value of the distance to the wall.
1710 */
1711 inline virtual void SetBlendingFunc(unsigned long iPoint, su2double val_viscosity, su2double val_dist, su2double val_density, TURB_TRANS_MODEL trans_model) {}
1712
1713 /*!
1714 * \brief Get the first blending function of the SST model.
1715 */
1716 inline virtual su2double GetF1blending(unsigned long iPoint) const { return 0.0; }
1717
1718 /*!
1719 * \brief Get the second blending function of the SST model.
1720 */
1721 inline virtual su2double GetF2blending(unsigned long iPoint) const { return 0.0; }
1722
1723 /*!
1724 * \brief Get the value of the cross diffusion of tke and omega.
1725 */
1726 inline virtual su2double GetCrossDiff(unsigned long iPoint) const { return 0.0; }
1727
1728 /*!
1729 * \brief Get the value of the eddy viscosity.
1730 * \return the value of the eddy viscosity.
1731 */
1732 inline virtual su2double GetmuT(unsigned long iPoint) const { return 0.0; }
1733
1734 /*!
1735 * \brief Get the value of the intermittency.
1736 * \return the value of the intermittency.
1737 */
1738 inline virtual su2double GetIntermittency(unsigned long iPoint) const { return 0.0; }
1739
1740 /*!
1741 * \brief Set the intermittency.
1742 * \param[in] val_dist - Value of the intermittency.
1743 */
1744 inline virtual void SetIntermittency(unsigned long iPoint, su2double val_Intermittency) {}
1745
1746 /*!
1747 * \brief Get the value of the separation intermittency.
1748 * \return the value of the separation intermittency.
1749 */
1750 inline virtual su2double GetIntermittencySep(unsigned long iPoint) const { return 0.0; }
1751
1752 /*!
1753 * \brief Set the separation intermittency (gamma_sep).
1754 * \param[in] val_dist - Value of the separation intermittency (gamma_sep).
1755 */
1756 inline virtual void SetIntermittencySep(unsigned long iPoint, su2double val_Intermittency_sep) {}
1757
1758 /*!
1759 * \brief Get the value of the effective intermittency.
1760 * \return the value of the effective intermittency.
1761 */
1762 inline virtual su2double GetIntermittencyEff(unsigned long iPoint) const { return 0.0; }
1763
1764 /*!
1765 * \brief Set the effective intermittency (gamma_eff).
1766 * \param[in] Value of the effective intermittency (gamma_eff).
1767 */
1768 inline virtual void SetIntermittencyEff(unsigned long iPoint, su2double val_Intermittency_eff) {}
1769
1770 /*!
1771 * \brief Set the value of the eddy viscosity.
1772 * \param[in] val_muT
1773 */
1774 inline virtual void SetmuT(unsigned long iPoint, su2double val_muT) {}
1775
1776 /*!
1777 * \brief Set the value of the turbulence index.
1778 * \param[in] val_turb_index - turbulence index
1779 */
1780 inline virtual void SetTurbIndex(unsigned long iPoint, su2double val_turb_index) {}
1781
1782 /*!
1783 * \brief Get the value of the turbulence index.
1784 * \return val_turb_index - turbulence index
1785 */
1786 inline virtual su2double GetTurbIndex(unsigned long iPoint) const {return 0.0;}
1787
1788 /*!
1789 * \brief A virtual member.
1790 * \param[in] iVar - Index of the variable.
1791 * \param[in] val_source - Value of the harmonic balance source.
1792 */
1793 inline virtual void SetHarmonicBalance_Source(unsigned long iPoint, unsigned long iVar, su2double val_source) {}
1794
1795 /*!
1796 * \brief A virtual member.
1797 */
1798 inline virtual su2double GetHarmonicBalance_Source(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
1799
1800 /*!
1801 * \brief Set the Eddy Viscosity Sensitivity of the problem.
1802 * \param[in] val_EddyViscSens - Eddy Viscosity Sensitivity.
1803 * \param[in] numTotalVar - Number of variables.
1804 */
1805 inline virtual void SetEddyViscSens(unsigned long iPoint, const su2double *val_EddyViscSens, unsigned long numTotalVar) {}
1806
1807 /*!
1808 * \brief Get the Eddy Viscosity Sensitivity of the problem.
1809 * \return Pointer to the Eddy Viscosity Sensitivity.
1810 */
1811 inline virtual su2double *GetEddyViscSens(unsigned long iPoint) { return nullptr; }
1812
1813 /*!
1814 * \brief A virtual member. Set the direct solution for the adjoint solver.
1815 * \param[in] solution_direct - Value of the direct solution.
1816 */
1817 inline virtual void SetSolution_Direct(unsigned long iPoint, const su2double *solution_direct) {}
1818
1819 /*!
1820 * \brief A virtual member. Get the direct solution for the adjoint solver.
1821 * \return Pointer to the direct solution vector.
1822 */
1823 inline virtual su2double *GetSolution_Direct(unsigned long iPoint) { return nullptr; }
1824
1825 /*!
1826 * \brief A virtual member. Set the restart geometry (coordinate of the converged solution)
1827 * \param[in] val_coordinate_direct - Value of the restart coordinate.
1828 */
1829 inline virtual void SetGeometry_Direct(unsigned long iPoint, const su2double *val_coordinate_direct) {}
1830
1831 /*!
1832 * \brief A virtual member. Get the restart geometry (coordinate of the converged solution).
1833 * \return Pointer to the restart coordinate vector.
1834 */
1835 inline virtual su2double *GetGeometry_Direct(unsigned long iPoint) { return nullptr; }
1836
1837 /*!
1838 * \brief A virtual member. Get the restart geometry (coordinate of the converged solution).
1839 * \return Coordinate of the direct solver restart for .
1840 */
1841 inline virtual su2double GetGeometry_Direct(unsigned long iPoint, unsigned long iDim) const { return 0.0; }
1842
1843 /*!
1844 * \brief A virtual member. Get the geometry solution.
1845 * \param[in] iVar - Index of the variable.
1846 * \return Value of the solution for the index <i>iVar</i>.
1847 */
1848 inline virtual su2double GetSolution_Geometry(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
1849
1850 /*!
1851 * \brief A virtual member. Set the value of the mesh solution (adjoint).
1852 * \param[in] solution - Solution of the problem (acceleration).
1853 */
1854 inline virtual void SetSolution_Geometry(unsigned long iPoint, const su2double *solution_geometry) {}
1855
1856 /*!
1857 * \brief A virtual member. Set the value of the mesh solution (adjoint).
1858 * \param[in] solution - Solution of the problem (acceleration).
1859 */
1860 inline virtual void SetSolution_Geometry(unsigned long iPoint, unsigned long iVar, su2double solution_geometry) {}
1861
1862 /*!
1863 * \brief A virtual member. Set the value of the old geometry solution (adjoint).
1864 */
1865 inline virtual void Set_OldSolution_Geometry() {}
1866
1867 /*!
1868 * \brief A virtual member. Get the value of the old geometry solution (adjoint).
1869 * \param[out] solution - old adjoint solution for coordinate iDim
1870 */
1871 inline virtual su2double Get_OldSolution_Geometry(unsigned long iPoint, unsigned long iDim) const { return 0.0; }
1872
1873 /*!
1874 * \brief Get BGS solution to compute the BGS residual (difference between BGS and BGS_k).
1875 * \note This is virtual because for some classes the result of a BGS iteration is not "Solution".
1876 * If this method is overriden, the BGSSolution_k ones proabably have to be too.
1877 */
1878 inline virtual su2double Get_BGSSolution(unsigned long iPoint, unsigned long iVar) const {
1879 return Solution(iPoint, iVar);
1880 }
1881
1882 /*!
1883 * \brief Set the value of the solution in the previous BGS subiteration.
1884 */
1885 virtual void Set_BGSSolution_k();
1886
1887 /*!
1888 * \brief Restore the previous BGS subiteration to solution.
1889 */
1890 virtual void Restore_BGSSolution_k();
1891
1892 /*!
1893 * \brief Set the value of the solution in the previous BGS subiteration.
1894 */
1895 inline virtual void Set_BGSSolution_k(unsigned long iPoint, unsigned long iVar, su2double val_var) {
1896 Solution_BGS_k(iPoint,iVar) = val_var;
1897 }
1898
1899 /*!
1900 * \brief Get the value of the solution in the previous BGS subiteration.
1901 * \param[out] val_solution - solution in the previous BGS subiteration.
1902 */
1903 inline virtual su2double Get_BGSSolution_k(unsigned long iPoint, unsigned long iVar) const {
1904 return Solution_BGS_k(iPoint,iVar);
1905 }
1906
1907 /*!
1908 * \brief Set the value of the velocity (Structural Analysis).
1909 * \param[in] solution - Solution of the problem (velocity).
1910 */
1911 inline virtual void SetSolution_Vel(unsigned long iPoint, const su2double *solution) {}
1912
1913 /*!
1914 * \overload
1915 * \param[in] iVar - Index of the variable.
1916 * \param[in] solution_vel - Value of the solution for the index <i>iVar</i>.
1917 */
1918 inline virtual void SetSolution_Vel(unsigned long iPoint, unsigned long iVar, su2double solution_vel) {}
1919
1920 /*!
1921 * \brief Set the value of the velocity (Structural Analysis) at time n.
1922 * \param[in] solution_vel_time_n - Value of the old solution.
1923 */
1924 inline virtual void SetSolution_Vel_time_n(unsigned long iPoint, const su2double *solution_vel_time_n) {}
1925
1926 /*!
1927 * \overload
1928 * \param[in] iVar - Index of the variable.
1929 * \param[in] solution_vel_time_n - Value of the old solution for the index <i>iVar</i>.
1930 */
1931 inline virtual void SetSolution_Vel_time_n(unsigned long iPoint, unsigned long iVar, su2double solution_vel_time_n) {}
1932
1933 /*!
1934 * \brief Get the solution at time n.
1935 * \param[in] iVar - Index of the variable.
1936 * \return Value of the solution for the index <i>iVar</i>.
1937 */
1938 inline su2double GetSolution_time_n(unsigned long iPoint, unsigned long iVar) const { return Solution_time_n(iPoint,iVar); }
1939
1940 /*!
1941 * \brief Get the solution at time n-1.
1942 * \param[in] iVar - Index of the variable.
1943 * \return Value of the solution for the index <i>iVar</i>.
1944 */
1945 inline su2double GetSolution_time_n1(unsigned long iPoint, unsigned long iVar) const { return Solution_time_n1(iPoint,iVar); }
1946
1947 /*!
1948 * \brief Get the velocity (Structural Analysis).
1949 * \param[in] iVar - Index of the variable.
1950 * \return Value of the solution for the index <i>iVar</i>.
1951 */
1952 inline virtual su2double GetSolution_Vel(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
1953
1954 /*!
1955 * \brief Get the velocity (Structural Analysis).
1956 * \return Pointer to the velocity vector at a point.
1957 */
1958 inline virtual su2double* GetSolution_Vel(unsigned long iPoint) { return nullptr; }
1959
1960 /*!
1961 * \brief Get the velocity of the nodes (Structural Analysis) at time n.
1962 * \param[in] iVar - Index of the variable.
1963 * \return Pointer to the old solution vector.
1964 */
1965 inline virtual su2double GetSolution_Vel_time_n(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
1966
1967 /*!
1968 * \brief Get the velocity of the nodes (Structural Analysis) at time n.
1969 * \return Pointer to the velocity vector at a point.
1970 */
1971 inline virtual su2double* GetSolution_Vel_time_n(unsigned long iPoint) { return nullptr; }
1972
1973 /*!
1974 * \brief Set the value of the acceleration (Structural Analysis).
1975 * \param[in] solution_accel - Solution of the problem (acceleration).
1976 */
1977 inline virtual void SetSolution_Accel(unsigned long iPoint, const su2double *solution_accel) {}
1978
1979 /*!
1980 * \overload
1981 * \param[in] iVar - Index of the variable.
1982 * \param[in] solution_accel - Value of the solution for the index <i>iVar</i>.
1983 */
1984 inline virtual void SetSolution_Accel(unsigned long iPoint, unsigned long iVar, su2double solution_accel) {}
1985
1986 /*!
1987 * \brief Set the value of the acceleration (Structural Analysis) at time n.
1988 * \param[in] solution_accel_time_n - Pointer to the residual vector.
1989 */
1990 inline virtual void SetSolution_Accel_time_n(unsigned long iPoint, const su2double *solution_accel_time_n) {}
1991
1992 /*!
1993 * \overload
1994 * \param[in] iVar - Index of the variable.
1995 * \param[in] solution_accel_time_n - Value of the old solution for the index <i>iVar</i>.
1996 */
1997 inline virtual void SetSolution_Accel_time_n(unsigned long iPoint, unsigned long iVar, su2double solution_accel_time_n) {}
1998
1999 /*!
2000 * \brief Get the acceleration (Structural Analysis).
2001 * \param[in] iVar - Index of the variable.
2002 * \return Value of the solution for the index <i>iVar</i>.
2003 */
2004 inline virtual su2double GetSolution_Accel(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
2005
2006 /*!
2007 * \brief Get the solution of the problem.
2008 * \return Pointer to the solution vector.
2009 */
2010 inline virtual su2double *GetSolution_Accel(unsigned long iPoint) { return nullptr; }
2011
2012 /*!
2013 * \brief Get the acceleration of the nodes (Structural Analysis) at time n.
2014 * \param[in] iVar - Index of the variable.
2015 * \return Pointer to the old solution vector.
2016 */
2017 inline virtual su2double GetSolution_Accel_time_n(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
2018
2019 /*!
2020 * \brief Get the solution at time n.
2021 * \return Pointer to the solution (at time n) vector.
2022 */
2023 inline virtual su2double *GetSolution_Accel_time_n(unsigned long iPoint) { return nullptr; }
2024
2025 /*!
2026 * \brief A virtual member. Set the value of the velocity solution predictor.
2027 */
2028 inline virtual void SetSolution_Vel_Pred(unsigned long iPoint, const su2double *val_solution_pred) { }
2029
2030 /*!
2031 * \brief A virtual member. Set the value of the old solution.
2032 * \param[in] solution_pred - Pointer to the residual vector.
2033 */
2034 inline virtual void SetSolution_Pred(unsigned long iPoint, const su2double *solution_pred) {}
2035
2036 /*!
2037 * \brief A virtual member. Get the velocity solution predictor.
2038 * \return Pointer to the velocity solution vector.
2039 */
2040 inline virtual const su2double *GetSolution_Vel_Pred(unsigned long iPoint) const {return nullptr; }
2041
2042 /*!
2043 * \brief A virtual member. Get the solution at time n.
2044 * \return Pointer to the solution (at time n) vector.
2045 */
2046 inline virtual const su2double *GetSolution_Pred(unsigned long iPoint) const { return nullptr; }
2047
2048 /*!
2049 * \brief A virtual member. Set the value of the old solution.
2050 * \param[in] solution_pred_Old - Pointer to the residual vector.
2051 */
2052 inline virtual void SetSolution_Pred_Old(unsigned long iPoint, const su2double *solution_pred_Old) {}
2053
2054 /*!
2055 * \brief A virtual member. Get the solution at time n.
2056 * \return Pointer to the solution (at time n) vector.
2057 */
2058 inline virtual const su2double *GetSolution_Pred_Old(unsigned long iPoint) const { return nullptr; }
2059
2060 /*!
2061 * \brief A virtual member.
2062 */
2063 inline virtual void SetReference_Geometry(unsigned long iPoint, unsigned long iVar, su2double ref_geometry) {}
2064
2065 /*!
2066 * \brief A virtual member.
2067 */
2068 inline virtual const su2double* GetReference_Geometry(unsigned long iPoint) const { return nullptr; }
2069
2070 /*!
2071 * \brief A virtual member.
2072 */
2073 inline virtual void SetPrestretch(unsigned long iPoint, unsigned long iVar, su2double val_prestretch) {}
2074
2075 /*!
2076 * \brief A virtual member.
2077 */
2078 inline virtual const su2double *GetPrestretch(unsigned long iPoint) const {return nullptr; }
2079
2080 /*!
2081 * \brief A virtual member.
2082 */
2083 inline virtual su2double GetPrestretch(unsigned long iPoint, unsigned long iVar) const { return 0.0; }
2084
2085 /*!
2086 * \brief A virtual member. Get the value of the undeformed coordinates.
2087 * \param[in] iDim - Index of Mesh_Coord[nDim]
2088 * \return Value of the original coordinate iDim.
2089 */
2090 inline virtual su2double GetMesh_Coord(unsigned long iPoint, unsigned long iDim) const { return 0.0; }
2091
2092 /*!
2093 * \brief A virtual member. Get the undeformed coordinates.
2094 * \return Pointer to the reference coordinates.
2095 */
2096 inline virtual const su2double *GetMesh_Coord(unsigned long iPoint) const { return nullptr; }
2097
2098 /*!
2099 * \brief A virtual member. Get the undeformed coordinates for the entire domain.
2100 */
2101 inline virtual const MatrixType *GetMesh_Coord() const { return nullptr; }
2102
2103 /*!
2104 * \brief A virtual member. Set the value of the undeformed coordinates.
2105 * \param[in] iDim - Index of Mesh_Coord[nDim]
2106 * \param[in] val_coord - Value of Mesh_Coord[nDim]
2107 */
2108 inline virtual void SetMesh_Coord(unsigned long iPoint, unsigned long iDim, su2double val_coord) { }
2109
2110 /*!
2111 * \brief A virtual member. Get the value of the wall distance in reference coordinates.
2112 * \param[in] iDim - Index of Mesh_Coord[nDim]
2113 * \return Value of the wall distance in reference coordinates.
2114 */
2115 inline virtual su2double GetWallDistance(unsigned long iPoint) const { return 0.0; }
2116
2117 /*!
2118 * \brief A virtual member. Set the value of the wall distance in reference coordinates.
2119 * \param[in] val_dist - Value of wall distance.
2120 */
2121 inline virtual void SetWallDistance(unsigned long iPoint, su2double val_dist) { }
2122
2123 /*!
2124 * \brief A virtual member. Register the reference coordinates of the mesh.
2125 */
2126 inline virtual void Register_MeshCoord() { }
2127
2128 /*!
2129 * \brief A virtual member. Recover the value of the adjoint of the mesh coordinates.
2130 */
2131 inline virtual void GetAdjoint_MeshCoord(unsigned long iPoint, su2double *adj_mesh) { }
2132
2133 /*!
2134 * \brief A virtual member. Get the value of the displacement imposed at the boundary.
2135 * \return Value of the boundary displacement.
2136 */
2137 inline virtual su2double GetBound_Disp(unsigned long iPoint, unsigned long iDim) const { return 0.0; }
2138
2139 /*!
2140 * \brief A virtual member. Get the value of the velocity imposed at the boundary.
2141 * \return Value of the boundary velocity.
2142 */
2143 inline virtual su2double GetBound_Vel(unsigned long iPoint, unsigned long iDim) const { return 0.0; }
2144
2145 /*!
2146 * \brief A virtual member. Set the boundary displacement.
2147 * \param[in] val_BoundDisp - Pointer to the boundary displacements.
2148 */
2149 inline virtual void SetBound_Disp(unsigned long iPoint, const su2double *val_BoundDisp) { }
2150
2151 /*!
2152 * \brief A virtual member. Set the boundary velocity.
2153 * \param[in] val_BoundVel - Pointer to the boundary velocity.
2154 */
2155 inline virtual void SetBound_Vel(unsigned long iPoint, const su2double *val_BoundVel) { }
2156
2157 /*!
2158 * \brief A virtual member. Set the boundary displacement.
2159 * \param[in] iDim - Index of the dimension of interest.
2160 * \param[in] val_BoundDisp - Value of the boundary displacements.
2161 */
2162 inline virtual void SetBound_Disp(unsigned long iPoint, unsigned long iDim, const su2double val_BoundDisp) { }
2163
2164 /*!
2165 * \brief A virtual member. Set the boundary velocity.
2166 * \param[in] iDim - Index of the dimension of interest.
2167 * \param[in] val_BoundVel - Value of the boundary velocity.
2168 */
2169 inline virtual void SetBound_Vel(unsigned long iPoint, unsigned long iDim, const su2double val_BoundVel) { }
2170
2171 /*!
2172 * \brief A virtual member. Get the value of the displacement imposed at the boundary.
2173 * \return Value of the boundary displacement.
2174 */
2175 inline virtual const su2double* GetBoundDisp_Direct(unsigned long iPoint) const { return nullptr; }
2176
2177 /*!
2178 * \brief A virtual member. Set the solution for the boundary displacements.
2179 * \param[in] val_BoundDisp - Pointer to the boundary displacements.
2180 */
2181 inline virtual void SetBoundDisp_Direct(unsigned long iPoint, const su2double *val_BoundDisp) { }
2182
2183 /*!
2184 * \brief Set the value of the sensitivity with respect to the undeformed coordinates.
2185 * \param[in] val_sens - Pointer to the sensitivities of the boundary displacements.
2186 */
2187 inline virtual void SetBoundDisp_Sens(unsigned long iPoint, const su2double *val_sens) { }
2188
2189 /*!
2190 * \brief A virtual member. Get the value of the sensitivity with respect to the undeformed coordinates.
2191 * \param[in] iDim - Index of Mesh_Coord_Sens[nDim]
2192 * \return Value of the original Mesh_Coord_Sens iDim.
2193 */
2194 inline virtual su2double GetBoundDisp_Sens(unsigned long iPoint, unsigned long iDim) const { return 0.0; }
2195
2196 /*!
2197 * \brief A virtual member. Register the boundary displacements of the mesh.
2198 */
2199 inline virtual void Register_BoundDisp() { }
2200
2201 /*!
2202 * \brief A virtual member. Recover the value of the adjoint of the boundary displacements.
2203 */
2204 inline virtual void GetAdjoint_BoundDisp(unsigned long iPoint, su2double *adj_disp) const { }
2205
2206 /*!
2207 * \brief A virtual member.
2208 */
2209 inline virtual void RegisterFlowTraction(bool reset) { }
2210
2211 /*!
2212 * \brief A virtual member.
2213 */
2214 inline virtual su2double ExtractFlowTractionSensitivity(unsigned long iPoint, unsigned long iDim) const { return 0.0; }
2215
2216 /*!
2217 * \brief Register the variables in the solution array as input/output variable.
2218 * \param[in] input - input or output variables.
2219 */
2220 void RegisterSolution(bool input);
2221
2222 /*!
2223 * \brief Register the variables in the solution_time_n array as input/output variable.
2224 */
2226
2227 /*!
2228 * \brief Register the variables in the solution_time_n1 array as input/output variable.
2229 */
2231
2232 /*!
2233 * \brief Register the variables in the user defined source array as input/output variable.
2234 */
2236
2237 /*!
2238 * \brief Set the adjoint values of the solution.
2239 * \param[in] adj_sol - The adjoint values of the solution.
2240 */
2241 inline void SetAdjointSolution(unsigned long iPoint, const su2double *adj_sol) {
2242 for (unsigned long iVar = 0; iVar < AD_OutputIndex.cols(); iVar++)
2243 AD::SetDerivative(AD_OutputIndex(iPoint,iVar), SU2_TYPE::GetValue(adj_sol[iVar]));
2244 }
2245
2246 /*!
2247 * \brief Get the adjoint values of the solution.
2248 * \param[in] adj_sol - The adjoint values of the solution.
2249 */
2250 inline void GetAdjointSolution(unsigned long iPoint, su2double *adj_sol) const {
2251 for (unsigned long iVar = 0; iVar < AD_InputIndex.cols(); iVar++)
2252 adj_sol[iVar] = AD::GetDerivative(AD_InputIndex(iPoint,iVar));
2253 }
2254
2255 inline void GetAdjointSolution_time_n(unsigned long iPoint, su2double *adj_sol) const {
2257 for (unsigned long iVar = 0; iVar < Solution_time_n.cols(); iVar++) {
2258 AD::SetIndex(index, Solution_time_n(iPoint, iVar));
2259 adj_sol[iVar] = AD::GetDerivative(index);
2260 }
2261 }
2262
2263 inline void GetAdjointSolution_time_n1(unsigned long iPoint, su2double *adj_sol) const {
2265 for (unsigned long iVar = 0; iVar < Solution_time_n1.cols(); iVar++) {
2266 AD::SetIndex(index, Solution_time_n1(iPoint, iVar));
2267 adj_sol[iVar] = AD::GetDerivative(index);
2268 }
2269 }
2270
2271 /*!
2272 * \brief Set the sensitivity at the node
2273 * \param[in] iDim - spacial component
2274 * \param[in] val - value of the Sensitivity
2275 */
2276 inline virtual void SetSensitivity(unsigned long iPoint, unsigned long iDim, su2double val) {}
2277
2278 /*!
2279 * \brief Get the Sensitivity at the node
2280 * \param[in] iDim - spacial component
2281 * \return value of the Sensitivity
2282 */
2283 inline virtual su2double GetSensitivity(unsigned long iPoint, unsigned long iDim) const { return 0.0; }
2284 inline virtual const MatrixType& GetSensitivity() const { AssertOverride(); return Solution; }
2285
2286 inline virtual void SetTau_Wall(unsigned long iPoint, su2double tau_wall) {}
2287
2288 inline virtual su2double GetTau_Wall(unsigned long iPoint) const { return 0.0; }
2289
2290 inline virtual void SetVortex_Tilting(unsigned long iPoint, CMatrixView<const su2double> PrimGrad_Flow,
2291 const su2double* Vorticity, su2double LaminarViscosity) {}
2292
2293 inline virtual su2double GetVortex_Tilting(unsigned long iPoint) const { return 0.0; }
2294
2295 /*!
2296 * \brief A virtual member: Set the recovered pressure for streamwise periodic flow.
2297 * \param[in] iPoint - Point index.
2298 * \param[in] val_pressure - pressure value.
2299 */
2300 inline virtual void SetStreamwise_Periodic_RecoveredPressure(unsigned long iPoint,su2double val_pressure) { }
2301
2302 /*!
2303 * \brief A virtual member: Get the recovered pressure for streamwise periodic flow.
2304 * \param[in] iPoint - Point index.
2305 * \return Recovered/Physical pressure for streamwise periodic flow.
2306 */
2307 inline virtual su2double GetStreamwise_Periodic_RecoveredPressure(unsigned long iPoint) const { return 0.0; }
2308
2309 /*!
2310 * \brief A virtual member: Set the recovered temperature for streamwise periodic flow.
2311 * \param[in] iPoint - Point index.
2312 * \param[in] val_temperature - temperature value.
2313 */
2314 inline virtual void SetStreamwise_Periodic_RecoveredTemperature(unsigned long iPoint, su2double val_temperature) { }
2315
2316 /*!
2317 * \brief A virtual member: Get the recovered temperature for streamwise periodic flow.
2318 * \param[in] iPoint - Point index.
2319 * \return Recovered/Physical temperature for streamwise periodic flow.
2320 */
2321 inline virtual su2double GetStreamwise_Periodic_RecoveredTemperature(unsigned long iPoint) const { return 0.0; }
2322
2323 /*!
2324 * \brief Virtual member: Set the Radiative source term at the node
2325 * \return value of the radiative source term
2326 */
2327 inline virtual const su2double *GetRadiative_SourceTerm(unsigned long iPoint) const { return nullptr;}
2328
2329 /*!
2330 * \brief Virtual member: Set the Radiative source term at the node
2331 * \param[in] val_RadSourceTerm - value of the radiative source term
2332 */
2333 inline virtual void SetRadiative_SourceTerm(unsigned long iPoint, unsigned long iVar, su2double val_RadSourceTerm) { }
2334
2335 /*!
2336 * \brief Get whether a volumetric heat source is to be introduced in point iPoint
2337 * \return Bool, determines if this point introduces volumetric heat
2338 */
2339 inline virtual bool GetVol_HeatSource(unsigned long iPoint) const { return false; }
2340
2341 /*!
2342 * \brief Set the FSI force sensitivity at the node
2343 * \param[in] iDim - spacial component
2344 * \param[in] val - value of the Sensitivity
2345 */
2346 virtual void SetFlowTractionSensitivity(unsigned long iPoint, unsigned long iDim, su2double val) { }
2347
2348 /*!
2349 * \brief Get the FSI force sensitivity at the node
2350 * \param[in] iDim - spacial component
2351 * \return value of the Sensitivity
2352 */
2353 virtual su2double GetFlowTractionSensitivity(unsigned long iPoint, unsigned long iDim) const { return 0.0; }
2354
2355 /*!
2356 * \brief Set the source term applied into the displacement adjoint coming from external solvers
2357 * \param[in] iDim - spacial component
2358 * \param[in] val - value of the source term
2359 */
2360 virtual void SetSourceTerm_DispAdjoint(unsigned long iPoint, unsigned long iDim, su2double val) { }
2361 virtual void SetSourceTerm_VelAdjoint(unsigned long iPoint, unsigned long iDim, su2double val) { }
2362
2363 /*!
2364 * \brief Get the source term applied into the displacement adjoint coming from external solvers
2365 * \param[in] iDim - spacial component
2366 * \return value of the source term
2367 */
2368 virtual su2double GetSourceTerm_DispAdjoint(unsigned long iPoint, unsigned long iDim) const { return 0.0; }
2369 virtual su2double GetSourceTerm_VelAdjoint(unsigned long iPoint, unsigned long iDim) const { return 0.0; }
2370
2371 /*!
2372 * \brief Set fluid entropy
2373 * \param[in] iPoint - Node index
2374 * \param[in] entropy - fluid entropy value.
2375 */
2376 inline virtual void SetEntropy(unsigned long iPoint, su2double entropy) { };
2377
2378 /*!
2379 * \brief Get fluid entropy
2380 * \param[in] iPoint - Node index
2381 * \return Entropy - Fluid entropy value
2382 */
2383 inline virtual su2double GetEntropy(unsigned long iPoint) const { return 0; }
2384
2385 /*!
2386 * \brief Set dataset extrapolation instance
2387 * \param[in] iPoint - Node index
2388 * \param[in] extrapolation - Extrapolation instance (0 = within dataset, 1 = outside dataset)
2389 */
2390 inline virtual void SetDataExtrapolation(unsigned long iPoint, unsigned short extrapolation) { };
2391
2392 /*!
2393 * \brief Get dataset extrapolation instance
2394 * \param[in] iPoint - Node index
2395 * \return extrapolation - Extrapolation instance (0 = within dataset, 1 = outside dataset)
2396 */
2397 inline virtual unsigned short GetDataExtrapolation(unsigned long iPoint) const { return 0; }
2398
2399 /*!
2400 * \brief Set the number of iterations required by a Newton solver used by the fluid model.
2401 * \param[in] iPoint - Node index
2402 * \param[in] nIter - Number of iterations evaluated by the Newton solver
2403 */
2404 inline virtual void SetNewtonSolverIterations(unsigned long iPoint, unsigned long nIter) { }
2405
2406 /*!
2407 * \brief Get the number of iterations required by a Newton solver used by the fluid model.
2408 * \param[in] iPoint - Node index
2409 * \return Number of iterations evaluated by the Newton solver
2410 */
2411 inline virtual unsigned long GetNewtonSolverIterations(unsigned long iPoint) const { return 0; }
2412
2413 /*!
2414 * \brief LUT premixed flamelet: virtual functions for the speciesflameletvariable LUT
2415 */
2416 inline virtual void SetLookupScalar(unsigned long iPoint, su2double val_lookup_scalar, unsigned short val_ivar) { }
2417
2418 inline virtual void SetScalarSource(unsigned long iPoint, unsigned short val_ivar, su2double val_source) { }
2419
2420 inline virtual void SetTableMisses(unsigned long iPoint, unsigned short misses) { }
2421
2422 inline virtual unsigned short GetTableMisses(unsigned long iPoint) const { return 0; }
2423
2424 inline virtual const su2double *GetScalarSources(unsigned long iPoint) const { return nullptr; }
2425 inline virtual const su2double *GetScalarLookups(unsigned long iPoint) const { return nullptr; }
2426
2427 inline virtual su2double GetMomCoeff(unsigned long iPoint) { return 0.0; }
2428
2429 inline virtual void SetMomCoeff(unsigned long iPoint, su2double val_Mom_Coeff) { }
2430
2431 /*!
2432 * \brief Get whether a strong boundary condition was applied to the point, which for the
2433 * pressure-based solver means its momentum row was deleted and carries no A_p.
2434 */
2435 inline virtual bool GetStrongBC(unsigned long iPoint) const { return false; }
2436
2437 inline virtual su2double GetMomentumCorrection(unsigned long iPoint, unsigned short iDim) { return 0.0; }
2438
2439 inline virtual void SetMomentumCorrection(unsigned long iPoint, unsigned short iDim, su2double val_mom) { }
2440
2441 inline virtual su2double GetHbyACorrection(unsigned long iPoint, unsigned short iDim) { return 0.0; }
2442
2443 inline virtual void SetHbyACorrection(unsigned long iPoint, unsigned short iDim, su2double val_HbyAcorrection) { }
2444};
size_t size() const noexcept
Definition C2DContainer.hpp:222
Index_t cols() const noexcept
Definition C2DContainer.hpp:222
Index_t rows() const noexcept
Definition C2DContainer.hpp:222
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Main class for defining the Thermo-Physical Model.
Definition CFluidModel.hpp:47
Class to represent a matrix (without owning the data, this just wraps a pointer).
Definition container_decorators.hpp:40
Class for defining the 2T (trans-rotational and vibro-electronic) nonequilibrium gas model.
Definition CNEMOGas.hpp:38
Main class for defining the variables.
Definition CVariable.hpp:50
virtual bool SetDensity(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1409
virtual bool SetPrimVar(unsigned long iPoint, su2double eddy_visc, su2double turb_ke, CFluidModel *FluidModel)
A virtual member.
Definition CVariable.hpp:1302
virtual su2double ExtractFlowTractionSensitivity(unsigned long iPoint, unsigned long iDim) const
A virtual member.
Definition CVariable.hpp:2214
void SetAuxVar(unsigned long iPoint, unsigned long iVar, const su2double auxvar)
Set auxiliary variables.
Definition CVariable.hpp:666
void GetResidual_Sum(unsigned long iPoint, su2double *val_residual) const
Get the value of the summed residual.
Definition CVariable.hpp:616
VectorType Max_Lambda_Visc
Maximun viscous eingenvalue.
Definition CVariable.hpp:85
unsigned long nPoint
Number of points in the domain.
Definition CVariable.hpp:106
virtual void Restore_BGSSolution_k()
Restore the previous BGS subiteration to solution.
Definition CVariable.cpp:132
virtual su2double GetThermalConductivity(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1166
virtual su2double GetDES_LengthScale(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:394
su2double GetMax_Lambda_Inv(unsigned long iPoint) const
Get the value of the maximum eigenvalue for the inviscid terms of the PDE.
Definition CVariable.hpp:922
virtual void SetLookupScalar(unsigned long iPoint, su2double val_lookup_scalar, unsigned short val_ivar)
LUT premixed flamelet: virtual functions for the speciesflameletvariable LUT.
Definition CVariable.hpp:2416
virtual void SetPrimitive(unsigned long iPoint, CConfig *config)
A virtual member.
Definition CVariable.hpp:1491
const VectorType & GetSolutionExtra() const
Definition CVariable.hpp:498
unsigned long nPrimVar
Number of primitive variables.
Definition CVariable.hpp:109
const MatrixType & GetSolution_Max() const
Definition CVariable.hpp:866
virtual su2double GetMassFraction(unsigned long iPoint, unsigned long val_Species) const
A virtual member.
Definition CVariable.hpp:1024
virtual su2double GetLaminarViscosity(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1152
virtual CMatrixView< su2double > GetGradient_Primitive(unsigned long iPoint, unsigned long iVar=0)
A virtual member.
Definition CVariable.hpp:1684
void SetSolution(unsigned long iPoint, unsigned long iVar, su2double solution)
Set the value of the solution, one variable.
Definition CVariable.hpp:208
virtual su2double GetMomentumCorrection(unsigned long iPoint, unsigned short iDim)
Definition CVariable.hpp:2437
virtual su2double GetLES_Mode(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:406
VectorType ExternalExtra
External storage for the adjoint value (i.e. for the OF mainly.
Definition CVariable.hpp:102
MatrixType External
External (outer) contribution in discrete adjoint multizone problems.
Definition CVariable.hpp:60
void SetResidual_Old(unsigned long iPoint, const su2double *val_residual_old)
Set the value of the old residual.
Definition CVariable.hpp:575
void SetResidualSumZero(unsigned long iPoint)
Set summed residual vector to zero value.
Definition CVariable.hpp:593
virtual const su2double * GetSolution_Vel_Pred(unsigned long iPoint) const
A virtual member. Get the velocity solution predictor.
Definition CVariable.hpp:2040
bool GetNon_Physical(unsigned long iPoint)
Get the value of the non-physical boolean at a point.
Definition CVariable.hpp:240
virtual void Set_External_To_DualTimeDer()
Set Dual-time derivative contributions to the external.
Definition CVariable.hpp:456
su2double * GetSolution_time_n1(unsigned long iPoint)
Get the solution at time n-1.
Definition CVariable.hpp:567
CVariable()=default
virtual su2double GetTau_Wall(unsigned long iPoint) const
Definition CVariable.hpp:2288
virtual su2double GetGammaBC(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1244
su2double GetGradient(unsigned long iPoint, unsigned long iVar, unsigned long iDim) const
Get the value of the solution gradient.
Definition CVariable.hpp:813
virtual su2double GetLimiter_Primitive(unsigned long iPoint, unsigned long iVar) const
A virtual member.
Definition CVariable.hpp:1678
su2double GetLocalCFL(unsigned long iPoint) const
Get the value of the local CFL number for the current control volume (CV).
Definition CVariable.hpp:647
MatrixType Solution_time_n1
Solution of the problem at time n-1 for dual-time stepping technique.
Definition CVariable.hpp:71
su2double GetAuxVar(unsigned long iPoint, unsigned long iVar=0) const
Get the Aux var value at Point i, variable j.
Definition CVariable.hpp:658
MatrixType & GetLimiter(void)
Get the slope limiter.
Definition CVariable.hpp:843
virtual void SetObjFuncSource(unsigned long iPoint, const su2double *val_SetObjFuncSource)
A virtual member.
Definition CVariable.hpp:1237
MatrixType Limiter
Limiter of the solution of the problem.
Definition CVariable.hpp:77
virtual void SetRoe_Dissipation(unsigned long iPoint, su2double val_dissipation)
A virtual member.
Definition CVariable.hpp:374
void AddUnd_Lapl(unsigned long iPoint, unsigned long iVar, su2double val_und_lapl)
Increment the value of the undivided laplacian of the solution.
Definition CVariable.hpp:974
su2double GetUnderRelaxation(unsigned long iPoint) const
Get the value of the under-relaxation parameter for the current control volume (CV).
Definition CVariable.hpp:633
virtual bool SetPressure(unsigned long iPoint, su2double Gamma, su2double turb_ke)
A virtual member.
Definition CVariable.hpp:1447
CMatrixView< su2double > GetAuxVarGradient(unsigned long iPoint)
Get the value of the auxilliary gradient.
Definition CVariable.hpp:704
void RegisterContainer(bool input, su2activematrix &variable, su2matrix< AD::Identifier > &ad_index)
Definition CVariable.hpp:140
virtual void SetVelSolutionDVector(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1649
MatrixType AuxVar
Auxiliary variable for gradient computation.
Definition CVariable.hpp:81
virtual bool SetSoundSpeed(unsigned long iPoint, su2double soundspeed2)
A virtual member.
Definition CVariable.hpp:1467
virtual su2double GetVelocity(unsigned long iPoint, unsigned long iDim) const
A virtual member.
Definition CVariable.hpp:1129
void RegisterSolution_time_n1()
Register the variables in the solution_time_n1 array as input/output variable.
Definition CVariable.cpp:150
virtual su2double * GetEnthalpys(unsigned long iPoint)
Get the species enthalpy.
Definition CVariable.hpp:1030
void SetEnergy_ResTruncError_Zero(unsigned long iPoint)
Set the velocity of the truncation error to zero.
Definition CVariable.hpp:752
void RegisterContainer(bool input, su2activevector &variable, su2vector< AD::Identifier > *ad_index=nullptr)
Definition CVariable.hpp:144
virtual su2double GetTemperature(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1100
virtual void Set_isVertex(unsigned long iPoint, bool isVertex)
A virtual member.
Definition CVariable.hpp:1592
virtual void SetBoundDisp_Sens(unsigned long iPoint, const su2double *val_sens)
Set the value of the sensitivity with respect to the undeformed coordinates.
Definition CVariable.hpp:2187
void SetSolution(unsigned long iPoint, const su2double *solution)
Set the value of the solution, all variables.
Definition CVariable.hpp:198
virtual su2double * GetDiffusionCoeff(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1159
virtual void SetSourceTerm_VelAdjoint(unsigned long iPoint, unsigned long iDim, su2double val)
Definition CVariable.hpp:2361
unsigned long nPrimVarGrad
Number of primitives for which a gradient is computed.
Definition CVariable.hpp:110
virtual void SetdTde_rho(unsigned long iPoint, su2double dTde_rho)
A virtual member.
Definition CVariable.hpp:1374
virtual bool SetPrimVar(unsigned long iPoint, CConfig *config)
A virtual member.
Definition CVariable.hpp:1269
CVectorOfMatrix & GetAuxVarGradient(void)
Get the gradient of the auxilary variables.
Definition CVariable.hpp:685
su2double GetSolution(unsigned long iPoint, unsigned long iVar) const
Get the solution.
Definition CVariable.hpp:248
virtual void SetThermalConductivity(unsigned long iPoint, su2double thermalConductivity)
A virtual member.
Definition CVariable.hpp:1626
virtual su2double Get_FlowTraction(unsigned long iPoint, unsigned long iVar) const
A virtual member.
Definition CVariable.hpp:1577
virtual const MatrixType & GetPrimitive() const
Get the primitive variables for all points.
Definition CVariable.hpp:1319
const MatrixType & GetAuxVar(void) const
Get the entire Aux matrix of the problem.
Definition CVariable.hpp:653
su2double * GetSolution_time_n(unsigned long iPoint)
Get the solution at time n.
Definition CVariable.hpp:559
MatrixType Undivided_Laplacian
Undivided laplacian of the solution.
Definition CVariable.hpp:89
virtual su2double GetSensitivity(unsigned long iPoint, unsigned long iDim) const
Get the Sensitivity at the node.
Definition CVariable.hpp:2283
virtual void SetBesselIntegral(unsigned long iPoint, su2double val_integral)
A virtual member.
Definition CVariable.hpp:435
virtual void SetBound_Disp(unsigned long iPoint, unsigned long iDim, const su2double val_BoundDisp)
A virtual member. Set the boundary displacement.
Definition CVariable.hpp:2162
virtual su2double GetDiffusivity(unsigned long iPoint, unsigned short val_ivar) const
A virtual member.
Definition CVariable.hpp:1173
virtual void SetScalarSource(unsigned long iPoint, unsigned short val_ivar, su2double val_source)
Definition CVariable.hpp:2418
const VectorType & GetSensor() const
Definition CVariable.hpp:966
void SetMax_Lambda_Inv(unsigned long iPoint, su2double val_max_lambda)
Set the value of the maximum eigenvalue for the inviscid terms of the PDE.
Definition CVariable.hpp:894
virtual su2double GetVonMises_Stress(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1522
virtual su2double * GetSolution_Vel(unsigned long iPoint)
Get the velocity (Structural Analysis).
Definition CVariable.hpp:1958
CVectorOfMatrix & GetGradient(void)
Get the gradient of the entire solution.
Definition CVariable.hpp:796
VectorType SolutionExtra_BGS_k
Intermediate storage, enables cross term extraction as that is also pushed to Solution.
Definition CVariable.hpp:104
virtual void SetHarmonicBalance_Source(unsigned long iPoint, unsigned long iVar, su2double val_source)
A virtual member.
Definition CVariable.hpp:1793
void RegisterUserDefinedSource()
Register the variables in the user defined source array as input/output variable.
Definition CVariable.cpp:153
virtual void SetPrimitive(unsigned long iPoint, unsigned long iVar, su2double val_prim)
A virtual member.
Definition CVariable.hpp:1329
virtual void SetSolution_Accel_time_n(unsigned long iPoint, const su2double *solution_accel_time_n)
Set the value of the acceleration (Structural Analysis) at time n.
Definition CVariable.hpp:1990
VectorType Max_Lambda_Inv
Maximun inviscid eingenvalue.
Definition CVariable.hpp:84
virtual void AddStress_FEM(unsigned long iPoint, unsigned long iVar, su2double val_stress)
A virtual member.
Definition CVariable.hpp:1507
const CVectorOfMatrix & GetGradient(void) const
Definition CVariable.hpp:797
virtual void SetMesh_Coord(unsigned long iPoint, unsigned long iDim, su2double val_coord)
A virtual member. Set the value of the undeformed coordinates.
Definition CVariable.hpp:2108
virtual CMatrixView< const su2double > GetVelocityGradient(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1136
su2matrix< AD::Identifier > AD_OutputIndex
Indices of Solution variables in the adjoint vector after solver iteration.
Definition CVariable.hpp:98
virtual void SetSolution_Geometry(unsigned long iPoint, const su2double *solution_geometry)
A virtual member. Set the value of the mesh solution (adjoint).
Definition CVariable.hpp:1854
void SubtractRes_TruncError(unsigned long iPoint, const su2double *val_truncation_error)
Subtract a value to the truncation error.
Definition CVariable.hpp:723
virtual su2double * GetSolution_Accel(unsigned long iPoint)
Get the solution of the problem.
Definition CVariable.hpp:2010
const MatrixType & GetLimiter(void) const
Definition CVariable.hpp:844
virtual void SetSensitivity(unsigned long iPoint, unsigned long iDim, su2double val)
Set the sensitivity at the node.
Definition CVariable.hpp:2276
virtual su2double Get_FlowTraction_n(unsigned long iPoint, unsigned long iVar) const
A virtual member.
Definition CVariable.hpp:1587
CMatrixView< su2double > GetGradient(unsigned long iPoint)
Get the value of the solution gradient.
Definition CVariable.hpp:804
virtual void AddSolution_New(unsigned long iPoint, unsigned long iVar, su2double solution)
A virtual member.
Definition CVariable.hpp:464
su2double * GetResidual_Sum(unsigned long iPoint)
Get the value of the summed residual.
Definition CVariable.hpp:602
virtual bool SetPrimVar(unsigned long iPoint, su2double SharpEdge_Distance, bool check, CConfig *config)
A virtual member.
Definition CVariable.hpp:1292
su2double * GetSolution_Old(unsigned long iPoint)
Get the old solution of the problem (Runge-Kutta method)
Definition CVariable.hpp:544
su2double GetRmatrix(unsigned long iPoint, unsigned long iDim, unsigned long jDim) const
Get the value of the Rmatrix entry for least squares gradient calculations.
Definition CVariable.hpp:831
virtual void SetThermalCoeff(unsigned long iPoint, CConfig *config)
Set the thermal coefficient.
Definition CVariable.hpp:1497
virtual const su2double * GetBoundDisp_Direct(unsigned long iPoint) const
A virtual member. Get the value of the displacement imposed at the boundary.
Definition CVariable.hpp:2175
VectorType UnderRelaxation
Value of the under-relaxation parameter local to the control volume.
Definition CVariable.hpp:67
virtual su2double GetRhoCv_ve(unsigned long iPoint) const
A virtual member – Get the mixture specific heat at constant volume (vib.-el.).
Definition CVariable.hpp:1121
void RegisterContainer(bool input, su2activematrix &variable, su2matrix< AD::Identifier > *ad_index=nullptr)
Definition CVariable.hpp:125
virtual bool SetPrimVar(unsigned long iPoint, su2double eddy_visc, su2double turb_ke, CConfig *config)
A virtual member.
Definition CVariable.hpp:1297
virtual su2double * GetVorticity(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1215
virtual void SetGeometry_Direct(unsigned long iPoint, const su2double *val_coordinate_direct)
A virtual member. Set the restart geometry (coordinate of the converged solution)
Definition CVariable.hpp:1829
virtual void SetIntermittencySep(unsigned long iPoint, su2double val_Intermittency_sep)
Set the separation intermittency (gamma_sep).
Definition CVariable.hpp:1756
su2vector< bool > Non_Physical
Non-physical points in the solution (force first order).
Definition CVariable.hpp:62
su2double GetUndivided_Laplacian(unsigned long iPoint, unsigned long iVar) const
Get the undivided laplacian of the solution.
Definition CVariable.hpp:1001
virtual su2double GetDensity(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1009
virtual void SetdPdrho_e(unsigned long iPoint, su2double dPdrho_e)
A virtual member.
Definition CVariable.hpp:1359
virtual void SetSolution_Vel(unsigned long iPoint, unsigned long iVar, su2double solution_vel)
Definition CVariable.hpp:1918
virtual su2double GetVortex_Tilting(unsigned long iPoint) const
Definition CVariable.hpp:2293
virtual void SetSolution_Accel(unsigned long iPoint, unsigned long iVar, su2double solution_accel)
Definition CVariable.hpp:1984
const MatrixType & GetSolution_Min() const
Definition CVariable.hpp:873
virtual void SetPrestretch(unsigned long iPoint, unsigned long iVar, su2double val_prestretch)
A virtual member.
Definition CVariable.hpp:2073
virtual su2double * GetSolution_Direct(unsigned long iPoint)
A virtual member. Get the direct solution for the adjoint solver.
Definition CVariable.hpp:1823
virtual su2double * GetSolution_Accel_time_n(unsigned long iPoint)
Get the solution at time n.
Definition CVariable.hpp:2023
void Set_Solution_time_n1(unsigned long iPoint, unsigned long iVar, su2double val_sol)
Set the variable solution at time n-1.
Definition CVariable.hpp:325
VectorType LocalCFL
Value of the CFL number local to the control volume.
Definition CVariable.hpp:68
virtual su2double GetBesselIntegral(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:440
virtual su2double * GetdPdU(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1452
virtual void SetBoundDisp_Direct(unsigned long iPoint, const su2double *val_BoundDisp)
A virtual member. Set the solution for the boundary displacements.
Definition CVariable.hpp:2181
virtual void SetNewtonSolverIterations(unsigned long iPoint, unsigned long nIter)
Set the number of iterations required by a Newton solver used by the fluid model.
Definition CVariable.hpp:2404
const MatrixType & GetUserDefinedSource() const
Get the entire User Define Source of the problem.
Definition CVariable.hpp:536
MatrixType Solution_Max
Max solution for limiter computation.
Definition CVariable.hpp:78
virtual su2double GetBoundDisp_Sens(unsigned long iPoint, unsigned long iDim) const
A virtual member. Get the value of the sensitivity with respect to the undeformed coordinates.
Definition CVariable.hpp:2194
virtual void Add_FlowTraction(unsigned long iPoint, const su2double *val_flowTraction)
A virtual member.
Definition CVariable.hpp:1572
virtual void SetLangevinSourceTerms(unsigned long iPoint, unsigned short iDim, su2double val_stochSource)
A virtual member.
Definition CVariable.hpp:428
virtual void SetPhi_Old(unsigned long iPoint, const su2double *val_phi)
A virtual member.
Definition CVariable.hpp:1430
MatrixType Solution
Solution of the problem.
Definition CVariable.hpp:55
virtual su2double GetEnthalpy(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1065
void Set_Solution_time_n1()
Set the variable solution at time n-1.
Definition CVariable.cpp:119
virtual void SetVelSolutionVector(unsigned long iPoint, const su2double *val_vector)
Virtual Member. Specify a vector to set the velocity components of the solution. Multiplied by densit...
Definition CVariable.hpp:335
virtual bool SetPrimVar(unsigned long iPoint, CFluidModel *FluidModel)
A virtual member.
Definition CVariable.hpp:1275
virtual bool SetPrimVar(unsigned long iPoint, su2double Density_Inf, su2double Viscosity_Inf, su2double eddy_visc, su2double turb_ke, CConfig *config)
A virtual member.
Definition CVariable.hpp:1312
virtual su2double GetHarmonicBalance_Source(unsigned long iPoint, unsigned long iVar) const
A virtual member.
Definition CVariable.hpp:1798
MatrixType & GetSolution_time_n1()
Definition CVariable.hpp:568
virtual void SetTableMisses(unsigned long iPoint, unsigned short misses)
Definition CVariable.hpp:2420
virtual su2double GetTemperature_ve(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1107
virtual su2double GetIntermittency(unsigned long iPoint) const
Get the value of the intermittency.
Definition CVariable.hpp:1738
const VectorType & GetLambda() const
Definition CVariable.hpp:951
virtual su2double Get_BGSSolution_k(unsigned long iPoint, unsigned long iVar) const
Get the value of the solution in the previous BGS subiteration.
Definition CVariable.hpp:1903
static void AssertOverride()
Definition CVariable.hpp:121
virtual void Clear_SurfaceLoad_Res()
A virtual member.
Definition CVariable.hpp:1537
virtual su2double * GetPrimitive(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1339
virtual void SetFlowTractionSensitivity(unsigned long iPoint, unsigned long iDim, su2double val)
Set the FSI force sensitivity at the node.
Definition CVariable.hpp:2346
virtual void SetHbyACorrection(unsigned long iPoint, unsigned short iDim, su2double val_HbyAcorrection)
Definition CVariable.hpp:2443
void AddMax_Lambda_Inv(unsigned long iPoint, su2double val_max_lambda)
Add a value to the maximum eigenvalue for the inviscid terms of the PDE.
Definition CVariable.hpp:908
virtual void SetSolution_Vel(unsigned long iPoint, const su2double *solution)
Set the value of the velocity (Structural Analysis).
Definition CVariable.hpp:1911
virtual unsigned short GetTableMisses(unsigned long iPoint) const
Definition CVariable.hpp:2422
virtual void SetdTdrho_e(unsigned long iPoint, su2double dTdrho_e)
A virtual member.
Definition CVariable.hpp:1369
MatrixType Residual_Sum
Auxiliary structure for residual smoothing.
Definition CVariable.hpp:93
void AddRes_TruncError(unsigned long iPoint, const su2double *val_truncation_error)
Add a value to the truncation error.
Definition CVariable.hpp:713
virtual void SetVortex_Tilting(unsigned long iPoint, CMatrixView< const su2double > PrimGrad_Flow, const su2double *Vorticity, su2double LaminarViscosity)
Definition CVariable.hpp:2290
virtual bool SetTemperature(unsigned long iPoint, CConfig *config)
A virtual member.
Definition CVariable.hpp:1485
virtual su2double GetPrestretch(unsigned long iPoint, unsigned long iVar) const
A virtual member.
Definition CVariable.hpp:2083
void SetVal_ResTruncError_Zero(unsigned long iPoint, unsigned long iVar)
Set the truncation error to zero.
Definition CVariable.hpp:740
virtual su2double GetIntermittencySep(unsigned long iPoint) const
Get the value of the separation intermittency.
Definition CVariable.hpp:1750
virtual su2double GetLangevinSourceTerms(unsigned long iPoint, unsigned short iDim) const
A virtual member.
Definition CVariable.hpp:420
const MatrixType & Get_External() const
Definition CVariable.hpp:552
unsigned long GetnAuxVar() const
Get the number of auxiliary variables.
Definition CVariable.hpp:191
void AddMax_Lambda_Visc(unsigned long iPoint, su2double val_max_lambda)
Add a value to the maximum eigenvalue for the viscous terms of the PDE.
Definition CVariable.hpp:915
virtual void Register_MeshCoord()
A virtual member. Register the reference coordinates of the mesh.
Definition CVariable.hpp:2126
virtual const CVectorOfMatrix & GetGradient_Primitive() const
Definition CVariable.hpp:1664
const su2double * Get_External(unsigned long iPoint) const
Get the external contributions of the problem.
Definition CVariable.hpp:551
virtual su2double GetSpecificHeatCv(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1187
CVariable(CVariable &&)=delete
su2double * GetLimiter(unsigned long iPoint)
Get the value of the slope limiter.
Definition CVariable.hpp:851
virtual void SetStress_FEM(unsigned long iPoint, unsigned long iVar, su2double val_stress)
A virtual member.
Definition CVariable.hpp:1502
MatrixType Solution_time_n
Solution of the problem at time n for dual-time stepping technique.
Definition CVariable.hpp:70
void Add_External(unsigned long iPoint, const su2double *val_sol)
Add a value to the External vector.
Definition CVariable.hpp:471
virtual su2double GetProjVel(unsigned long iPoint, const su2double *val_vector) const
A virtual member.
Definition CVariable.hpp:1080
virtual su2double * GetLimiter_Primitive(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1690
virtual void SetRoe_Dissipation_FD(unsigned long iPoint, su2double val_wall_dist)
A virtual member.
Definition CVariable.hpp:380
virtual bool SetPrimVar(unsigned long iPoint, su2double Density_Inf, CConfig *config)
A virtual member.
Definition CVariable.hpp:1307
virtual void SetDES_LengthScale(unsigned long iPoint, su2double val_des_lengthscale)
A virtual member.
Definition CVariable.hpp:400
virtual bool SetTemperature(unsigned long iPoint, su2double Gas_Constant)
A virtual member.
Definition CVariable.hpp:1473
virtual void SetGammaSep(unsigned long iPoint, su2double gamma_sep)
A virtual member.
Definition CVariable.hpp:1201
su2double GetSolution_time_n1(unsigned long iPoint, unsigned long iVar) const
Get the solution at time n-1.
Definition CVariable.hpp:1945
CVariable & operator=(const CVariable &)=delete
void SetSolution_Old(unsigned long iPoint, const su2double *solution_old)
Set the value of the old solution.
Definition CVariable.hpp:263
void SetMax_Lambda_Visc(unsigned long iPoint, su2double val_max_lambda)
Set the value of the maximum eigenvalue for the viscous terms of the PDE.
Definition CVariable.hpp:901
virtual void Set_BGSSolution_k(unsigned long iPoint, unsigned long iVar, su2double val_var)
Set the value of the solution in the previous BGS subiteration.
Definition CVariable.hpp:1895
virtual void SetEddyViscosity(unsigned long iPoint, su2double eddy_visc)
A virtual member.
Definition CVariable.hpp:1257
virtual void SetReference_Geometry(unsigned long iPoint, unsigned long iVar, su2double ref_geometry)
A virtual member.
Definition CVariable.hpp:2063
virtual void Register_BoundDisp()
A virtual member. Register the boundary displacements of the mesh.
Definition CVariable.hpp:2199
virtual su2double * GetEddyViscSens(unsigned long iPoint)
Get the Eddy Viscosity Sensitivity of the problem.
Definition CVariable.hpp:1811
su2double GetSolution_Old(unsigned long iPoint, unsigned long iVar) const
Get the old solution of the problem (Runge-Kutta method)
Definition CVariable.hpp:256
void SetUnd_Lapl(unsigned long iPoint, unsigned long iVar, su2double val_und_lapl)
Set a value to the undivided laplacian.
Definition CVariable.hpp:984
virtual ~CVariable()=default
Destructor of the class.
unsigned long nSecondaryVar
Number of secondary variables.
Definition CVariable.hpp:111
virtual void SetVelocity(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1419
CVectorOfMatrix Grad_AuxVar
Gradient of the auxiliary variables of the problem.
Definition CVariable.hpp:82
void SetDelta_Time(unsigned long iPoint, su2double val_delta_time)
Set the value of the time step.
Definition CVariable.hpp:880
void Add_ExternalExtra_To_SolutionExtra()
Add the external contribution to the solution for the extra adjoint solutions.
Definition CVariable.hpp:487
virtual void SetSolution_Vel_Pred(unsigned long iPoint, const su2double *val_solution_pred)
A virtual member. Set the value of the velocity solution predictor.
Definition CVariable.hpp:2028
void SetLocalCFL(unsigned long iPoint, su2double val_cfl)
Set the value of the local CFL number for the current control volume (CV).
Definition CVariable.hpp:640
unsigned long nVar
Number of variables of the problem.
Definition CVariable.hpp:108
virtual const su2double * GetSolution_Pred(unsigned long iPoint) const
A virtual member. Get the solution at time n.
Definition CVariable.hpp:2046
virtual su2double GetStreamwise_Periodic_RecoveredPressure(unsigned long iPoint) const
A virtual member: Get the recovered pressure for streamwise periodic flow.
Definition CVariable.hpp:2307
virtual su2double Get_SurfaceLoad_Res_n(unsigned long iPoint, unsigned long iVar) const
A virtual member.
Definition CVariable.hpp:1547
void SetSensor(unsigned long iPoint, su2double val_sensor)
Set pressure sensor.
Definition CVariable.hpp:958
MatrixType Residual_Old
Auxiliary structure for residual smoothing.
Definition CVariable.hpp:92
virtual void Add_BodyForces_Res(unsigned long iPoint, const su2double *val_bodyForce)
A virtual member.
Definition CVariable.hpp:1552
void SetAdjointSolution(unsigned long iPoint, const su2double *adj_sol)
Set the adjoint values of the solution.
Definition CVariable.hpp:2241
virtual su2double GetBound_Disp(unsigned long iPoint, unsigned long iDim) const
A virtual member. Get the value of the displacement imposed at the boundary.
Definition CVariable.hpp:2137
virtual su2double GetEnergy(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1037
virtual CVectorOfMatrix & GetGradient_Primitive()
Get the primitive variable gradients for all points.
Definition CVariable.hpp:1663
MatrixType Solution_Min
Min solution for limiter computation.
Definition CVariable.hpp:79
virtual void Set_FlowTraction_n()
A virtual member.
Definition CVariable.hpp:1582
const MatrixType & GetSolution() const
Get the entire solution of the problem.
Definition CVariable.hpp:522
MatrixType Solution_Old
Old solution of the problem R-K.
Definition CVariable.hpp:56
virtual void SetBound_Disp(unsigned long iPoint, const su2double *val_BoundDisp)
A virtual member. Set the boundary displacement.
Definition CVariable.hpp:2149
virtual MatrixType & GetLimiter_Primitive()
Get the primitive variables limiter.
Definition CVariable.hpp:1670
virtual void Setdmudrho_T(unsigned long iPoint, su2double dmudrho_T)
A virtual member.
Definition CVariable.hpp:1379
virtual void SetThermalConductivity(unsigned long iPoint, CConfig *config)
A virtual member.
Definition CVariable.hpp:1632
MatrixType & GetSolution_time_n()
Definition CVariable.hpp:560
virtual su2double * GetGeometry_Direct(unsigned long iPoint)
A virtual member. Get the restart geometry (coordinate of the converged solution).
Definition CVariable.hpp:1835
virtual void Add_SurfaceLoad_Res(unsigned long iPoint, const su2double *val_surfForce)
A virtual member.
Definition CVariable.hpp:1527
su2double * GetResidual_Old(unsigned long iPoint)
Get the value of the old residual.
Definition CVariable.hpp:609
virtual void SetBetaInc2(unsigned long iPoint, su2double val_betainc2)
A virtual member.
Definition CVariable.hpp:1424
void GetAdjointSolution_time_n1(unsigned long iPoint, su2double *adj_sol) const
Definition CVariable.hpp:2263
virtual su2double GetStreamwise_Periodic_RecoveredTemperature(unsigned long iPoint) const
A virtual member: Get the recovered temperature for streamwise periodic flow.
Definition CVariable.hpp:2321
MatrixType & GetSolution_Min()
Get the min solution.
Definition CVariable.hpp:872
void GetAdjointSolution_time_n(unsigned long iPoint, su2double *adj_sol) const
Definition CVariable.hpp:2255
virtual void SetSolution_Vel_time_n(unsigned long iPoint, const su2double *solution_vel_time_n)
Set the value of the velocity (Structural Analysis) at time n.
Definition CVariable.hpp:1924
su2matrix< AD::Identifier > AD_InputIndex
Indices of Solution variables in the adjoint vector before solver iteration.
Definition CVariable.hpp:97
virtual su2double GetHbyACorrection(unsigned long iPoint, unsigned short iDim)
Definition CVariable.hpp:2441
virtual su2double GetF1blending(unsigned long iPoint) const
Get the first blending function of the SST model.
Definition CVariable.hpp:1716
VectorType Lambda
Value of the eingenvalue.
Definition CVariable.hpp:86
void Set_Solution_time_n1(unsigned long iPoint, const su2double *val_sol)
Set the variable solution at time n-1.
Definition CVariable.hpp:308
MatrixType UserDefinedSource
User Defined Source of the problem.
Definition CVariable.hpp:58
virtual su2double GetGradient_Primitive(unsigned long iPoint, unsigned long iVar, unsigned long iDim) const
A virtual member.
Definition CVariable.hpp:1657
virtual const su2double * GetVorticity(unsigned long iPoint) const
Definition CVariable.hpp:1216
virtual void SetSecondary(unsigned long iPoint, unsigned long iVar, su2double val_secondary)
A virtual member.
Definition CVariable.hpp:1349
virtual su2double GetBetaInc2(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1094
virtual const su2double * GetStress_FEM(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1512
void SetSolution_Old(unsigned long iPoint, unsigned long iVar, su2double solution_old)
Definition CVariable.hpp:274
virtual void SetSourceTerm_DispAdjoint(unsigned long iPoint, unsigned long iDim, su2double val)
Set the source term applied into the displacement adjoint coming from external solvers.
Definition CVariable.hpp:2360
virtual void SetPressure(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1414
void AddLambda(unsigned long iPoint, su2double val_lambda)
Add the value of the spectral radius.
Definition CVariable.hpp:943
virtual void SetmuT(unsigned long iPoint, su2double val_muT)
Set the value of the eddy viscosity.
Definition CVariable.hpp:1774
virtual void SetdktdT_rho(unsigned long iPoint, su2double dktdT_rho)
A virtual member.
Definition CVariable.hpp:1394
virtual void SetGammaEff(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1208
virtual su2double * GetObjFuncSource(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1051
virtual su2double GetRhoCv_tr(unsigned long iPoint) const
A virtual member – Get the mixture specific heat at constant volume (trans.-rot.).
Definition CVariable.hpp:1114
virtual void SetGammaBC(unsigned long iPoint, su2double val_gamma)
A virtual member.
Definition CVariable.hpp:1250
MatrixType Solution_BGS_k
Old solution container for BGS iterations.
Definition CVariable.hpp:95
virtual void SetLaminarViscosity(unsigned long iPoint, CConfig *config)
A virtual member.
Definition CVariable.hpp:1620
virtual su2double GetSecondary(unsigned long iPoint, unsigned long iVar) const
A virtual member.
Definition CVariable.hpp:1344
virtual void SetEddyViscSens(unsigned long iPoint, const su2double *val_EddyViscSens, unsigned long numTotalVar)
Set the Eddy Viscosity Sensitivity of the problem.
Definition CVariable.hpp:1805
virtual void Set_OldSolution_Geometry()
A virtual member. Set the value of the old geometry solution (adjoint).
Definition CVariable.hpp:1865
virtual su2double GetRoe_Dissipation(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:368
virtual void SetTurbIndex(unsigned long iPoint, su2double val_turb_index)
Set the value of the turbulence index.
Definition CVariable.hpp:1780
void SetUnderRelaxation(unsigned long iPoint, su2double val_under_relaxation)
Set the value of the under-relaxation parameter for the current control volume (CV).
Definition CVariable.hpp:626
virtual const MatrixType * GetMesh_Coord() const
A virtual member. Get the undeformed coordinates for the entire domain.
Definition CVariable.hpp:2101
virtual void SetSolution_Pred(unsigned long iPoint, const su2double *solution_pred)
A virtual member. Set the value of the old solution.
Definition CVariable.hpp:2034
virtual su2double GetSourceTerm_VelAdjoint(unsigned long iPoint, unsigned long iDim) const
Definition CVariable.hpp:2369
virtual void SetSolution_Direct(unsigned long iPoint, const su2double *solution_direct)
A virtual member. Set the direct solution for the adjoint solver.
Definition CVariable.hpp:1817
void SetExternalZero()
Set external contributions to zero.
Definition CVariable.cpp:140
virtual void SetVonMises_Stress(unsigned long iPoint, su2double val_stress)
A virtual member.
Definition CVariable.hpp:1517
VectorType & GetSolutionExtra()
Return the extra adjoint solution.
Definition CVariable.hpp:497
void GetResTruncError(unsigned long iPoint, su2double *val_trunc_error) const
Get the truncation error.
Definition CVariable.hpp:766
virtual bool SetPressure(unsigned long iPoint, su2double Gamma)
A virtual member.
Definition CVariable.hpp:1436
C3DDoubleMatrix & GetRmatrix(void)
Get the value Rmatrix for the entire domain.
Definition CVariable.hpp:837
MatrixType & GetUserDefinedSource()
Definition CVariable.hpp:537
virtual void Set_BGSSolution_k()
Set the value of the solution in the previous BGS subiteration.
Definition CVariable.cpp:124
virtual su2double GetBound_Vel(unsigned long iPoint, unsigned long iDim) const
A virtual member. Get the value of the velocity imposed at the boundary.
Definition CVariable.hpp:2143
virtual su2double GetThermalConductivity_ve(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1194
virtual const MatrixType & GetLimiter_Primitive() const
Definition CVariable.hpp:1671
void AddClippedSolution(unsigned long iPoint, unsigned long iVar, su2double solution, su2double lowerlimit, su2double upperlimit, su2double Sol2Conservative=1.0, su2double Sol2Conservative_old=1.0)
Update the variables using a conservative format.
Definition CVariable.hpp:510
virtual void SetSolution_Pred_Old(unsigned long iPoint, const su2double *solution_pred_Old)
A virtual member. Set the value of the old solution.
Definition CVariable.hpp:2052
void AddSolution(unsigned long iPoint, const su2double *solution)
Add a value to the solution.
Definition CVariable.hpp:352
virtual void SetVel_ResTruncError_Zero(unsigned long iPoint)
Set the momentum part of the truncation error to zero.
Definition CVariable.hpp:746
void Set_Solution_time_n(unsigned long iPoint, const su2double *val_sol)
Set the variable solution at time n.
Definition CVariable.hpp:300
su2double * GetUndivided_Laplacian(unsigned long iPoint)
Get the undivided laplacian of the solution.
Definition CVariable.hpp:993
static const VectorType EmptyVector
Definition CVariable.hpp:116
virtual bool SetPressure(unsigned long iPoint, CConfig *config)
A virtual member.
Definition CVariable.hpp:1442
virtual void SetSolution_Accel_time_n(unsigned long iPoint, unsigned long iVar, su2double solution_accel_time_n)
Definition CVariable.hpp:1997
virtual su2double Get_BodyForces_Res(unsigned long iPoint, unsigned long iVar) const
A virtual member.
Definition CVariable.hpp:1557
virtual const su2double * GetScalarLookups(unsigned long iPoint) const
Definition CVariable.hpp:2425
virtual CMatrixView< su2double > GetGradient_Reconstruction(unsigned long iPoint)
Get the value of the primitive gradient for MUSCL reconstruction.
Definition CVariable.hpp:1696
virtual void SetEntropy(unsigned long iPoint, su2double entropy)
Set fluid entropy.
Definition CVariable.hpp:2376
virtual void Set_FlowTraction(unsigned long iPoint, const su2double *val_flowTraction)
A virtual member.
Definition CVariable.hpp:1567
virtual su2double GetSolution_Vel_time_n(unsigned long iPoint, unsigned long iVar) const
Get the velocity of the nodes (Structural Analysis) at time n.
Definition CVariable.hpp:1965
virtual const su2double * GetReference_Geometry(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:2068
su2vector< unsigned short > Non_Physical_Counter
Number of consecutive iterations that a point has been treated first-order. After a specified number ...
Definition CVariable.hpp:64
virtual su2double GetStrainMag(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1223
virtual su2double GetSolution_Geometry(unsigned long iPoint, unsigned long iVar) const
A virtual member. Get the geometry solution.
Definition CVariable.hpp:1848
virtual const su2double * GetScalarSources(unsigned long iPoint) const
Definition CVariable.hpp:2424
void SetResTruncError(unsigned long iPoint, su2double *val_trunc_error)
Set the truncation error.
Definition CVariable.hpp:776
MatrixType Res_TruncError
Truncation error for multigrid cycle.
Definition CVariable.hpp:91
virtual void SetDataExtrapolation(unsigned long iPoint, unsigned short extrapolation)
Set dataset extrapolation instance.
Definition CVariable.hpp:2390
MatrixType & GetSolution()
Definition CVariable.hpp:523
virtual su2double GetDensity(unsigned long iPoint, unsigned long val_iSpecies) const
A virtual member.
Definition CVariable.hpp:1016
virtual void SetIntermittency(unsigned long iPoint, su2double val_Intermittency)
Set the intermittency.
Definition CVariable.hpp:1744
void SetAuxVarGradient(unsigned long iPoint, unsigned long iVar, unsigned long iDim, su2double value)
Set value of auxillary gradients.
Definition CVariable.hpp:677
su2double GetMax_Lambda_Visc(unsigned long iPoint) const
Get the value of the maximum eigenvalue for the viscous terms of the PDE.
Definition CVariable.hpp:929
virtual const CVectorOfMatrix & GetGradient_Reconstruction() const
Definition CVariable.hpp:1703
virtual unsigned short GetDataExtrapolation(unsigned long iPoint) const
Get dataset extrapolation instance.
Definition CVariable.hpp:2397
void Set_Solution()
Set variables to the value of the old variables.
Definition CVariable.cpp:109
virtual void Setdktdrho_T(unsigned long iPoint, su2double dktdrho_T)
A virtual member.
Definition CVariable.hpp:1389
virtual su2double GetWallDistance(unsigned long iPoint) const
A virtual member. Get the value of the wall distance in reference coordinates.
Definition CVariable.hpp:2115
virtual void SetSecondaryVar(unsigned long iPoint, CFluidModel *FluidModel)
A virtual member.
Definition CVariable.hpp:1287
virtual su2double GetPrimitive(unsigned long iPoint, unsigned long iVar) const
A virtual member.
Definition CVariable.hpp:1324
virtual void SetMomentumCorrection(unsigned long iPoint, unsigned short iDim, su2double val_mom)
Definition CVariable.hpp:2439
void Set_Solution_time_n()
Set the variable solution at time n.
Definition CVariable.cpp:114
void RegisterSolution_time_n()
Register the variables in the solution_time_n array as input/output variable.
Definition CVariable.cpp:146
virtual void SetBound_Vel(unsigned long iPoint, unsigned long iDim, const su2double val_BoundVel)
A virtual member. Set the boundary velocity.
Definition CVariable.hpp:2169
virtual su2double * GetForceProj_Vector(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1044
virtual su2double GetTurbIndex(unsigned long iPoint) const
Get the value of the turbulence index.
Definition CVariable.hpp:1786
virtual su2double GetEntropy(unsigned long iPoint) const
Get fluid entropy.
Definition CVariable.hpp:2383
virtual void SetSolution_New()
A virtual member.
Definition CVariable.hpp:446
virtual const su2double * GetRadiative_SourceTerm(unsigned long iPoint) const
Virtual member: Set the Radiative source term at the node.
Definition CVariable.hpp:2327
void SetRes_TruncErrorZero(unsigned long iPoint)
Set the truncation error to zero.
Definition CVariable.hpp:732
void RegisterSolution(bool input)
Register the variables in the solution array as input/output variable.
Definition CVariable.cpp:142
C3DDoubleMatrix Rmatrix
Geometry-based matrix for weighted least squares gradient calculations.
Definition CVariable.hpp:75
void SetGradient(unsigned long iPoint, su2double **gradient)
Set the gradient of the solution.
Definition CVariable.hpp:786
virtual void SetLES_Mode(unsigned long iPoint, su2double val_les_mode)
A virtual member.
Definition CVariable.hpp:413
virtual void SetVelocity2(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1602
const MatrixType & GetUndivided_Laplacian() const
Definition CVariable.hpp:1002
virtual bool GetVol_HeatSource(unsigned long iPoint) const
Get whether a volumetric heat source is to be introduced in point iPoint.
Definition CVariable.hpp:2339
virtual void RegisterFlowTraction(bool reset)
A virtual member.
Definition CVariable.hpp:2209
void AddSolution(unsigned long iPoint, unsigned long iVar, su2double solution)
Add a value to the solution.
Definition CVariable.hpp:343
virtual su2double GetSolution_Accel_time_n(unsigned long iPoint, unsigned long iVar) const
Get the acceleration of the nodes (Structural Analysis) at time n.
Definition CVariable.hpp:2017
virtual bool SetTemperature_ve(unsigned long iPoint, su2double val_Tve)
Sets the vibrational electronic temperature of the flow.
Definition CVariable.hpp:1479
virtual void SetBound_Vel(unsigned long iPoint, const su2double *val_BoundVel)
A virtual member. Set the boundary velocity.
Definition CVariable.hpp:2155
su2double GetSolution_time_n(unsigned long iPoint, unsigned long iVar) const
Get the solution at time n.
Definition CVariable.hpp:1938
virtual void SetSolution_Geometry(unsigned long iPoint, unsigned long iVar, su2double solution_geometry)
A virtual member. Set the value of the mesh solution (adjoint).
Definition CVariable.hpp:1860
virtual su2double GetSoundSpeed(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1087
virtual su2double GetSolution_New(unsigned long iPoint, unsigned long iVar) const
A virtual member.
Definition CVariable.hpp:362
virtual su2double Get_SurfaceLoad_Res(unsigned long iPoint, unsigned long iVar) const
A virtual member.
Definition CVariable.hpp:1532
MatrixType & GetSolution_Max()
Get the min solution.
Definition CVariable.hpp:865
unsigned long nDim
Number of dimension of the problem.
Definition CVariable.hpp:107
virtual su2double GetPressure(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1072
VectorType SolutionExtra
Stores adjoint solution for extra solution variables. Currently only streamwise periodic pressure-dro...
Definition CVariable.hpp:100
virtual su2double Get_OldSolution_Geometry(unsigned long iPoint, unsigned long iDim) const
A virtual member. Get the value of the old geometry solution (adjoint).
Definition CVariable.hpp:1871
su2double * GetResTruncError(unsigned long iPoint)
Get the truncation error.
Definition CVariable.hpp:759
void AddRmatrix(unsigned long iPoint, unsigned long iDim, unsigned long jDim, su2double value)
Add value to the Rmatrix for least squares gradient calculations.
Definition CVariable.hpp:822
virtual void SetSecondary(unsigned long iPoint, const su2double *val_secondary)
A virtual member.
Definition CVariable.hpp:1354
void AddResidual_Sum(unsigned long iPoint, const su2double *val_residual)
Add a value to the summed residual vector.
Definition CVariable.hpp:585
virtual su2double GetmuT(unsigned long iPoint) const
Get the value of the eddy viscosity.
Definition CVariable.hpp:1732
virtual void Set_SurfaceLoad_Res_n()
A virtual member.
Definition CVariable.hpp:1542
virtual su2double GetCrossDiff(unsigned long iPoint) const
Get the value of the cross diffusion of tke and omega.
Definition CVariable.hpp:1726
virtual su2double GetSpecificHeatCp(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1180
virtual void SetSpecificHeatCv(unsigned long iPoint, su2double Cv)
A virtual member.
Definition CVariable.hpp:1644
virtual void SetTau_Wall(unsigned long iPoint, su2double tau_wall)
Definition CVariable.hpp:2286
virtual void SetLaminarViscosity(unsigned long iPoint, su2double laminarViscosity)
A virtual member.
Definition CVariable.hpp:1614
virtual su2double GetGeometry_Direct(unsigned long iPoint, unsigned long iDim) const
A virtual member. Get the restart geometry (coordinate of the converged solution).
Definition CVariable.hpp:1841
virtual void SetRadiative_SourceTerm(unsigned long iPoint, unsigned long iVar, su2double val_RadSourceTerm)
Virtual member: Set the Radiative source term at the node.
Definition CVariable.hpp:2333
virtual su2double GetEddyViscosity(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1058
virtual void SetIntermittencyEff(unsigned long iPoint, su2double val_Intermittency_eff)
Set the effective intermittency (gamma_eff).
Definition CVariable.hpp:1768
virtual su2double GetVelocity2(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1145
virtual su2double GetF2blending(unsigned long iPoint) const
Get the second blending function of the SST model.
Definition CVariable.hpp:1721
void Set_Solution_time_n(unsigned long iPoint, unsigned long iVar, su2double val_sol)
Set the variable solution at time n.
Definition CVariable.hpp:317
virtual void SetRoe_Dissipation_NTS(unsigned long iPoint, su2double val_delta, su2double val_const_DES)
A virtual member.
Definition CVariable.hpp:388
CVectorOfMatrix Gradient
Gradient of the solution of the problem.
Definition CVariable.hpp:74
void Set_ExternalExtra_To_SolutionExtra()
Store the adjoint solution of the extra adjoint into the external container.
Definition CVariable.hpp:478
virtual su2double * GetSolution_Vel_time_n(unsigned long iPoint)
Get the velocity of the nodes (Structural Analysis) at time n.
Definition CVariable.hpp:1971
virtual bool SetDensity(unsigned long iPoint, su2double val_density)
A virtual member.
Definition CVariable.hpp:1404
virtual void SetVelocity_Old(unsigned long iPoint, const su2double *val_velocity)
A virtual member.
Definition CVariable.hpp:1608
virtual const MatrixType & GetSensitivity() const
Definition CVariable.hpp:2284
virtual CVectorOfMatrix & GetGradient_Reconstruction()
Get the reconstruction gradient for primitive variable at all points.
Definition CVariable.hpp:1702
virtual unsigned long GetNewtonSolverIterations(unsigned long iPoint) const
Get the number of iterations required by a Newton solver used by the fluid model.
Definition CVariable.hpp:2411
virtual su2double GetSolution_Vel(unsigned long iPoint, unsigned long iVar) const
Get the velocity (Structural Analysis).
Definition CVariable.hpp:1952
virtual void SetdPde_rho(unsigned long iPoint, su2double dPde_rho)
A virtual member.
Definition CVariable.hpp:1364
const CVectorOfMatrix & GetAuxVarGradient(void) const
Definition CVariable.hpp:686
VectorType Delta_Time
Time step.
Definition CVariable.hpp:72
virtual void SetMomCoeff(unsigned long iPoint, su2double val_Mom_Coeff)
Definition CVariable.hpp:2429
virtual void Clear_BodyForces_Res(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1562
virtual su2double GetIntermittencyEff(unsigned long iPoint) const
Get the value of the effective intermittency.
Definition CVariable.hpp:1762
void Add_DeltaSolution(unsigned long iPoint, unsigned long iVar, su2double solution)
Add the value of the solution vector to the previous solution (incremental approach).
Definition CVariable.hpp:216
virtual bool Get_isVertex(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:1597
virtual const su2double * GetPrestretch(unsigned long iPoint) const
A virtual member.
Definition CVariable.hpp:2078
virtual void SetStreamwise_Periodic_RecoveredPressure(unsigned long iPoint, su2double val_pressure)
A virtual member: Set the recovered pressure for streamwise periodic flow.
Definition CVariable.hpp:2300
virtual void SetPrimitive(unsigned long iPoint, const su2double *val_prim)
A virtual member.
Definition CVariable.hpp:1334
virtual void SetWallDistance(unsigned long iPoint, su2double val_dist)
A virtual member. Set the value of the wall distance in reference coordinates.
Definition CVariable.hpp:2121
VectorType Sensor
Pressure sensor for high order central scheme and Roe dissipation.
Definition CVariable.hpp:88
virtual su2double GetSourceTerm_DispAdjoint(unsigned long iPoint, unsigned long iDim) const
Get the source term applied into the displacement adjoint coming from external solvers.
Definition CVariable.hpp:2368
virtual void SetBlendingFunc(unsigned long iPoint, su2double val_viscosity, su2double val_dist, su2double val_density, TURB_TRANS_MODEL trans_model)
Set the blending function for the blending of k-w and k-eps.
Definition CVariable.hpp:1711
virtual bool SetPrimVar(unsigned long iPoint, CNEMOGas *fluidmodel)
A virtual member.
Definition CVariable.hpp:1282
su2double * GetSolution(unsigned long iPoint)
Get the solution of the problem.
Definition CVariable.hpp:530
virtual su2double GetSolution_Accel(unsigned long iPoint, unsigned long iVar) const
Get the acceleration (Structural Analysis).
Definition CVariable.hpp:2004
su2double GetDelta_Time(unsigned long iPoint) const
Get the value of the time step.
Definition CVariable.hpp:887
su2double GetLambda(unsigned long iPoint) const
Get the value of the spectral radius.
Definition CVariable.hpp:950
void SetNon_Physical(unsigned long iPoint, bool val_value)
Set the value of the non-physical point.
Definition CVariable.hpp:223
su2double GetAuxVarGradient(unsigned long iPoint, unsigned long iVar, unsigned long iDim) const
Get the value of the auxilliary gradient.
Definition CVariable.hpp:695
virtual void SetdmudT_rho(unsigned long iPoint, su2double dmudT_rho)
A virtual member.
Definition CVariable.hpp:1384
virtual su2double * GetdTvedU(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1462
virtual const su2double * GetSolution_Pred_Old(unsigned long iPoint) const
A virtual member. Get the solution at time n.
Definition CVariable.hpp:2058
virtual void SetSolution_Vel_time_n(unsigned long iPoint, unsigned long iVar, su2double solution_vel_time_n)
Definition CVariable.hpp:1931
virtual void SetEnthalpy(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1263
virtual su2double * GetSecondary(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1399
void Set_OldSolution()
Set old variables to the value of the current variables.
Definition CVariable.cpp:104
virtual void SetStreamwise_Periodic_RecoveredTemperature(unsigned long iPoint, su2double val_temperature)
A virtual member: Set the recovered temperature for streamwise periodic flow.
Definition CVariable.hpp:2314
virtual void SetSolution_Accel(unsigned long iPoint, const su2double *solution_accel)
Set the value of the acceleration (Structural Analysis).
Definition CVariable.hpp:1977
virtual su2double * GetdTdU(unsigned long iPoint)
A virtual member.
Definition CVariable.hpp:1457
CVariable(const CVariable &)=delete
virtual void SetForceProj_Vector(unsigned long iPoint, const su2double *val_ForceProj_Vector)
A virtual member.
Definition CVariable.hpp:1230
virtual void GetAdjoint_MeshCoord(unsigned long iPoint, su2double *adj_mesh)
A virtual member. Recover the value of the adjoint of the mesh coordinates.
Definition CVariable.hpp:2131
virtual void SetSpecificHeatCp(unsigned long iPoint, su2double Cp)
A virtual member.
Definition CVariable.hpp:1638
virtual su2double GetMomCoeff(unsigned long iPoint)
Definition CVariable.hpp:2427
unsigned long nAuxVar
Number of auxiliary variables.
Definition CVariable.hpp:112
void SetLambda(unsigned long iPoint, su2double val_lambda)
Set the value of the spectral radius.
Definition CVariable.hpp:936
virtual const su2double * GetMesh_Coord(unsigned long iPoint) const
A virtual member. Get the undeformed coordinates.
Definition CVariable.hpp:2096
virtual su2double Get_BGSSolution(unsigned long iPoint, unsigned long iVar) const
Get BGS solution to compute the BGS residual (difference between BGS and BGS_k).
Definition CVariable.hpp:1878
void GetAdjointSolution(unsigned long iPoint, su2double *adj_sol) const
Get the adjoint values of the solution.
Definition CVariable.hpp:2250
su2double GetLimiter(unsigned long iPoint, unsigned long iVar) const
Get the value of the slope limiter.
Definition CVariable.hpp:859
virtual su2double GetMesh_Coord(unsigned long iPoint, unsigned long iDim) const
A virtual member. Get the value of the undeformed coordinates.
Definition CVariable.hpp:2090
virtual void GetAdjoint_BoundDisp(unsigned long iPoint, su2double *adj_disp) const
A virtual member. Recover the value of the adjoint of the boundary displacements.
Definition CVariable.hpp:2204
su2double GetSensor(unsigned long iPoint) const
Get the pressure sensor.
Definition CVariable.hpp:965
virtual bool GetStrongBC(unsigned long iPoint) const
Get whether a strong boundary condition was applied to the point, which for the pressure-based solver...
Definition CVariable.hpp:2435
virtual su2double GetFlowTractionSensitivity(unsigned long iPoint, unsigned long iDim) const
Get the FSI force sensitivity at the node.
Definition CVariable.hpp:2353
passivedouble su2double
Definition code_config.hpp:181
void RegisterInput(su2double &data)
Registers the variable as an input. I.e. as a leaf of the computational graph.
Definition ad_structure.hpp:101
int Identifier
Definition ad_structure.hpp:56
double GetDerivative(Identifier index)
Extracts the adjoint value at index.
Definition ad_structure.hpp:139
void SetDerivative(Identifier index, const double val)
Sets the adjoint value at index to val.
Definition ad_structure.hpp:132
Identifier GetPassiveIndex()
Returns the identifier that represents an inactive variable.
Definition ad_structure.hpp:145
void SetIndex(Identifier &index, const su2double &data)
Evaluates and saves gradient data from a variable.
Definition ad_structure.hpp:296
void RegisterOutput(su2double &data)
Registers the variable as an output. I.e. as the root of the computational graph.
Definition ad_structure.hpp:107
passivedouble GetValue(const su2double &data)
Get the (primitive) value of the datatype (needs to be specialized for active types).
Definition datatype_structure.hpp:113
constexpr int omp_get_num_threads()
Number of threads in current team.
Definition omp_structure.hpp:75
#define END_SU2_OMP_FOR
Definition omp_structure.hpp:158
constexpr size_t roundUpDiv(size_t numerator, size_t denominator)
Integer division rounding up.
Definition omp_structure.hpp:204
#define SU2_OMP_FOR_STAT(CHUNK)
Definition omp_structure.hpp:151
TURB_TRANS_MODEL
Types of transition models.
Definition option_structure.hpp:1363