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

#include <MCGIDI.hpp>

Inheritance diagram for MCGIDI::Protare:

Public Member Functions

LUPI_HOST_DEVICE Protare (ProtareType a_protareType)
LUPI_HOST Protare (ProtareType a_protareType, GIDI::Protare const &a_protare, Transporting::MC const &a_settings, PoPI::Database const &a_pops)
virtual LUPI_HOST_DEVICE ~Protare ()
LUPI_HOST_DEVICE ProtareType protareType () const
LUPI_HOST_DEVICE String const & projectileID () const
LUPI_HOST_DEVICE int projectileIntid () const
LUPI_HOST_DEVICE int projectileIndex () const
LUPI_HOST_DEVICE int projectileUserIndex () const
LUPI_HOST_DEVICE double projectileMass () const
LUPI_HOST_DEVICE double projectileExcitationEnergy () const
LUPI_HOST_DEVICE String const & targetID () const
LUPI_HOST_DEVICE int targetIntid () const
LUPI_HOST_DEVICE int targetIndex () const
LUPI_HOST_DEVICE int targetUserIndex () const
LUPI_HOST_DEVICE double targetMass () const
LUPI_HOST_DEVICE double targetExcitationEnergy () const
LUPI_HOST_DEVICE int photonIndex () const
LUPI_HOST_DEVICE int userPhotonIndex () const
LUPI_HOST_DEVICE String evaluation () const
LUPI_HOST GIDI::Frame projectileFrame () const
LUPI_HOST Vector< int > const & productIntids (bool a_transportablesOnly) const
LUPI_HOST Vector< int > const & productIndices (bool a_transportablesOnly) const
LUPI_HOST Vector< int > const & userProductIndices (bool a_transportablesOnly) const
LUPI_HOST void setUserParticleIndex (int a_particleIndex, int a_userParticleIndex)
LUPI_HOST void setUserParticleIndexViaIntid (int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE bool isTNSL_ProtareSingle () const
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t numberOfProtares () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE ProtareSingle const * protare (std::size_t a_index) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE ProtareSingleprotare (std::size_t a_index) MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE ProtareSingle const * protareWithReaction (std::size_t a_index) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double minimumEnergy () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double maximumEnergy () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE Vector< double > temperatures (std::size_t a_index=0) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST Vector< double > const & projectileMultiGroupBoundaries () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST Vector< double > const & projectileMultiGroupBoundariesCollapsed () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t numberOfReactions () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE Reaction const * reaction (std::size_t a_index) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t numberOfOrphanProducts () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE Reaction const * orphanProduct (std::size_t a_index) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE bool hasFission () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE bool hasIncoherentDoppler () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE int URR_index () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE bool hasURR_probabilityTables () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double URR_domainMin () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double URR_domainMax () const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE bool reactionHasURR_probabilityTables (std::size_t a_index) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double threshold (std::size_t a_index) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double crossSection (URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling=false) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE void crossSectionVector (double a_temperature, double a_userFactor, std::size_t a_numberAllocated, double *a_crossSectionVector) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double reactionCrossSection (std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling=false) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double reactionCrossSection (std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos, double a_temperature, double a_energy) const MCGIDI_TRUE_VIRTUAL
template<typename RNG>
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t sampleReaction (Sampling::Input &a_input, URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex, double a_crossSection, RNG &&a_rng) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double depositionEnergy (std::size_t a_hashIndex, double a_temperature, double a_energy) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double depositionMomentum (std::size_t a_hashIndex, double a_temperature, double a_energy) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double productionEnergy (std::size_t a_hashIndex, double a_temperature, double a_energy) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double gain (std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIndex) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double gainViaIntid (std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIntid) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE Vector< double > const & upscatterModelAGroupVelocities () const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE void serialize2 (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE void serializeCommon (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE long sizeOf () const
LUPI_HOST_DEVICE long memorySize ()
LUPI_HOST_DEVICE void incrementMemorySize (long &a_totalMemory, long &a_sharedMemory)
template<typename RNG>
LUPI_HOST_DEVICE std::size_t sampleReaction (Sampling::Input &a_input, URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex, double a_crossSection, RNG &&a_rng) const

Public Attributes

friend ProtareSingle
friend ProtareComposite
friend ProtareTNSL

Detailed Description

Base class for the protare sub-classes.

Base class for the MCGIDI protare classes.

Definition at line 1470 of file MCGIDI.hpp.

Constructor & Destructor Documentation

◆ Protare() [1/2]

LUPI_HOST_DEVICE MCGIDI::Protare::Protare ( ProtareType a_protareType)
Parameters
a_protareType[in] The enum for the type of Protare (i.e., single, composite or TNSL).

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

Definition at line 61 of file MCGIDI_protare.cc.

61 :
62 m_protareType( a_protareType ),
63 m_projectileID( ),
64 m_projectileIntid( -1 ),
65 m_projectileIndex( -1 ),
66 m_projectileUserIndex( -1 ),
67 m_projectileMass( 0.0 ),
68 m_projectileExcitationEnergy( 0.0 ),
69
70 m_targetID( ),
71 m_targetIntid( -1 ),
72 m_targetIndex( -1 ),
73 m_targetUserIndex( -1 ),
74 m_targetMass( 0.0 ),
75 m_targetExcitationEnergy( 0.0 ),
76
77 m_neutronIndex( -1 ),
78 m_userNeutronIndex( -1 ),
79 m_photonIndex( -1 ),
80 m_userPhotonIndex( -1 ),
81
82 m_evaluation( ),
83 m_projectileFrame( GIDI::Frame::lab ),
84
85 m_isTNSL_ProtareSingle( false ) {
86
87}

Referenced by MCGIDI::ProtareComposite::ProtareComposite(), MCGIDI::ProtareSingle::ProtareSingle(), MCGIDI::ProtareSingle::ProtareSingle(), and MCGIDI::ProtareTNSL::ProtareTNSL().

◆ Protare() [2/2]

LUPI_HOST MCGIDI::Protare::Protare ( ProtareType a_protareType,
GIDI::Protare const & a_protare,
Transporting::MC const & a_settings,
PoPI::Database const & a_pops )

◆ ~Protare()

LUPI_HOST_DEVICE MCGIDI::Protare::~Protare ( )
virtual

Definition at line 138 of file MCGIDI_protare.cc.

138 {
139
140}

Member Function Documentation

◆ crossSection()

LUPI_HOST_DEVICE double MCGIDI::Protare::crossSection ( URR_protareInfos const & a_URR_protareInfos,
std::size_t a_hashIndex,
double a_temperature,
double a_energy,
bool a_sampling = false ) const

Returns the total cross section.

Parameters
a_URR_protareInfos[in] URR information.
a_hashIndex[in] The cross section hash index.
a_temperature[in] The target temperature.
a_energy[in] The projectile energy.
a_sampling[in] Only used for multi-group cross sections. When sampling, the cross section in the group where threshold is present the cross section is augmented.
Returns
The total cross section.

Definition at line 980 of file MCGIDI_protare.cc.

980 {
981
982 double crossSection1 = 0.0;
983
984 switch( protareType( ) ) {
986 crossSection1 = static_cast<ProtareSingle const *>( this )->crossSection( a_URR_protareInfos, a_hashIndex, a_temperature, a_energy, a_sampling );
987 break;
989 crossSection1 = static_cast<ProtareComposite const *>( this )->crossSection( a_URR_protareInfos, a_hashIndex, a_temperature, a_energy, a_sampling );
990 break;
992 crossSection1 = static_cast<ProtareTNSL const *>( this )->crossSection( a_URR_protareInfos, a_hashIndex, a_temperature, a_energy, a_sampling );
993 break;
994 }
995
996 return( crossSection1 );
997}
LUPI_HOST_DEVICE ProtareType protareType() const
Definition MCGIDI.hpp:1514
friend ProtareTNSL
Definition MCGIDI.hpp:1601
friend ProtareComposite
Definition MCGIDI.hpp:1600
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double crossSection(URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling=false) const MCGIDI_TRUE_VIRTUAL
friend ProtareSingle
Definition MCGIDI.hpp:1599

Referenced by crossSection().

◆ crossSectionVector()

LUPI_HOST_DEVICE void MCGIDI::Protare::crossSectionVector ( double a_temperature,
double a_userFactor,
std::size_t a_numberAllocated,
double * a_crossSectionVector ) const

Adds the energy dependent, total cross section corresponding to the temperature a_temperature multiplied by a_userFactor to a_crossSectionVector.

Parameters
a_temperature[in] Specifies the temperature of the material.
a_userFactor[in] User factor which all cross sections are multiplied by.
a_numberAllocated[in] The length of memory allocated for a_crossSectionVector.
a_crossSectionVector[in/out] The energy dependent, total cross section to add cross section data to.

Definition at line 1008 of file MCGIDI_protare.cc.

1009 {
1010
1011 switch( protareType( ) ) {
1012 case ProtareType::single:
1013 static_cast<ProtareSingle const *>( this )->crossSectionVector( a_temperature, a_userFactor, a_numberAllocated, a_crossSectionVector );
1014 break;
1016 static_cast<ProtareComposite const *>( this )->crossSectionVector( a_temperature, a_userFactor, a_numberAllocated, a_crossSectionVector );
1017 break;
1018 case ProtareType::TNSL:
1019 static_cast<ProtareTNSL const *>( this )->crossSectionVector( a_temperature, a_userFactor, a_numberAllocated, a_crossSectionVector );
1020 break;
1021 }
1022}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE void crossSectionVector(double a_temperature, double a_userFactor, std::size_t a_numberAllocated, double *a_crossSectionVector) const MCGIDI_TRUE_VIRTUAL

Referenced by crossSectionVector().

◆ depositionEnergy()

LUPI_HOST_DEVICE double MCGIDI::Protare::depositionEnergy ( std::size_t a_hashIndex,
double a_temperature,
double a_energy ) const

Returns the total deposition energy.

Parameters
a_hashIndex[in] The cross section hash index.
a_temperature[in] The target temperature.
a_energy[in] The projectile energy.
Returns
The total deposition energy.

Definition at line 1101 of file MCGIDI_protare.cc.

1101 {
1102
1103 double depositionEnergy1 = 0.0;
1104
1105 switch( protareType( ) ) {
1106 case ProtareType::single:
1107 depositionEnergy1 = static_cast<ProtareSingle const *>( this )->depositionEnergy( a_hashIndex, a_temperature, a_energy );
1108 break;
1110 depositionEnergy1 = static_cast<ProtareComposite const *>( this )->depositionEnergy( a_hashIndex, a_temperature, a_energy );
1111 break;
1112 case ProtareType::TNSL:
1113 depositionEnergy1 = static_cast<ProtareTNSL const *>( this )->depositionEnergy( a_hashIndex, a_temperature, a_energy );
1114 break;
1115 }
1116
1117 return( depositionEnergy1 );
1118}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double depositionEnergy(std::size_t a_hashIndex, double a_temperature, double a_energy) const MCGIDI_TRUE_VIRTUAL

Referenced by depositionEnergy(), and sampleReaction().

◆ depositionMomentum()

LUPI_HOST_DEVICE double MCGIDI::Protare::depositionMomentum ( std::size_t a_hashIndex,
double a_temperature,
double a_energy ) const

Returns the total deposition momentum.

Parameters
a_hashIndex[in] The cross section hash index.
a_temperature[in] The target temperature.
a_energy[in] The projectile energy.
Returns
The total deposition momentum.

Definition at line 1130 of file MCGIDI_protare.cc.

1130 {
1131
1132 double depositionMomentum1 = 0.0;
1133
1134 switch( protareType( ) ) {
1135 case ProtareType::single:
1136 depositionMomentum1 = static_cast<ProtareSingle const *>( this )->depositionMomentum( a_hashIndex, a_temperature, a_energy );
1137 break;
1139 depositionMomentum1 = static_cast<ProtareComposite const *>( this )->depositionMomentum( a_hashIndex, a_temperature, a_energy );
1140 break;
1141 case ProtareType::TNSL:
1142 depositionMomentum1 = static_cast<ProtareTNSL const *>( this )->depositionMomentum( a_hashIndex, a_temperature, a_energy );
1143 break;
1144 }
1145
1146 return( depositionMomentum1 );
1147}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double depositionMomentum(std::size_t a_hashIndex, double a_temperature, double a_energy) const MCGIDI_TRUE_VIRTUAL

Referenced by depositionMomentum(), and sampleReaction().

◆ evaluation()

LUPI_HOST_DEVICE String MCGIDI::Protare::evaluation ( ) const
inline

Returns the value of the m_evaluation member.

Definition at line 1532 of file MCGIDI.hpp.

◆ gain()

LUPI_HOST_DEVICE double MCGIDI::Protare::gain ( std::size_t a_hashIndex,
double a_temperature,
double a_energy,
int a_particleIndex ) const

Returns the gain for particle with index a_particleIndex.

Parameters
a_hashIndex[in] The continuous energy hash or multi-group index.
a_temperature[in] The temperature of the target.
a_energy[in] The projectile energy.
a_particleIndex[in] The index of the particle whose gain is to be returned.
Returns
A vector of the length of the number of multi-group groups.

Definition at line 1189 of file MCGIDI_protare.cc.

1189 {
1190
1191 double gain1 = 0.0;
1192
1193 switch( protareType( ) ) {
1194 case ProtareType::single:
1195 gain1 = static_cast<ProtareSingle const *>( this )->gain( a_hashIndex, a_temperature, a_energy, a_particleIndex );
1196 break;
1198 gain1 = static_cast<ProtareComposite const *>( this )->gain( a_hashIndex, a_temperature, a_energy, a_particleIndex );
1199 break;
1200 case ProtareType::TNSL:
1201 gain1 = static_cast<ProtareTNSL const *>( this )->gain( a_hashIndex, a_temperature, a_energy, a_particleIndex );
1202 break;
1203 }
1204
1205 return( gain1 );
1206}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double gain(std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIndex) const MCGIDI_TRUE_VIRTUAL

Referenced by gain(), and sampleReaction().

◆ gainViaIntid()

LUPI_HOST_DEVICE double MCGIDI::Protare::gainViaIntid ( std::size_t a_hashIndex,
double a_temperature,
double a_energy,
int a_particleIntid ) const

Returns the gain for particle with intid a_particleIntid.

Parameters
a_hashIndex[in] The continuous energy hash or multi-group index.
a_temperature[in] The temperature of the target.
a_energy[in] The projectile energy.
a_particleIntid[in] The intid of the particle whose gain is to be returned.
Returns
A vector of the length of the number of multi-group groups.

Definition at line 1219 of file MCGIDI_protare.cc.

1219 {
1220
1221 double gain1 = 0.0;
1222
1223 switch( protareType( ) ) {
1225 gain1 = static_cast<ProtareSingle const *>( this )->gainViaIntid( a_hashIndex, a_temperature, a_energy, a_particleIntid );
1226 break;
1228 gain1 = static_cast<ProtareComposite const *>( this )->gainViaIntid( a_hashIndex, a_temperature, a_energy, a_particleIntid );
1229 break;
1230 case ProtareType::TNSL:
1231 gain1 = static_cast<ProtareTNSL const *>( this )->gainViaIntid( a_hashIndex, a_temperature, a_energy, a_particleIntid );
1232 break;
1233 }
1234
1235 return( gain1 );
1236}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double gainViaIntid(std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIntid) const MCGIDI_TRUE_VIRTUAL

Referenced by gainViaIntid(), and sampleReaction().

◆ hasFission()

LUPI_HOST_DEVICE bool MCGIDI::Protare::hasFission ( ) const

Returns true if this has a fission reaction and false otherwise.

Returns
true is if this has a fission reaction and false otherwise.

Definition at line 768 of file MCGIDI_protare.cc.

768 {
769
770 bool hasFission1 = false;
771
772 switch( protareType( ) ) {
774 hasFission1 = static_cast<ProtareSingle const *>( this )->hasFission( );
775 break;
777 hasFission1 = static_cast<ProtareComposite const *>( this )->hasFission( );
778 break;
780 hasFission1 = static_cast<ProtareTNSL const *>( this )->hasFission( );
781 break;
782 }
783
784 return( hasFission1 );
785}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE bool hasFission() const MCGIDI_TRUE_VIRTUAL

Referenced by hasFission().

◆ hasIncoherentDoppler()

LUPI_HOST_DEVICE bool MCGIDI::Protare::hasIncoherentDoppler ( ) const

Returns true if this has a photoatomic incoherent doppler broadened reaction and false otherwise.

Returns
true is if this has a specified reaction and false otherwise.

Definition at line 793 of file MCGIDI_protare.cc.

793 {
794
795 bool hasIncoherentDoppler1 = false;
796
797 switch( protareType( ) ) {
799 hasIncoherentDoppler1 = static_cast<ProtareSingle const *>( this )->hasIncoherentDoppler( );
800 break;
802 hasIncoherentDoppler1 = static_cast<ProtareComposite const *>( this )->hasIncoherentDoppler( );
803 break;
805 hasIncoherentDoppler1 = static_cast<ProtareTNSL const *>( this )->hasIncoherentDoppler( );
806 break;
807 }
808
809 return( hasIncoherentDoppler1 );
810}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE bool hasIncoherentDoppler() const MCGIDI_TRUE_VIRTUAL

Referenced by hasIncoherentDoppler().

◆ hasURR_probabilityTables()

LUPI_HOST_DEVICE bool MCGIDI::Protare::hasURR_probabilityTables ( ) const

Returns true if this has URR probability tables and false otherwise.

Returns
boolean.

Definition at line 843 of file MCGIDI_protare.cc.

843 {
844
845 bool hasURR_probabilityTables1 = false;
846
847 switch( protareType( ) ) {
849 hasURR_probabilityTables1 = static_cast<ProtareSingle const *>( this )->hasURR_probabilityTables( );
850 break;
852 hasURR_probabilityTables1 = static_cast<ProtareComposite const *>( this )->hasURR_probabilityTables( );
853 break;
855 hasURR_probabilityTables1 = static_cast<ProtareTNSL const *>( this )->hasURR_probabilityTables( );
856 break;
857 }
858
859 return( hasURR_probabilityTables1 );
860}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE bool hasURR_probabilityTables() const MCGIDI_TRUE_VIRTUAL

Referenced by hasURR_probabilityTables().

◆ incrementMemorySize()

LUPI_HOST_DEVICE void MCGIDI::Protare::incrementMemorySize ( long & a_totalMemory,
long & a_sharedMemory )

This method counts the number of bytes of memory allocated by this and puts it into a_totalMemory. If shared memory is used, the size of shared memory is a_sharedMemory. If using shared memory, the host code only needs to allocate (a_totalMemory - a_sharedMemory) in main memory.

Definition at line 449 of file MCGIDI_protare.cc.

449 {
450
451 LUPI::DataBuffer buf; // Written this way for debugger to modify buf.m_placementStart here for easier double checking.
452
453 buf.m_placement = buf.m_placementStart + sizeOf( );
455 a_totalMemory += buf.m_placement - buf.m_placementStart;
456 a_sharedMemory += buf.m_sharedPlacement - buf.m_sharedPlacementStart;
457}
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE long sizeOf() const

Referenced by sampleReaction().

◆ isTNSL_ProtareSingle()

LUPI_HOST_DEVICE bool MCGIDI::Protare::isTNSL_ProtareSingle ( ) const
inline

Returns the value of the m_isTNSL_ProtareSingle member.

Definition at line 1541 of file MCGIDI.hpp.

Referenced by MCGIDI::OutputChannel::OutputChannel(), and MCGIDI::ProtareSingle::ProtareSingle().

◆ maximumEnergy()

LUPI_HOST_DEVICE double MCGIDI::Protare::maximumEnergy ( ) const

Returns the maximum cross section domain.

Returns the maximum cross section domain for all reaction..

Returns
Returns the maximum cross section domain.

Definition at line 596 of file MCGIDI_protare.cc.

596 {
597
598 double maximumEnergy1 = 0.0;
599
600 switch( protareType( ) ) {
602 maximumEnergy1 = static_cast<ProtareSingle const *>( this )->maximumEnergy( );
603 break;
605 maximumEnergy1 = static_cast<ProtareComposite const *>( this )->maximumEnergy( );
606 break;
608 maximumEnergy1 = static_cast<ProtareTNSL const *>( this )->maximumEnergy( );
609 break;
610 }
611
612 return( maximumEnergy1 );
613}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double maximumEnergy() const MCGIDI_TRUE_VIRTUAL

Referenced by maximumEnergy().

◆ memorySize()

LUPI_HOST_DEVICE long MCGIDI::Protare::memorySize ( )

This method counts the number of bytes of memory allocated by this. This is an improvement to the internalSize() method of getting memory size.

Definition at line 435 of file MCGIDI_protare.cc.

435 {
436
437 LUPI::DataBuffer buf;
438 // Written this way for debugger to modify buf.m_placementStart here for easier double checking.
439 buf.m_placement = buf.m_placementStart + sizeOf();
441 return( ( buf.m_placement - buf.m_placementStart ) + ( buf.m_sharedPlacement - buf.m_sharedPlacementStart ) );
442}

Referenced by sampleReaction().

◆ minimumEnergy()

LUPI_HOST_DEVICE double MCGIDI::Protare::minimumEnergy ( ) const

Returns the minimum cross section domain.

Returns the minimum cross section domain for all reaction..

Returns
Returns the minimum cross section domain.

Definition at line 571 of file MCGIDI_protare.cc.

571 {
572
573 double minimumEnergy1 = 0.0;
574
575 switch( protareType( ) ) {
577 minimumEnergy1 = static_cast<ProtareSingle const *>( this )->minimumEnergy( );
578 break;
580 minimumEnergy1 = static_cast<ProtareComposite const *>( this )->minimumEnergy( );
581 break;
583 minimumEnergy1 = static_cast<ProtareTNSL const *>( this )->minimumEnergy( );
584 break;
585 }
586
587 return( minimumEnergy1 );
588}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double minimumEnergy() const MCGIDI_TRUE_VIRTUAL

Referenced by minimumEnergy().

◆ numberOfOrphanProducts()

LUPI_HOST_DEVICE std::size_t MCGIDI::Protare::numberOfOrphanProducts ( ) const

Returns the number of orphanProducts of this.

Returns
Number of orphanProducts of this.

Definition at line 716 of file MCGIDI_protare.cc.

716 {
717
718 std::size_t numberOfReactions1 = 0;
719
720 switch( protareType( ) ) {
722 numberOfReactions1 = static_cast<ProtareSingle const *>( this )->numberOfOrphanProducts( );
723 break;
725 numberOfReactions1 = static_cast<ProtareComposite const *>( this )->numberOfOrphanProducts( );
726 break;
728 numberOfReactions1 = static_cast<ProtareTNSL const *>( this )->numberOfOrphanProducts( );
729 break;
730 }
731
732 return( numberOfReactions1 );
733}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t numberOfOrphanProducts() const MCGIDI_TRUE_VIRTUAL

Referenced by numberOfOrphanProducts().

◆ numberOfProtares()

LUPI_HOST_DEVICE std::size_t MCGIDI::Protare::numberOfProtares ( ) const

Returns the number of protares contained in this.

Returns the number of protares contained in this.

Returns
Integer number of protares.

Definition at line 465 of file MCGIDI_protare.cc.

465 {
466
467 std::size_t numberOfProtares2 = 0;
468
469 switch( protareType( ) ) {
471 numberOfProtares2 = static_cast<ProtareSingle const *>( this )->numberOfProtares( );
472 break;
474 numberOfProtares2 = static_cast<ProtareComposite const *>( this )->numberOfProtares( );
475 break;
477 numberOfProtares2 = static_cast<ProtareTNSL const *>( this )->numberOfProtares( );
478 break;
479 }
480
481 return( numberOfProtares2 );
482}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t numberOfProtares() const MCGIDI_TRUE_VIRTUAL

Referenced by numberOfProtares(), and MCGIDI::URR_protareInfos::updateProtare().

◆ numberOfReactions()

LUPI_HOST_DEVICE std::size_t MCGIDI::Protare::numberOfReactions ( ) const

Returns the number of reactions of this.

Returns
Number of reactions of this.

Definition at line 664 of file MCGIDI_protare.cc.

664 {
665
666 std::size_t numberOfReactions1 = 0;
667
668 switch( protareType( ) ) {
670 numberOfReactions1 = static_cast<ProtareSingle const *>( this )->numberOfReactions( );
671 break;
673 numberOfReactions1 = static_cast<ProtareComposite const *>( this )->numberOfReactions( );
674 break;
676 numberOfReactions1 = static_cast<ProtareTNSL const *>( this )->numberOfReactions( );
677 break;
678 }
679
680 return( numberOfReactions1 );
681}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t numberOfReactions() const MCGIDI_TRUE_VIRTUAL

Referenced by numberOfReactions().

◆ orphanProduct()

LUPI_HOST_DEVICE Reaction const * MCGIDI::Protare::orphanProduct ( std::size_t a_index) const

Returns the orphanProduct at index a_index.

Parameters
a_index[in] The index of the orphanProduct to return.
Returns
The orphanProduct at index a_index.

Definition at line 743 of file MCGIDI_protare.cc.

743 {
744
745 Reaction const *orphanProduct1 = nullptr;
746
747 switch( protareType( ) ) {
749 orphanProduct1 = static_cast<ProtareSingle const *>( this )->orphanProduct( a_index );
750 break;
752 orphanProduct1 = static_cast<ProtareComposite const *>( this )->orphanProduct( a_index );
753 break;
755 orphanProduct1 = static_cast<ProtareTNSL const *>( this )->orphanProduct( a_index );
756 break;
757 }
758
759 return( orphanProduct1 );
760}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE Reaction const * orphanProduct(std::size_t a_index) const MCGIDI_TRUE_VIRTUAL

Referenced by orphanProduct().

◆ photonIndex()

LUPI_HOST_DEVICE int MCGIDI::Protare::photonIndex ( ) const
inline

Returns the value of the m_photonIndex member.

Definition at line 1530 of file MCGIDI.hpp.

Referenced by MCGIDI::GRIN_capture::sampleProducts().

◆ productIndices()

LUPI_HOST Vector< int > const & MCGIDI::Protare::productIndices ( bool a_transportablesOnly) const

Returns the list product indices. If a_transportablesOnly is true, the list only includes transportable particle.

Parameters
a_transportablesOnly[in] If true, a reference to m_productIndicesTransportable is returned; otherwise a reference to m_productIndices is returned.

Definition at line 194 of file MCGIDI_protare.cc.

194 {
195
196 if( a_transportablesOnly ) return( m_productIndicesTransportable );
197 return( m_productIndices );
198}

◆ productIntids()

LUPI_HOST Vector< int > const & MCGIDI::Protare::productIntids ( bool a_transportablesOnly) const

Returns the list product intids. If a_transportablesOnly is true, the list only includes transportable particle.

Parameters
a_transportablesOnly[in] If true, a reference to m_productIntidsTransportable is returned; otherwise a reference to m_productIntids is returned.

Definition at line 182 of file MCGIDI_protare.cc.

182 {
183
184 if( a_transportablesOnly ) return( m_productIntidsTransportable );
185 return( m_productIntids );
186}

◆ productionEnergy()

LUPI_HOST_DEVICE double MCGIDI::Protare::productionEnergy ( std::size_t a_hashIndex,
double a_temperature,
double a_energy ) const

Returns the total production energy.

Parameters
a_hashIndex[in] The cross section hash index.
a_temperature[in] The target temperature.
a_energy[in] The projectile energy.
Returns
The total production energy.

Definition at line 1159 of file MCGIDI_protare.cc.

1159 {
1160
1161 double productionEnergy1 = 0.0;
1162
1163 switch( protareType( ) ) {
1164 case ProtareType::single:
1165 productionEnergy1 = static_cast<ProtareSingle const *>( this )->productionEnergy( a_hashIndex, a_temperature, a_energy );
1166 break;
1168 productionEnergy1 = static_cast<ProtareComposite const *>( this )->productionEnergy( a_hashIndex, a_temperature, a_energy );
1169 break;
1170 case ProtareType::TNSL:
1171 productionEnergy1 = static_cast<ProtareTNSL const *>( this )->productionEnergy( a_hashIndex, a_temperature, a_energy );
1172 break;
1173 }
1174
1175 return( productionEnergy1 );
1176}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double productionEnergy(std::size_t a_hashIndex, double a_temperature, double a_energy) const MCGIDI_TRUE_VIRTUAL

Referenced by productionEnergy(), and sampleReaction().

◆ projectileExcitationEnergy()

LUPI_HOST_DEVICE double MCGIDI::Protare::projectileExcitationEnergy ( ) const
inline

Returns the value of the m_projectileExcitationEnergy member.

Definition at line 1521 of file MCGIDI.hpp.

◆ projectileFrame()

LUPI_HOST GIDI::Frame MCGIDI::Protare::projectileFrame ( ) const
inline

Returns the value of the m_projectileFrame member.

Definition at line 1533 of file MCGIDI.hpp.

◆ projectileID()

LUPI_HOST_DEVICE String const & MCGIDI::Protare::projectileID ( ) const
inline

Returns the value of the m_projectileID member.

Definition at line 1516 of file MCGIDI.hpp.

◆ projectileIndex()

LUPI_HOST_DEVICE int MCGIDI::Protare::projectileIndex ( ) const
inline

Returns the value of the m_projectileIndex member.

Definition at line 1518 of file MCGIDI.hpp.

Referenced by MCGIDI::Reaction::sampleNullProducts().

◆ projectileIntid()

◆ projectileMass()

LUPI_HOST_DEVICE double MCGIDI::Protare::projectileMass ( ) const
inline

Returns the value of the m_projectileMass member.

Definition at line 1520 of file MCGIDI.hpp.

Referenced by MCGIDI::Reaction::sampleNullProducts().

◆ projectileMultiGroupBoundaries()

LUPI_HOST Vector< double > const & MCGIDI::Protare::projectileMultiGroupBoundaries ( ) const

Returns the projectile's multi-group boundaries that were read from the file (i.e., pre-collapse).

Parameters
a_index[in] Index of the reqested ProtareSingle.
Returns
Vector of doubles.

Definition at line 637 of file MCGIDI_protare.cc.

637 {
638
639 ProtareSingle const *protareSingle = protare( 0 );
640 return( protareSingle->projectileMultiGroupBoundaries( ) );
641}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE ProtareSingle const * protare(std::size_t a_index) const MCGIDI_TRUE_VIRTUAL

◆ projectileMultiGroupBoundariesCollapsed()

LUPI_HOST Vector< double > const & MCGIDI::Protare::projectileMultiGroupBoundariesCollapsed ( ) const

Returns the projectile's collapsed multi-group boundaries (i.e., those used for transport).

Parameters
a_index[in] Index of the reqested ProtareSingle.
Returns
Vector of doubles.

Definition at line 652 of file MCGIDI_protare.cc.

652 {
653
654 ProtareSingle const *protareSingle = protare( 0 );
655 return( protareSingle->projectileMultiGroupBoundariesCollapsed( ) );
656}

◆ projectileUserIndex()

LUPI_HOST_DEVICE int MCGIDI::Protare::projectileUserIndex ( ) const
inline

Returns the value of the m_projectileUserIndex member.

Definition at line 1519 of file MCGIDI.hpp.

Referenced by MCGIDI::Reaction::sampleNullProducts().

◆ protare() [1/2]

LUPI_HOST_DEVICE ProtareSingle const * MCGIDI::Protare::protare ( std::size_t a_index) const

Returns the a_index - 1 Protare contained in this.

Returns the const pointer representing the protare at index a_index.

Parameters
a_index[in] Index of protare in this.
Returns
Returns the const pointer representing the protare.

Definition at line 492 of file MCGIDI_protare.cc.

492 {
493
494 ProtareSingle const *protare1 = nullptr;
495
496 switch( protareType( ) ) {
498 protare1 = static_cast<ProtareSingle const *>( this )->protare( a_index );
499 break;
501 protare1 = static_cast<ProtareComposite const *>( this )->protare( a_index );
502 break;
504 protare1 = static_cast<ProtareTNSL const *>( this )->protare( a_index );
505 break;
506 }
507
508 return( protare1 );
509}

Referenced by projectileMultiGroupBoundaries(), projectileMultiGroupBoundariesCollapsed(), protare(), protare(), temperatures(), and MCGIDI::URR_protareInfos::updateProtare().

◆ protare() [2/2]

LUPI_HOST_DEVICE ProtareSingle * MCGIDI::Protare::protare ( std::size_t a_index)

Returns the a_index - 1 Protare contained in this.

Returns the pointer representing the protare at index a_index.

Parameters
a_index[in] Index of protare in this.
Returns
Returns the pointer representing the protare.

Definition at line 519 of file MCGIDI_protare.cc.

519 {
520
521 ProtareSingle *protare1 = nullptr;
522
523 switch( protareType( ) ) {
525 protare1 = static_cast<ProtareSingle *>( this )->protare( a_index );
526 break;
528 protare1 = static_cast<ProtareComposite *>( this )->protare( a_index );
529 break;
531 protare1 = static_cast<ProtareTNSL *>( this )->protare( a_index );
532 break;
533 }
534
535 return( protare1 );
536}

◆ protareType()

◆ protareWithReaction()

LUPI_HOST_DEVICE ProtareSingle const * MCGIDI::Protare::protareWithReaction ( std::size_t a_index) const

Returns the ProtareSingle that contains the (a_index - 1) reaction.

Returns the pointer to the ProtareSingle that contains the (a_index - 1)th reaction.

Parameters
a_index[in] Index of the reaction.
Returns
Pointer to the requested protare or nullptr if invalid a_index..

Definition at line 546 of file MCGIDI_protare.cc.

546 {
547
548 ProtareSingle const *protare1 = nullptr;
549
550 switch( protareType( ) ) {
552 protare1 = static_cast<ProtareSingle const *>( this )->protareWithReaction( a_index );
553 break;
555 protare1 = static_cast<ProtareComposite const *>( this )->protareWithReaction( a_index );
556 break;
558 protare1 = static_cast<ProtareTNSL const *>( this )->protareWithReaction( a_index );
559 break;
560 }
561
562 return( protare1 );
563}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE ProtareSingle const * protareWithReaction(std::size_t a_index) const MCGIDI_TRUE_VIRTUAL

Referenced by protareWithReaction().

◆ reaction()

LUPI_HOST_DEVICE Reaction const * MCGIDI::Protare::reaction ( std::size_t a_index) const

Returns the reaction at index a_index.

Parameters
a_index[in] The index of the reaction to return.
Returns
The reaction at index a_index.

Definition at line 691 of file MCGIDI_protare.cc.

691 {
692
693 Reaction const *reaction1 = nullptr;
694
695 switch( protareType( ) ) {
697 reaction1 = static_cast<ProtareSingle const *>( this )->reaction( a_index );
698 break;
700 reaction1 = static_cast<ProtareComposite const *>( this )->reaction( a_index );
701 break;
703 reaction1 = static_cast<ProtareTNSL const *>( this )->reaction( a_index );
704 break;
705 }
706
707 return( reaction1 );
708}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE Reaction const * reaction(std::size_t a_index) const MCGIDI_TRUE_VIRTUAL

Referenced by G4GIDI_target::G4GIDI_target(), and reaction().

◆ reactionCrossSection() [1/2]

LUPI_HOST_DEVICE double MCGIDI::Protare::reactionCrossSection ( std::size_t a_reactionIndex,
URR_protareInfos const & a_URR_protareInfos,
double a_temperature,
double a_energy ) const

Returns the cross section for reaction at index a_reactionIndex.

Parameters
a_reactionIndex[in] The index of the reaction.
a_URR_protareInfos[in] URR information.
a_temperature[in] The target temperature.
a_energy[in] The projectile energy.
Returns
The total cross section.

Definition at line 1072 of file MCGIDI_protare.cc.

1072 {
1073
1074 double reactionCrossSection1 = 0.0;
1075
1076 switch( protareType( ) ) {
1077 case ProtareType::single:
1078 reactionCrossSection1 = static_cast<ProtareSingle const *>( this )->reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_temperature, a_energy );
1079 break;
1081 reactionCrossSection1 = static_cast<ProtareComposite const *>( this )->reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_temperature, a_energy );
1082 break;
1083 case ProtareType::TNSL:
1084 reactionCrossSection1 = static_cast<ProtareTNSL const *>( this )->reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_temperature, a_energy );
1085 break;
1086 }
1087
1088 return( reactionCrossSection1 );
1089}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double reactionCrossSection(std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling=false) const MCGIDI_TRUE_VIRTUAL

