From 56b4b2d12522fc1667a76f9c675ca928e059d34c Mon Sep 17 00:00:00 2001 From: Eya Dammak Date: Fri, 3 Jan 2025 17:31:32 +0100 Subject: [PATCH] fix issues of tab --- CMakeLists.txt | 2 +- .../plasma/PlasmaParticleContainer.cpp | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cdf08938b..227366c8d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -342,7 +342,7 @@ if(BUILD_TESTING) WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ) - add_test(NAME laser_ionization.1Rank + add_test(NAME laser_ionization.1Rank COMMAND bash ${HiPACE_SOURCE_DIR}/tests/laser_ionization.1Rank.sh $ ${HiPACE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} diff --git a/src/particles/plasma/PlasmaParticleContainer.cpp b/src/particles/plasma/PlasmaParticleContainer.cpp index 0cd912f2ec..af89c4567d 100644 --- a/src/particles/plasma/PlasmaParticleContainer.cpp +++ b/src/particles/plasma/PlasmaParticleContainer.cpp @@ -501,10 +501,10 @@ LaserIonization (const int islice, (PhysConstSI::ep0 * PhysConstSI::m_e) ); const amrex::Real E0 = Hipace::m_normalized_units ? wp * PhysConstSI::m_e * PhysConstSI::c / PhysConstSI::q_e : 1; - const amrex::Real lambda0 = laser.GetLambda0(); + const amrex::Real lambda0 = laser.GetLambda0(); const amrex::Real omega0 = 2.0 * MathConst::pi * phys_const.c / lambda0; - const bool linear_polarization = laser.LinearPolarization(); - + const bool linear_polarization = laser.LinearPolarization(); + int * const ion_lev = soa_ion.GetIntData(PlasmaIdx::ion_lev).data(); const amrex::Real * const x_prev = soa_ion.GetRealData(PlasmaIdx::x_prev).data(); const amrex::Real * const y_prev = soa_ion.GetRealData(PlasmaIdx::y_prev).data(); @@ -559,8 +559,8 @@ LaserIonization (const int islice, amrex::Real Ep = std::sqrt( amrex::abs(Et*Et) + amrex::abs(El*El) ); Ep *= phys_const.m_e * phys_const.c / phys_const.q_e; - Ep *= E0; - + Ep *= E0; + // Compute probability of ionization p const amrex::Real gammap = (1.0_rt + uxp[ip] * uxp[ip] * clightsq + uyp[ip] * uyp[ip] * clightsq @@ -571,12 +571,12 @@ LaserIonization (const int islice, std::pow(Ep, adk_power[ion_lev_loc]) * std::exp( adk_exp_prefactor[ion_lev_loc]/Ep ); - amrex::Real w_dtau_ac; - if (linear_polarization) { - w_dtau_ac = w_dtau_dc * std::sqrt(Ep * laser_adk_prefactor[ion_lev_loc]); - } else { - w_dtau_ac = w_dtau_dc; - } + amrex::Real w_dtau_ac; + if (linear_polarization) { + w_dtau_ac = w_dtau_dc * std::sqrt(Ep * laser_adk_prefactor[ion_lev_loc]); + } else { + w_dtau_ac = w_dtau_dc; + } amrex::Real p = 1._rt - std::exp( - w_dtau_ac );