Documentation 6b54b78464
Loading...
Searching...
No Matches
CLimiterDetails.hpp
Go to the documentation of this file.
1/*!
2 * \file CLimiterDetails.hpp
3 * \brief A class template that allows defining limiters via
4 * specialization of particular details.
5 * \author P. Gomes
6 * \version 8.5.0 "Harrier"
7 *
8 * SU2 Project Website: https://su2code.github.io
9 *
10 * The SU2 Project is maintained by the SU2 Foundation
11 * (http://su2foundation.org)
12 *
13 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
14 *
15 * SU2 is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; either
18 * version 2.1 of the License, or (at your option) any later version.
19 *
20 * SU2 is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
24 *
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
27 */
28
29 #pragma once
30
31/*!
32 * \brief A traits class for limiters, see notes for "computeLimiters_impl()".
33 * \ingroup FvmAlgos
34 * \note There is no default implementation (the code will compile but not
35 * link) specialization is mandatory.
36 */
37template<LIMITER LimiterKind>
39{
40 /*!
41 * \brief Compute any global value that may be needed by the other functions.
42 * \note This function is called once by multiple threads.
43 */
44 template<class FieldType>
45 inline void preprocess(CGeometry&, CConfig&, size_t varBegin,
46 size_t varEnd, const FieldType&);
47
48 /*!
49 * \brief Geometric modifier (e.g. increase limiting near sharp edges).
50 * \note This function is called once per point inside an AD pre-
51 * -accumulation region, newly used variables should be registered.
52 */
53 inline su2double geometricFactor(size_t iPoint, CGeometry&) const;
54
55 /*!
56 * \brief Smooth (usually) function of the maximum/minimum (positive/negative)
57 * gradient projections onto the edges, and the deltas over direct neighbors.
58 * Both proj and delta may be 0.0, beware of divisions.
59 * \note This function is called twice (min/max) per point per variable
60 * (also inside an AD pre-accumulation region).
61 */
62 inline su2double limiterFunction(size_t iVar, su2double proj, su2double delta) const;
63};
64
65
66/*!
67 * \brief Common small functions used by limiters.
68 * \ingroup FvmAlgos
69 */
70template<class Type = su2double>
72{
73 FORCEINLINE static Type epsilon() {return std::numeric_limits<passivedouble>::epsilon();}
74
75 /*! \brief MUSCL reconstruction increment using the displacement to the middle of an edge. */
76 template <class Int>
77 FORCEINLINE static Type reconstructionIncrement(Int nDim, const Type* halfEdge, const Type* gradient,
78 const Type& value_i, const Type& value_j, const Type& kappa) {
79 Type proj = 0.0;
80 for (Int iDim = 0; iDim < nDim; ++iDim) proj += halfEdge[iDim] * gradient[iDim];
81 const Type cent = 0.5 * (value_j - value_i);
82 return umusclProjection(proj, cent, kappa);
83 }
84
85 FORCEINLINE static Type umusclProjection(const Type& grad_proj, const Type& delta, const Type& kappa)
86 {
87 /*-------------------------------------------------------------------*/
88 /*--- The MUSCL kappa-scheme reconstruction is typically written: ---*/
89 /*--- V_L = V_i + 0.25 * dV_ij^kap, where ---*/
90 /*--- dV_ij^kap = (1-kappa) dV_ij^upw + (1+kappa) dV_ij^cen, ---*/
91 /*--- dV_ij^cen = V_j - V_i, ---*/
92 /*--- dV_ij^upw = 2 grad(Vi) dot vector_ij - dV_ij^cen. ---*/
93 /*--- To maintain proper scaling for edge limiters, the result of ---*/
94 /*--- this function is 0.5 * dV_ij^kap. ---*/
95 /*-------------------------------------------------------------------*/
96 const Type cent = 0.5 * delta;
97 const Type upw = grad_proj - cent;
98 return (1.0 - kappa) * upw + (1.0 + kappa) * cent;
99 }
100
101 FORCEINLINE static Type venkatFunction(const Type& proj, const Type& delta, const Type& eps2)
102 {
103 Type y = delta*(delta+proj) + eps2;
104 return (y + delta*proj) / (y + 2*proj*proj);
105 }
106
107 FORCEINLINE static Type vanAlbadaFunction(const Type& proj, const Type& delta, const Type& eps)
108 {
109 return delta * (proj + delta) / (pow(proj, 2) + pow(delta, 2) + eps);
110 }
111
112 FORCEINLINE static Type raisedSine(const Type& dist)
113 {
114 Type factor = 0.5*(1.0+dist+sin(PI_NUMBER*dist)/PI_NUMBER);
115 return max(0.0, min(factor, 1.0));
116 }
117
118 FORCEINLINE static Type r3Function(const Type& proj, const Type& delta, const Type& epsp)
119 {
120 Type Dp = fabs(delta);
121 Type Dm = fabs(proj);
122 if(Dp>(2.0*Dm)) return 1.0;
123 Type y = pow(Dp, 3) + epsp;
124 Type S3 = 4.0*Dm*Dm;
125 return (y + Dp*S3) / (y + Dm*(delta*delta+S3));
126 }
127
128 FORCEINLINE static Type r4Function(const Type& proj, const Type& delta, const Type& epsp)
129 {
130 Type Dp = fabs(delta);
131 Type Dm = fabs(proj);
132 if(Dp>(2.0*Dm)) return 1.0;
133 Type y = pow(Dp, 4) + epsp;
134 Type S4 = 2.0*Dm*(Dp*Dp-2.0*Dm*(Dp-2.0*Dm));
135 return (y + Dp*S4) / (y + Dm*(pow(delta,3)+S4));
136 }
137
138 FORCEINLINE static Type r5Function(const Type& proj, const Type& delta, const Type& epsp)
139 {
140 Type Dp = fabs(delta);
141 Type Dm = fabs(proj);
142 if(Dp>(2.0*Dm)) return 1.0;
143 Type y = pow(Dp, 5) + epsp;
144 Type S5 = 8.0*Dm*Dm*(Dp*Dp-2.0*Dm*(Dp-Dm));
145 return (y + Dp*S5) / (y + Dm*(pow(delta,4)+S5));
146 }
147};
148
149
150/*!
151 * \brief Barth-Jespersen specialization.
152 * \ingroup FvmAlgos
153 */
154template<>
156{
158
159 /*!
160 * \brief Set a small epsilon to avoid divisions by 0.
161 */
162 template<class... Ts>
163 inline void preprocess(Ts&...) {eps2 = LimiterHelpers<>::epsilon();}
164
165 /*!
166 * \brief No geometric modification for this kind of limiter.
167 */
168 template<class... Ts>
169 inline su2double geometricFactor(Ts&...) const {return 1.0;}
170
171 /*!
172 * \brief Venkatakrishnan function with a numerical epsilon.
173 */
174 inline su2double limiterFunction(size_t, su2double proj, su2double delta) const
175 {
176 return LimiterHelpers<>::venkatFunction(proj, delta, eps2);
177 }
178};
179
180
181/*!
182 * \brief Venkatakrishnan specialization.
183 * \ingroup FvmAlgos
184 */
185template<>
187{
189
190 /*!
191 * \brief Store the reference lenght based eps^2 parameter,
192 * limited to a small number to avoid divisions by 0.
193 */
194 template<class... Ts>
195 inline void preprocess(CGeometry&, const CConfig& config, Ts&...)
196 {
197 su2double L = config.GetRefElemLength();
199 su2double eps1 = fabs(L*K);
200 eps2 = max(eps1*eps1*eps1, LimiterHelpers<>::epsilon());
201 }
202
203 /*!
204 * \brief No geometric modification for this kind of limiter.
205 */
206 template<class... Ts>
207 inline su2double geometricFactor(Ts&...) const {return 1.0;}
208
209 /*!
210 * \brief Smooth function that disables limiting in smooth regions.
211 */
212 inline su2double limiterFunction(size_t, su2double proj, su2double delta) const
213 {
214 return LimiterHelpers<>::venkatFunction(proj, delta, eps2);
215 }
216};
217
218
219/*!
220 * \brief Nishikawa's R3 limiter specialization.
221 * \ingroup FvmAlgos
222 */
223template<>
225{
227
228 /*!
229 * \brief Store the reference lenght based eps^3 parameter,
230 * limited to a small number to avoid divisions by 0.
231 */
232 template<class... Ts>
233 inline void preprocess(CGeometry&, const CConfig& config, Ts&...)
234 {
235 su2double L = config.GetRefElemLength();
237 su2double eps1 = fabs(L*K);
238 epsp = max(pow(eps1, 4), LimiterHelpers<>::epsilon());
239 }
240
241 /*!
242 * \brief No geometric modification for this kind of limiter.
243 */
244 template<class... Ts>
245 inline su2double geometricFactor(Ts&...) const {return 1.0;}
246
247 /*!
248 * \brief Smooth function that disables limiting in smooth regions.
249 */
250 inline su2double limiterFunction(size_t, su2double proj, su2double delta) const
251 {
252 return LimiterHelpers<>::r3Function(proj, delta, epsp);
253 }
254};
255
256
257/*!
258 * \brief Nishikawa's R4 limiter specialization.
259 * \ingroup FvmAlgos
260 */
261template<>
263{
265
266 /*!
267 * \brief Store the reference lenght based eps^4 parameter,
268 * limited to a small number to avoid divisions by 0.
269 */
270 template<class... Ts>
271 inline void preprocess(CGeometry&, const CConfig& config, Ts&...)
272 {
273 su2double L = config.GetRefElemLength();
275 su2double eps1 = fabs(L*K);
276 epsp = max(pow(eps1, 5), LimiterHelpers<>::epsilon());
277 }
278
279 /*!
280 * \brief No geometric modification for this kind of limiter.
281 */
282 template<class... Ts>
283 inline su2double geometricFactor(Ts&...) const {return 1.0;}
284
285 /*!
286 * \brief Smooth function that disables limiting in smooth regions.
287 */
288 inline su2double limiterFunction(size_t, su2double proj, su2double delta) const
289 {
290 return LimiterHelpers<>::r4Function(proj, delta, epsp);
291 }
292};
293
294
295/*!
296 * \brief Nishikawa's R5 limiter specialization.
297 * \ingroup FvmAlgos
298 */
299template<>
301{
303
304 /*!
305 * \brief Store the reference lenght based eps^5 parameter,
306 * limited to a small number to avoid divisions by 0.
307 */
308 template<class... Ts>
309 inline void preprocess(CGeometry&, const CConfig& config, Ts&...)
310 {
311 su2double L = config.GetRefElemLength();
313 su2double eps1 = fabs(L*K);
314 epsp = max(pow(eps1, 6), LimiterHelpers<>::epsilon());
315 }
316
317 /*!
318 * \brief No geometric modification for this kind of limiter.
319 */
320 template<class... Ts>
321 inline su2double geometricFactor(Ts&...) const {return 1.0;}
322
323 /*!
324 * \brief Smooth function that disables limiting in smooth regions.
325 */
326 inline su2double limiterFunction(size_t, su2double proj, su2double delta) const
327 {
328 return LimiterHelpers<>::r5Function(proj, delta, epsp);
329 }
330};
331
332/*!
333 * \brief Venkatakrishnan-Wang specialization.
334 * \ingroup FvmAlgos
335 */
336template<>
338{
339 static su2activevector sharedMin, sharedMax;
341
342 /*!
343 * \brief Store the solution range based eps^2 parameter.
344 */
345 template<class FieldType>
346 inline void preprocess(CGeometry& geometry, const CConfig& config, size_t varBegin,
347 size_t varEnd, const FieldType& field)
348 {
349 /*--- Determine the max and min global value for each variable. ---*/
350
351 su2double largeNum = 0.1*std::numeric_limits<passivedouble>::max();
352
353 /*--- Allocate the static members (shared between threads) to
354 * perform the reduction across all threads in the rank. ---*/
355
357 {
358 sharedMin.resize(varEnd) = largeNum;
359 sharedMax.resize(varEnd) =-largeNum;
360 }
362
363 /*--- Per thread reduction. ---*/
364
365 su2activevector localMin(varEnd), localMax(varEnd);
366 localMin = largeNum;
367 localMax =-largeNum;
368
369 SU2_OMP_FOR_(schedule(static, 512) SU2_NOWAIT)
370 for(size_t iPoint = 0; iPoint < geometry.GetnPointDomain(); ++iPoint)
371 {
372 for(size_t iVar = varBegin; iVar < varEnd; ++iVar)
373 {
374 localMin(iVar) = min(localMin(iVar), field(iPoint, iVar));
375 localMax(iVar) = max(localMax(iVar), field(iPoint, iVar));
376 }
377 }
379
380 /*--- Per rank reduction. ---*/
381
382 for(size_t iVar = varBegin; iVar < varEnd; ++iVar)
383 {
384 atomicMin(localMin(iVar), sharedMin(iVar));
385 atomicMax(localMax(iVar), sharedMax(iVar));
386 }
387
388 /*--- Global reduction. ---*/
389
391 {
392 localMin = sharedMin;
393 SU2_MPI::Allreduce(localMin.data(), sharedMin.data(), varEnd, MPI_DOUBLE, MPI_MIN, SU2_MPI::GetComm());
394
395 localMax = sharedMax;
396 SU2_MPI::Allreduce(localMax.data(), sharedMax.data(), varEnd, MPI_DOUBLE, MPI_MAX, SU2_MPI::GetComm());
397 }
399
400 /*--- Compute eps^2 (each thread has its own copy of it). ---*/
401
402 eps2.resize(varEnd);
404
405 for(size_t iVar = varBegin; iVar < varEnd; ++iVar)
406 {
407 su2double range = sharedMax(iVar) - sharedMin(iVar);
408 eps2(iVar) = max(pow(K*range, 2), LimiterHelpers<>::epsilon());
409 }
410 }
411
412 /*!
413 * \brief No geometric modification for this kind of limiter.
414 */
415 template<class... Ts>
416 inline su2double geometricFactor(Ts&...) const {return 1.0;}
417
418 /*!
419 * \brief Smooth function that disables limiting in smooth regions.
420 */
421 inline su2double limiterFunction(size_t iVar, su2double proj, su2double delta) const
422 {
423 AD::SetPreaccIn(eps2(iVar));
424 return LimiterHelpers<>::venkatFunction(proj, delta, eps2(iVar));
425 }
426};
427
428
429/*!
430 * \brief Venkatakrishnan with sharp edge modification.
431 * \ingroup FvmAlgos
432 */
433template<>
435{
436 su2double eps1, eps2, sharpCoeff;
437
438 /*!
439 * \brief Store the reference lenght based eps^2 parameter.
440 */
441 template<class... Ts>
442 inline void preprocess(CGeometry&, const CConfig& config, Ts&...)
443 {
444 sharpCoeff = config.GetAdjSharp_LimiterCoeff();
445 su2double L = config.GetRefElemLength();
447 eps1 = fabs(L*K);
448 eps2 = max(eps1*eps1*eps1, LimiterHelpers<>::epsilon());
449 }
450
451 /*!
452 * \brief Full limiting (1st order) near sharp edges.
453 */
454 inline su2double geometricFactor(size_t iPoint, CGeometry& geometry) const
455 {
457 su2double dist = geometry.nodes->GetSharpEdge_Distance(iPoint)/(sharpCoeff*eps1)-1.0;
458 return LimiterHelpers<>::raisedSine(dist);
459 }
460
461 /*!
462 * \brief Smooth function that disables limiting in smooth regions.
463 */
464 inline su2double limiterFunction(size_t, su2double proj, su2double delta) const
465 {
466 return LimiterHelpers<>::venkatFunction(proj, delta, eps2);
467 }
468};
469
470
471/*!
472 * \brief Venkatakrishnan with wall distance modification.
473 * \ingroup FvmAlgos
474 */
475template<>
477{
478 su2double eps1, eps2, sharpCoeff;
479
480 /*!
481 * \brief Store the reference lenght based eps^2 parameter.
482 */
483 template<class... Ts>
484 inline void preprocess(CGeometry&, const CConfig& config, Ts&...)
485 {
486 sharpCoeff = config.GetAdjSharp_LimiterCoeff();
487 su2double L = config.GetRefElemLength();
489 eps1 = fabs(L*K);
490 eps2 = max(eps1*eps1*eps1, LimiterHelpers<>::epsilon());
491 }
492
493 /*!
494 * \brief Full limiting (1st order) near walls.
495 */
496 inline su2double geometricFactor(size_t iPoint, CGeometry& geometry) const
497 {
498 AD::SetPreaccIn(geometry.nodes->GetWall_Distance(iPoint));
499 su2double dist = geometry.nodes->GetWall_Distance(iPoint)/(sharpCoeff*eps1)-1.0;
500 return LimiterHelpers<>::raisedSine(dist);
501 }
502
503 /*!
504 * \brief Smooth function that disables limiting in smooth regions.
505 */
506 inline su2double limiterFunction(size_t, su2double proj, su2double delta) const
507 {
508 return LimiterHelpers<>::venkatFunction(proj, delta, eps2);
509 }
510};
A templated matrix/vector-like object.
Definition C2DContainer.hpp:374
C2DContainer & resize(const Index_t size1, const Index_t size2=1) noexcept
Request a change of size.
Definition C2DContainer.hpp:541
static Comm GetComm()
Definition mpi_structure.hpp:530
static void Allreduce(const void *sendbuf, void *recvbuf, int count, Datatype datatype, Op op, Comm comm)
Definition mpi_structure.hpp:570
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
su2double GetVenkat_LimiterCoeff(void) const
Get the value of limiter coefficient.
Definition CConfig.hpp:2557
su2double GetRefElemLength(void) const
Get the reference element length for computing the slope limiting epsilon.
Definition CConfig.hpp:2486
su2double GetAdjSharp_LimiterCoeff(void) const
Get the value of sharp edge limiter.
Definition CConfig.hpp:2569
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
unsigned long GetnPointDomain() const
Get number of real points (that belong to the domain).
Definition CGeometry.hpp:593
su2double & GetSharpEdge_Distance(unsigned long iPoint)
Get the value of the distance to a sharp edge.
Definition CPoint.hpp:521
su2double & GetWall_Distance(unsigned long iPoint)
Get the value of the distance to the nearest wall.
Definition CPoint.hpp:492
Scalar_t * data() noexcept
Definition C2DContainer.hpp:222
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
FORCEINLINE ARRAY_T pow(const ARRAY_T &a, const ARRAY_T &b)
Definition special_vectorization.hpp:179
#define MPI_MAX
Definition mpi_structure.hpp:490
#define MPI_MIN
Definition mpi_structure.hpp:489
#define MPI_DOUBLE
Definition mpi_structure.hpp:484
void SetPreaccIn(Ts &&... data)
Sets the scalar inputs of a preaccumulation section.
Definition ad_structure.hpp:186
#define BEGIN_SU2_OMP_SAFE_GLOBAL_ACCESS
Definition omp_structure.hpp:187
#define END_SU2_OMP_FOR
Definition omp_structure.hpp:158
#define SU2_OMP_FOR_(ARGS)
Definition omp_structure.hpp:149
#define SU2_NOWAIT
Definition omp_structure.hpp:153
#define END_SU2_OMP_SAFE_GLOBAL_ACCESS
Definition omp_structure.hpp:192
void atomicMin(const T &local, T &shared)
Definition omp_structure.hpp:322
void atomicMax(const T &local, T &shared)
Definition omp_structure.hpp:305
LIMITER
Types of slope limiters.
Definition option_structure.hpp:1038
@ VENKATAKRISHNAN
Slope limiter using Venkatakrisnan method (stencil formulation).
@ NISHIKAWA_R3
Slope limiter using Nishikawa's R3 method (stencil formulation).
@ NISHIKAWA_R4
Slope limiter using Nishikawa's R4 method (stencil formulation).
@ SHARP_EDGES
Slope limiter using sharp edges.
@ NISHIKAWA_R5
Slope limiter using Nishikawa's R5 method (stencil formulation).
@ VENKATAKRISHNAN_WANG
Slope limiter using Venkatakrisnan method, eps based on solution (stencil formulation).
@ WALL_DISTANCE
Slope limiter using wall distance.
@ BARTH_JESPERSEN
Slope limiter using Barth-Jespersen method (stencil formulation).
constexpr passivedouble PI_NUMBER
Pi number (not using M_PI to avoid Windows issues).
Definition option_structure.hpp:108
su2double limiterFunction(size_t, su2double proj, su2double delta) const
Venkatakrishnan function with a numerical epsilon.
Definition CLimiterDetails.hpp:174
su2double eps2
Definition CLimiterDetails.hpp:157
su2double geometricFactor(Ts &...) const
No geometric modification for this kind of limiter.
Definition CLimiterDetails.hpp:169
void preprocess(Ts &...)
Set a small epsilon to avoid divisions by 0.
Definition CLimiterDetails.hpp:163
su2double epsp
Definition CLimiterDetails.hpp:226
void preprocess(CGeometry &, const CConfig &config, Ts &...)
Store the reference lenght based eps^3 parameter, limited to a small number to avoid divisions by 0.
Definition CLimiterDetails.hpp:233
su2double geometricFactor(Ts &...) const
No geometric modification for this kind of limiter.
Definition CLimiterDetails.hpp:245
su2double limiterFunction(size_t, su2double proj, su2double delta) const
Smooth function that disables limiting in smooth regions.
Definition CLimiterDetails.hpp:250
su2double limiterFunction(size_t, su2double proj, su2double delta) const
Smooth function that disables limiting in smooth regions.
Definition CLimiterDetails.hpp:288
su2double geometricFactor(Ts &...) const
No geometric modification for this kind of limiter.
Definition CLimiterDetails.hpp:283
su2double epsp
Definition CLimiterDetails.hpp:264
void preprocess(CGeometry &, const CConfig &config, Ts &...)
Store the reference lenght based eps^4 parameter, limited to a small number to avoid divisions by 0.
Definition CLimiterDetails.hpp:271
su2double limiterFunction(size_t, su2double proj, su2double delta) const
Smooth function that disables limiting in smooth regions.
Definition CLimiterDetails.hpp:326
void preprocess(CGeometry &, const CConfig &config, Ts &...)
Store the reference lenght based eps^5 parameter, limited to a small number to avoid divisions by 0.
Definition CLimiterDetails.hpp:309
su2double geometricFactor(Ts &...) const
No geometric modification for this kind of limiter.
Definition CLimiterDetails.hpp:321
su2double epsp
Definition CLimiterDetails.hpp:302
su2double limiterFunction(size_t, su2double proj, su2double delta) const
Smooth function that disables limiting in smooth regions.
Definition CLimiterDetails.hpp:464
void preprocess(CGeometry &, const CConfig &config, Ts &...)
Store the reference lenght based eps^2 parameter.
Definition CLimiterDetails.hpp:442
su2double geometricFactor(size_t iPoint, CGeometry &geometry) const
Full limiting (1st order) near sharp edges.
Definition CLimiterDetails.hpp:454
su2double eps1
Definition CLimiterDetails.hpp:436
su2double geometricFactor(Ts &...) const
No geometric modification for this kind of limiter.
Definition CLimiterDetails.hpp:207
su2double limiterFunction(size_t, su2double proj, su2double delta) const
Smooth function that disables limiting in smooth regions.
Definition CLimiterDetails.hpp:212
su2double eps2
Definition CLimiterDetails.hpp:188
void preprocess(CGeometry &, const CConfig &config, Ts &...)
Store the reference lenght based eps^2 parameter, limited to a small number to avoid divisions by 0.
Definition CLimiterDetails.hpp:195
su2double geometricFactor(Ts &...) const
No geometric modification for this kind of limiter.
Definition CLimiterDetails.hpp:416
su2activevector eps2
Definition CLimiterDetails.hpp:340
su2double limiterFunction(size_t iVar, su2double proj, su2double delta) const
Smooth function that disables limiting in smooth regions.
Definition CLimiterDetails.hpp:421
static su2activevector sharedMax
Definition CLimiterDetails.hpp:339
void preprocess(CGeometry &geometry, const CConfig &config, size_t varBegin, size_t varEnd, const FieldType &field)
Store the solution range based eps^2 parameter.
Definition CLimiterDetails.hpp:346
su2double geometricFactor(size_t iPoint, CGeometry &geometry) const
Full limiting (1st order) near walls.
Definition CLimiterDetails.hpp:496
su2double limiterFunction(size_t, su2double proj, su2double delta) const
Smooth function that disables limiting in smooth regions.
Definition CLimiterDetails.hpp:506
su2double eps1
Definition CLimiterDetails.hpp:478
void preprocess(CGeometry &, const CConfig &config, Ts &...)
Store the reference lenght based eps^2 parameter.
Definition CLimiterDetails.hpp:484
A traits class for limiters, see notes for "computeLimiters_impl()".
Definition CLimiterDetails.hpp:39
su2double geometricFactor(size_t iPoint, CGeometry &) const
Geometric modifier (e.g. increase limiting near sharp edges).
void preprocess(CGeometry &, CConfig &, size_t varBegin, size_t varEnd, const FieldType &)
Compute any global value that may be needed by the other functions.
su2double limiterFunction(size_t iVar, su2double proj, su2double delta) const
Smooth (usually) function of the maximum/minimum (positive/negative) gradient projections onto the ed...
Common small functions used by limiters.
Definition CLimiterDetails.hpp:72
static FORCEINLINE Type reconstructionIncrement(Int nDim, const Type *halfEdge, const Type *gradient, const Type &value_i, const Type &value_j, const Type &kappa)
MUSCL reconstruction increment using the displacement to the middle of an edge.
Definition CLimiterDetails.hpp:77
static FORCEINLINE Type r3Function(const Type &proj, const Type &delta, const Type &epsp)
Definition CLimiterDetails.hpp:118
static FORCEINLINE Type umusclProjection(const Type &grad_proj, const Type &delta, const Type &kappa)
Definition CLimiterDetails.hpp:85
static FORCEINLINE Type r4Function(const Type &proj, const Type &delta, const Type &epsp)
Definition CLimiterDetails.hpp:128
static FORCEINLINE Type venkatFunction(const Type &proj, const Type &delta, const Type &eps2)
Definition CLimiterDetails.hpp:101
static FORCEINLINE Type vanAlbadaFunction(const Type &proj, const Type &delta, const Type &eps)
Definition CLimiterDetails.hpp:107
static FORCEINLINE Type r5Function(const Type &proj, const Type &delta, const Type &epsp)
Definition CLimiterDetails.hpp:138
static FORCEINLINE Type epsilon()
Definition CLimiterDetails.hpp:73
static FORCEINLINE Type raisedSine(const Type &dist)
Definition CLimiterDetails.hpp:112