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

#include <GIDI.hpp>

Inheritance diagram for GIDI::OutputChannel:

Public Member Functions

 OutputChannel (bool a_twoBody, bool a_fissions, std::string const &a_process)
 OutputChannel (Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, Styles::Suite const *a_styles, bool a_isFission, bool a_addFissionResiduals)
 ~OutputChannel ()
bool twoBody () const
std::string process () const
int depth () const
ComponentQ ()
Component const & Q () const
Suiteproducts ()
Suite const & products () const
FissionFragmentDatafissionFragmentData ()
FissionFragmentData const & fissionFragmentData () const
Construction::FissionResiduals fissionResiduals () const
void modifiedMultiGroupElasticForTNSL (std::map< std::string, std::size_t > const &a_maximumTNSL_MultiGroupIndex)
bool areAllProductsTracked (Transporting::Particles const &a_particles) const
GUPI::AncestryfindInAncestry3 (std::string const &a_item)
GUPI::Ancestry const * findInAncestry3 (std::string const &a_item) const
bool isFission () const
bool hasFission () const
bool isDelayedFissionNeutronComplete () const
void productIDs (std::set< std::string > &a_ids, Transporting::Particles const &a_particles, bool a_transportablesOnly) const
int productMultiplicity (std::string const &a_productID) const
int maximumLegendreOrder (LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID) const
Vector multiGroupQ (LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, bool a_final) const
Vector multiGroupMultiplicity (LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID) const
Matrix multiGroupProductMatrix (LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, std::string const &a_productID, std::size_t a_order) const
Vector multiGroupAverageEnergy (LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID) const
Vector multiGroupAverageMomentum (LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID) const
void delayedNeutronProducts (DelayedNeutronProducts &a_delayedNeutronProducts) const
void incompleteParticles (Transporting::Settings const &a_settings, std::set< std::string > &a_incompleteParticles) const
void continuousEnergyProductData (Transporting::Settings const &a_settings, std::string const &a_particleID, double a_energy, double &a_productEnergy, double &a_productMomentum, double &a_productGain, bool a_ignoreIncompleteParticles) const
void mapContinuousEnergyProductData (Transporting::Settings const &a_settings, std::string const &a_particleID, std::vector< double > const &a_energies, std::size_t a_offset, std::vector< double > &a_productEnergies, std::vector< double > &a_productMomenta, std::vector< double > &a_productGains, bool a_ignoreIncompleteParticles) const
void calculateMultiGroupData (ProtareSingle const *a_protare, Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_heatedMultiGroupLabel, MultiGroupCalulationInformation const &a_multiGroupCalulationInformation, Functions::XYs1d const &a_crossSectionXYs1d)
void toXMLList (GUPI::WriteInfo &a_writeInfo, std::string const &a_indent="") const
Public Member Functions inherited from GUPI::Ancestry
 Ancestry (std::string const &a_moniker, std::string const &a_attribute="")
virtual ~Ancestry ()
Ancestryoperator= (Ancestry const &a_ancestry)
std::string const & moniker () const
void setMoniker (std::string const &a_moniker)
Ancestryancestor ()
Ancestry const * ancestor () const
void setAncestor (Ancestry *a_ancestor)
std::string attribute () const
Ancestryroot ()
Ancestry const * root () const
bool isChild (Ancestry *a_instance)
bool isParent (Ancestry *a_parent)
bool isRoot () const
AncestryfindInAncestry (std::string const &a_href)
Ancestry const * findInAncestry (std::string const &a_href) const
virtual LUPI_HOST void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
virtual std::string xlinkItemKey () const
std::string toXLink () const
void printXML () const

Additional Inherited Members

Static Public Member Functions inherited from GUPI::Ancestry
static std::string buildXLinkItemKey (std::string const &a_name, std::string const &a_key)

Detailed Description

This class represents a GNDS outputChannel.

Definition at line 4093 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ OutputChannel() [1/2]

GIDI::OutputChannel::OutputChannel ( bool a_twoBody,
bool a_fissions,
std::string const & a_process )

Definition at line 19 of file GIDI_outputChannel.cc.

