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

#include <MCGIDI.hpp>

Public Member Functions

LUPI_HOST_DEVICE HeatedReactionCrossSectionMultiGroup ()
LUPI_HOST HeatedReactionCrossSectionMultiGroup (SetupInfo &a_setupInfo, Transporting::MC const &a_settings, std::size_t a_offset, std::vector< double > const &a_crossSection, double a_threshold)
LUPI_HOST_DEVICE double operator[] (std::size_t a_index) const
LUPI_HOST_DEVICE double threshold () const
LUPI_HOST_DEVICE std::size_t offset () const
LUPI_HOST_DEVICE double crossSection (std::size_t a_index, bool a_sampling=false) const
LUPI_HOST_DEVICE double augmentedThresholdCrossSection () const
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST void write (FILE *a_file, std::size_t a_reactionIndex) const

Detailed Description

Definition at line 788 of file MCGIDI.hpp.

Constructor & Destructor Documentation

◆ HeatedReactionCrossSectionMultiGroup() [1/2]

LUPI_HOST_DEVICE MCGIDI::HeatedReactionCrossSectionMultiGroup::HeatedReactionCrossSectionMultiGroup ( )

Definition at line 1571 of file MCGIDI_heatedCrossSections.cc.

1571 {
1572
1573}

◆ HeatedReactionCrossSectionMultiGroup() [2/2]

LUPI_HOST MCGIDI::HeatedReactionCrossSectionMultiGroup::HeatedReactionCrossSectionMultiGroup ( SetupInfo & a_setupInfo,
Transporting::MC const & a_settings,
std::size_t a_offset,
std::vector< double > const & a_crossSection,
double a_threshold )

Member Function Documentation

◆ augmentedThresholdCrossSection()

LUPI_HOST_DEVICE double MCGIDI::HeatedReactionCrossSectionMultiGroup::augmentedThresholdCrossSection ( ) const
inline

Returns the value of the m_augmentedThresholdCrossSection.

Definition at line 816 of file MCGIDI.hpp.

◆ crossSection()

LUPI_HOST_DEVICE double MCGIDI::HeatedReactionCrossSectionMultiGroup::crossSection ( std::size_t a_index,
bool a_sampling = false ) const
inline

Definition at line 805 of file MCGIDI.hpp.

805 {
806 if( a_index < m_offset ) return( 0.0 );
807 std::size_t index = a_index - m_offset;
808 if( index >= m_crossSections.size( ) ) return( 0.0 );
809
810 double _crossSection( m_crossSections[index] );
811 if( a_sampling && ( index == 0 ) ) {
812 _crossSection += m_augmentedThresholdCrossSection;
813 }
814 return( _crossSection );
815 }

◆ offset()

LUPI_HOST_DEVICE std::size_t MCGIDI::HeatedReactionCrossSectionMultiGroup::offset ( ) const
inline

Returns the value of the m_offset.

Definition at line 804 of file MCGIDI.hpp.

◆ operator[]()

LUPI_HOST_DEVICE double MCGIDI::HeatedReactionCrossSectionMultiGroup::operator[] ( std::size_t a_index) const
inline

Returns the value of the cross section at multi-group index a_index.

Definition at line 802 of file MCGIDI.hpp.

◆ serialize()

LUPI_HOST_DEVICE void MCGIDI::HeatedReactionCrossSectionMultiGroup::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 1603 of file MCGIDI_heatedCrossSections.cc.

1603 {
1604
1605 DATA_MEMBER_DOUBLE( m_threshold, a_buffer, a_mode );
1606 DATA_MEMBER_SIZE_T( m_offset, a_buffer, a_mode );
1607 DATA_MEMBER_VECTOR_DOUBLE( m_crossSections, a_buffer, a_mode );
1608 DATA_MEMBER_DOUBLE( m_augmentedThresholdCrossSection, a_buffer, a_mode );
1609}
#define DATA_MEMBER_VECTOR_DOUBLE(member, buf, mode)
#define DATA_MEMBER_SIZE_T(member, buf, mode)
#define DATA_MEMBER_DOUBLE(member, buf, mode)

◆ threshold()

LUPI_HOST_DEVICE double MCGIDI::HeatedReactionCrossSectionMultiGroup::threshold ( ) const
inline

Returns the value of the m_threshold.

Definition at line 803 of file MCGIDI.hpp.

◆ write()

LUPI_HOST void MCGIDI::HeatedReactionCrossSectionMultiGroup::write ( FILE * a_file,
std::size_t a_reactionIndex ) const

This method writes the multi-group data.

Parameters
a_file[in] The buffer to read or write data to depending on a_mode.
a_reactionIndex[in] The index of the reaction.

Definition at line 1618 of file MCGIDI_heatedCrossSections.cc.

1618 {
1619
1620 std::string buffer = LUPI::Misc::argumentsToString( "Reaction cross section (%3d)", a_reactionIndex );
1621 writeVector( a_file, buffer, m_offset, m_crossSections );
1622}
std::string argumentsToString(char const *a_format,...)
Definition LUPI_misc.cc:305

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