aboutsummaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/Particles/Collision/ElasticCollisionPerez.H18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/Particles/Collision/ElasticCollisionPerez.H b/Source/Particles/Collision/ElasticCollisionPerez.H
index f3ba42b4d..efa1c2a85 100644
--- a/Source/Particles/Collision/ElasticCollisionPerez.H
+++ b/Source/Particles/Collision/ElasticCollisionPerez.H
@@ -41,27 +41,27 @@ void ElasticCollisionPerez (
T_R const dt, T_R const L, T_R const dV)
{
- T_R constexpr inv_c2 = 1./(PhysConst::c*PhysConst::c);
+ T_R constexpr inv_c2 = T_R(1.0)/(PhysConst::c*PhysConst::c);
int NI1 = I1e - I1s;
int NI2 = I2e - I2s;
// get local T1t and T2t
T_R T1t; T_R T2t;
- if ( T1 <= 0. && L <= 0. )
+ if ( T1 <= T_R(0.0) && L <= T_R(0.0) )
{
T1t = ComputeTemperature(I1s,I1e,I1,u1x,u1y,u1z,m1);
}
else { T1t = T1; }
- if ( T2 <= 0. && L <= 0. )
+ if ( T2 <= T_R(0.0) && L <= T_R(0.0) )
{
T2t = ComputeTemperature(I2s,I2e,I2,u2x,u2y,u2z,m2);
}
else { T2t = T2; }
// local density
- T_R n1 = 0.;
- T_R n2 = 0.;
- T_R n12 = 0.;
+ T_R n1 = T_R(0.0);
+ T_R n2 = T_R(0.0);
+ T_R n12 = T_R(0.0);
for (int i1=I1s; i1<I1e; ++i1) { n1 += w1[ I1[i1] ]; }
for (int i2=I2s; i2<I2e; ++i2) { n2 += w2[ I2[i2] ]; }
n1 = n1 / dV; n2 = n2 / dV;
@@ -78,10 +78,10 @@ void ElasticCollisionPerez (
// compute Debye length lmdD
T_R lmdD;
- lmdD = T_R(1.)/std::sqrt( n1*q1*q1/(T1t*PhysConst::ep0) +
+ lmdD = T_R(1.0)/std::sqrt( n1*q1*q1/(T1t*PhysConst::ep0) +
n2*q2*q2/(T2t*PhysConst::ep0) );
- T_R rmin =
- std::pow(T_R(4.)*MathConst::pi/T_R(3.)*amrex::max(n1,n2),T_R(-1./3.));
+ T_R rmin = std::pow( T_R(4.0) * MathConst::pi / T_R(3.0) *
+ amrex::max(n1,n2), T_R(-1.0/3.0) );
lmdD = amrex::max(lmdD, rmin);
// call UpdateMomentumPerezElastic()