Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI_outputChannel.cc
Go to the documentation of this file.
1/*
2# <<BEGIN-copyright>>
3# Copyright 2019, Lawrence Livermore National Security, LLC.
4# This file is part of the gidiplus package (https://github.com/LLNL/gidiplus).
5# gidiplus is licensed under the MIT license (see https://opensource.org/licenses/MIT).
6# SPDX-License-Identifier: MIT
7# <<END-copyright>>
8*/
9
10#include "GIDI.hpp"
11#include <HAPI.hpp>
12
13namespace GIDI {
14
15/*! \class OutputChannel
16 * This class represents a **GNDS** outputChannel.
17*/
18
19OutputChannel::OutputChannel( bool a_twoBody, bool a_fissions, std::string const &a_process ) :
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}
33
34/* *********************************************************************************************************//**
35 * Constructed from data in a <**outputChannel**> node.
36 *
37 * @param a_construction [in] Used to pass user options to the constructor.
38 * @param a_node [in] The reaction HAPI::Node to be parsed and used to construct the reaction.
39 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
40 * @param a_pops [in] The *external* PoPI::Database instance used to get particle indices and possibly other particle information.
41 * @param a_internalPoPs [in] The *internal* PoPI::Database instance used to get particle indices and possibly other particle information.
42 * This is the <**PoPs**> node under the <**reactionSuite**> node.
43 * @param a_styles [in] The <**styles**> node under the <**reactionSuite**> node.
44 * @param a_isFission [in] Boolean indicating if output channel is a fission channel (true) or not (false).
45 ***********************************************************************************************************/
46
47OutputChannel::OutputChannel( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops,
48 PoPI::Database const &a_internalPoPs, Styles::Suite const *a_styles, bool a_isFission, LUPI_maybeUnused bool a_addFissionResiduals ) :
49 GUPI::Ancestry( a_node.name( ) ),
50 m_twoBody( std::string( a_node.attribute_as_string( GIDI_genreChars ) ) == GIDI_twoBodyChars ),
51 m_fissions( a_isFission ),
52 m_process( std::string( a_node.attribute_as_string( GIDI_processChars ) ) ),
53 m_Q( a_construction, GIDI_QChars, GIDI_labelChars, a_node, a_setupInfo, a_pops, a_internalPoPs, parseQSuite, a_styles ),
54 m_products( a_construction, GIDI_productsChars, GIDI_labelChars, a_node, a_setupInfo, a_pops, a_internalPoPs, parseProductSuite, a_styles ),
55 m_fissionFragmentData( a_construction, a_node.child( GIDI_fissionFragmentDataChars ), a_setupInfo, a_pops, a_internalPoPs, a_styles ),
56 m_fissionResiduals( Construction::FissionResiduals::none ) {
57
58 if( a_isFission ) m_fissionResiduals = a_construction.fissionResiduals( );
59
60 m_Q.setAncestor( this );
61 m_products.setAncestor( this );
62 m_fissionFragmentData.setAncestor( this );
63}
64
65/* *********************************************************************************************************//**
66 ***********************************************************************************************************/
67
71
72/* *********************************************************************************************************//**
73 * Returns the maximum product depth for this output channel.
74 *
75 * @return The maximum product depth.
76 ***********************************************************************************************************/
77
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}
91
92/* *********************************************************************************************************//**
93 * Returns **true** if all outgoing particles (i.e., products) are specifed in *a_particles*. That is, the user
94 * will be tracking all products of *this* reaction.
95 *
96 * @param a_particles [in] The list of particles to be transported.
97 *
98 * @return bool.
99 ***********************************************************************************************************/
100
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}
114
115/* *********************************************************************************************************//**
116 * Only for internal use. Called by a ProtareTNSL instance to zero the lower energy multi-group data covered by the TNSL ProtareSingle.
117 *
118 * @param a_maximumTNSL_MultiGroupIndex [in] A map that contains labels for heated multi-group data and the last valid group boundary
119 * for the TNSL data for that boundary.
120 ***********************************************************************************************************/
121
122void OutputChannel::modifiedMultiGroupElasticForTNSL( std::map<std::string,std::size_t> const &a_maximumTNSL_MultiGroupIndex ) {
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}
131
132/* *********************************************************************************************************//**
133 * 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.
134 *
135 * @param a_item [in] The name of the class member whose pointer is to be return.
136 * @return The pointer to the class member or nullptr if class does not have a member named a_item.
137 ***********************************************************************************************************/
138
139GUPI::Ancestry *OutputChannel::findInAncestry3( std::string const &a_item ) {
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}
147
148/* *********************************************************************************************************//**
149 * 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.
150 *
151 * @param a_item [in] The name of the class member whose pointer is to be return.
152 * @return The pointer to the class member or nullptr if class does not have a member named a_item.
153 ***********************************************************************************************************/
154
155GUPI::Ancestry const *OutputChannel::findInAncestry3( std::string const &a_item ) const {
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}
163
164/* *********************************************************************************************************//**
165 * Returns true if the product has an output channel and its output channel hasFission returns true, and false otherwise.
166 *
167 * @return true if at least one output channel is a fission channel.
168 ***********************************************************************************************************/
169
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}
182
183/* *********************************************************************************************************//**
184 * Returns **false* if outputChannel has delayed fission neutrons and they are not complete; otherwise, returns **true**.
185 *
186 * @return bool
187 ***********************************************************************************************************/
188
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}
202
203/* *********************************************************************************************************//**
204 * Insert a std::set with the products id and any product in in its output channel.
205 * If a_transportablesOnly is true, only transportable product indices are return.
206 *
207 * @param a_indices [out] The unique list of product indices.
208 * @param a_particles [in] The list of particles to be transported.
209 * @param a_transportablesOnly [in] If true, only transportable product indices are added in the list.
210 ***********************************************************************************************************/
211
212void OutputChannel::productIDs( std::set<std::string> &a_indices, Transporting::Particles const &a_particles, bool a_transportablesOnly ) const {
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}
232
233/* *********************************************************************************************************//**
234 * Returns the product multiplicity (e.g., 0, 1, 2, ...) or -1 if energy dependent or not an integer for particle with id *a_productID*.
235 *
236 * @param a_productID; [in] The id of the requested particle.
237 *
238 * @return The multiplicity for the requested particle.
239 ***********************************************************************************************************/
240
241int OutputChannel::productMultiplicity( std::string const &a_productID ) const {
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}
267
268/* *********************************************************************************************************//**
269 * Determines the maximum Legredre order present in the multi-group transfer matrix for the specified products of this output channel.
270 *
271 * @param a_smr [Out] If errors are not to be thrown, then the error is reported via this instance.
272 * @param a_settings [in] Specifies the requested label.
273 * @param a_temperatureInfo [in] Specifies the temperature and labels use to lookup the requested data.
274 * @param a_productID [in] Particle id of the requested product.
275 *
276 * @return The maximum Legredre order. If no transfer matrix data are present for the requested product, -1 is returned.
277 ***********************************************************************************************************/
278
280 Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const {
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}
297
298/* *********************************************************************************************************//**
299 * Returns the sum of the multi-group multiplicity for the requested label for the request product of this output channel.
300 * This is a cross section weighted multiplicity.
301 *
302 * @param a_smr [Out] If errors are not to be thrown, then the error is reported via this instance.
303 * @param a_settings [in] Specifies the requested label.
304 * @param a_temperatureInfo [in] Specifies the temperature and labels use to lookup the requested data.
305 * @param a_productID [in] Particle id for the requested product.
306 *
307 * @return The requested multi-group multiplicity as a GIDI::Vector.
308 ***********************************************************************************************************/
309
311 Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const {
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}
325
326/* *********************************************************************************************************//**
327 * Returns the sum of the multi-group, Q for the requested label for the this output channel. This is a cross section weighted Q.
328 * 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
329 * summed, including output channels for each products.
330 *
331 * @param a_smr [Out] If errors are not to be thrown, then the error is reported via this instance.
332 * @param a_settings [in] Specifies the requested label.
333 * @param a_temperatureInfo [in] Specifies the temperature and labels use to lookup the requested data.
334 * @param a_final [in] If true, the Q is calculated for all output channels, including those for products.
335 *
336 * @return The requested multi-group Q as a GIDI::Vector.
337 ***********************************************************************************************************/
338
340 Styles::TemperatureInfo const &a_temperatureInfo, bool a_final ) const {
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}
360
361/* *********************************************************************************************************//**
362 * Returns the multi-group, product matrix for the requested label for the requested product index for the requested Legendre order.
363 * If no data are found, an empty GIDI::Matrix is returned.
364 *
365 * @param a_smr [Out] If errors are not to be thrown, then the error is reported via this instance.
366 * @param a_settings [in] Specifies the requested label and if delayed neutrons should be included.
367 * @param a_temperatureInfo [in] Specifies the temperature and labels use to lookup the requested data.
368 * @param a_particles [in] The list of particles to be transported.
369 * @param a_productID [in] Particle id for the requested product.
370 * @param a_order [in] Requested product matrix, Legendre order.
371 *
372 * @return The requested multi-group product matrix as a GIDI::Matrix.
373 ***********************************************************************************************************/
374
376 Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, std::string const &a_productID,
377 std::size_t a_order ) const {
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}
391
392/* *********************************************************************************************************//**
393 * 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.
394 *
395 * @param a_smr [Out] If errors are not to be thrown, then the error is reported via this instance.
396 * @param a_settings [in] Specifies the requested label.
397 * @param a_temperatureInfo [in] Specifies the temperature and labels use to lookup the requested data.
398 * @param a_productID [in] Particle id for the requested product.
399 *
400 * @return The requested multi-group average energy as a GIDI::Vector.
401 ***********************************************************************************************************/
402
404 Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const {
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}
418
419/* *********************************************************************************************************//**
420 * 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.
421 *
422 * @param a_smr [Out] If errors are not to be thrown, then the error is reported via this instance.
423 * @param a_settings [in] Specifies the requested label.
424 * @param a_temperatureInfo [in] Specifies the temperature and labels use to lookup the requested data.
425 * @param a_productID [in] Particle id for the requested product.
426 *
427 * @return The requested multi-group average momentum as a GIDI::Vector.
428 ***********************************************************************************************************/
429
431 Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const {
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}
445
446/* *********************************************************************************************************//**
447 * Loops over the instances in **m_products** calling their **incompleteParticles** methods and calls the :**incompleteParticles** method
448 * for the **m_fissionFragmentData** member.
449 *
450 * @param a_settings [in] Specifies the requested label.
451 * @param a_incompleteParticles [out] The list of particles whose **completeParticle** method returns *false*.
452 ***********************************************************************************************************/
453
454void OutputChannel::incompleteParticles( Transporting::Settings const &a_settings, std::set<std::string> &a_incompleteParticles ) const {
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}
464
465/* *********************************************************************************************************//**
466 * Returns, via arguments, the average energy and momentum, and gain for product with particle id *a_particleID*.
467 *
468 * @param a_settings [in] Specifies the requested label.
469 * @param a_particleID [in] The particle id of the product.
470 * @param a_energy [in] The energy of the projectile.
471 * @param a_productEnergy [in] The average energy of the product.
472 * @param a_productMomentum [in] The average momentum of the product.
473 * @param a_productGain [in] The gain of the product.
474 * @param a_ignoreIncompleteParticles [in] If *true*, incomplete particles are ignore, otherwise a *throw* is executed.
475 ***********************************************************************************************************/
476
477void OutputChannel::continuousEnergyProductData( Transporting::Settings const &a_settings, std::string const &a_particleID, double a_energy,
478 double &a_productEnergy, double &a_productMomentum, double &a_productGain, bool a_ignoreIncompleteParticles ) const {
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}
489
490/* *********************************************************************************************************//**
491 * Modifies the average product energies, momenta and gains for product with particle id *a_particleID*.
492 *
493 * @param a_settings [in] Specifies user options.
494 * @param a_particleID [in] The particle id of the product.
495 * @param a_energies [in] The vector of energies to map the data to.
496 * @param a_offset [in] The index of the first energy whose data are to be added to the vectors.
497 * @param a_productEnergies [out] The vector of average energies of the product.
498 * @param a_productMomenta [out] The vector of average momenta of the product.
499 * @param a_productGains [out] The vector of gain of the product.
500 * @param a_ignoreIncompleteParticles [in] If *true*, incomplete particles are ignore, otherwise a *throw* is executed.
501 ***********************************************************************************************************/
502
503void OutputChannel::mapContinuousEnergyProductData( Transporting::Settings const &a_settings, std::string const &a_particleID,
504 std::vector<double> const &a_energies, std::size_t a_offset, std::vector<double> &a_productEnergies, std::vector<double> &a_productMomenta,
505 std::vector<double> &a_productGains, bool a_ignoreIncompleteParticles ) const {
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}
517
518/* *********************************************************************************************************//**
519 * This methods calculates multi-group data for all needed components and adds each component's multi-group with label *a_heatedMultiGroupLabel*.
520 *
521 * @param a_temperatureInfo [in] Specifies the temperature and labels use to lookup the requested data.
522 * @param a_heatedMultiGroupLabel [in] The label of the style for the multi-group data being added.
523 * @param a_multiGroupCalulationInformation [in] Store multi-group boundary and flux data used for multi-grouping.
524 * @param a_crossSectionXYs1d [in[ The cross section weight.
525 ***********************************************************************************************************/
526
527void OutputChannel::calculateMultiGroupData( ProtareSingle const *a_protare, Styles::TemperatureInfo const &a_temperatureInfo,
528 std::string const &a_heatedMultiGroupLabel, MultiGroupCalulationInformation const &a_multiGroupCalulationInformation,
529 Functions::XYs1d const &a_crossSectionXYs1d ) {
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}
541
542/* *********************************************************************************************************//**
543 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
544 *
545 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
546 * @param a_indent [in] The amount to indent *this* node.
547 ***********************************************************************************************************/
548
549void OutputChannel::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
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}
570
571}
#define GIDI_twoBodyChars
Definition GIDI.hpp:461
#define GIDI_fissionFragmentDataChars
Definition GIDI.hpp:229
#define GIDI_genreChars
Definition GIDI.hpp:452
#define GIDI_QChars
Definition GIDI.hpp:219
#define GIDI_outputChannelChars
Definition GIDI.hpp:227
#define GIDI_processChars
Definition GIDI.hpp:453
#define GIDI_NBodyChars
Definition GIDI.hpp:462
#define GIDI_productsChars
Definition GIDI.hpp:220
#define GIDI_labelChars
Definition GIDI.hpp:438
#define LUPI_maybeUnused
FissionResiduals fissionResiduals() const
Definition GIDI.hpp:571
Vector const & data() const
Definition GIDI.hpp:1254
OutputChannel(bool a_twoBody, bool a_fissions, std::string const &a_process)
Vector multiGroupAverageMomentum(LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID) const
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent="") const
void productIDs(std::set< std::string > &a_ids, Transporting::Particles const &a_particles, bool a_transportablesOnly) const
void modifiedMultiGroupElasticForTNSL(std::map< std::string, std::size_t > const &a_maximumTNSL_MultiGroupIndex)
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 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
int productMultiplicity(std::string const &a_productID) const
bool isDelayedFissionNeutronComplete() const
bool isFission() const
Definition GIDI.hpp:4130
void incompleteParticles(Transporting::Settings const &a_settings, std::set< std::string > &a_incompleteParticles) const
int maximumLegendreOrder(LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID) const
GUPI::Ancestry * findInAncestry3(std::string const &a_item)
Vector multiGroupAverageEnergy(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
bool areAllProductsTracked(Transporting::Particles const &a_particles) const
Vector multiGroupQ(LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, bool a_final) 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
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
void productIDs(std::set< std::string > &a_ids, Transporting::Particles const &a_particles, bool a_transportablesOnly) const
int depth() 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 modifiedMultiGroupElasticForTNSL(std::map< std::string, std::size_t > const &a_maximumTNSL_MultiGroupIndex)
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
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
void setAncestor(Ancestry *a_ancestor)
Definition GUPI.hpp:106
std::string const & moniker() const
Definition GUPI.hpp:102
Ancestry(std::string const &a_moniker, std::string const &a_attribute="")
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
Definition GIDI.hpp:32
void calculate1dMultiGroupDataInComponent(ProtareSingle const *a_protare, std::string const &a_heatedMultiGroupLabel, MultiGroupCalulationInformation const &a_multiGroupCalulationInformation, Component &a_component, Functions::XYs1d const &a_crossSection)
Form * parseProductSuite(Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs, std::string const &a_name, Styles::Suite const *a_styles)
Form * parseQSuite(Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs, std::string const &a_name, Styles::Suite const *a_styles)
Definition GUPI.hpp:20
static std::string const FissionProductENDL99125
Definition PoPI.hpp:172
static std::string const FissionProductENDL99120
Definition PoPI.hpp:171