Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 2, 2024
1 parent 6381b4e commit 3afb9b3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Source/Particles/ParticleBoundaryBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ struct CopyAndTimestamp {
amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> m_phi;
int m_idim;
int m_iside;


template <typename DstData, typename SrcData>
AMREX_GPU_HOST_DEVICE
Expand All @@ -189,7 +189,7 @@ struct CopyAndTimestamp {
for (int j = 0; j < src.m_num_runtime_int; ++j) {
dst.m_runtime_idata[j][dst_i] = src.m_runtime_idata[j][src_i];
}

amrex::ParticleReal const ux = dst.m_rdata[PIdx::ux][dst_i];
amrex::ParticleReal const uy = dst.m_rdata[PIdx::uy][dst_i];
amrex::ParticleReal const uz = dst.m_rdata[PIdx::uz][dst_i];
Expand All @@ -206,15 +206,15 @@ struct CopyAndTimestamp {
}

if (m_iside==1){ //iside=1, we are in the right side
delta_t = std::abs(dst.m_rdata[PIdx::z][dst_i]-m_phi[m_idim])/exit_velocity;
delta_t = std::abs(dst.m_rdata[PIdx::z][dst_i]-m_phi[m_idim])/exit_velocity;
dst.m_runtime_rdata[m_delta_index][dst_i] = delta_t;
} else{
delta_t = std::abs(dst.m_rdata[PIdx::z][dst_i]-m_plo[m_idim])/exit_velocity;
dst.m_runtime_rdata[m_delta_index][dst_i] = delta_t;
delta_t = std::abs(dst.m_rdata[PIdx::z][dst_i]-m_plo[m_idim])/exit_velocity;
dst.m_runtime_rdata[m_delta_index][dst_i] = delta_t;
}
}
//calculation of the normal to the boundary
std::array<double, 3> n = {0.0, 0.0, 0.0};
std::array<double, 3> n = {0.0, 0.0, 0.0};
n[m_idim]=1-2*m_iside;
dst.m_runtime_rdata[m_normal_index][dst_i]= n[0];
dst.m_runtime_rdata[m_normal_index+1][dst_i]= n[1];
Expand Down Expand Up @@ -447,7 +447,7 @@ void ParticleBoundaryBuffer::gatherParticles (MultiParticleContainer& mypc,
if (np == 0) { continue; }

auto predicate = IsOutsideDomainBoundary{plo, phi, idim, iside};

const auto ptile_data = ptile.getConstParticleTileData();

amrex::ReduceOps<amrex::ReduceOpSum> reduce_op;
Expand Down Expand Up @@ -612,4 +612,4 @@ ParticleBoundaryBuffer::getParticleBufferPointer(const std::string species_name,
auto index = WarpX::GetInstance().GetPartContainer().getSpeciesID(species_name);

return &buffer[index];
}
}

0 comments on commit 3afb9b3

Please sign in to comment.