Skip to content

Commit

Permalink
Remove AMREX_FORCE_INLINE
Browse files Browse the repository at this point in the history
  • Loading branch information
cemitch99 committed Feb 11, 2025
1 parent 41cd4b0 commit 99f69b7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
20 changes: 5 additions & 15 deletions src/particles/spacecharge/EnvelopeSpaceChargePush.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,11 @@

namespace impactx::spacecharge
{
/** This function returns the linear transport map associated with a
* reduced 2D space charge model, based on the beam covariance matrix.
*
* @param[in] refpart reference particle
* @param[in,out] cm covariance matrix
* @param[in] current beam current [A]
* @param[in] ds step size [m]
* @returns 6x6 transport matrix
*/
AMREX_GPU_HOST AMREX_FORCE_INLINE
void
envelope_space_charge2D_push (
RefPart const & refpart,
Map6x6 & cm,
amrex::ParticleReal current,
[[maybe_unused]] RefPart const & refpart,
[[maybe_unused]] Map6x6 & cm,
[[maybe_unused]] amrex::ParticleReal current,
amrex::ParticleReal ds
)
{
Expand All @@ -41,8 +31,8 @@ namespace impactx::spacecharge
Map6x6 R = Map6x6::Identity();

// access reference particle values to find beta*gamma^2
amrex::ParticleReal const pt_ref = refpart.pt;
amrex::ParticleReal const betgam2 = std::pow(pt_ref, 2) - 1.0_prt;
//amrex::ParticleReal const pt_ref = refpart.pt;
//amrex::ParticleReal const betgam2 = std::pow(pt_ref, 2) - 1.0_prt;

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

// evaluate the beam space charge perveance from current
// TODO
Expand Down
16 changes: 8 additions & 8 deletions src/tracking/envelope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,21 @@ namespace impactx
<< " slice_step=" << slice_step << "\n";
}

std::visit([&ref, &cm, &slice_ds, &space_charge](auto&& element)
if (space_charge)
{
// push Covariance Matrix in 2D space charge fields
amrex::ParticleReal current=0.0; //TODO: This must be set.
spacecharge::envelope_space_charge2D_push(ref,cm,current,slice_ds);
}

std::visit([&ref, &cm](auto&& element)
{
// push reference particle in global coordinates
{
BL_PROFILE("impactx::Push::RefPart");
element(ref);
}

if (space_charge)
{
// push Covariance Matrix in 2D space charge fields
amrex::ParticleReal current=0.0; //TODO: This must be set.
spacecharge::envelope_space_charge2D_push(ref,cm,current,slice_ds);
}

// push Covariance Matrix in external fields
element(cm, ref);

Expand Down

0 comments on commit 99f69b7

Please sign in to comment.