Skip to content

Commit

Permalink
Remove compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
whokion committed Mar 19, 2024
1 parent 0cca2ce commit b833838
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
10 changes: 2 additions & 8 deletions src/celeritas/neutron/executor/NeutronInelasticExecutor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ CELER_FUNCTION Interaction
NeutronInelasticExecutor::operator()(CoreTrackView const& track)
{
auto particle = track.make_particle_view();
auto const& dir = track.make_geo_view().dir();
auto rng = track.make_rng_engine();

// Select a target element
Expand All @@ -54,14 +53,9 @@ NeutronInelasticExecutor::operator()(CoreTrackView const& track)
CELER_ASSERT(elcomp_id);
track.make_physics_step_view().element(elcomp_id);
}
ElementView element = material.make_element_view(elcomp_id);

// Select a target nucleus
IsotopeSelector iso_select(element);
IsotopeView target = element.make_isotope_view(iso_select(rng));


// Construct the interactor
NeutronInelasticInteractor interact(params, particle, dir, target);
NeutronInelasticInteractor interact(params, particle);

// Execute the interactor
return interact(rng);
Expand Down
14 changes: 3 additions & 11 deletions src/celeritas/neutron/interactor/NeutronInelasticInteractor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ class NeutronInelasticInteractor
// Construct from shared and state data
inline CELER_FUNCTION
NeutronInelasticInteractor(NeutronInelasticRef const& shared,
ParticleTrackView const& particle,
Real3 const& inc_direction,
IsotopeView const& target);
ParticleTrackView const& particle);

// Sample an interaction with the given RNG
template<class Engine>
Expand All @@ -50,10 +48,6 @@ class NeutronInelasticInteractor

// Constant shared data
NeutronInelasticRef const& shared_;
// Incident neutron direction
Real3 const& inc_direction_;
// Target nucleus
IsotopeView const& target_;
};

//---------------------------------------------------------------------------//
Expand All @@ -65,10 +59,8 @@ class NeutronInelasticInteractor
CELER_FUNCTION
NeutronInelasticInteractor::NeutronInelasticInteractor(
NeutronInelasticRef const& shared,
ParticleTrackView const& particle,
Real3 const& inc_direction,
IsotopeView const& target)
: shared_(shared), inc_direction_(inc_direction), target_(target)
ParticleTrackView const& particle)
: shared_(shared)
{
CELER_EXPECT(particle.particle_id() == shared_.scalars.neutron_id);
}
Expand Down

0 comments on commit b833838

Please sign in to comment.