19 :
20 GUPI::Ancestry( GIDI_outputChannelChars ),
21 m_twoBody( a_twoBody ),
22 m_fissions( a_fissions ),
23 m_process( a_process ),
26 m_fissionFragmentData( ),
27 m_fissionResiduals( Construction::FissionResiduals::none ) {
28
29 m_Q.setAncestor( this );
30 m_products.setAncestor( this );
31 m_fissionFragmentData.setAncestor( this );
32}
#define GIDI_QChars
Definition GIDI.hpp:219
#define GIDI_outputChannelChars
Definition GIDI.hpp:227
#define GIDI_productsChars
Definition GIDI.hpp:220
#define GIDI_labelChars
Definition GIDI.hpp:438

◆ OutputChannel() [2/2]

GIDI::OutputChannel::OutputChannel ( Construction::Settings const & a_construction,
HAPI::Node const & a_node,
SetupInfo & a_setupInfo,
PoPI::Database const & a_pops,
PoPI::Database const & a_internalPoPs,
Styles::Suite const * a_styles,
bool a_isFission,
bool a_addFissionResiduals )

◆ ~OutputChannel()

GIDI::OutputChannel::~OutputChannel ( )

Definition at line 68 of file GIDI_outputChannel.cc.

68 {
69
70}

Member Function Documentation

◆ areAllProductsTracked()

bool GIDI::OutputChannel::areAllProductsTracked ( Transporting::Particles const & a_particles) const

Returns true if all outgoing particles (i.e., products) are specifed in a_particles. That is, the user will be tracking all products of this reaction.

Parameters
a_particles[in] The list of particles to be transported.
Returns
bool.

Definition at line 101 of file GIDI_outputChannel.cc.

101 {
102// Does not check m_fissionFragmentData as its will only have neutrons which should already be in m_products at least for now.
103
104 if( isFission( ) ) return( false );
105
106 for( auto iter = m_products.begin( ); iter != m_products.end( ); ++iter ) {
107 Product *product = static_cast<Product *>( *iter );
108
109 if( !product->areAllProductsTracked( a_particles ) ) return( false );
110 }
111
112 return( true );
113}
bool isFission() const
Definition GIDI.hpp:4130

◆ calculateMultiGroupData()

void GIDI::OutputChannel::calculateMultiGroupData ( ProtareSingle const * a_protare,
Styles::TemperatureInfo const & a_temperatureInfo,
std::string const & a_heatedMultiGroupLabel,
MultiGroupCalulationInformation const & a_multiGroupCalulationInformation,
Functions::XYs1d const & a_crossSectionXYs1d )

This methods calculates multi-group data for all needed components and adds each component's multi-group with label a_heatedMultiGroupLabel.