◆ reactionCrossSection() [2/2]

LUPI_HOST_DEVICE double MCGIDI::Protare::reactionCrossSection ( std::size_t a_reactionIndex,
URR_protareInfos const & a_URR_protareInfos,
std::size_t a_hashIndex,
double a_temperature,
double a_energy,
bool a_sampling = false ) const

Returns the cross section for reaction at index a_reactionIndex.

Parameters
a_reactionIndex[in] The index of the reaction.
a_URR_protareInfos[in] URR information.
a_hashIndex[in] The cross section hash index.
a_temperature[in] The target temperature.
a_energy[in] The projectile energy.
a_sampling[in] Only used for multi-group cross sections. When sampling, the cross section in the group where threshold is present the cross section is augmented.
Returns
The total cross section.

Definition at line 1038 of file MCGIDI_protare.cc.

1039 {
1040
1041 double reactionCrossSection1 = 0.0;
1042
1043 switch( protareType( ) ) {
1044 case ProtareType::single:
1045 reactionCrossSection1 = static_cast<ProtareSingle const *>( this )->reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_hashIndex,
1046 a_temperature, a_energy, a_sampling );
1047 break;
1049 reactionCrossSection1 = static_cast<ProtareComposite const *>( this )->reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_hashIndex,
1050 a_temperature, a_energy, a_sampling );
1051 break;
1052 case ProtareType::TNSL:
1053 reactionCrossSection1 = static_cast<ProtareTNSL const *>( this )->reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_hashIndex,
1054 a_temperature, a_energy, a_sampling );
1055 break;
1056 }
1057
1058 return( reactionCrossSection1 );
1059}

