@@ -405,23 +405,23 @@ void nse_interp(nse_table_t& nse_state, bool skip_X_fill=false) {
405
405
amrex::Real rmin = nse_table_size::logrho_min;
406
406
amrex::Real rmax = nse_table_size::logrho_max;
407
407
408
- rholog = std::clamp (rholog, rmin, rmax);
408
+ rholog = amrex::Clamp (rholog, rmin, rmax);
409
409
}
410
410
411
411
amrex::Real tlog = std::log10 (nse_state.T );
412
412
{
413
413
amrex::Real tmin = nse_table_size::logT_min;
414
414
amrex::Real tmax = nse_table_size::logT_max;
415
415
416
- tlog = std::clamp (tlog, tmin, tmax);
416
+ tlog = amrex::Clamp (tlog, tmin, tmax);
417
417
}
418
418
419
419
amrex::Real yet = nse_state.Ye ;
420
420
{
421
421
amrex::Real yemin = nse_table_size::ye_min;
422
422
amrex::Real yemax = nse_table_size::ye_max;
423
423
424
- yet = std::clamp (yet, yemin, yemax);
424
+ yet = amrex::Clamp (yet, yemin, yemax);
425
425
}
426
426
427
427
if (nse_table_interp_linear) {
@@ -443,7 +443,7 @@ void nse_interp(nse_table_t& nse_state, bool skip_X_fill=false) {
443
443
for (int n = 1 ; n <= NumSpec; n++) {
444
444
amrex::Real _X = trilinear (ir1, it1, ic1, rholog, tlog, yet,
445
445
[=] (const int i) {return massfractab (n, i);});
446
- nse_state.X [n-1 ] = std::clamp (_X, 0 .0_rt, 1 .0_rt);
446
+ nse_state.X [n-1 ] = amrex::Clamp (_X, 0 .0_rt, 1 .0_rt);
447
447
}
448
448
}
449
449
@@ -455,13 +455,13 @@ void nse_interp(nse_table_t& nse_state, bool skip_X_fill=false) {
455
455
// so we offset one to the left and also ensure that we don't go off the table
456
456
457
457
int ir0 = nse_get_logrho_index (rholog) - 1 ;
458
- ir0 = std::clamp (ir0, 1 , nse_table_size::nden-3 );
458
+ ir0 = amrex::Clamp (ir0, 1 , nse_table_size::nden-3 );
459
459
460
460
int it0 = nse_get_logT_index (tlog) - 1 ;
461
- it0 = std::clamp (it0, 1 , nse_table_size::ntemp-3 );
461
+ it0 = amrex::Clamp (it0, 1 , nse_table_size::ntemp-3 );
462
462
463
463
int ic0 = nse_get_ye_index (yet) - 1 ;
464
- ic0 = std::clamp (ic0, 1 , nse_table_size::nye-3 );
464
+ ic0 = amrex::Clamp (ic0, 1 , nse_table_size::nye-3 );
465
465
466
466
nse_state.abar = tricubic (ir0, it0, ic0, rholog, tlog, yet, abartab);
467
467
nse_state.bea = tricubic (ir0, it0, ic0, rholog, tlog, yet, beatab);
@@ -476,7 +476,7 @@ void nse_interp(nse_table_t& nse_state, bool skip_X_fill=false) {
476
476
for (int n = 1 ; n <= NumSpec; n++) {
477
477
amrex::Real _X = tricubic (ir0, it0, ic0, rholog, tlog, yet,
478
478
[=] (const int i) {return massfractab (n, i);});
479
- nse_state.X [n-1 ] = std::clamp (_X, 0 .0_rt, 1 .0_rt);
479
+ nse_state.X [n-1 ] = amrex::Clamp (_X, 0 .0_rt, 1 .0_rt);
480
480
}
481
481
}
482
482
}
@@ -498,33 +498,33 @@ nse_interp_dT(const amrex::Real temp, const amrex::Real rho, const amrex::Real y
498
498
amrex::Real rmin = nse_table_size::logrho_min;
499
499
amrex::Real rmax = nse_table_size::logrho_max;
500
500
501
- rholog = std::clamp (rholog, rmin, rmax);
501
+ rholog = amrex::Clamp (rholog, rmin, rmax);
502
502
}
503
503
504
504
amrex::Real tlog = std::log10 (temp);
505
505
{
506
506
amrex::Real tmin = nse_table_size::logT_min;
507
507
amrex::Real tmax = nse_table_size::logT_max;
508
508
509
- tlog = std::clamp (tlog, tmin, tmax);
509
+ tlog = amrex::Clamp (tlog, tmin, tmax);
510
510
}
511
511
512
512
amrex::Real yet = ye;
513
513
{
514
514
amrex::Real yemin = nse_table_size::ye_min;
515
515
amrex::Real yemax = nse_table_size::ye_max;
516
516
517
- yet = std::clamp (yet, yemin, yemax);
517
+ yet = amrex::Clamp (yet, yemin, yemax);
518
518
}
519
519
520
520
int ir0 = nse_get_logrho_index (rholog) - 1 ;
521
- ir0 = std::clamp (ir0, 1 , nse_table_size::nden-3 );
521
+ ir0 = amrex::Clamp (ir0, 1 , nse_table_size::nden-3 );
522
522
523
523
int it0 = nse_get_logT_index (tlog) - 1 ;
524
- it0 = std::clamp (it0, 1 , nse_table_size::ntemp-3 );
524
+ it0 = amrex::Clamp (it0, 1 , nse_table_size::ntemp-3 );
525
525
526
526
int ic0 = nse_get_ye_index (yet) - 1 ;
527
- ic0 = std::clamp (ic0, 1 , nse_table_size::nye-3 );
527
+ ic0 = amrex::Clamp (ic0, 1 , nse_table_size::nye-3 );
528
528
529
529
// note: this is returning the derivative wrt log10(T), so we need to
530
530
// convert to d/dT
@@ -551,33 +551,33 @@ nse_interp_drho(const amrex::Real temp, const amrex::Real rho, const amrex::Real
551
551
amrex::Real rmin = nse_table_size::logrho_min;
552
552
amrex::Real rmax = nse_table_size::logrho_max;
553
553
554
- rholog = std::clamp (rholog, rmin, rmax);
554
+ rholog = amrex::Clamp (rholog, rmin, rmax);
555
555
}
556
556
557
557
amrex::Real tlog = std::log10 (temp);
558
558
{
559
559
amrex::Real tmin = nse_table_size::logT_min;
560
560
amrex::Real tmax = nse_table_size::logT_max;
561
561
562
- tlog = std::clamp (tlog, tmin, tmax);
562
+ tlog = amrex::Clamp (tlog, tmin, tmax);
563
563
}
564
564
565
565
amrex::Real yet = ye;
566
566
{
567
567
amrex::Real yemin = nse_table_size::ye_min;
568
568
amrex::Real yemax = nse_table_size::ye_max;
569
569
570
- yet = std::clamp (yet, yemin, yemax);
570
+ yet = amrex::Clamp (yet, yemin, yemax);
571
571
}
572
572
573
573
int ir0 = nse_get_logrho_index (rholog) - 1 ;
574
- ir0 = std::clamp (ir0, 1 , nse_table_size::nden-3 );
574
+ ir0 = amrex::Clamp (ir0, 1 , nse_table_size::nden-3 );
575
575
576
576
int it0 = nse_get_logT_index (tlog) - 1 ;
577
- it0 = std::clamp (it0, 1 , nse_table_size::ntemp-3 );
577
+ it0 = amrex::Clamp (it0, 1 , nse_table_size::ntemp-3 );
578
578
579
579
int ic0 = nse_get_ye_index (yet) - 1 ;
580
- ic0 = std::clamp (ic0, 1 , nse_table_size::nye-3 );
580
+ ic0 = amrex::Clamp (ic0, 1 , nse_table_size::nye-3 );
581
581
582
582
// note: this is returning the derivative wrt log10(rho), so we need to
583
583
// convert to d/drho
0 commit comments