Parameters
a_temperatureInfo[in] Specifies the temperature and labels use to lookup the requested data.
a_heatedMultiGroupLabel[in] The label of the style for the multi-group data being added.
a_multiGroupCalulationInformation[in] Store multi-group boundary and flux data used for multi-grouping.
a_crossSectionXYs1d[in[ The cross section weight.

Definition at line 527 of file GIDI_outputChannel.cc.

529 {
530
531 calculate1dMultiGroupDataInComponent( a_protare, a_heatedMultiGroupLabel, a_multiGroupCalulationInformation, m_Q, a_crossSectionXYs1d );
532
533 for( std::size_t index = 0; index < m_products.size( ); ++index ) {
534 Product &product = *m_products.get<Product>( index );
535
536 product.calculateMultiGroupData( a_protare, a_temperatureInfo, a_heatedMultiGroupLabel, a_multiGroupCalulationInformation, a_crossSectionXYs1d );
537 }
538
539 m_fissionFragmentData.calculateMultiGroupData( a_protare, a_temperatureInfo, a_heatedMultiGroupLabel, a_multiGroupCalulationInformation, a_crossSectionXYs1d );
540}
void calculate1dMultiGroupDataInComponent(ProtareSingle const *a_protare, std::string const &a_heatedMultiGroupLabel, MultiGroupCalulationInformation const &a_multiGroupCalulationInformation, Component &a_component, Functions::XYs1d const &a_crossSection)

◆ continuousEnergyProductData()

void GIDI::OutputChannel::continuousEnergyProductData ( Transporting::Settings const & a_settings,
std::string const & a_particleID,
double a_energy,
double & a_productEnergy,
double & a_productMomentum,
double & a_productGain,
bool a_ignoreIncompleteParticles ) const

Returns, via arguments, the average energy and momentum, and gain for product with particle id a_particleID.

Parameters
a_settings[in] Specifies the requested label.
a_particleID[in] The particle id of the product.
a_energy[in] The energy of the projectile.
a_productEnergy[in] The average energy of the product.
a_productMomentum[in] The average momentum of the product.
a_productGain[in] The gain of the product.
a_ignoreIncompleteParticles[in] If true, incomplete particles are ignore, otherwise a throw is executed.

Definition at line 477 of file GIDI_outputChannel.cc.

478 {
479
480 for( std::size_t index = 0; index < m_products.size( ); ++index ) {
481 Product const &product = *m_products.get<Product>( index );
482
483 product.continuousEnergyProductData( a_settings, a_particleID, a_energy, a_productEnergy, a_productMomentum, a_productGain, a_ignoreIncompleteParticles );
484 }
485
486 m_fissionFragmentData.continuousEnergyProductData( a_settings, a_particleID, a_energy, a_productEnergy, a_productMomentum, a_productGain,
487 a_ignoreIncompleteParticles );
488}

◆ delayedNeutronProducts()

void GIDI::OutputChannel::delayedNeutronProducts ( DelayedNeutronProducts & a_delayedNeutronProducts) const
inline

Definition at line 4149 of file GIDI.hpp.

4149{ m_fissionFragmentData.delayedNeutronProducts( a_delayedNeutronProducts ); }

◆ depth()

int GIDI::OutputChannel::depth ( ) const

Returns the maximum product depth for this output channel.

Returns
The maximum product depth.

Definition at line 78 of file GIDI_outputChannel.cc.

78 {
79
80 int _depth = 0;
81 std::size_t size = m_products.size( );
82
83 for( std::size_t index = 0; index < size; ++index ) {
84 Product const &product = *m_products.get<Product>( index );
85
86 int productDepth = product.depth( );
87 if( productDepth > _depth ) _depth = productDepth;
88 }
89 return( _depth + 1 );
90}

◆ findInAncestry3() [1/2]

GUPI::Ancestry * GIDI::OutputChannel::findInAncestry3 ( std::string const & a_item)
virtual

Used by GUPI::Ancestry to tranverse GNDS nodes. This method returns a pointer to a derived class' a_item member or nullptr if none exists.

Parameters
a_item[in] The name of the class member whose pointer is to be return.
Returns
The pointer to the class member or nullptr if class does not have a member named a_item.

Implements GUPI::Ancestry.

Definition at line 139 of file GIDI_outputChannel.cc.

139 {
140
141 if( a_item == GIDI_QChars ) return( &m_Q );
142 if( a_item == GIDI_productsChars ) return( &m_products );
143 if( a_item == GIDI_fissionFragmentDataChars ) return( &m_fissionFragmentData );
144
145 return( nullptr );
146}
#define GIDI_fissionFragmentDataChars
Definition GIDI.hpp:229

◆ findInAncestry3() [2/2]

GUPI::Ancestry const * GIDI::OutputChannel::findInAncestry3 ( std::string const & a_item) const
virtual

Used by GUPI::Ancestry to tranverse GNDS nodes. This method returns a pointer to a derived class' a_item member or nullptr if none exists.

Parameters
a_item[in] The name of the class member whose pointer is to be return.
Returns
The pointer to the class member or nullptr if class does not have a member named a_item.

Implements GUPI::Ancestry.

Definition at line 155 of file GIDI_outputChannel.cc.

155 {
156
157 if( a_item == GIDI_QChars ) return( &m_Q );
158 if( a_item == GIDI_productsChars ) return( &m_products );
159 if( a_item == GIDI_fissionFragmentDataChars ) return( &m_fissionFragmentData );
160
161 return( nullptr );
162}

◆ fissionFragmentData() [1/2]

FissionFragmentData & GIDI::OutputChannel::fissionFragmentData ( )
inline

Definition at line 4119 of file GIDI.hpp.

4119{ return( m_fissionFragmentData ); }

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

◆ fissionFragmentData() [2/2]

FissionFragmentData const & GIDI::OutputChannel::fissionFragmentData ( ) const
inline

Definition at line 4120 of file GIDI.hpp.

4120{ return( m_fissionFragmentData ); }

◆ fissionResiduals()

Construction::FissionResiduals GIDI::OutputChannel::fissionResiduals ( ) const
inline

Returns the value of the m_fissionResiduals member.

Definition at line 4122 of file GIDI.hpp.

◆ hasFission()

bool GIDI::OutputChannel::hasFission ( ) const

Returns true if the product has an output channel and its output channel hasFission returns true, and false otherwise.

Returns
true if at least one output channel is a fission channel.

Definition at line 170 of file GIDI_outputChannel.cc.

170 {
171
172 if( m_fissions ) return( true );
173
174 std::size_t size = m_products.size( );
175 for( std::size_t index = 0; index < size; ++index ) {
176 Product const &product = *m_products.get<Product>( index );
177
178 if( product.hasFission( ) ) return( true );
179 }
180 return( false );
181}

◆ incompleteParticles()

void GIDI::OutputChannel::incompleteParticles ( Transporting::Settings const & a_settings,
std::set< std::string > & a_incompleteParticles ) const

Loops over the instances in m_products calling their incompleteParticles methods and calls the :incompleteParticles method for the m_fissionFragmentData member.

Parameters
a_settings[in] Specifies the requested label.
a_incompleteParticles[out] The list of particles whose completeParticle method returns false.

Definition at line 454 of file GIDI_outputChannel.cc.

454 {
455
456 for( std::size_t index = 0; index < m_products.size( ); ++index ) {
457 Product const &product = *m_products.get<Product>( index );
458
459 product.incompleteParticles( a_settings, a_incompleteParticles );
460 }
461
462 m_fissionFragmentData.incompleteParticles( a_settings, a_incompleteParticles );
463}

◆ isDelayedFissionNeutronComplete()

bool GIDI::OutputChannel::isDelayedFissionNeutronComplete ( ) const

Returns false* if outputChannel has delayed fission neutrons and they are not complete; otherwise, returns **true.

Returns
bool

Definition at line 189 of file GIDI_outputChannel.cc.

189 {
190
191 if( !m_fissionFragmentData.isDelayedFissionNeutronComplete( ) ) return( false );
192
193 std::size_t size = m_products.size( );
194 for( std::size_t index = 0; index < size; ++index ) {
195 Product const &product = *m_products.get<Product>( index );
196
197 if( !product.isDelayedFissionNeutronComplete( false ) ) return( false );
198 }
199
200 return( true );
201}

Referenced by GIDI::ProtareSingle::isDelayedFissionNeutronComplete().

◆ isFission()

bool GIDI::OutputChannel::isFission ( ) const
inline

Returns true if the output channel is a fission output channel.

Definition at line 4130 of file GIDI.hpp.

Referenced by areAllProductsTracked(), MCGIDI::OutputChannel::OutputChannel(), productIDs(), and productMultiplicity().

◆ mapContinuousEnergyProductData()

void GIDI::OutputChannel::mapContinuousEnergyProductData ( Transporting::Settings const & a_settings,
std::string const & a_particleID,
std::vector< double > const & a_energies,
std::size_t a_offset,
std::vector< double > & a_productEnergies,
std::vector< double > & a_productMomenta,
std::vector< double > & a_productGains,
bool a_ignoreIncompleteParticles ) const

Modifies the average product energies, momenta and gains for product with particle id a_particleID.

Parameters
a_settings[in] Specifies user options.
a_particleID[in] The particle id of the product.
a_energies[in] The vector of energies to map the data to.
a_offset[in] The index of the first energy whose data are to be added to the vectors.
a_productEnergies[out] The vector of average energies of the product.
a_productMomenta[out] The vector of average momenta of the product.
a_productGains[out] The vector of gain of the product.
a_ignoreIncompleteParticles[in] If true, incomplete particles are ignore, otherwise a throw is executed.

Definition at line 503 of file GIDI_outputChannel.cc.

505 {
506
507 for( std::size_t index = 0; index < m_products.size( ); ++index ) {
508 Product const &product = *m_products.get<Product>( index );
509
510 product.mapContinuousEnergyProductData( a_settings, a_particleID, a_energies, a_offset, a_productEnergies, a_productMomenta,
511 a_productGains, a_ignoreIncompleteParticles );
512 }
513
514 m_fissionFragmentData.mapContinuousEnergyProductData( a_settings, a_particleID, a_energies, a_offset, a_productEnergies, a_productMomenta,
515 a_productGains, a_ignoreIncompleteParticles );
516}

◆ maximumLegendreOrder()

int GIDI::OutputChannel::maximumLegendreOrder ( LUPI::StatusMessageReporting & a_smr,
Transporting::MG const & a_settings,
Styles::TemperatureInfo const & a_temperatureInfo,
std::string const & a_productID ) const

Determines the maximum Legredre order present in the multi-group transfer matrix for the specified products of this output channel.

Parameters
a_smr[Out] If errors are not to be thrown, then the error is reported via this instance.
a_settings[in] Specifies the requested label.
a_temperatureInfo[in] Specifies the temperature and labels use to lookup the requested data.
a_productID[in] Particle id of the requested product.
Returns
The maximum Legredre order. If no transfer matrix data are present for the requested product, -1 is returned.

Definition at line 279 of file GIDI_outputChannel.cc.

280 {
281
282 std::size_t size = m_products.size( );
283 int _maximumLegendreOrder = -1;
284
285 for( std::size_t index = 0; index < size; ++index ) {
286 Product const &product = *m_products.get<Product>( index );
287 int r_maximumLegendreOrder = product.maximumLegendreOrder( a_smr, a_settings, a_temperatureInfo, a_productID );
288
289 if( r_maximumLegendreOrder > _maximumLegendreOrder ) _maximumLegendreOrder = r_maximumLegendreOrder;
290 }
291
292 int r_maximumLegendreOrder = m_fissionFragmentData.maximumLegendreOrder( a_smr, a_settings, a_temperatureInfo, a_productID );
293 if( r_maximumLegendreOrder > _maximumLegendreOrder ) _maximumLegendreOrder = r_maximumLegendreOrder;
294
295 return( _maximumLegendreOrder );
296}

◆ modifiedMultiGroupElasticForTNSL()

void GIDI::OutputChannel::modifiedMultiGroupElasticForTNSL ( std::map< std::string, std::size_t > const & a_maximumTNSL_MultiGroupIndex)

Only for internal use. Called by a ProtareTNSL instance to zero the lower energy multi-group data covered by the TNSL ProtareSingle.

Parameters
a_maximumTNSL_MultiGroupIndex[in] A map that contains labels for heated multi-group data and the last valid group boundary for the TNSL data for that boundary.

Definition at line 122 of file GIDI_outputChannel.cc.

122 {
123
124 // No need to fix m_Q as it is all 0.0's for elastic scattering.
125 for( auto iter = m_products.begin( ); iter != m_products.end( ); ++iter ) {
126 Product *product = static_cast<Product *>( *iter );
127
128 product->modifiedMultiGroupElasticForTNSL( a_maximumTNSL_MultiGroupIndex );
129 }
130}

◆ multiGroupAverageEnergy()

Vector GIDI::OutputChannel::multiGroupAverageEnergy ( LUPI::StatusMessageReporting & a_smr,
Transporting::MG const & a_settings,
Styles::TemperatureInfo const & a_temperatureInfo,
std::string const & a_productID ) const

Returns the sum of the multi-group, average energy for the requested label for the requested product. This is a cross section weighted average energy.

Parameters
a_smr[Out] If errors are not to be thrown, then the error is reported via this instance.
a_settings[in] Specifies the requested label.
a_temperatureInfo[in] Specifies the temperature and labels use to lookup the requested data.
a_productID[in] Particle id for the requested product.
Returns
The requested multi-group average energy as a GIDI::Vector.

Definition at line 403 of file GIDI_outputChannel.cc.

404 {
405
406 Vector vector( 0 );
407
408 for( std::size_t index = 0; index < m_products.size( ); ++index ) {
409 Product const &product = *m_products.get<Product>( index );
410
411 vector += product.multiGroupAverageEnergy( a_smr, a_settings, a_temperatureInfo, a_productID );
412 }
413
414 vector += m_fissionFragmentData.multiGroupAverageEnergy( a_smr, a_settings, a_temperatureInfo, a_productID );
415
416 return( vector );
417}

◆ multiGroupAverageMomentum()

Vector GIDI::OutputChannel::multiGroupAverageMomentum ( LUPI::StatusMessageReporting & a_smr,
Transporting::MG const & a_settings,
Styles::TemperatureInfo const & a_temperatureInfo,
std::string const & a_productID ) const

Returns the sum of the multi-group, average momentum for the requested label for the requested product. This is a cross section weighted average momentum.

Parameters
a_smr[Out] If errors are not to be thrown, then the error is reported via this instance.
a_settings[in] Specifies the requested label.
a_temperatureInfo[in] Specifies the temperature and labels use to lookup the requested data.
a_productID[in] Particle id for the requested product.
Returns
The requested multi-group average momentum as a GIDI::Vector.

Definition at line 430 of file GIDI_outputChannel.cc.

431 {
432
433 Vector vector( 0 );
434
435 for( std::size_t index = 0; index < m_products.size( ); ++index ) {
436 Product const &product = *m_products.get<Product>( index );
437
438 vector += product.multiGroupAverageMomentum( a_smr, a_settings, a_temperatureInfo, a_productID );
439 }
440
441 vector += m_fissionFragmentData.multiGroupAverageMomentum( a_smr, a_settings, a_temperatureInfo, a_productID );
442
443 return( vector );
444}

◆ multiGroupMultiplicity()

Vector GIDI::OutputChannel::multiGroupMultiplicity ( LUPI::StatusMessageReporting & a_smr,
Transporting::MG const & a_settings,
Styles::TemperatureInfo const & a_temperatureInfo,
std::string const & a_productID ) const

Returns the sum of the multi-group multiplicity for the requested label for the request product of this output channel. This is a cross section weighted multiplicity.

Parameters
a_smr[Out] If errors are not to be thrown, then the error is reported via this instance.
a_settings[in] Specifies the requested label.
a_temperatureInfo[in] Specifies the temperature and labels use to lookup the requested data.
a_productID[in] Particle id for the requested product.
Returns
The requested multi-group multiplicity as a GIDI::Vector.

Definition at line 310 of file GIDI_outputChannel.cc.

311 {
312
313 Vector vector( 0 );
314
315 for( std::size_t index = 0; index < m_products.size( ); ++index ) {
316 Product const &product = *m_products.get<Product>( index );
317
318 vector += product.multiGroupMultiplicity( a_smr, a_settings, a_temperatureInfo, a_productID );
319 }
320
321 vector += m_fissionFragmentData.multiGroupMultiplicity( a_smr, a_settings, a_temperatureInfo, a_productID );
322
323 return( vector );
324}

◆ multiGroupProductMatrix()

Matrix GIDI::OutputChannel::multiGroupProductMatrix ( LUPI::StatusMessageReporting & a_smr,
Transporting::MG const & a_settings,
Styles::TemperatureInfo const & a_temperatureInfo,
Transporting::Particles const & a_particles,
std::string const & a_productID,
std::size_t a_order ) const

Returns the multi-group, product matrix for the requested label for the requested product index for the requested Legendre order. If no data are found, an empty GIDI::Matrix is returned.

Parameters
a_smr[Out] If errors are not to be thrown, then the error is reported via this instance.
a_settings[in] Specifies the requested label and if delayed neutrons should be included.
a_temperatureInfo[in] Specifies the temperature and labels use to lookup the requested data.
a_particles[in] The list of particles to be transported.
a_productID[in] Particle id for the requested product.
a_order[in] Requested product matrix, Legendre order.
Returns
The requested multi-group product matrix as a GIDI::Matrix.

Definition at line 375 of file GIDI_outputChannel.cc.

377 {
378
379 Matrix matrix( 0, 0 );
380
381 for( std::size_t index = 0; index < m_products.size( ); ++index ) {
382 Product const &product = *m_products.get<Product>( index );
383
384 matrix += product.multiGroupProductMatrix( a_smr, a_settings, a_temperatureInfo, a_particles, a_productID, a_order );
385 }
386
387 matrix += m_fissionFragmentData.multiGroupProductMatrix( a_smr, a_settings, a_temperatureInfo, a_particles, a_productID, a_order );
388
389 return( matrix );
390}

◆ multiGroupQ()

Vector GIDI::OutputChannel::multiGroupQ ( LUPI::StatusMessageReporting & a_smr,
Transporting::MG const & a_settings,
Styles::TemperatureInfo const & a_temperatureInfo,
bool a_final ) const

Returns the sum of the multi-group, Q for the requested label for the this output channel. This is a cross section weighted Q. If a_final is false, only the Q for the output channels directly under each reaction is summed. Otherwise, the Q for all output channels summed, including output channels for each products.

Parameters
a_smr[Out] If errors are not to be thrown, then the error is reported via this instance.
a_settings[in] Specifies the requested label.
a_temperatureInfo[in] Specifies the temperature and labels use to lookup the requested data.
a_final[in] If true, the Q is calculated for all output channels, including those for products.
Returns
The requested multi-group Q as a GIDI::Vector.

Definition at line 339 of file GIDI_outputChannel.cc.

340 {
341
342 Vector vector( 0 );
343
344 Functions::Gridded1d const *form = dynamic_cast<Functions::Gridded1d const*>( a_settings.form( a_smr, m_Q, a_temperatureInfo, "Q-value" ) );
345
346 if( form != nullptr ) vector += form->data( );
347
348 if( a_final ) {
349 for( std::size_t index = 0; index < m_products.size( ); ++index ) {
350 Product const &product1 = *m_products.get<Product>( index );
351
352 vector += product1.multiGroupQ( a_smr, a_settings, a_temperatureInfo, a_final );
353 }
354 }
355
356 vector += m_fissionFragmentData.multiGroupQ( a_smr, a_settings, a_temperatureInfo, a_final );
357
358 return( vector );
359}

◆ process()

std::string GIDI::OutputChannel::process ( ) const
inline

Returns the value of the m_process member.

Definition at line 4112 of file GIDI.hpp.

◆ productIDs()

void GIDI::OutputChannel::productIDs ( std::set< std::string > & a_indices,
Transporting::Particles const & a_particles,
bool a_transportablesOnly ) const

Insert a std::set with the products id and any product in in its output channel. If a_transportablesOnly is true, only transportable product indices are return.

Parameters
a_indices[out] The unique list of product indices.
a_particles[in] The list of particles to be transported.
a_transportablesOnly[in] If true, only transportable product indices are added in the list.

Definition at line 212 of file GIDI_outputChannel.cc.

212 {
213
214 std::size_t size = m_products.size( );
215
216 for( std::size_t index = 0; index < size; ++index ) {
217 Product const &product = *m_products.get<Product>( index );
218
219 product.productIDs( a_indices, a_particles, a_transportablesOnly );
220 }
221
222 m_fissionFragmentData.productIDs( a_indices, a_particles, a_transportablesOnly );
223
224 if( !a_transportablesOnly && isFission( ) ) {
225 if( m_fissionResiduals == Construction::FissionResiduals::ENDL99120 ) {
226 a_indices.insert( PoPI::IDs::FissionProductENDL99120 ); }
227 else if( m_fissionResiduals == Construction::FissionResiduals::ENDL99125 ) {
228 a_indices.insert( PoPI::IDs::FissionProductENDL99125 );
229 }
230 }
231}
static std::string const FissionProductENDL99125
Definition PoPI.hpp:172
static std::string const FissionProductENDL99120
Definition PoPI.hpp:171

◆ productMultiplicity()

int GIDI::OutputChannel::productMultiplicity ( std::string const & a_productID) const

Returns the product multiplicity (e.g., 0, 1, 2, ...) or -1 if energy dependent or not an integer for particle with id a_productID.

Parameters
a_productID;[in] The id of the requested particle.
Returns
The multiplicity for the requested particle.

Definition at line 241 of file GIDI_outputChannel.cc.

241 {
242
243 int total_multiplicity = 0;
244 std::size_t size = m_products.size( );
245
246 if( isFission( ) ) {
247 if( ( a_productID == PoPI::IDs::FissionProductENDL99120 ) && ( m_fissionResiduals == Construction::FissionResiduals::ENDL99120 ) ) {
248 return( 2 ); }
249 else if( ( a_productID == PoPI::IDs::FissionProductENDL99125 ) && ( m_fissionResiduals == Construction::FissionResiduals::ENDL99125 ) ) {
250 return( 2 );
251 }
252 }
253
254 for( std::size_t index = 0; index < size; ++index ) {
255 Product const &product = *m_products.get<Product>( index );
256 int multiplicity = product.productMultiplicity( a_productID );
257
258 if( multiplicity < 0 ) return( -1 );
259 total_multiplicity += multiplicity;
260 }
261
262 int multiplicity = m_fissionFragmentData.productMultiplicity( a_productID );
263 if( multiplicity < 0 ) return( -1 );
264
265 return( total_multiplicity + multiplicity );
266}

◆ products() [1/2]

Suite & GIDI::OutputChannel::products ( )
inline

Returns a reference to the m_products member.

Definition at line 4117 of file GIDI.hpp.

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

◆ products() [2/2]

Suite const & GIDI::OutputChannel::products ( ) const
inline

Returns a reference to the m_products member.

Definition at line 4118 of file GIDI.hpp.

◆ Q() [1/2]

Component & GIDI::OutputChannel::Q ( )
inline

Returns a reference to the m_Q member.

Definition at line 4115 of file GIDI.hpp.

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

◆ Q() [2/2]

Component const & GIDI::OutputChannel::Q ( ) const
inline

Returns a reference to the m_Q member.

Definition at line 4116 of file GIDI.hpp.

◆ toXMLList()

void GIDI::OutputChannel::toXMLList ( GUPI::WriteInfo & a_writeInfo,
std::string const & a_indent = "" ) const
virtual

Fills the argument a_writeInfo with the XML lines that represent this. Recursively enters each sub-node.

Parameters
a_writeInfo[in/out] Instance containing incremental indentation and other information and stores the appended lines.
a_indent[in] The amount to indent this node.

Reimplemented from GUPI::Ancestry.

Definition at line 549 of file GIDI_outputChannel.cc.

549 {
550
551 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
552 std::string attributes;
553
554 if( m_twoBody ) {
555 attributes = a_writeInfo.addAttribute( GIDI_genreChars, GIDI_twoBodyChars ); }
556 else {
557 attributes = a_writeInfo.addAttribute( GIDI_genreChars, GIDI_NBodyChars );
558 }
559
560 if( m_process != "" ) attributes += a_writeInfo.addAttribute( GIDI_processChars, m_process );
561
562 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
563
564 m_Q.toXMLList( a_writeInfo, indent2 );
565 m_products.toXMLList( a_writeInfo, indent2 );
566 m_fissionFragmentData.toXMLList( a_writeInfo, indent2 );
567
568 a_writeInfo.addNodeEnder( moniker( ) );
569}
#define GIDI_twoBodyChars
Definition GIDI.hpp:461
#define GIDI_genreChars
Definition GIDI.hpp:452
#define GIDI_processChars
Definition GIDI.hpp:453
#define GIDI_NBodyChars
Definition GIDI.hpp:462
std::string const & moniker() const
Definition GUPI.hpp:102
void addNodeEnder(std::string const &a_moniker)
Definition GUPI.hpp:59
std::string incrementalIndent(std::string const &indent)
Definition GUPI.hpp:52
void addNodeStarter(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
Definition GUPI.hpp:55
std::string addAttribute(std::string const &a_name, std::string const &a_value) const
Definition GUPI.hpp:60

◆ twoBody()

bool GIDI::OutputChannel::twoBody ( ) const
inline

Returns the value of the m_twoBody member.

Definition at line 4111 of file GIDI.hpp.

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


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