Referenced by reactionCrossSection(), and reactionCrossSection().

◆ reactionHasURR_probabilityTables()

LUPI_HOST_DEVICE bool MCGIDI::Protare::reactionHasURR_probabilityTables ( std::size_t a_index) const

Returns true if the reaction at index a_index has URR robability tables and false otherwise.

Parameters
a_index[in] The index of the reaction.
Returns
true if the reaction has URR robability tables and false otherwise.

Definition at line 920 of file MCGIDI_protare.cc.

920 {
921
922 bool reactionHasURR_probabilityTables1 = false;
923
924 switch( protareType( ) ) {
926 reactionHasURR_probabilityTables1 = static_cast<ProtareSingle const *>( this )->reactionHasURR_probabilityTables( a_index );
927 break;
929 reactionHasURR_probabilityTables1 = static_cast<ProtareComposite const *>( this )->reactionHasURR_probabilityTables( a_index );
930 break;
932 reactionHasURR_probabilityTables1 = static_cast<ProtareTNSL const *>( this )->reactionHasURR_probabilityTables( a_index );
933 break;
934 }
935
936 return( reactionHasURR_probabilityTables1 );
937}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE bool reactionHasURR_probabilityTables(std::size_t a_index) const MCGIDI_TRUE_VIRTUAL

