Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
MCGIDI::DelayedNeutron Class Reference

#include <MCGIDI.hpp>

Public Member Functions

LUPI_HOST_DEVICE DelayedNeutron ()
LUPI_HOST DelayedNeutron (int a_index, GIDI::DelayedNeutron const *a_delayedNeutron, SetupInfo &a_setupInfo, Transporting::MC const &a_settings, GIDI::Transporting::Particles const &a_particles)
LUPI_HOST_DEVICE ~DelayedNeutron ()
LUPI_HOST_DEVICE int delayedNeutronIndex () const
LUPI_HOST_DEVICE double rate () const
LUPI_HOST_DEVICE Product const & product () const
LUPI_HOST void setUserParticleIndex (int a_particleIndex, int a_userParticleIndex)
LUPI_HOST void setUserParticleIndexViaIntid (int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)

Detailed Description

This class represents a GNDS <DelayedNeutron> node.

Definition at line 1246 of file MCGIDI.hpp.

Constructor & Destructor Documentation

◆ DelayedNeutron() [1/2]

LUPI_HOST_DEVICE MCGIDI::DelayedNeutron::DelayedNeutron ( )

Default constructor used when broadcasting a Protare as needed by MPI or GPUs.

Definition at line 22 of file MCGIDI_delayedNeutron.cc.

22 :
23 m_delayedNeutronIndex( -1 ),
24 m_rate( 0.0 ),
25 m_product( ) {
26
27}

◆ DelayedNeutron() [2/2]

LUPI_HOST MCGIDI::DelayedNeutron::DelayedNeutron ( int a_index,
GIDI::DelayedNeutron const * a_delayedNeutron,
SetupInfo & a_setupInfo,
Transporting::MC const & a_settings,
GIDI::Transporting::Particles const & a_particles )
Parameters
a_index[in] Fix me.
a_delayedNeutron[in] The GIDI::DelayedNeutron whose data is to be used to construct this.
a_setupInfo[in] Used internally when constructing a Protare to pass information to other constructors.
a_settings[in] Used to pass user options to the this to instruct it which data are desired.
a_particles[in] List of transporting particles and their information (e.g., multi-group boundaries and fluxes).

Definition at line 37 of file MCGIDI_delayedNeutron.cc.

38 :
39 m_delayedNeutronIndex( a_index ),
40 m_rate( 0.0 ),
41 m_product( &a_delayedNeutron->product( ), a_setupInfo, a_settings, a_particles, false ) {
42
43 GIDI::PhysicalQuantity const *rate = a_delayedNeutron->rate( ).get<GIDI::PhysicalQuantity>( 0 );
44 m_rate = rate->value( );
45}
LUPI_HOST_DEVICE double rate() const
Definition MCGIDI.hpp:1259

◆ ~DelayedNeutron()

LUPI_HOST_DEVICE MCGIDI::DelayedNeutron::~DelayedNeutron ( )

Definition at line 50 of file MCGIDI_delayedNeutron.cc.

50 {
51
52}

Member Function Documentation

◆ delayedNeutronIndex()

LUPI_HOST_DEVICE int MCGIDI::DelayedNeutron::delayedNeutronIndex ( ) const
inline

Definition at line 1258 of file MCGIDI.hpp.

1258{ return( m_delayedNeutronIndex ); }

Referenced by MCGIDI::OutputChannel::sampleProducts(), and MCGIDI::Reaction::sampleProducts().

◆ product()

◆ rate()

LUPI_HOST_DEVICE double MCGIDI::DelayedNeutron::rate ( ) const
inline

Definition at line 1259 of file MCGIDI.hpp.

1259{ return( m_rate ); }

Referenced by DelayedNeutron(), MCGIDI::OutputChannel::sampleProducts(), and MCGIDI::Reaction::sampleProducts().

◆ serialize()

LUPI_HOST_DEVICE void MCGIDI::DelayedNeutron::serialize ( LUPI::DataBuffer & a_buffer,
LUPI::DataBuffer::Mode a_mode )

This method serializes this for broadcasting as needed for MPI and GPUs. The method can count the number of required bytes, pack this or unpack this depending on a_mode.

Parameters
a_buffer[in] The buffer to read or write data to depending on a_mode.
a_mode[in] Specifies the action of this method.

Definition at line 86 of file MCGIDI_delayedNeutron.cc.

86 {
87
88 DATA_MEMBER_INT( m_delayedNeutronIndex, a_buffer, a_mode );
89 DATA_MEMBER_DOUBLE( m_rate, a_buffer, a_mode );
90 m_product.serialize( a_buffer, a_mode );
91}
#define DATA_MEMBER_DOUBLE(member, buf, mode)
#define DATA_MEMBER_INT( member, buf, mode)

◆ setUserParticleIndex()

LUPI_HOST void MCGIDI::DelayedNeutron::setUserParticleIndex ( int a_particleIndex,
int a_userParticleIndex )

Updates the m_userParticleIndex to a_userParticleIndex for all particles with PoPs index a_particleIndex.

Parameters
a_particleIndex[in] The PoPs index of the particle whose user index is to be set.
a_userParticleIndex[in] The particle index specified by the user.

Definition at line 61 of file MCGIDI_delayedNeutron.cc.

61 {
62
63 m_product.setUserParticleIndex( a_particleIndex, a_userParticleIndex );
64}

◆ setUserParticleIndexViaIntid()

LUPI_HOST void MCGIDI::DelayedNeutron::setUserParticleIndexViaIntid ( int a_particleIntid,
int a_userParticleIndex )

Updates the m_userParticleIndex to a_userParticleIndex for all particles with PoPs intid a_particleIntid.

Parameters
a_particleIndex[in] The PoPs intid of the particle whose user index is to be set.
a_userParticleIndex[in] The particle index specified by the user.

Definition at line 73 of file MCGIDI_delayedNeutron.cc.

73 {
74
75 m_product.setUserParticleIndexViaIntid( a_particleIntid, a_userParticleIndex );
76}

The documentation for this class was generated from the following files: