Documentation a537f1bdf2
Loading...
Searching...
No Matches
upwind.hpp
Go to the documentation of this file.
1/*!
2 * \file upwind.hpp
3 * \brief Roe-family of convective schemes.
4 * \author P. Gomes, A. Bueno, F. Palacios
5 * \version 8.5.0 "Harrier"
6 *
7 * SU2 Project Website: https://su2code.github.io
8 *
9 * The SU2 Project is maintained by the SU2 Foundation
10 * (http://su2foundation.org)
11 *
12 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
13 *
14 * SU2 is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * SU2 is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26 */
27
28#pragma once
29
30#include "../../CNumericsSIMD.hpp"
31#include "../../util.hpp"
32#include "../variables.hpp"
33#include "common.hpp"
34#include "../../../variables/CEulerVariable.hpp"
35#include "../../../../../Common/include/geometry/CGeometry.hpp"
36
37/*!
38 * \class CUpwindBase
39 * \ingroup ConvDiscr
40 * \brief Base class for upwind schemes, derived classes implement
41 * details of the convective flux in a const "finalizeFlux" method.
42 * A base class implementing "viscousTerms" is accepted as template parameter.
43 * Similarly to derived, that method should update the flux and Jacobians, but
44 * whereas "finalizeFlux" is passed data prepared by CUpwindBase, "viscousTerms"
45 * takes the same input arguments as "ComputeFlux", i.e. it can fetch more
46 * data from CVariable. Derived is meant to implement small details,
47 * Base is meant to do heavy lifting.
48 */
49template<class Derived, class Base>
50class CUpwindBase : public Base {
51protected:
52 using Base::nDim;
54 static constexpr size_t nPrimVarGrad = nDim+4;
55 static constexpr size_t nPrimVar = Max(Base::nPrimVar, nPrimVarGrad);
56
59 const bool finestGrid;
60 const bool dynamicGrid;
61 const bool muscl;
64
65 /*!
66 * \brief Constructor, store some constants and forward args to base.
67 */
68 template<class... Ts>
69 CUpwindBase(const CConfig& config, unsigned iMesh, Ts&... args) : Base(config, iMesh, args...),
70 gamma(config.GetGamma()),
71 gasConst(config.GetGas_ConstantND()),
72 finestGrid(iMesh == MESH_0),
73 dynamicGrid(config.GetDynamic_Grid()),
74 muscl(finestGrid && config.GetMUSCL_Flow()),
75 umusclKappa(config.GetMUSCL_Kappa_Flow()),
76 typeLimiter(config.GetKind_SlopeLimit_Flow()) {
77 }
78
79public:
80 /*!
81 * \brief Implementation of the base Roe flux.
82 */
83 void ComputeFlux(const Int iEdge,
84 const CConfig& config,
85 const CGeometry& geometry,
86 const CVariable& solution_,
87 const UpdateType updateType,
88 const Double updateMask,
90 SparseMatrixType& matrix,
91 su2activevector* edgeMassFluxes) const final {
92
93 /*--- Start preaccumulation, inputs are registered
94 * automatically in "gatherVariables". ---*/
96
97 const bool implicit = (config.GetKind_TimeIntScheme() == EULER_IMPLICIT);
98 const su2double umusclRamp = config.GetMUSCLRampValue() * config.GetNewtonKrylovRelaxation();
99 const auto& solution = static_cast<const CEulerVariable&>(solution_);
100
101 const auto iPoint = geometry.edges->GetNode(iEdge,0);
102 const auto jPoint = geometry.edges->GetNode(iEdge,1);
103
104 /*--- Geometric properties. ---*/
105
106 const auto vector_ij = distanceVector<nDim>(iPoint, jPoint, geometry.nodes->GetCoord());
107
108 const auto normal = gatherVariables<nDim>(iEdge, geometry.edges->GetNormal());
109 const auto area = norm(normal);
110 VectorDbl<nDim> unitNormal;
111 for (size_t iDim = 0; iDim < nDim; ++iDim) {
112 unitNormal(iDim) = normal(iDim) / area;
113 }
114
115 /*--- Reconstructed primitives. ---*/
116
118 V1st.i.all = gatherVariables<nPrimVar>(iPoint, solution.GetPrimitive());
119 V1st.j.all = gatherVariables<nPrimVar>(jPoint, solution.GetPrimitive());
120
121 /*--- Recompute density and enthalpy instead of reconstructing. ---*/
122 Double nonPhysical;
123 auto V = reconstructPrimitives<CCompressiblePrimitives<nDim,nPrimVarGrad> >(
124 iEdge, iPoint, jPoint, gamma, gasConst, muscl, umusclKappa, umusclRamp,
125 typeLimiter, V1st, vector_ij, solution, nonPhysical);
126
127 /*--- Compute conservative variables. ---*/
128
132
133 /*--- Finalize in derived class (static polymorphism). ---*/
134
135 const auto derived = static_cast<const Derived*>(this);
136 VectorDbl<nVar> flux;
137 MatrixDbl<nVar> jac_i, jac_j;
138 derived->finalizeFlux(flux, jac_i, jac_j, implicit, area, unitNormal, normal,
139 V, U, iPoint, jPoint, nonPhysical, solution, geometry);
140
141 /*--- Add the contributions from the base class (static decorator). ---*/
142
143 Base::viscousTerms(iEdge, iPoint, jPoint, V1st, solution_, vector_ij, geometry,
144 config, area, unitNormal, implicit, flux, jac_i, jac_j);
145
146 /*--- Stop preaccumulation. ---*/
147
148 stopPreacc(flux);
149
150 /*--- Update the vector and system matrix. ---*/
151
152 updateLinearSystem(iEdge, iPoint, jPoint, implicit, updateType,
153 updateMask, flux, jac_i, jac_j, vector, matrix);
154
155 /*--- Store the mass flux (density-equation flux) for bounded-scalar transport. ---*/
156
157 updateEdgeMassFlux(iEdge, flux(0), edgeMassFluxes);
158 }
159};
160
161/*!
162 * \class CRoeScheme
163 * \ingroup ConvDiscr
164 * \brief Classical Roe scheme.
165 */
166template<class Decorator>
167class CRoeScheme : public CUpwindBase<CRoeScheme<Decorator>, Decorator> {
168private:
169 using Base = CUpwindBase<CRoeScheme<Decorator>, Decorator>;
170 using Base::nDim;
171 using Base::nVar;
172 using Base::nPrimVarGrad;
173 using Base::nPrimVar;
174
175 const su2double kappa;
176 const su2double entropyFix;
177 const ENUM_ROELOWDISS typeDissip;
178 using Base::gamma;
179 using Base::gasConst;
180 using Base::dynamicGrid;
181
182public:
183 /*!
184 * \brief Constructor, store some constants and forward to base.
185 */
186 template<class... Ts>
187 CRoeScheme(const CConfig& config, Ts&... args) : Base(config, args...),
188 kappa(config.GetRoe_Kappa()),
189 entropyFix(config.GetEntropyFix_Coeff()),
190 typeDissip(static_cast<ENUM_ROELOWDISS>(config.GetKind_RoeLowDiss())) {
191 }
192
193 /*!
194 * \brief Updates flux and Jacobians with standard Roe dissipation.
195 * \note "Ts" is here just in case other schemes in the family need extra args.
196 */
197 template<class PrimVarType, class ConsVarType, class... Ts>
199 MatrixDbl<nVar>& jac_i,
200 MatrixDbl<nVar>& jac_j,
201 const bool implicit,
202 const Double& area,
203 const VectorDbl<nDim>& unitNormal,
204 const VectorDbl<nDim>& normal,
205 const CPair<PrimVarType>& V,
206 const CPair<ConsVarType>& U,
207 const Int& iPoint,
208 const Int& jPoint,
209 const Double& nonPhysical,
210 const CEulerVariable& solution,
211 const CGeometry& geometry,
212 Ts&...) const {
213 /*--- Roe averaged variables. ---*/
214
215 auto roeAvg = roeAveragedVariables(gamma, V, unitNormal);
216
217 /*--- Grid motion. ---*/
218
219 Double projGridVel = 0.0, projVel = roeAvg.projVel;
220 if (dynamicGrid) {
221 const auto& gridVel = geometry.nodes->GetGridVel();
222 projGridVel = 0.5*(dot(gatherVariables<nDim>(iPoint,gridVel), unitNormal)+
223 dot(gatherVariables<nDim>(jPoint,gridVel), unitNormal));
224 projVel -= projGridVel;
225 }
226
227 /*--- Convective eigenvalues. ---*/
228
229 VectorDbl<nVar> lambda;
230 for (size_t iDim = 0; iDim < nDim; ++iDim) {
231 lambda(iDim) = projVel;
232 }
233 lambda(nDim) = projVel + roeAvg.speedSound;
234 lambda(nDim+1) = projVel - roeAvg.speedSound;
235
236 /*--- Apply Mavriplis' entropy correction to eigenvalues. ---*/
237
238 Double lambdaMin = fmax(entropyFix, nonPhysical) * (abs(projVel) + roeAvg.speedSound);
239 for (size_t iVar = 0; iVar < nVar; ++iVar) {
240 lambda(iVar) = fmax(abs(lambda(iVar)), lambdaMin);
241 }
242
243 /*--- Inviscid fluxes and Jacobians. ---*/
244
245 auto flux_i = inviscidProjFlux(V.i, U.i, normal);
246 auto flux_j = inviscidProjFlux(V.j, U.j, normal);
247
248 for (size_t iVar = 0; iVar < nVar; ++iVar) {
249 flux(iVar) = 0.5 * (flux_i(iVar) + flux_j(iVar));
250 }
251 if (implicit) {
252 jac_i = inviscidProjJac(gamma, V.i.velocity(), U.i.energy(), normal, kappa);
253 jac_j = inviscidProjJac(gamma, V.j.velocity(), U.j.energy(), normal, kappa);
254 }
255
256 /*--- Correct for grid motion. ---*/
257
258 if (dynamicGrid) {
259 for (size_t iVar = 0; iVar < nVar; ++iVar) {
260 Double dFdU = projGridVel * area * 0.5;
261 flux(iVar) -= dFdU * (U.i.all(iVar) + U.j.all(iVar));
262
263 if (implicit) {
264 jac_i(iVar,iVar) -= dFdU;
265 jac_j(iVar,iVar) -= dFdU;
266 }
267 }
268 }
269
270 /*--- P tensor. ---*/
271
272 auto pMat = pMatrix(gamma, roeAvg.density, roeAvg.velocity,
273 roeAvg.projVel, roeAvg.speedSound, unitNormal);
274
275 /*--- Inverse P tensor. ---*/
276
277 auto pMatInv = pMatrixInv(gamma, roeAvg.density, roeAvg.velocity,
278 roeAvg.projVel, roeAvg.speedSound, unitNormal);
279
280 /*--- Diference between conservative variables at jPoint and iPoint. ---*/
281
282 VectorDbl<nVar> deltaU;
283 for (size_t iVar = 0; iVar < nVar; ++iVar) {
284 deltaU(iVar) = U.j.all(iVar) - U.i.all(iVar);
285 }
286
287 /*--- Dissipation terms. ---*/
288
289 Double dissipation = roeDissipation(iPoint, jPoint, typeDissip, solution);
290
291 for (size_t iVar = 0; iVar < nVar; ++iVar) {
292 for (size_t jVar = 0; jVar < nVar; ++jVar) {
293 /*--- Compute |projModJacTensor| = P x |Lambda| x P^-1. ---*/
294
295 Double projModJacTensor = 0.0;
296 for (size_t kVar = 0; kVar < nVar; ++kVar) {
297 projModJacTensor += pMat(iVar,kVar) * lambda(kVar) * pMatInv(kVar,jVar);
298 }
299
300 Double dDdU = projModJacTensor * (1-kappa) * area * dissipation;
301
302 /*--- Update flux and Jacobians. ---*/
303
304 flux(iVar) -= dDdU * deltaU(jVar);
305
306 if (implicit) {
307 jac_i(iVar,jVar) += dDdU;
308 jac_j(iVar,jVar) -= dDdU;
309 }
310 }
311 }
312 }
313};
314
315/*!
316 * \class CMSWScheme
317 * \ingroup ConvDiscr
318 * \brief MSW scheme with switch to SW based on a pressure sensor.
319 */
320template<class Decorator>
321class CMSWScheme : public CUpwindBase<CMSWScheme<Decorator>, Decorator> {
322protected:
324 using Base::nDim;
325 using Base::nVar;
326 using Base::nPrimVarGrad;
327 using Base::nPrimVar;
328
330 using Base::gamma;
331 using Base::gasConst;
332 using Base::dynamicGrid;
333
334public:
335 /*!
336 * \brief Constructor, store some constants and forward args to base.
337 */
338 template<class... Ts>
339 CMSWScheme(const CConfig& config, unsigned iMesh, Ts&... args) : Base(config, iMesh, args...),
340 alpha(config.GetMSW_Alpha()) {
341 }
342
343 /*!
344 * \brief Implementation of the flux.
345 */
346 template<class PrimVarType, class ConsVarType, class... Ts>
348 MatrixDbl<nVar>& jac_i,
349 MatrixDbl<nVar>& jac_j,
350 const bool implicit,
351 const Double& area,
352 const VectorDbl<nDim>& unitNormal,
353 const VectorDbl<nDim>& normal,
354 const CPair<PrimVarType>& V,
355 const CPair<ConsVarType>& U,
356 const Int& iPoint,
357 const Int& jPoint,
358 const Double& nonPhysical,
359 const CEulerVariable& solution,
360 const CGeometry& geometry,
361 Ts&...) const {
362
363 /*--- Weighted states for flux-vector spliting (see the non-SIMD version in fvs.cpp for notes). ---*/
364
365 const auto si = gatherVariables(iPoint, solution.GetSensor());
366 const auto sj = gatherVariables(jPoint, solution.GetSensor());
367
368 const Double dp = fmax(si, sj) - alpha * 0.06;
369 const Double w = 0.25 * (1 - sign(dp) * (1 - exp(-100 * abs(dp)))) * (1 - nonPhysical);
370 const Double onemw = 1 - w;
371
373 for (size_t iVar = 0; iVar < nPrimVarGrad; ++iVar) {
374 Vweighted.i.all(iVar) = onemw * V.i.all(iVar) + w * V.j.all(iVar);
375 Vweighted.j.all(iVar) = onemw * V.j.all(iVar) + w * V.i.all(iVar);
376 }
377 const Double soundSpeed_i = sqrt(gamma * gasConst * Vweighted.i.temperature());
378 const Double soundSpeed_j = sqrt(gamma * gasConst * Vweighted.j.temperature());
379
380 Double projGridVel_i = 0.0, projGridVel_j = 0.0;
381 if (dynamicGrid) {
382 const auto& gridVel = geometry.nodes->GetGridVel();
383 const Double vn_i = dot(gatherVariables<nDim>(iPoint, gridVel), unitNormal);
384 const Double vn_j = dot(gatherVariables<nDim>(jPoint, gridVel), unitNormal);
385 projGridVel_i = onemw * vn_i + w * vn_j;
386 projGridVel_j = onemw * vn_j + w * vn_i;
387 }
388 Double projVel_i = dot(Vweighted.i.velocity(), unitNormal) - projGridVel_i;
389 Double projVel_j = dot(Vweighted.j.velocity(), unitNormal) - projGridVel_j;
390
391 /*--- Lambda+ ---*/
392
393 VectorDbl<nVar> lambda;
394 for (size_t iDim = 0; iDim < nDim; ++iDim) {
395 lambda(iDim) = fmax(projVel_i, 0);
396 }
397 lambda(nDim) = fmax(projVel_i + soundSpeed_i, 0);
398 lambda(nDim+1) = fmax(projVel_i - soundSpeed_i, 0);
399
400 auto pMat = pMatrix(gamma, Vweighted.i.density(), Vweighted.i.velocity(),
401 projVel_i, soundSpeed_i, unitNormal);
402 auto pMatInv = pMatrixInv(gamma, Vweighted.i.density(), Vweighted.i.velocity(),
403 projVel_i, soundSpeed_i, unitNormal);
404
405 auto updateFlux = [&](const auto& u, auto& jac) {
406 for (size_t iVar = 0; iVar < nVar; ++iVar) {
407 for (size_t jVar = 0; jVar < nVar; ++jVar) {
408 /*--- Compute |projModJacTensor| = P x |Lambda| x P^-1. ---*/
409
410 Double projModJacTensor = 0.0;
411 for (size_t kVar = 0; kVar < nVar; ++kVar) {
412 projModJacTensor += pMat(iVar,kVar) * lambda(kVar) * pMatInv(kVar,jVar);
413 }
414 Double dFdU = projModJacTensor * area;
415
416 flux(iVar) += dFdU * u(jVar);
417 jac(iVar, jVar) = dFdU;
418 }
419 }
420 };
421 updateFlux(U.i.all, jac_i);
422
423 /*--- Lambda- ---*/
424
425 for (size_t iDim = 0; iDim < nDim; ++iDim) {
426 lambda(iDim) = fmin(projVel_j, 0);
427 }
428 lambda(nDim) = fmin(projVel_j + soundSpeed_j, 0);
429 lambda(nDim+1) = fmin(projVel_j - soundSpeed_j, 0);
430
431 pMat = pMatrix(gamma, Vweighted.j.density(), Vweighted.j.velocity(),
432 projVel_j, soundSpeed_j, unitNormal);
433 pMatInv = pMatrixInv(gamma, Vweighted.j.density(), Vweighted.j.velocity(),
434 projVel_j, soundSpeed_j, unitNormal);
435 updateFlux(U.j.all, jac_j);
436 }
437};
A templated matrix/vector-like object.
Definition C2DContainer.hpp:374
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Class for defining the variables of the compressible Euler solver.
Definition CEulerVariable.hpp:46
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
CPoint * nodes
Node vector (dual grid information).
Definition CGeometry.hpp:253
MSW scheme with switch to SW based on a pressure sensor.
Definition upwind.hpp:321
void finalizeFlux(VectorDbl< nVar > &flux, MatrixDbl< nVar > &jac_i, MatrixDbl< nVar > &jac_j, const bool implicit, const Double &area, const VectorDbl< nDim > &unitNormal, const VectorDbl< nDim > &normal, const CPair< PrimVarType > &V, const CPair< ConsVarType > &U, const Int &iPoint, const Int &jPoint, const Double &nonPhysical, const CEulerVariable &solution, const CGeometry &geometry, Ts &...) const
Implementation of the flux.
Definition upwind.hpp:347
CMSWScheme(const CConfig &config, unsigned iMesh, Ts &... args)
Constructor, store some constants and forward args to base.
Definition upwind.hpp:339
const su2double alpha
Definition upwind.hpp:329
su2double * GetGridVel(unsigned long iPoint)
Get the value of the grid velocity at the point.
Definition CPoint.hpp:816
Classical Roe scheme.
Definition upwind.hpp:167
CRoeScheme(const CConfig &config, Ts &... args)
Constructor, store some constants and forward to base.
Definition upwind.hpp:187
void finalizeFlux(VectorDbl< nVar > &flux, MatrixDbl< nVar > &jac_i, MatrixDbl< nVar > &jac_j, const bool implicit, const Double &area, const VectorDbl< nDim > &unitNormal, const VectorDbl< nDim > &normal, const CPair< PrimVarType > &V, const CPair< ConsVarType > &U, const Int &iPoint, const Int &jPoint, const Double &nonPhysical, const CEulerVariable &solution, const CGeometry &geometry, Ts &...) const
Updates flux and Jacobians with standard Roe dissipation.
Definition upwind.hpp:198
Class for holding and manipulating vectors needed by linear solvers.
Definition CSysVector.hpp:195
Base class for upwind schemes, derived classes implement details of the convective flux in a const "f...
Definition upwind.hpp:50
const su2double umusclKappa
Definition upwind.hpp:62
const su2double gasConst
Definition upwind.hpp:58
static constexpr size_t nPrimVarGrad
Definition upwind.hpp:54
const bool muscl
Definition upwind.hpp:61
static constexpr size_t nPrimVar
Definition upwind.hpp:55
void ComputeFlux(const Int iEdge, const CConfig &config, const CGeometry &geometry, const CVariable &solution_, const UpdateType updateType, const Double updateMask, CSysVector< su2double > &vector, SparseMatrixType &matrix, su2activevector *edgeMassFluxes) const final
Implementation of the base Roe flux.
Definition upwind.hpp:83
CUpwindBase(const CConfig &config, unsigned iMesh, Ts &... args)
Constructor, store some constants and forward args to base.
Definition upwind.hpp:69
const bool dynamicGrid
Definition upwind.hpp:60
const LIMITER typeLimiter
Definition upwind.hpp:63
const bool finestGrid
Definition upwind.hpp:59
const su2double gamma
Definition upwind.hpp:57
static constexpr size_t nVar
Definition upwind.hpp:53
Main class for defining the variables.
Definition CVariable.hpp:50
su2double GetSensor(unsigned long iPoint) const
Get the pressure sensor.
Definition CVariable.hpp:965
A simple SIMD type relying on implicit vectorization, i.e. done by the compiler, explicitly vectorize...
Definition vectorization.hpp:89
#define FORCEINLINE
Definition code_config.hpp:44
passivedouble su2double
Definition code_config.hpp:181
MatrixDbl< nDim+2 > pMatrix(const Double &gamma, const Double &density, const RandomAccessIterator &velocity, const Double &projVel, const Double &speedSound, const VectorDbl< nDim > &normal)
Compute and return the P tensor (compressible flow, ideal gas).
Definition common.hpp:136
MatrixDbl< nDim+2 > inviscidProjJac(const Double &gamma, RandomAccessIterator velocity, const Double &energy, const VectorDbl< nDim > &normal, const Double &scale)
Jacobian of the convective flux (compressible flow, ideal gas).
Definition common.hpp:280
MatrixDbl< nDim+2 > pMatrixInv(const Double &gamma, const Double &density, const RandomAccessIterator &velocity, const Double &projVel, const Double &speedSound, const VectorDbl< nDim > &normal)
Compute and return the inverse P tensor (compressible flow, ideal gas).
Definition common.hpp:198
VectorDbl< nDim+2 > inviscidProjFlux(const PrimVarType &V, const ConsVarType &U, const VectorDbl< nDim > &normal)
Convective projected (onto normal) flux (compressible flow).
Definition common.hpp:262
Double roeDissipation(const Int &iPoint, const Int &jPoint, const ENUM_ROELOWDISS type, const VariableType &solution)
(Low) Dissipation coefficient for Roe schemes.
Definition common.hpp:318
Helper functions for viscous methods.
FORCEINLINE ARRAY_T exp(const ARRAY_T &x)
Definition special_vectorization.hpp:156
FORCEINLINE ARRAY_T sqrt(const ARRAY_T &x)
Definition special_vectorization.hpp:116
FORCEINLINE ARRAY_T sign(const ARRAY_T &x)
Definition special_vectorization.hpp:118
FORCEINLINE ARRAY_T abs(const ARRAY_T &x)
Definition special_vectorization.hpp:117
void StartPreacc()
Starts a new preaccumulation section and sets the input variables.
Definition ad_structure.hpp:215
UpdateType
Ways to update vectors and system matrices. COLORING is the typical i/j update, whereas for REDUCTION...
Definition util.hpp:44
void stopPreacc(Vector< Double, nVar > &x)
Stop the AD preaccumulation.
Definition util.hpp:392
constexpr size_t Max(size_t a, size_t b)
Constexpr version of max.
Definition util.hpp:124
void updateEdgeMassFlux(Int iEdge, const Double &massFlux, su2activevector *target)
Store the (scalar) mass flux of an edge, e.g. for "bounded scalar" transport equations.
Definition util.hpp:636
Double norm(const Vector< Double, nDim > &vector)
Vector norm.
Definition util.hpp:267
void updateLinearSystem(Int iEdge, Int iPoint, Int jPoint, bool implicit, UpdateType updateType, Double updateMask, const Vector< Double, nVar > &flux, const Matrix< Double, nVar, nVar > &jac_i, const Matrix< Double, nVar, nVar > &jac_j, CSysVector< su2double > &vector, SparseMatrixType &matrix)
Update the matrix and right-hand-side of a linear system with one conservative flux.
Definition util.hpp:571
auto dot(ForwardIterator iterator, const T *ptr) -> typename std::decay< decltype(*ptr)>::type
Dot product.
Definition util.hpp:203
Double gatherVariables(Int iPoint, const Container &vars, size_t iVar=0)
Gather a single variable, from column iVar (0 by default) of row iPoint of a 2D container,...
Definition util.hpp:277
@ EULER_IMPLICIT
Implicit Euler time integration definition.
Definition option_structure.hpp:1711
const unsigned int MESH_0
Definition of the finest grid level.
Definition option_structure.hpp:88
@ V
Menter k-w SST model with vorticity production terms.
LIMITER
Types of slope limiters.
Definition option_structure.hpp:1038
ENUM_ROELOWDISS
Types of Roe Low Dissipation Schemes.
Definition option_structure.hpp:1668
Type to store compressible conservative (i.e. solution) variables.
Definition variables.hpp:70
Simple pair type for i/j variables.
Definition util.hpp:130
T i
Definition util.hpp:131
T j
Definition util.hpp:131
CRoeVariables< nDim > roeAveragedVariables(const Double &gamma, const CPair< PrimVarType > &V, const VectorDbl< nDim > &normal)
Compute Roe-averaged variables from pair of primitive variables.
Definition variables.hpp:116
CCompressibleConservatives< nDim > compressibleConservatives(const CCompressiblePrimitives< nDim, N > &V)
Primitive to conservative conversion.
Definition variables.hpp:90