From e1b1737647480e67aa214b3dcdaf4ad6a090cf74 Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Thu, 23 Jul 2020 15:22:36 -0700 Subject: [PATCH] eol fix --- Source/Particles/Gather/GetExternalFields.H | 4 +-- .../Particles/PhysicalParticleContainer.cpp | 6 ++--- Source/Particles/PulsarParameters.H | 26 +++++++++---------- Source/Particles/PulsarParameters.cpp | 4 +-- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Source/Particles/Gather/GetExternalFields.H b/Source/Particles/Gather/GetExternalFields.H index de2cec09b38..91f868b8942 100644 --- a/Source/Particles/Gather/GetExternalFields.H +++ b/Source/Particles/Gather/GetExternalFields.H @@ -57,13 +57,13 @@ struct GetExternalField { amrex::ParticleReal x, y, z; m_get_position(i, x, y, z); - PulsarParm::PulsarEField(x, y, z, field_x, field_y, field_z, m_time); + PulsarParm::PulsarEField(x, y, z, field_x, field_y, field_z, m_time); } else if (m_type == Pulsar_Bfield) { amrex::ParticleReal x, y, z; m_get_position(i, x, y, z); - PulsarParm::PulsarBField(x, y, z, field_x, field_y, field_z, m_time); + PulsarParm::PulsarBField(x, y, z, field_x, field_y, field_z, m_time); } #endif else diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 103330d8d91..8fadb9c73db 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -800,7 +800,7 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) amrex::ParallelForRNG(overlap_box, [=] AMREX_GPU_DEVICE (int i, int j, int k, amrex::RandomEngine const& engine) noexcept { - amrex::IntVect iv = amrex::IntVect(AMREX_D_DECL(i, j, k)); + amrex::IntVect iv = amrex::IntVect(AMREX_D_DECL(i, j, k)); const auto index = overlap_box.index(iv); for (int i_part = 0; i_part < pcounts[index]; ++i_part) { @@ -1123,7 +1123,7 @@ PhysicalParticleContainer::Evolve (int lev, #else int thread_num = 0; #endif - + FArrayBox filtered_Ex, filtered_Ey, filtered_Ez; FArrayBox filtered_Bx, filtered_By, filtered_Bz; for (WarpXParIter pti(*this, lev); pti.isValid(); ++pti) @@ -1133,7 +1133,7 @@ PhysicalParticleContainer::Evolve (int lev, amrex::Gpu::synchronize(); } Real wt = amrex::second(); - + const Box& box = pti.validbox(); auto& attribs = pti.GetAttribs(); diff --git a/Source/Particles/PulsarParameters.H b/Source/Particles/PulsarParameters.H index 5ea19786570..185411e41e6 100644 --- a/Source/Particles/PulsarParameters.H +++ b/Source/Particles/PulsarParameters.H @@ -10,7 +10,7 @@ namespace PulsarParm { extern std::string pulsar_type; - + extern AMREX_GPU_DEVICE_MANAGED amrex::Real omega_star; extern AMREX_GPU_DEVICE_MANAGED amrex::Real ramp_omega_time; extern AMREX_GPU_DEVICE_MANAGED amrex::Real B_star; @@ -25,9 +25,9 @@ namespace PulsarParm extern AMREX_GPU_DEVICE_MANAGED amrex::Real Ninj_fraction; extern AMREX_GPU_DEVICE_MANAGED amrex::Real rhoGJ_scale; extern AMREX_GPU_DEVICE_MANAGED int damp_EB_internal; - + extern AMREX_GPU_DEVICE_MANAGED int verbose; - + void ReadParameters(); @@ -38,7 +38,7 @@ namespace PulsarParm if (ramp_omega_time > 0.0 && time < ramp_omega_time) { omega = omega_star * time / ramp_omega_time; } - + return omega; } @@ -68,7 +68,7 @@ namespace PulsarParm if (time < ramp_omega_time) { omega = omega_star*time/ramp_omega_time; } - + if (r= R_star ) { amrex::Real r_ratio = R_star/r; @@ -90,7 +90,7 @@ namespace PulsarParm Er += (2.0/3.0)*omega*B_star*R_star*r_ratio*r_ratio; } amrex::Real Etheta = (-1.0)*B_star*omega*R_star*r_ratio*r3*(2.0*s_theta*c_theta); - + Exp = Er*s_theta*c_phi + Etheta*c_theta*c_phi; Eyp = Er*s_theta*s_phi + Etheta*c_theta*s_phi; Ezp = Er*c_theta - Etheta*s_theta; @@ -226,20 +226,20 @@ namespace PulsarParm const auto domain_xlo = geom.ProbLo(); const auto domain_xhi = geom.ProbHi(); const auto domain_dx = geom.CellSize(); - + //const amrex::Real x = domain_xlo[0] + (i - domain_ilo.x + 0.5) * domain_dx[0] + (1.0 - mf_ixType[0])*domain_dx[0]*0.5; //const amrex::Real y = domain_xlo[1] + (j - domain_ilo.y + 0.5) * domain_dx[1] + (1.0 - mf_ixType[1])*domain_dx[1]*0.5; //const amrex::Real z = domain_xlo[2] + (k - domain_ilo.z + 0.5) * domain_dx[2] + (1.0 - mf_ixType[2])*domain_dx[2]*0.5; const amrex::Real x = domain_xlo[0] + (i ) * domain_dx[0] + (1.0 - mf_ixType[0])*domain_dx[0]*0.5; const amrex::Real y = domain_xlo[1] + (j ) * domain_dx[1] + (1.0 - mf_ixType[1])*domain_dx[1]*0.5; const amrex::Real z = domain_xlo[2] + (k ) * domain_dx[2] + (1.0 - mf_ixType[2])*domain_dx[2]*0.5; - + const amrex::Real xc = 0.5 * (domain_xlo[0] + domain_xhi[0]); const amrex::Real yc = 0.5 * (domain_xlo[1] + domain_xhi[1]); const amrex::Real zc = 0.5 * (domain_xlo[2] + domain_xhi[2]); - + const amrex::Real r = std::sqrt((x-xc)*(x-xc) + (y-yc)*(y-yc) + (z-zc)*(z-zc)); - + return r; } } @@ -249,13 +249,13 @@ namespace PulsarParm void DampEField(int i, int j, int k, amrex::GeometryData const& geom, amrex::Array4 const& Efield, int const* const AMREX_RESTRICT mf_ixtype) { const amrex::Real r = Spherical::r(i, j, k, geom, mf_ixtype); - + if (r < R_star) { // Damping function: Fd = tanh(damping_scale * (r / R_star - 1)) + 1 // for damping_scale >= 10 or so: // Fd(0) ~ 0 // Fd(R_star) ~ 1 - + const amrex::Real Fd = std::tanh(damping_scale * (r / R_star - 1.0)) + 1.0; Efield(i, j, k) = Efield(i, j, k) * Fd; } diff --git a/Source/Particles/PulsarParameters.cpp b/Source/Particles/PulsarParameters.cpp index bb9f2142652..85d08be6662 100644 --- a/Source/Particles/PulsarParameters.cpp +++ b/Source/Particles/PulsarParameters.cpp @@ -8,7 +8,7 @@ namespace PulsarParm { std::string pulsar_type; - + AMREX_GPU_DEVICE_MANAGED amrex::Real omega_star; AMREX_GPU_DEVICE_MANAGED amrex::Real ramp_omega_time = -1.0; AMREX_GPU_DEVICE_MANAGED amrex::Real B_star; @@ -24,7 +24,7 @@ namespace PulsarParm AMREX_GPU_DEVICE_MANAGED amrex::Real max_ndens; AMREX_GPU_DEVICE_MANAGED amrex::Real Ninj_fraction; AMREX_GPU_DEVICE_MANAGED amrex::Real rhoGJ_scale; - + void ReadParameters() { amrex::ParmParse pp("pulsar"); pp.query("pulsarType",pulsar_type);