Referenced by reactionHasURR_probabilityTables().

◆ sampleReaction() [1/2]

template<typename RNG>
LUPI_HOST_DEVICE std::size_t MCGIDI::Protare::sampleReaction ( Sampling::Input & a_input,
URR_protareInfos const & a_URR_protareInfos,
std::size_t a_hashIndex,
double a_crossSection,
RNG && a_rng ) const

Samples a reaction of this and returns its index.

Parameters
a_input[in/out] Sample options requested by user.
a_URR_protareInfos[in] URR information.
a_hashIndex[in] Specifies the continuous energy hash index or multi-group index.
a_crossSection[in] The total cross section for the protare at a_input.temperature() and a_input.energy().
a_rng[in] The random number generator function that returns a double in the range [0, 1.0).
Returns
The index of the sampled reaction.

Definition at line 2685 of file MCGIDI_headerSource.hpp.

2686 {
2687
2688 std::size_t reactionIndex = MCGIDI_nullReaction;
2689
2690 switch( protareType( ) ) {
2691 case ProtareType::single:
2692 reactionIndex = static_cast<ProtareSingle const *>( this )->sampleReaction( a_input, a_URR_protareInfos, a_hashIndex,
2693 a_crossSection, a_rng );
2694 break;
2696 reactionIndex = static_cast<ProtareComposite const *>( this )->sampleReaction( a_input, a_URR_protareInfos, a_hashIndex,
2697 a_crossSection, a_rng );
2698 break;
2699 case ProtareType::TNSL:
2700 reactionIndex = static_cast<ProtareTNSL const *>( this )->sampleReaction( a_input, a_URR_protareInfos, a_hashIndex,
2701 a_crossSection, a_rng );
2702 break;
2703 }
2704
2705 return( reactionIndex );
2706}
#define MCGIDI_nullReaction
Definition MCGIDI.hpp:64
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t sampleReaction(Sampling::Input &a_input, URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex, double a_crossSection, RNG &&a_rng) const MCGIDI_TRUE_VIRTUAL

