Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI::Transporting::MG Class Reference

#include <GIDI.hpp>

Inheritance diagram for GIDI::Transporting::MG:

Public Member Functions

 MG (std::string const &a_projectileID, Mode a_mode, DelayedNeutrons a_delayedNeutrons)
Mode mode () const
void setMode (Mode a_mode)
bool useMultiGroupSummedData () const
void setUseMultiGroupSummedData (bool a_useMultiGroupSummedData)
Form const * form (LUPI::StatusMessageReporting &a_smr, GIDI::Suite const &a_suite, Styles::TemperatureInfo const &a_temperatureInfo, std::string a_dataType, std::string const &a_label="") const
Public Member Functions inherited from GIDI::Transporting::Settings
 Settings (std::string const &a_projectileID, DelayedNeutrons a_delayedNeutrons)
 ~Settings ()
std::string const & projectileID () const
DelayedNeutrons delayedNeutrons () const
void setDelayedNeutrons (DelayedNeutrons a_delayedNeutrons)
bool nuclearPlusCoulombInterferenceOnly () const
void setNuclearPlusCoulombInterferenceOnly (bool a_nuclearPlusCoulombInterferenceOnly)
bool zeroDepositionIfAllProductsTracked () const
void setZeroDepositionIfAllProductsTracked (bool a_zeroDepositionIfAllProductsTracked)
bool throwOnError () const
void setThrowOnError (bool a_throwOnError)
Vector multiGroupZeroVector (Particles const &a_particles, bool a_collapse=true) const
Matrix multiGroupZeroMatrix (Particles const &a_particles, std::string const &a_particleID, bool a_collapse=true) const

Detailed Description

This class is used to instruct deterministic methods on what data are being requested.

Definition at line 3752 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ MG()

GIDI::Transporting::MG::MG ( std::string const & a_projectileID,
Mode a_mode,
DelayedNeutrons a_delayedNeutrons )
Parameters
a_projectileID[in] The PoPs index for the projectile.
a_mode[in] Specifies the type of data to use or retrieve for transport codes.
a_delayedNeutrons[in] Flag indicating whether or not delayed neutron data are to be include in the requested data.

Definition at line 123 of file GIDI_settings.cc.

123 :
124 Settings( a_projectileID, a_delayedNeutrons ),
125 m_mode( a_mode ),
126 m_useMultiGroupSummedData( true ) {
127
128}
Settings(std::string const &a_projectileID, DelayedNeutrons a_delayedNeutrons)

Member Function Documentation

◆ form()

Form const * GIDI::Transporting::MG::form ( LUPI::StatusMessageReporting & a_smr,
GIDI::Suite const & a_suite,
Styles::TemperatureInfo const & a_temperatureInfo,
std::string a_dataType,
std::string const & a_label = "" ) const

Searches the suite a_suite for the form style specified by m_mode and matching one in a_temperatureInfo. This only works for multi-group data (i.e., multiGroup or multiGroupWithSnElasticUpScatter type data). If a_label is not an empty string, then it is used as the label for the form to return and a_temperatureInfo is ignored.

Parameters
a_smr[Out] If errors are not to be thrown, then the error is reported via this instance.
a_suite[in] The suite to search for the requested form.
a_temperatureInfo[in] Specifies the temperature and labels use to lookup the requested data.
a_dataType[in] The type of data being required. Only used if data not found.
a_label[in] The not an empty string, this is used as the label for the form to return.

Definition at line 142 of file GIDI_settings.cc.

143 {
144
145 std::string label;
146
147 if( a_label != "" ) {
148 label = a_label; }
149 else if( m_mode == Mode::multiGroup ) {
150 label = a_temperatureInfo.heatedMultiGroup( ); }
151 else if( m_mode == Mode::multiGroupWithSnElasticUpScatter ) {
152 label = a_temperatureInfo.SnElasticUpScatter( );
153 }
154
155 Suite::const_iterator iter = a_suite.find( label, true );
156 if( ( iter == a_suite.end( ) ) && ( a_label == "" ) ) {
157 if( m_mode == Mode::multiGroupWithSnElasticUpScatter ) iter = a_suite.find( a_temperatureInfo.heatedMultiGroup( ), true );
158 }
159
160 if( iter == a_suite.end( ) ) {
161 std::string sourceInfo( a_suite.toXLink( ) );
162 ProtareSingle const *rootProtareSingle = static_cast<ProtareSingle const *>( a_suite.root( ) );
163 sourceInfo += " for protare " + rootProtareSingle->projectile( ).ID( ) + " + " + rootProtareSingle->target( ).ID( )
164 + " for " + rootProtareSingle->evaluation( ) + ".";
165
166 if( throwOnError( ) ) {
167 throw Exception( "ERROR from GIDI::MG::form: label '" + label + "' not found in suite '" + sourceInfo ); }
168 else {
169 std::string warning( "data for " + a_dataType + " not found with label '" + label + "' in suite " + sourceInfo );
170 smr_setReportError2p( a_smr.smr( ), 0, 0, warning.c_str( ) );
171 }
172 return( nullptr );
173 }
174
175 return( *iter );
176}
Forms::const_iterator const_iterator
Definition GIDI.hpp:2593
statusMessageReporting * smr()
Definition LUPI.hpp:112
#define smr_setReportError2p(smr, libraryID, code, fmt)

Referenced by GIDI::Product::maximumLegendreOrder(), GIDI::Reaction::multiGroupAvailableEnergy(), GIDI::Reaction::multiGroupAvailableMomentum(), GIDI::Product::multiGroupAverageEnergy(), GIDI::Product::multiGroupAverageMomentum(), GIDI::Reaction::multiGroupCrossSection(), GIDI::Product::multiGroupMultiplicity(), GIDI::Product::multiGroupProductMatrix(), GIDI::FissionFragmentData::multiGroupQ(), and GIDI::OutputChannel::multiGroupQ().

◆ mode()

Mode GIDI::Transporting::MG::mode ( ) const
inline

Returns the value of the m_mode member.

Definition at line 3761 of file GIDI.hpp.

◆ setMode()

void GIDI::Transporting::MG::setMode ( Mode a_mode)
inline

Sets the m_mode member to a_mode.

Definition at line 3762 of file GIDI.hpp.

◆ setUseMultiGroupSummedData()

void GIDI::Transporting::MG::setUseMultiGroupSummedData ( bool a_useMultiGroupSummedData)
inline

Sets the m_useMultiGroupSummedData member to a_useMultiGroupSummedData.

Definition at line 3765 of file GIDI.hpp.

◆ useMultiGroupSummedData()

bool GIDI::Transporting::MG::useMultiGroupSummedData ( ) const
inline

Returns the value of the m_useMultiGroupSummedData member.

Definition at line 3764 of file GIDI.hpp.


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