◆ sampleReaction() [2/2]

template<typename RNG>
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t MCGIDI::Protare::sampleReaction ( Sampling::Input & a_input,
URR_protareInfos const & a_URR_protareInfos,
std::size_t a_hashIndex,
double a_crossSection,
RNG && a_rng ) const
inline

Referenced by sampleReaction(), and sampleReaction().

◆ serialize()

LUPI_HOST_DEVICE void MCGIDI::Protare::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 290 of file MCGIDI_protare.cc.

290 {
291
292 serializeCommon( a_buffer, a_mode );
293
294 switch( m_protareType ) {
296 static_cast<ProtareSingle *>( this )->serialize2( a_buffer, a_mode );
297 break;
299 static_cast<ProtareComposite *>( this )->serialize2( a_buffer, a_mode );
300 break;
302 static_cast<ProtareTNSL *>( this )->serialize2( a_buffer, a_mode );
303 break;
304 }
305}
LUPI_HOST_DEVICE void serializeCommon(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE void serialize2(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)

Referenced by incrementMemorySize(), memorySize(), and sampleReaction().

◆ serialize2()

LUPI_HOST_DEVICE void MCGIDI::Protare::serialize2 ( 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 315 of file MCGIDI_protare.cc.

315 {
316
317 serializeCommon( a_buffer, a_mode );
318
319 switch( m_protareType ) {
321 static_cast<ProtareSingle *>( this )->serialize2( a_buffer, a_mode );
322 break;
324 LUPI_THROW( "Protare::serialize2:: Oops1, this should not happend." );
325 break;
327 LUPI_THROW( "Protare::serialize2:: Oops2, this should not happend." );
328 break;
329 }
330}
#define LUPI_THROW(arg)

Referenced by sampleReaction(), serialize(), and serialize2().

◆ serializeCommon()

LUPI_HOST_DEVICE void MCGIDI::Protare::serializeCommon ( 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 340 of file MCGIDI_protare.cc.

340 {
341
342 int protareType1 = 0;
343 if( a_mode != LUPI::DataBuffer::Mode::Unpack ) {
344 switch( m_protareType ) {
346 break;
348 protareType1 = 1;
349 break;
350 case ProtareType::TNSL :
351 protareType1 = 2;
352 break;
353 }
354 }
355 DATA_MEMBER_INT( protareType1, a_buffer, a_mode );
356 if( a_mode == LUPI::DataBuffer::Mode::Unpack ) {
357 switch( protareType1 ) {
358 case 0 :
359 m_protareType = ProtareType::single;
360 break;
361 case 1 :
362 m_protareType = ProtareType::composite;
363 break;
364 case 2 :
365 m_protareType = ProtareType::TNSL;
366 break;
367 }
368 }
369
370 DATA_MEMBER_STRING( m_projectileID, a_buffer, a_mode );
371 DATA_MEMBER_INT( m_projectileIntid, a_buffer, a_mode );
372 DATA_MEMBER_INT( m_projectileIndex, a_buffer, a_mode );
373 DATA_MEMBER_INT( m_projectileUserIndex, a_buffer, a_mode );
374 DATA_MEMBER_DOUBLE( m_projectileMass, a_buffer, a_mode );
375 DATA_MEMBER_DOUBLE( m_projectileExcitationEnergy, a_buffer, a_mode );
376
377 DATA_MEMBER_STRING( m_targetID, a_buffer, a_mode );
378 DATA_MEMBER_INT( m_targetIntid, a_buffer, a_mode );
379 DATA_MEMBER_INT( m_targetIndex, a_buffer, a_mode );
380 DATA_MEMBER_INT( m_targetUserIndex, a_buffer, a_mode );
381 DATA_MEMBER_DOUBLE( m_targetMass, a_buffer, a_mode );
382 DATA_MEMBER_DOUBLE( m_targetExcitationEnergy, a_buffer, a_mode );
383
384 DATA_MEMBER_INT( m_photonIndex, a_buffer, a_mode );
385 DATA_MEMBER_INT( m_userPhotonIndex, a_buffer, a_mode );
386
387 DATA_MEMBER_STRING( m_evaluation, a_buffer, a_mode );
388
389 int frame = 0;
390 if( m_projectileFrame == GIDI::Frame::centerOfMass ) frame = 1;
391 DATA_MEMBER_INT( frame, a_buffer, a_mode );
392 m_projectileFrame = GIDI::Frame::lab;
393 if( frame == 1 ) m_projectileFrame = GIDI::Frame::centerOfMass;
394
395 DATA_MEMBER_VECTOR_INT( m_productIntids, a_buffer, a_mode );
396 DATA_MEMBER_VECTOR_INT( m_productIndices, a_buffer, a_mode );
397 DATA_MEMBER_VECTOR_INT( m_userProductIndices, a_buffer, a_mode );
398
399 DATA_MEMBER_VECTOR_INT( m_productIntidsTransportable, a_buffer, a_mode );
400 DATA_MEMBER_VECTOR_INT( m_productIndicesTransportable, a_buffer, a_mode );
401 DATA_MEMBER_VECTOR_INT( m_userProductIndicesTransportable, a_buffer, a_mode );
402
403 DATA_MEMBER_CAST( m_isTNSL_ProtareSingle, a_buffer, a_mode, bool );
404}
#define DATA_MEMBER_STRING(member, buf, mode)
#define DATA_MEMBER_VECTOR_INT(member, buf, mode)
#define DATA_MEMBER_CAST(member, buf, mode, someType)
#define DATA_MEMBER_DOUBLE(member, buf, mode)
#define DATA_MEMBER_INT( member, buf, mode)
@ centerOfMass
Definition GIDI.hpp:146

Referenced by sampleReaction(), serialize(), and serialize2().

◆ setUserParticleIndex()

LUPI_HOST void MCGIDI::Protare::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 219 of file MCGIDI_protare.cc.

219 {
220
221 if( m_projectileIndex == a_particleIndex ) m_projectileUserIndex = a_userParticleIndex;
222 if( m_targetIndex == a_particleIndex ) m_targetUserIndex = a_userParticleIndex;
223
224 if( m_photonIndex == a_particleIndex ) m_userPhotonIndex = a_userParticleIndex;
225
226 for( std::size_t i1 = 0; i1 < m_productIndices.size( ); ++i1 ) {
227 if( m_productIndices[i1] == a_particleIndex ) m_userProductIndices[i1] = a_userParticleIndex;
228 }
229
230 for( std::size_t i1 = 0; i1 < m_productIndicesTransportable.size( ); ++i1 ) {
231 if( m_productIndicesTransportable[i1] == a_particleIndex ) m_userProductIndicesTransportable[i1] = a_userParticleIndex;
232 }
233
234 switch( m_protareType ) {
236 static_cast<ProtareSingle *>( this )->setUserParticleIndex2( a_particleIndex, a_userParticleIndex );
237 break;
239 static_cast<ProtareComposite *>( this )->setUserParticleIndex2( a_particleIndex, a_userParticleIndex );
240 break;
242 static_cast<ProtareTNSL *>( this )->setUserParticleIndex2( a_particleIndex, a_userParticleIndex );
243 break;
244 }
245}

◆ setUserParticleIndexViaIntid()

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

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

Parameters
a_particleIntid[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 254 of file MCGIDI_protare.cc.

254 {
255
256 if( m_projectileIntid == a_particleIntid ) m_projectileUserIndex = a_userParticleIndex;
257 if( m_targetIntid == a_particleIntid ) m_targetUserIndex = a_userParticleIndex;
258
259 if( PoPI::Intids::photon == a_particleIntid ) m_userPhotonIndex = a_userParticleIndex;
260
261 for( std::size_t i1 = 0; i1 < m_productIntids.size( ); ++i1 ) {
262 if( m_productIntids[i1] == a_particleIntid ) m_userProductIndices[i1] = a_userParticleIndex;
263 }
264
265 for( std::size_t i1 = 0; i1 < m_productIntidsTransportable.size( ); ++i1 ) {
266 if( m_productIntidsTransportable[i1] == a_particleIntid ) m_userProductIndicesTransportable[i1] = a_userParticleIndex;
267 }
268
269 switch( m_protareType ) {
271 static_cast<ProtareSingle *>( this )->setUserParticleIndexViaIntid2( a_particleIntid, a_userParticleIndex );
272 break;
274 static_cast<ProtareComposite *>( this )->setUserParticleIndexViaIntid2( a_particleIntid, a_userParticleIndex );
275 break;
277 static_cast<ProtareTNSL *>( this )->setUserParticleIndexViaIntid2( a_particleIntid, a_userParticleIndex );
278 break;
279 }
280}
static int constexpr photon
Definition PoPI.hpp:178

◆ sizeOf()

LUPI_HOST_DEVICE long MCGIDI::Protare::sizeOf ( ) const

Returns the number of memory bytes used by this.

Returns
The number of bytes used by this.

Definition at line 412 of file MCGIDI_protare.cc.

412 {
413
414 long sizeOf1 = 0;
415
416 switch( m_protareType ) {
418 sizeOf1 = static_cast<ProtareSingle const *>( this )->sizeOf2( );
419 break;
421 sizeOf1 = static_cast<ProtareComposite const *>( this )->sizeOf2( );
422 break;
423 case ProtareType::TNSL:
424 sizeOf1 = static_cast<ProtareTNSL const *>( this )->sizeOf2( );
425 break;
426 }
427
428 return( sizeOf1 );
429}

Referenced by incrementMemorySize(), memorySize(), and sampleReaction().

◆ targetExcitationEnergy()

LUPI_HOST_DEVICE double MCGIDI::Protare::targetExcitationEnergy ( ) const
inline

Returns the value of the m_targetExcitationEnergy member.

Definition at line 1528 of file MCGIDI.hpp.

◆ targetID()

LUPI_HOST_DEVICE String const & MCGIDI::Protare::targetID ( ) const
inline

Returns the value of the m_targetID member.

Definition at line 1523 of file MCGIDI.hpp.

◆ targetIndex()

LUPI_HOST_DEVICE int MCGIDI::Protare::targetIndex ( ) const
inline

Returns the value of the m_targetIndex member.

Definition at line 1525 of file MCGIDI.hpp.

◆ targetIntid()

LUPI_HOST_DEVICE int MCGIDI::Protare::targetIntid ( ) const
inline

Returns the value of the m_targetIntid member.

Definition at line 1524 of file MCGIDI.hpp.

Referenced by MCGIDI::OutputChannel::OutputChannel().

◆ targetMass()

LUPI_HOST_DEVICE double MCGIDI::Protare::targetMass ( ) const
inline

Returns the value of the m_targetMass member.

Definition at line 1527 of file MCGIDI.hpp.

◆ targetUserIndex()

LUPI_HOST_DEVICE int MCGIDI::Protare::targetUserIndex ( ) const
inline

Returns the value of the m_targetUserIndex member.

Definition at line 1526 of file MCGIDI.hpp.

◆ temperatures()

LUPI_HOST_DEVICE Vector< double > MCGIDI::Protare::temperatures ( std::size_t a_index = 0) const

Returns the list of temperatures for the requested ProtareSingle.

Returns the list of temperatures for the requested ProtareSingle.

Parameters
a_index[in] Index of the reqested ProtareSingle.
Returns
Vector of doubles.

Definition at line 623 of file MCGIDI_protare.cc.

623 {
624
625 ProtareSingle const *protareSingle = protare( a_index );
626 return( protareSingle->temperatures( ) );
627}

◆ threshold()

LUPI_HOST_DEVICE double MCGIDI::Protare::threshold ( std::size_t a_index) const

Returns the threshold for the reaction at index a_index. If a_index is negative, it is set to 0 before the threshold in the regular protare is returned.

Parameters
a_index[in] The index of the reaction.
Returns
The threshold for reaction at index a_index.

Definition at line 948 of file MCGIDI_protare.cc.

948 {
949
950 double threshold1 = 0.0;
951
952 switch( protareType( ) ) {
954 threshold1 = static_cast<ProtareSingle const *>( this )->threshold( a_index );
955 break;
957 threshold1 = static_cast<ProtareComposite const *>( this )->threshold( a_index );
958 break;
960 threshold1 = static_cast<ProtareTNSL const *>( this )->threshold( a_index );
961 break;
962 }
963
964 return( threshold1 );
965}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double threshold(std::size_t a_index) const MCGIDI_TRUE_VIRTUAL

Referenced by threshold().

◆ upscatterModelAGroupVelocities()

LUPI_HOST_DEVICE Vector< double > const & MCGIDI::Protare::upscatterModelAGroupVelocities ( ) const

Returns a reference to the m_upscatterModelAGroupVelocities.

Returns
Reference to the upscatter model A group velocities.

Definition at line 1244 of file MCGIDI_protare.cc.

1244 {
1245
1246 Vector<double> const *upscatterModelAGroupVelocities1 = nullptr;
1247 switch( protareType( ) ) {
1248 case ProtareType::single:
1249 upscatterModelAGroupVelocities1 = &static_cast<ProtareSingle const *>( this )->upscatterModelAGroupVelocities( );
1250 break;
1252 upscatterModelAGroupVelocities1 = &static_cast<ProtareComposite const *>( this )->upscatterModelAGroupVelocities( );
1253 break;
1254 case ProtareType::TNSL:
1255 upscatterModelAGroupVelocities1 = &static_cast<ProtareTNSL const *>( this )->upscatterModelAGroupVelocities( );
1256 break;
1257 }
1258
1259 return( *upscatterModelAGroupVelocities1 );
1260}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE Vector< double > const & upscatterModelAGroupVelocities() const MCGIDI_TRUE_VIRTUAL

Referenced by sampleReaction(), and upscatterModelAGroupVelocities().

◆ URR_domainMax()

LUPI_HOST_DEVICE double MCGIDI::Protare::URR_domainMax ( ) const

Returns the maximum energy for the unresolved resonance region (URR) domain. If no URR data present, returns -1.

Returns
Maximum energy for the unresolved resonance region (URR) domain.

Definition at line 893 of file MCGIDI_protare.cc.

893 {
894
895 double URR_domainMax1 = 0.0;
896
897 switch( protareType( ) ) {
899 URR_domainMax1 = static_cast<ProtareSingle const *>( this )->URR_domainMax( );
900 break;
902 URR_domainMax1 = static_cast<ProtareComposite const *>( this )->URR_domainMax( );
903 break;
905 URR_domainMax1 = static_cast<ProtareTNSL const *>( this )->URR_domainMax( );
906 break;
907 }
908
909 return( URR_domainMax1 );
910}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double URR_domainMax() const MCGIDI_TRUE_VIRTUAL

Referenced by URR_domainMax().

◆ URR_domainMin()

LUPI_HOST_DEVICE double MCGIDI::Protare::URR_domainMin ( ) const

Returns the minimum energy for the unresolved resonance region (URR) domain. If no URR data present, returns -1.

Returns
Minimum energy for the unresolved resonance region (URR) domain.

Definition at line 868 of file MCGIDI_protare.cc.

868 {
869
870 double URR_domainMin1 = 0.0;
871
872 switch( protareType( ) ) {
874 URR_domainMin1 = static_cast<ProtareSingle const *>( this )->URR_domainMin( );
875 break;
877 URR_domainMin1 = static_cast<ProtareComposite const *>( this )->URR_domainMin( );
878 break;
880 URR_domainMin1 = static_cast<ProtareTNSL const *>( this )->URR_domainMin( );
881 break;
882 }
883
884 return( URR_domainMin1 );
885}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double URR_domainMin() const MCGIDI_TRUE_VIRTUAL

Referenced by URR_domainMin().

◆ URR_index()

LUPI_HOST_DEVICE int MCGIDI::Protare::URR_index ( ) const

Returns URR index of this.

Returns
Integer URR index of this.

Definition at line 818 of file MCGIDI_protare.cc.

818 {
819
820 int URR_index1 = 0;
821
822 switch( protareType( ) ) {
824 URR_index1 = static_cast<ProtareSingle const *>( this )->URR_index( );
825 break;
827 URR_index1 = static_cast<ProtareComposite const *>( this )->URR_index( );
828 break;
830 URR_index1 = static_cast<ProtareTNSL const *>( this )->URR_index( );
831 break;
832 }
833
834 return( URR_index1 );
835}
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE int URR_index() const MCGIDI_TRUE_VIRTUAL

Referenced by URR_index().

◆ userPhotonIndex()

LUPI_HOST_DEVICE int MCGIDI::Protare::userPhotonIndex ( ) const
inline

Returns the value of the m_userPhotonIndex member.

Definition at line 1531 of file MCGIDI.hpp.

Referenced by MCGIDI::ProtareSingle::sampleBranchingGammas(), and MCGIDI::GRIN_capture::sampleProducts().

◆ userProductIndices()

LUPI_HOST Vector< int > const & MCGIDI::Protare::userProductIndices ( bool a_transportablesOnly) const

Returns the list user product indices. If a_transportablesOnly is true, the list only includes transportable particle.

Parameters
a_transportablesOnly[in] If true, a reference to m_userProductIndicesTransportable is returned; otherwise a reference to m_userProductIndices is returned.

Definition at line 206 of file MCGIDI_protare.cc.

206 {
207
208 if( a_transportablesOnly ) return( m_userProductIndicesTransportable );
209 return( m_userProductIndices );
210}

Member Data Documentation

◆ ProtareComposite

◆ ProtareSingle

◆ ProtareTNSL


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