14static LUPI_HOST void checkZeroReaction( GIDI::Vector &vector,
bool a_zeroReactions );
16 GIDI::Transporting::Particles
const &a_particles,
double a_temperature,
bool a_zeroReactions );
17static void writeVector( FILE *a_file, std::string
const &a_prefix, std::size_t a_offset,
Vector<double> const &a_vector );
32 m_URR_probabilityTables( nullptr ),
33 m_ACE_URR_probabilityTables( nullptr ) {
46 m_threshold( a_threshold ),
47 m_crossSections( a_crossSection.size( ) ),
49 m_URR_probabilityTables( nullptr ),
50 m_ACE_URR_probabilityTables( nullptr ) {
52 std::size_t index = 0;
53 for(
auto iter = a_crossSection.
begin( ); iter != a_crossSection.
end( ); ++iter, ++index ) m_crossSections[index] = *iter;
67 m_offset( a_crossSection.start( ) ),
68 m_threshold( a_threshold ),
69 m_crossSections( a_crossSection.Ys( ).size( ) ),
71 m_URR_probabilityTables( a_URR_probabilityTables ),
72 m_ACE_URR_probabilityTables( a_ACE_URR_probabilityTables ) {
74 std::size_t index = 0;
75 std::vector<double>
const &Ys = a_crossSection.
Ys( );
76 for(
auto iter = Ys.begin( ); iter != Ys.end( ); ++iter, ++index ) m_crossSections[index] = *iter;
78 if( m_URR_probabilityTables !=
nullptr ) {
79 m_URR_mode = Transporting::URR_mode::pdfs; }
80 else if( m_ACE_URR_probabilityTables !=
nullptr ) {
81 m_URR_mode = Transporting::URR_mode::ACE_URR_probabilityTables;
90 delete m_URR_probabilityTables;
91 delete m_ACE_URR_probabilityTables;
102 if( m_URR_probabilityTables !=
nullptr )
return( m_URR_probabilityTables->domainMin( ) );
103 if( m_ACE_URR_probabilityTables !=
nullptr )
return( m_ACE_URR_probabilityTables->domainMin( ) );
116 if( m_URR_probabilityTables !=
nullptr )
return( m_URR_probabilityTables->domainMax( ) );
117 if( m_ACE_URR_probabilityTables !=
nullptr )
return( m_ACE_URR_probabilityTables->domainMax( ) );
132 std::vector<double>
crossSection( energies.size( ), 0.0 );
133 for( std::size_t index = 0; index < m_crossSections.size( ); ++index )
crossSection[m_offset+index] = m_crossSections[index];
169 std::cout << a_indent <<
"# Offset = " << m_offset << std::endl;
170 std::cout << a_indent <<
"# Threshold = " << m_threshold << std::endl;
172 std::cout << a_indent <<
"# Number of cross section points = " << m_crossSections.size( ) << std::endl;
173 for(
auto iter = m_crossSections.begin( ); iter != m_crossSections.end( ); ++iter )
186 m_particleIntid( -1 ),
187 m_particleIndex( -1 ),
188 m_userParticleIndex( -1 ) {
196 m_particleIntid( a_particleIntid ),
197 m_particleIndex( a_particleIndex ),
198 m_userParticleIndex( -1 ),
211 m_gain = a_continuousEnergyGain.
gain( );
221 return( a_energy_fraction * m_gain[a_energy_index] + ( 1.0 - a_energy_fraction ) * m_gain[a_energy_index+1] );
251 LUPI_maybeUnused std::string
const &a_energyFormat, std::string
const &a_dFormat )
const {
253 std::cout << std::endl;
254 std::cout << a_indent <<
"# Particle intid = " << m_particleIntid << std::endl;
255 std::cout << a_indent <<
"# Particle index = " << m_particleIndex << std::endl;
256 std::cout << a_indent <<
"# Use particle index = " << m_userParticleIndex << std::endl;
258 std::cout << a_indent <<
"# Number of gains = " << m_gain.size( ) << std::endl;
259 for(
auto iter = m_gain.begin( ); iter != m_gain.end( ); ++iter )
269 m_temperature( 0.0 ),
272 m_totalCrossSection( ),
273 m_depositionEnergy( ),
274 m_depositionMomentum( ),
275 m_productionEnergy( ),
278 m_reactionsInURR_region( ),
279 m_reactionCrossSections( ),
280 m_ACE_URR_probabilityTables( nullptr ) {
300 std::vector<GIDI::Reaction const *>
const &a_reactions, std::vector<GIDI::Reaction const *>
const &a_orphanProducts,
bool a_fixedGrid,
301 bool a_zeroReactions ) :
302 m_temperature( a_temperatureInfo.
temperature( ).value( ) ),
305 m_totalCrossSection( ),
306 m_depositionEnergy( ),
307 m_depositionMomentum( ),
308 m_productionEnergy( ),
311 m_reactionsInURR_region( ),
312 m_reactionCrossSections( ),
313 m_ACE_URR_probabilityTables( nullptr ) {
323 std::vector<double>
const *energiesPointer;
324 std::vector<double>
const &
energies = grid.data( ).vector();
325 std::vector<double>
const &fixedGridPoints = a_settings.
fixedGridPoints( );
326 std::vector<int> fixedGridIndices( fixedGridPoints.size( ) );
328 for( std::size_t i1 = 0; i1 < fixedGridPoints.size( ); ++i1 ) {
331 energiesPointer = &fixedGridPoints;
332 m_energies = fixedGridPoints; }
338 m_hashIndices = a_domainHash.
map( m_energies );
340 std::size_t reactionIndex = 0;
342 std::vector<double> dummy;
345 m_reactionCrossSections.resize( a_reactions.size( ) );
347 for( std::vector<GIDI::Reaction const *>::const_iterator reactionIter = a_reactions.begin( ); reactionIter != a_reactions.end( ); ++reactionIter, ++reactionIndex ) {
348 GIDI::Suite const &reactionCrossSectionSuite = (*reactionIter)->crossSection( );
351 if( a_zeroReactions ) {
353 for( std::size_t index = 0; index < reactionCrossSectionZeroReactions->size( ); ++index ) reactionCrossSectionZeroReactions->set( index, 0.0 );
354 reactionCrossSection3 = reactionCrossSectionZeroReactions;
359 if( reactionCrossSectionSuite.
has( URR_label ) ) {
370 auto ACE_URR_probabilityTablesIter = (*URR_iter).second->m_ACE_URR_probabilityTables.find( (*reactionIter)->label( ) );
371 if( ACE_URR_probabilityTablesIter != (*URR_iter).second->m_ACE_URR_probabilityTables.end( ) ) {
372 ACE_URR_probabilityTables1 = (*ACE_URR_probabilityTablesIter).second;
373 (*ACE_URR_probabilityTablesIter).second =
nullptr;
382 std::size_t start = 0;
384 if(
energies[reactionCrossSection3->
start( )] > fixedGridPoints[0] ) {
387 throw std::out_of_range(
"Cross section out of range when initializing fixed grid!" );
389 start =
static_cast<std::size_t
>( intStart );
392 for( std::size_t i1 = 0; i1 < start; ++i1 ) reactionCrossSection4->
set( i1, 0.0 );
393 for( std::size_t i1 = start; i1 < fixedGridPoints.size( ); ++i1 ) {
394 std::size_t index =
static_cast<std::size_t
>( fixedGridIndices[i1] );
397 index -= reactionCrossSection3->
start( );
398 reactionCrossSection4->
set( i1, ( 1.0 - fraction ) * (*reactionCrossSection3)[index] + fraction * (*reactionCrossSection3)[index+1] );
400 reactionCrossSection3 = &fixedGridCrossSection;
404 *reactionCrossSection3, URR_probabilityTables, ACE_URR_probabilityTables1 );
407 delete reactionCrossSectionZeroReactions;
413 std::vector<std::size_t> reactions_in_URR_region;
415 for( reactionIndex = 0; reactionIndex <
numberOfReactions( ); ++reactionIndex ) {
417 reactions_in_URR_region.push_back( reactionIndex );
421 m_reactionsInURR_region.resize( reactions_in_URR_region.size( ) );
422 for( std::size_t i1 = 0; i1 < reactions_in_URR_region.size( ); ++i1 ) m_reactionsInURR_region[i1] = reactions_in_URR_region[i1];
427 auto ACE_URR_probabilityTablesIter = (*URR_iter).second->m_ACE_URR_probabilityTables.find(
"total" );
428 if( ACE_URR_probabilityTablesIter != (*URR_iter).second->m_ACE_URR_probabilityTables.end( ) ) {
429 m_ACE_URR_probabilityTables = (*ACE_URR_probabilityTablesIter).second;
430 (*ACE_URR_probabilityTablesIter).second =
nullptr;
441 m_gains.resize( a_particles.
particles( ).size( ) );
443 int projectileGainIndex = -1;
444 int photonGainIndex = -1;
445 for( std::map<std::string, GIDI::Transporting::Particle>::const_iterator particle = a_particles.
particles( ).begin( ); particle != a_particles.
particles( ).end( );
455 std::vector< std::vector<double> > gains( a_particles.
particles( ).size( ) );
456 for( std::size_t reactionIndex2 = 0; reactionIndex2 < a_reactions.size( ) + a_orphanProducts.size( ); ++reactionIndex2 ) {
459 std::vector<double> deposition_energy( m_energies.size( ), 0.0 );
460 std::vector<double> deposition_momentum( m_energies.size( ), 0.0 );
461 std::vector<double> production_energy( m_energies.size( ), 0.0 );
462 for( std::size_t i1 = 0; i1 < gains.size( ); ++i1 ) gains[i1] = std::vector<double>( m_energies.size( ), 0.0 );
469 if( reactionIndex2 < a_reactions.size( ) ) {
470 reaction = a_reactions[reactionIndex2];
473 MCGIDI_reaction_cross_section = m_reactionCrossSections[reactionIndex2];
474 offset = MCGIDI_reaction_cross_section->offset( ); }
476 reaction = a_orphanProducts[reactionIndex2-a_reactions.size( )];
477 GIDI::Suite const &reactionCrossSectionSuite = reaction->crossSection( );
482 for( std::size_t energy_index =
offset; energy_index < m_energies.size( ); ++energy_index ) {
483 double energy = m_energies[energy_index];
486 if( isPhotoAtomic ) {
487 deposition_energy[energy_index] = energy; }
489 deposition_energy[energy_index] = available_energy->
evaluate( energy );
491 double Q = deposition_energy[energy_index] - energy;
492 if( fabs( Q ) < 1e-12 * deposition_energy[energy_index] )
494 production_energy[energy_index] = Q;
496 deposition_momentum[energy_index] = available_momentum->
evaluate( energy );
500 for( std::map<std::string, GIDI::Transporting::Particle>::const_iterator particle = a_particles.
particles( ).begin( ); particle != a_particles.
particles( ).end( );
502 double product_energy, product_momentum, product_gain;
508 if( reaction->isPairProduction( ) && ( particle->first ==
PoPI::IDs::photon ) ) {
510 product_momentum = 0.0;
511 product_gain = 2.0; }
513 reaction->continuousEnergyProductData( a_settings, particle->first, energy, product_energy, product_momentum,
514 product_gain,
true );
516 if( (
int) i1 == projectileGainIndex ) --product_gain;
518 deposition_energy[energy_index] -= product_energy;
519 deposition_momentum[energy_index] -= product_momentum;
520 gains[i1][energy_index] = product_gain;
525 if( isPhotoAtomic ) {
526 for( std::size_t energyIndex =
offset; energyIndex < m_energies.size( ); ++energyIndex ) {
527 deposition_energy[energyIndex] = m_energies[energyIndex];
531 for( std::size_t energyIndex =
offset; energyIndex < m_energies.size( ); ++energyIndex ) {
532 double Q = deposition_energy[energyIndex] - m_energies[energyIndex];
533 if( fabs( Q ) < 1e-12 * deposition_energy[energyIndex] )
535 production_energy[energyIndex] = Q;
542 for( std::map<std::string, GIDI::Transporting::Particle>::const_iterator particle = a_particles.
particles( ).begin( );
543 particle != a_particles.
particles( ).end( ); ++particle, ++i1 ) {
548 if( reaction->isPairProduction( ) && ( particle->first ==
PoPI::IDs::photon ) ) {
549 for( std::size_t energyIndex =
offset; energyIndex < m_energies.size( ); ++energyIndex ) {
551 gains[i1][energyIndex] = 2.0;
554 reaction->mapContinuousEnergyProductData( a_settings, particle->first, *energiesPointer,
offset, deposition_energy,
555 deposition_momentum, gains[i1],
true );
558 if( (
int) i1 == projectileGainIndex ) {
559 for( std::size_t energyIndex =
offset; energyIndex < m_energies.size( ); ++energyIndex ) --gains[i1][energyIndex];
567 if( intInitialStateIndex >= 0 ) {
568 std::size_t initialStateIndex =
static_cast<std::size_t
>( intInitialStateIndex );
570 double multiplicity = nuclideGammaBranchStateInfo->
multiplicity( );
573 for( std::size_t energyIndex =
offset; energyIndex < m_energies.size( ); ++energyIndex ) {
574 deposition_energy[energyIndex] -= averageGammaEnergy;
575 if( photonGainIndex >= 0 ) gains[
static_cast<std::size_t
>(photonGainIndex)][energyIndex] += multiplicity;
582 for( std::size_t energyIndex =
offset; energyIndex < m_energies.size( ); ++energyIndex ) {
589 m_depositionEnergy[energyIndex] +=
crossSection * deposition_energy[energyIndex];
590 m_depositionMomentum[energyIndex] +=
crossSection * deposition_momentum[energyIndex];
591 m_productionEnergy[energyIndex] +=
crossSection * production_energy[energyIndex];
592 for( std::size_t i1 = 0; i1 < m_gains.size( ); ++i1 ) {
593 m_gains[i1]->adjustGain( energyIndex,
crossSection * gains[i1][energyIndex] );
605 for(
auto iter = m_reactionCrossSections.begin( ); iter < m_reactionCrossSections.end( ); ++iter )
delete *iter;
606 for(
auto iter = m_gains.begin( ); iter < m_gains.end( ); ++iter )
delete *iter;
607 delete m_ACE_URR_probabilityTables;
650 if( m_ACE_URR_probabilityTables !=
nullptr )
return( m_ACE_URR_probabilityTables->domainMin( ) );
652 for( std::size_t i1 = 0; i1 < m_reactionCrossSections.size( ); ++i1 ) {
669 if( m_ACE_URR_probabilityTables !=
nullptr )
return( m_ACE_URR_probabilityTables->domainMax( ) );
671 for( std::size_t i1 = 0; i1 < m_reactionCrossSections.size( ); ++i1 ) {
683 std::size_t a_hashIndex,
double a_energy,
LUPI_maybeUnused bool a_sampling )
const {
685 double energy_fraction;
686 std::size_t energy_index =
evaluationInfo( a_hashIndex, a_energy, &energy_fraction );
688 if( a_URR_index >= 0 ) {
689 URR_protareInfo const &URR_protare_info = a_URR_protareInfos[
static_cast<std::size_t
>(a_URR_index)];
691 if( URR_protare_info.
m_inURR ) {
692 double cross_section = 0.0;
693 for( std::size_t i1 = 0; i1 < m_reactionsInURR_region.size( ); ++i1 ) {
694 cross_section +=
reactionCrossSection2( m_reactionsInURR_region[i1], a_URR_protareInfos, a_URR_index, a_energy,
695 energy_index, energy_fraction,
false );
697 return( cross_section );
701 return( energy_fraction * m_totalCrossSection[energy_index] + ( 1.0 - energy_fraction ) * m_totalCrossSection[energy_index+1] );
707 int a_URR_index, std::size_t a_hashIndex,
double a_energy,
LUPI_maybeUnused bool a_sampling )
const {
709 double energyFraction;
711 std::size_t energyIndex =
evaluationInfo( a_hashIndex, a_energy, &energyFraction );
712 return(
reactionCrossSection2( a_reactionIndex, a_URR_protareInfos, a_URR_index, a_energy, energyIndex, energyFraction ) );
718 int a_URR_index,
double a_energy, std::size_t a_energyIndex,
double a_energyFraction,
LUPI_maybeUnused bool a_sampling )
const {
721 double URR_cross_section_factor = 1.0;
723 if( a_URR_index >= 0 ) {
724 URR_protareInfo const &URR_protare_info = a_URR_protareInfos[
static_cast<std::size_t
>(a_URR_index)];
725 if( URR_protare_info.
m_inURR ) {
727 if( reaction.URR_probabilityTables( ) !=
nullptr )
728 URR_cross_section_factor = reaction.URR_probabilityTables( )->sample( a_energy, URR_protare_info.
m_rng_Value, []() ->
double { return 0.0; } ); }
730 if( reaction._ACE_URR_probabilityTables( ) !=
nullptr )
731 URR_cross_section_factor = reaction._ACE_URR_probabilityTables( )->sample( a_energy, URR_protare_info.
m_rng_Value );
736 return( URR_cross_section_factor * ( a_energyFraction * reaction.crossSection( a_energyIndex ) + ( 1.0 - a_energyFraction ) * reaction.crossSection( a_energyIndex + 1 ) ) );
743 URR_protareInfos const &a_URR_protareInfos,
int a_URR_index,
double a_energy_in )
const {
746 std::size_t energyIndex =
static_cast<std::size_t
>( intEnergyIndex );
747 double energyFraction;
749 if( intEnergyIndex < 0 ) {
750 if( intEnergyIndex == -1 ) {
751 energyIndex = m_energies.size( ) - 2;
752 energyFraction = 0.0; }
755 energyFraction = 1.0;
758 energyFraction = ( m_energies[energyIndex+1] - a_energy_in ) / ( m_energies[energyIndex+1] - m_energies[energyIndex] );
761 return(
reactionCrossSection2( a_reactionIndex, a_URR_protareInfos, a_URR_index, a_energy_in, energyIndex, energyFraction,
false ) );
801 double energy_fraction;
802 std::size_t energy_index =
evaluationInfo( a_hashIndex, a_energy, &energy_fraction );
804 return( energy_fraction * m_depositionEnergy[energy_index] + ( 1.0 - energy_fraction ) * m_depositionEnergy[energy_index+1] );
817 double energy_fraction;
818 std::size_t energy_index =
evaluationInfo( a_hashIndex, a_energy, &energy_fraction );
820 return( energy_fraction * m_depositionMomentum[energy_index] + ( 1.0 - energy_fraction ) * m_depositionMomentum[energy_index+1] );
833 double energy_fraction;
834 std::size_t energy_index =
evaluationInfo( a_hashIndex, a_energy, &energy_fraction );
836 return( energy_fraction * m_productionEnergy[energy_index] + ( 1.0 - energy_fraction ) * m_productionEnergy[energy_index+1] );
849 double energy_fraction;
850 std::size_t energy_index =
evaluationInfo( a_hashIndex, a_energy, &energy_fraction );
852 for( std::size_t i1 = 0; i1 < m_gains.size( ); ++i1 ) {
853 if( a_particleIndex == m_gains[i1]->particleIndex( ) )
return( m_gains[i1]->
gain( energy_index, energy_fraction ) );
869 double energy_fraction;
870 std::size_t energy_index =
evaluationInfo( a_hashIndex, a_energy, &energy_fraction );
872 for( std::size_t i1 = 0; i1 < m_gains.size( ); ++i1 ) {
873 if( a_particleIntid == m_gains[i1]->particleIntid( ) )
return( m_gains[i1]->
gain( energy_index, energy_fraction ) );
888 for(
auto iter = m_gains.begin( ); iter != m_gains.end( ); ++iter ) (*iter)->setUserParticleIndex( a_particleIndex, a_userParticleIndex );
900 for(
auto iter = m_gains.begin( ); iter != m_gains.end( ); ++iter ) (*iter)->setUserParticleIndexViaIntid( a_particleIntid, a_userParticleIndex );
924 std::size_t vectorSize = m_reactionCrossSections.size( );
925 int vectorSizeInt = (int) vectorSize;
927 vectorSize = (std::size_t) vectorSizeInt;
931 for( std::size_t memberIndex = 0; memberIndex < vectorSize; ++memberIndex ) {
943 m_reactionCrossSections[memberIndex]->serialize( a_buffer, a_mode );
946 vectorSize = m_gains.size( );
947 vectorSizeInt = (int) vectorSize;
949 vectorSize = (std::size_t) vectorSizeInt;
952 for( std::size_t memberIndex = 0; memberIndex < vectorSize; ++memberIndex ) {
965 m_gains[memberIndex]->serialize( a_buffer, a_mode );
980 std::string
const &a_iFormat, std::string
const &a_energyFormat, std::string
const &a_dFormat )
const {
982 char const *dFormat = a_dFormat.c_str( );
983 std::string indent2 = a_indent +
" ";
984 std::string lineFormat = indent2 + a_energyFormat +
" " + a_dFormat +
" " + a_dFormat +
" " + a_dFormat +
" " + a_dFormat;
986 std::cout << std::endl;
989 std::cout << a_indent <<
"# Number of hash indices = " << m_hashIndices.size( ) << std::endl;
990 for(
auto iter = m_hashIndices.begin( ); iter != m_hashIndices.end( ); ++iter )
992 std::cout << std::endl;
993 std::size_t energySize = m_energies.size( );
994 std::cout << a_indent <<
"# Number of energies = " << m_energies.size( ) << std::endl;
995 std::cout <<
"# projectile total deposition deposition production" << std::endl;
996 std::cout <<
"# energy cross section energy momentum energy"<< std::endl;
997 std::cout <<
"#====================================================================================================="<< std::endl;
998 for( std::size_t index = 0; index != energySize; ++index ) {
1000 m_depositionMomentum[index], m_productionEnergy[index] ) << std::endl;
1003 for(
auto iter = m_gains.begin( ); iter != m_gains.end( ); ++iter ) (*iter)->print( a_protareSingle, a_indent, a_iFormat, a_energyFormat, a_dFormat );
1005 std::cout << std::endl;
1006 std::cout <<
"# URR mode is ";
1008 std::cout <<
"none" << std::endl; }
1010 std::cout <<
"pdfs" << std::endl; }
1012 std::cout <<
"ACE style protability tables" << std::endl; }
1014 std::cout <<
"Oops, need to code into print method." << std::endl;
1017 std::cout << a_indent <<
"# Index of reactions in URR region:";
1018 for(
auto reactionIter = m_reactionsInURR_region.begin( ); reactionIter != m_reactionsInURR_region.end( ); ++reactionIter ) {
1021 std::cout << std::endl;
1023 std::size_t reactionIndex = 0;
1024 std::cout << std::endl;
1025 std::cout << a_indent <<
"# Number of reactions = " << m_reactionCrossSections.size( ) << std::endl;
1026 for(
auto iter = m_reactionCrossSections.begin( ); iter != m_reactionCrossSections.end( ); ++iter, ++reactionIndex ) {
1029 std::cout << a_indent <<
"# Reaction number " << reactionIndex << std::endl;
1030 std::cout << a_indent <<
"# Reaction label: " << reaction->label( ).c_str( ) << std::endl;
1031 (*iter)->print( a_protareSingle, a_indent, a_iFormat, a_energyFormat, a_dFormat );
1043 m_heatedCrossSections( ) {
1061 m_heatedCrossSections.clear( );
1082 std::vector<GIDI::Reaction const *>
const &a_orphanProducts,
bool a_fixedGrid,
bool a_zeroReactions ) {
1084 m_temperatures.reserve( a_temperatureInfos.size( ) );
1085 m_heatedCrossSections.reserve( a_temperatureInfos.size( ) );
1087 for( GIDI::Styles::TemperatureInfos::const_iterator iter = a_temperatureInfos.begin( ); iter != a_temperatureInfos.end( ); ++iter ) {
1088 m_temperatures.push_back( iter->temperature( ).value( ) );
1090 a_reactions, a_orphanProducts, a_fixedGrid, a_zeroReactions ) );
1093 m_thresholds.resize( m_heatedCrossSections[0]->numberOfReactions( ) );
1094 for( std::size_t i1 = 0; i1 < m_heatedCrossSections[0]->numberOfReactions( ); ++i1 ) m_thresholds[i1] = m_heatedCrossSections[0]->
threshold( i1 );
1109 std::size_t a_hashIndex,
double a_temperature,
double a_energy,
bool a_sampling )
const {
1111 double cross_section;
1113 if( a_temperature <= m_temperatures[0] ) {
1114 cross_section = m_heatedCrossSections[0]->crossSection( a_URR_protareInfos, a_URR_index, a_hashIndex, a_energy, a_sampling ); }
1115 else if( a_temperature >= m_temperatures.back( ) ) {
1116 cross_section = m_heatedCrossSections.back( )->crossSection( a_URR_protareInfos, a_URR_index, a_hashIndex, a_energy, a_sampling ); }
1119 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
1120 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
1121 cross_section = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
crossSection( a_URR_protareInfos, a_URR_index, a_hashIndex, a_energy, a_sampling )
1122 + fraction * m_heatedCrossSections[i1]->crossSection( a_URR_protareInfos, a_URR_index, a_hashIndex, a_energy, a_sampling );
1125 return( cross_section );
1139 std::size_t a_numberAllocated,
double *a_crossSectionVector )
const {
1141 std::size_t index1 = 0, index2 = 0;
1142 double fraction = 0.0;
1144 if( a_temperature <= m_temperatures[0] ) {
1146 else if( a_temperature >= m_temperatures.back( ) ) {
1147 index1 = index2 = m_temperatures.size( ) - 1;
1150 for( ; index2 < m_temperatures.size( ); ++index2 )
if( a_temperature < m_temperatures[index2] )
break;
1151 index1 = index2 - 1;
1152 fraction = ( a_temperature - m_temperatures[index1] ) / ( m_temperatures[index2] - m_temperatures[index1] );
1155 Vector<MCGIDI_FLOAT> &totalCrossSection1 = m_heatedCrossSections[index1]->totalCrossSection( );
1156 Vector<MCGIDI_FLOAT> &totalCrossSection2 = m_heatedCrossSections[index2]->totalCrossSection( );
1157 std::size_t size = totalCrossSection1.
size( );
1158 double factor1 = a_userFactor * ( 1.0 - fraction ), factor2 = a_userFactor * fraction;
1160 if( a_numberAllocated < totalCrossSection1.
size( ) )
LUPI_THROW(
"HeatedCrossSectionsContinuousEnergy::crossSectionVector: a_numberAllocated too small." );
1161 for( std::size_t i1 = 0; i1 < size; ++i1 ) {
1162 a_crossSectionVector[i1] += factor1 * totalCrossSection1[i1] + factor2 * totalCrossSection2[i1];
1178 if( a_temperature <= m_temperatures[0] ) {
1179 crossSection1 = m_heatedCrossSections[0]->crossSectionAsGIDI_XYs1d( ); }
1180 else if( a_temperature >= m_temperatures.back( ) ) {
1181 crossSection1 = m_heatedCrossSections.back( )->crossSectionAsGIDI_XYs1d( ); }
1184 for( ; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
1185 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
1186 crossSection1 = m_heatedCrossSections[i1-1]->crossSectionAsGIDI_XYs1d( );
1187 crossSection1 *= ( 1. - fraction );
1189 crossSection2 *= fraction;
1190 crossSection1 += crossSection2;
1193 return( crossSection1 );
1206 double a_temperature )
const {
1210 if( a_temperature <= m_temperatures[0] ) {
1211 crossSection1 = m_heatedCrossSections[0]->reactionCrossSectionAsGIDI_XYs1d( a_reactionIndex ); }
1212 else if( a_temperature >= m_temperatures.back( ) ) {
1213 crossSection1 = m_heatedCrossSections.back( )->reactionCrossSectionAsGIDI_XYs1d( a_reactionIndex ); }
1216 for( ; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
1217 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
1218 crossSection1 = m_heatedCrossSections[i1-1]->reactionCrossSectionAsGIDI_XYs1d( a_reactionIndex );
1219 crossSection1 *= ( 1. - fraction );
1221 crossSection2 *= fraction;
1222 crossSection1 += crossSection2;
1225 return( crossSection1 );
1232 std::size_t a_hashIndex,
double a_temperature,
double a_energy,
bool a_sampling )
const {
1234 double cross_section;
1236 if( a_temperature <= m_temperatures[0] ) {
1237 cross_section = m_heatedCrossSections[0]->reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_URR_index, a_hashIndex, a_energy, a_sampling ); }
1238 else if( a_temperature >= m_temperatures.back( ) ) {
1239 cross_section = m_heatedCrossSections.back( )->reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_URR_index, a_hashIndex, a_energy, a_sampling ); }
1242 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
1243 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
1244 cross_section = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_URR_index, a_hashIndex, a_energy, a_sampling )
1245 + fraction * m_heatedCrossSections[i1]->reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_URR_index, a_hashIndex, a_energy, a_sampling );
1248 return( cross_section );
1255 double a_temperature,
double a_energy_in )
const {
1257 double cross_section;
1259 if( a_temperature <= m_temperatures[0] ) {
1260 cross_section = m_heatedCrossSections[0]->reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_URR_index, a_energy_in ); }
1261 else if( a_temperature >= m_temperatures.back( ) ) {
1262 cross_section = m_heatedCrossSections.back( )->reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_URR_index, a_energy_in ); }
1265 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
1266 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
1267 cross_section = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_URR_index, a_energy_in )
1268 + fraction * m_heatedCrossSections[i1]->reactionCrossSection( a_reactionIndex, a_URR_protareInfos, a_URR_index, a_energy_in );
1271 return( cross_section );
1284 double deposition_energy;
1286 if( a_temperature <= m_temperatures[0] ) {
1287 deposition_energy = m_heatedCrossSections[0]->depositionEnergy( a_hashIndex, a_energy ); }
1288 else if( a_temperature >= m_temperatures.back( ) ) {
1289 deposition_energy = m_heatedCrossSections.back( )->depositionEnergy( a_hashIndex, a_energy ); }
1292 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
1293 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
1294 deposition_energy = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
depositionEnergy( a_hashIndex, a_energy )
1295 + fraction * m_heatedCrossSections[i1]->depositionEnergy( a_hashIndex, a_energy );
1298 return( deposition_energy );
1311 double deposition_momentum;
1313 if( a_temperature <= m_temperatures[0] ) {
1314 deposition_momentum = m_heatedCrossSections[0]->depositionMomentum( a_hashIndex, a_energy ); }
1315 else if( a_temperature >= m_temperatures.back( ) ) {
1316 deposition_momentum = m_heatedCrossSections.back( )->depositionMomentum( a_hashIndex, a_energy ); }
1319 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
1320 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
1321 deposition_momentum = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
depositionMomentum( a_hashIndex, a_energy )
1322 + fraction * m_heatedCrossSections[i1]->depositionMomentum( a_hashIndex, a_energy );
1325 return( deposition_momentum );
1338 double production_energy;
1340 if( a_temperature <= m_temperatures[0] ) {
1341 production_energy = m_heatedCrossSections[0]->productionEnergy( a_hashIndex, a_energy ); }
1342 else if( a_temperature >= m_temperatures.back( ) ) {
1343 production_energy = m_heatedCrossSections.back( )->productionEnergy( a_hashIndex, a_energy ); }
1346 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
1347 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
1348 production_energy = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
productionEnergy( a_hashIndex, a_energy )
1349 + fraction * m_heatedCrossSections[i1]->productionEnergy( a_hashIndex, a_energy );
1352 return( production_energy );
1365 double a_energy,
int a_particleIndex )
const {
1367 double production_energy;
1369 if( a_temperature <= m_temperatures[0] ) {
1370 production_energy = m_heatedCrossSections[0]->gain( a_hashIndex, a_energy, a_particleIndex ); }
1371 else if( a_temperature >= m_temperatures.back( ) ) {
1372 production_energy = m_heatedCrossSections.back( )->gain( a_hashIndex, a_energy, a_particleIndex ); }
1375 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
1376 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
1377 production_energy = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
gain( a_hashIndex, a_energy, a_particleIndex )
1378 + fraction * m_heatedCrossSections[i1]->gain( a_hashIndex, a_energy, a_particleIndex );
1381 return( production_energy );
1394 double a_energy,
int a_particleIntid )
const {
1396 double production_energy;
1398 if( a_temperature <= m_temperatures[0] ) {
1399 production_energy = m_heatedCrossSections[0]->gainViaIntid( a_hashIndex, a_energy, a_particleIntid ); }
1400 else if( a_temperature >= m_temperatures.back( ) ) {
1401 production_energy = m_heatedCrossSections.back( )->gainViaIntid( a_hashIndex, a_energy, a_particleIntid ); }
1404 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
1405 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
1406 production_energy = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
gainViaIntid( a_hashIndex, a_energy, a_particleIntid )
1407 + fraction * m_heatedCrossSections[i1]->gainViaIntid( a_hashIndex, a_energy, a_particleIntid );
1410 return( production_energy );
1422 for(
auto iter = m_heatedCrossSections.begin( ); iter != m_heatedCrossSections.end( ); ++iter ) (*iter)->setUserParticleIndex( a_particleIndex, a_userParticleIndex );
1434 for(
auto iter = m_heatedCrossSections.begin( ); iter != m_heatedCrossSections.end( ); ++iter ) (*iter)->setUserParticleIndexViaIntid( a_particleIntid, a_userParticleIndex );
1450 std::size_t vectorSize = m_heatedCrossSections.size( );
1451 int vectorSizeInt = (int) vectorSize;
1453 vectorSize = (std::size_t) vectorSizeInt;
1457 for( std::size_t memberIndex = 0; memberIndex < vectorSize; ++memberIndex ) {
1469 m_heatedCrossSections[memberIndex]->serialize( a_buffer, a_mode );
1484 std::string
const &a_iFormat, std::string
const &a_energyFormat, std::string
const &a_dFormat )
const {
1486 std::cout <<
"Temperatures present:" << std::endl;
1487 for(
auto temperatureIter = m_temperatures.begin( ); temperatureIter != m_temperatures.end( ); ++temperatureIter ) {
1490 std::cout <<
"Reaction thresholds:" << std::endl;
1491 for(
auto reactionIter = m_thresholds.begin( ); reactionIter != m_thresholds.end( ); ++reactionIter ) {
1495 (*heatedCrossSections)->print( a_protareSingle, a_indent, a_iFormat, a_energyFormat, a_dFormat );
1507 m_particleIntid( -1 ),
1508 m_particleIndex( -1 ),
1509 m_userParticleIndex( -1 ) {
1517 m_particleIntid( a_particleIntid ),
1518 m_particleIndex( a_particleIndex ),
1519 m_userParticleIndex( -1 ),
1533 m_gain = a_multiGroupGain.
gain( );
1562 std::string buffer =
LUPI::Misc::argumentsToString(
"Gain for particle %d (%d, %d)", m_particleIntid, m_particleIndex, m_userParticleIndex );
1563 writeVector( a_file, buffer, 0, m_gain );
1578 std::size_t a_offset, std::vector<double>
const &a_crossSection,
double a_threshold ) :
1579 m_threshold( a_threshold ),
1580 m_offset( a_offset ),
1581 m_crossSections( a_crossSection ),
1582 m_augmentedThresholdCrossSection( 0.0 ) {
1586 if( ( a_offset > 0 ) && ( boundaries[a_offset] < a_threshold ) ) {
1587 if( ( boundaries[a_offset] < a_threshold ) && ( a_threshold < boundaries[a_offset+1] ) ) {
1588 m_augmentedThresholdCrossSection = m_crossSections[0] * ( boundaries[a_offset+1] + a_threshold - 2.0 * boundaries[a_offset] ) / ( boundaries[a_offset+1] - a_threshold ); }
1590 m_crossSections[0] = 0.0;
1621 writeVector( a_file, buffer, m_offset, m_crossSections );
1639 m_totalCrossSection( ),
1640 m_augmentedCrossSection( ),
1641 m_reactionCrossSections( ) {
1651 std::vector<double> dummy;
1655 m_reactionCrossSections.reserve( a_reactions.size( ) );
1660 for( std::vector<GIDI::Reaction const *>::const_iterator reactionIter = a_reactions.begin( ); reactionIter != a_reactions.end( ); ++reactionIter, ++index ) {
1661 GIDI::Vector crossSectionVector = (*reactionIter)->multiGroupCrossSection( a_smr, MG_settings, a_temperatureInfo );
1663 vector = GIDI::collapse( crossSectionVector, a_settings, a_particles, 0.0 );
1665 std::size_t start = 0;
1666 for( ; start < vector.size( ); ++start ) {
1667 if( vector[start] != 0.0 ) break;
1669 checkZeroReaction( vector, a_zeroReactions );
1670 std::vector<double> data;
1671 for( std::size_t i1 = start; i1 < vector.size( ); ++i1 ) data.push_back( vector[i1] );
1674 (*reactionIter)->crossSectionThreshold( ) ) );
1679 m_totalCrossSection = totalCrossSection.data( );
1681 m_augmentedCrossSection.
resize( totalCrossSection.size( ) );
1682 for( std::size_t i1 = 0; i1 < m_augmentedCrossSection.size( ); ++i1 ) m_augmentedCrossSection[i1] = 0;
1683 for( std::size_t i1 = 0; i1 < m_reactionCrossSections.size( ); ++i1 )
1684 m_augmentedCrossSection[m_reactionCrossSections[i1]->offset( )] += m_reactionCrossSections[i1]->augmentedThresholdCrossSection( );
1687 vector = a_protare.
multiGroupDepositionEnergy( a_smr, multi_group_settings, a_temperatureInfo, a_particles, a_reactionsToExclude );
1688 vector = collapseAndcheckZeroReaction( vector, a_settings, a_particles, 0.0, a_zeroReactions );
1692 vector = collapseAndcheckZeroReaction( vector, a_settings, a_particles, 0.0, a_zeroReactions );
1695 vector = a_protare.
multiGroupQ( a_smr, multi_group_settings, a_temperatureInfo,
true,
true, a_reactionsToExclude );
1696 vector = collapseAndcheckZeroReaction( vector, a_settings, a_particles, 0.0, a_zeroReactions );
1699 std::map<std::string, GIDI::Transporting::Particle> particles = a_particles.
particles( );
1700 m_gains.resize( particles.size( ) );
1702 for( std::map<std::string, GIDI::Transporting::Particle>::const_iterator particle = particles.begin( ); particle != particles.end( ); ++particle, ++i1 ) {
1706 vector = a_protare.
multiGroupGain( a_smr, multi_group_settings, a_temperatureInfo, particle->first, a_reactionsToExclude );
1707 vector = collapseAndcheckZeroReaction( vector, a_settings, a_particles, 0.0, a_zeroReactions );
1708 m_gains[i1] =
new MultiGroupGain( particleIntid, particleIndex, vector );
1717 for(
auto iter = m_reactionCrossSections.begin( ); iter < m_reactionCrossSections.end( ); ++iter )
delete *iter;
1718 for(
auto iter = m_gains.begin( ); iter < m_gains.end( ); ++iter )
delete *iter;
1732 double crossSection2 = m_totalCrossSection[a_hashIndex];
1734 if( a_sampling ) crossSection2 += m_augmentedCrossSection[a_hashIndex];
1736 return( crossSection2 );
1750 for( std::size_t i1 = 0; i1 < m_gains.size( ); ++i1 ) {
1751 if( a_particleIndex == m_gains[i1]->particleIndex( ) )
return( m_gains[i1]->
gain( a_hashIndex ) );
1768 for( std::size_t i1 = 0; i1 < m_gains.size( ); ++i1 ) {
1769 if( a_particleIntid == m_gains[i1]->particleIntid( ) )
return( m_gains[i1]->
gain( a_hashIndex ) );
1784 for(
auto iter = m_gains.begin( ); iter != m_gains.end( ); ++iter ) (*iter)->setUserParticleIndex( a_particleIndex, a_userParticleIndex );
1796 for(
auto iter = m_gains.begin( ); iter != m_gains.end( ); ++iter ) (*iter)->setUserParticleIndexViaIntid( a_particleIntid, a_userParticleIndex );
1815 std::size_t vectorSize = m_reactionCrossSections.size( );
1816 int vectorSizeInt = (int) vectorSize;
1818 vectorSize = (std::size_t) vectorSizeInt;
1822 for( std::size_t memberIndex = 0; memberIndex < vectorSize; ++memberIndex ) {
1834 m_reactionCrossSections[memberIndex]->serialize( a_buffer, a_mode );
1837 vectorSize = m_gains.size( );
1838 vectorSizeInt = (int) vectorSize;
1840 vectorSize = (std::size_t) vectorSizeInt;
1843 for( std::size_t memberIndex = 0; memberIndex < vectorSize; ++memberIndex ) {
1855 m_gains[memberIndex]->serialize( a_buffer, a_mode );
1867 writeVector( a_file,
"Total cross section", 0, m_totalCrossSection );
1868 writeVector( a_file,
"Augmented cross section", 0, m_augmentedCrossSection );
1869 writeVector( a_file,
"Deposition energy", 0, m_depositionEnergy );
1870 writeVector( a_file,
"Deposition momentum", 0, m_depositionMomentum );
1871 writeVector( a_file,
"Production energy", 0, m_productionEnergy );
1873 for(
auto iter = m_gains.begin( ); iter != m_gains.end( ); ++iter ) (*iter)->write( a_file );
1874 std::size_t reactionIndex = 0;
1876 (*iter)->write( a_file, reactionIndex );
1919 LUPI_maybeUnused std::vector<GIDI::Reaction const *>
const &a_orphanProducts,
bool a_zeroReactions,
1922 m_temperatures.reserve( a_temperatureInfos.size( ) );
1923 m_heatedCrossSections.reserve( a_temperatureInfos.size( ) );
1925 for( GIDI::Styles::TemperatureInfos::const_iterator iter = a_temperatureInfos.begin( ); iter != a_temperatureInfos.end( ); ++iter ) {
1926 m_temperatures.push_back( iter->temperature( ).value( ) );
1928 a_reactions, iter->heatedMultiGroup( ), a_zeroReactions, a_reactionsToExclude ) );
1931 m_thresholds.resize( m_heatedCrossSections[0]->numberOfReactions( ) );
1932 for( std::size_t i1 = 0; i1 < m_heatedCrossSections[0]->numberOfReactions( ); ++i1 ) m_thresholds[i1] = m_heatedCrossSections[0]->
threshold( i1 );
1934 m_multiGroupThresholdIndex.resize( m_heatedCrossSections[0]->numberOfReactions( ) );
1935 for( std::size_t i1 = 0; i1 < m_heatedCrossSections[0]->numberOfReactions( ); ++i1 ) {
1936 m_multiGroupThresholdIndex[i1] = -1;
1937 if( m_thresholds[i1] > 0 ) m_multiGroupThresholdIndex[i1] =
static_cast<int>( m_heatedCrossSections[0]->thresholdOffset( i1 ) );
1953 double cross_section;
1955 if( a_temperature <= m_temperatures[0] ) {
1956 cross_section = m_heatedCrossSections[0]->crossSection( a_hashIndex, a_sampling ); }
1957 else if( a_temperature >= m_temperatures.back( ) ) {
1958 cross_section = m_heatedCrossSections.back( )->crossSection( a_hashIndex, a_sampling ); }
1961 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
1962 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
1964 cross_section = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
crossSection( a_hashIndex, a_sampling )
1965 + fraction * m_heatedCrossSections[i1]->crossSection( a_hashIndex, a_sampling );
1968 return( cross_section );
1981 std::size_t a_numberAllocated,
double *a_crossSectionVector )
const {
1983 std::size_t index1 = 0, index2 = 0;
1984 double fraction = 0.0;
1986 if( a_temperature <= m_temperatures[0] ) {
1988 else if( a_temperature >= m_temperatures.back( ) ) {
1989 index1 = index2 = m_temperatures.size( ) - 1;
1992 for( ; index2 < m_temperatures.size( ); ++index2 )
if( a_temperature < m_temperatures[index2] )
break;
1993 index1 = index2 - 1;
1994 fraction = ( a_temperature - m_temperatures[index1] ) / ( m_temperatures[index2] - m_temperatures[index1] );
1997 Vector<double> &totalCrossSection1 = m_heatedCrossSections[index1]->totalCrossSection( );
1998 Vector<double> &totalCrossSection2 = m_heatedCrossSections[index2]->totalCrossSection( );
1999 std::size_t size = totalCrossSection1.
size( );
2000 double factor1 = a_userFactor * ( 1.0 - fraction ), factor2 = a_userFactor * fraction;
2002 if( a_numberAllocated < totalCrossSection1.
size( ) )
LUPI_THROW(
"HeatedCrossSectionsMultiGroup::crossSectionVector: a_numberAllocated too small." );
2003 for( std::size_t i1 = 0; i1 < size; ++i1 ) {
2004 a_crossSectionVector[i1] += factor1 * totalCrossSection1[i1] + factor2 * totalCrossSection2[i1];
2019 double cross_section;
2021 if( a_temperature <= m_temperatures[0] ) {
2022 cross_section = m_heatedCrossSections[0]->reactionCrossSection( a_reactionIndex, a_hashIndex, a_sampling ); }
2023 else if( a_temperature >= m_temperatures.back( ) ) {
2024 cross_section = m_heatedCrossSections.back( )->reactionCrossSection( a_reactionIndex, a_hashIndex, a_sampling ); }
2027 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
2028 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
2029 cross_section = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
reactionCrossSection( a_reactionIndex, a_hashIndex, a_sampling )
2030 + fraction * m_heatedCrossSections[i1]->reactionCrossSection( a_reactionIndex, a_hashIndex, a_sampling );
2033 return( cross_section );
2046 int intEnergyIndex =
binarySearchVector( a_energy_in, m_projectileMultiGroupBoundariesCollapsed );
2047 std::size_t energyIndex =
static_cast<std::size_t
>( intEnergyIndex );
2049 if( intEnergyIndex == -2 ) {
2052 energyIndex = m_projectileMultiGroupBoundariesCollapsed.size( ) - 2;
2070 double deposition_energy;
2072 if( a_temperature <= m_temperatures[0] ) {
2073 deposition_energy = m_heatedCrossSections[0]->depositionEnergy( a_hashIndex ); }
2074 else if( a_temperature >= m_temperatures.back( ) ) {
2075 deposition_energy = m_heatedCrossSections.back( )->depositionEnergy( a_hashIndex ); }
2078 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
2079 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
2080 deposition_energy = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
depositionEnergy( a_hashIndex )
2081 + fraction * m_heatedCrossSections[i1]->depositionEnergy( a_hashIndex );
2084 return( deposition_energy );
2098 double deposition_momentum;
2100 if( a_temperature <= m_temperatures[0] ) {
2101 deposition_momentum = m_heatedCrossSections[0]->depositionMomentum( a_hashIndex ); }
2102 else if( a_temperature >= m_temperatures.back( ) ) {
2103 deposition_momentum = m_heatedCrossSections.back( )->depositionMomentum( a_hashIndex ); }
2106 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
2107 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
2108 deposition_momentum = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
depositionMomentum( a_hashIndex )
2109 + fraction * m_heatedCrossSections[i1]->depositionMomentum( a_hashIndex );
2112 return( deposition_momentum );
2126 double production_energy;
2128 if( a_temperature <= m_temperatures[0] ) {
2129 production_energy = m_heatedCrossSections[0]->productionEnergy( a_hashIndex ); }
2130 else if( a_temperature >= m_temperatures.back( ) ) {
2131 production_energy = m_heatedCrossSections.back( )->productionEnergy( a_hashIndex ); }
2134 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
2135 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
2137 production_energy = ( 1. - fraction ) * m_heatedCrossSections[i1-1]->
productionEnergy( a_hashIndex )
2138 + fraction * m_heatedCrossSections[i1]->productionEnergy( a_hashIndex );
2141 return( production_energy );
2156 if( a_temperature <= m_temperatures[0] ) {
2157 return( m_heatedCrossSections[0]->
gain( a_hashIndex, a_particleIndex ) ); }
2158 else if( a_temperature >= m_temperatures.back( ) ) {
2159 return( m_heatedCrossSections.back( )->gain( a_hashIndex, a_particleIndex ) );
2163 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
2164 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
2166 double gain1 = m_heatedCrossSections[i1-1]->gain( a_hashIndex, a_particleIndex );
2167 double gain2 = m_heatedCrossSections[i1]->gain( a_hashIndex, a_particleIndex );
2169 return( ( 1. - fraction ) * gain1 + fraction * gain2 );
2184 if( a_temperature <= m_temperatures[0] ) {
2185 return( m_heatedCrossSections[0]->
gainViaIntid( a_hashIndex, a_particleIntid ) ); }
2186 else if( a_temperature >= m_temperatures.back( ) ) {
2187 return( m_heatedCrossSections.back( )->gainViaIntid( a_hashIndex, a_particleIntid ) );
2191 for( i1 = 0; i1 < m_temperatures.size( ); ++i1 )
if( a_temperature < m_temperatures[i1] )
break;
2192 double fraction = ( a_temperature - m_temperatures[i1-1] ) / ( m_temperatures[i1] - m_temperatures[i1-1] );
2194 double gain1 = m_heatedCrossSections[i1-1]->gainViaIntid( a_hashIndex, a_particleIntid );
2195 double gain2 = m_heatedCrossSections[i1]->gainViaIntid( a_hashIndex, a_particleIntid );
2197 return( ( 1. - fraction ) * gain1 + fraction * gain2 );
2209 for(
auto iter = m_heatedCrossSections.begin( ); iter != m_heatedCrossSections.end( ); ++iter ) (*iter)->setUserParticleIndex( a_particleIndex, a_userParticleIndex );
2221 for(
auto iter = m_heatedCrossSections.begin( ); iter != m_heatedCrossSections.end( ); ++iter ) (*iter)->setUserParticleIndexViaIntid( a_particleIntid, a_userParticleIndex );
2239 std::size_t vectorSize = m_heatedCrossSections.size( );
2240 int vectorSizeInt = (int) vectorSize;
2242 vectorSize = (std::size_t) vectorSizeInt;
2246 for( std::size_t memberIndex = 0; memberIndex < vectorSize; ++memberIndex ) {
2258 m_heatedCrossSections[memberIndex]->serialize( a_buffer, a_mode );
2271 if( a_temperatureIndex < 0 )
return;
2273 std::size_t temperatureIndex = (std::size_t) a_temperatureIndex;
2274 if( temperatureIndex >= m_temperatures.size( ) )
return;
2276 printf(
"HeatedCrossSectionsMultiGroup::write for temperature %.4e\n", m_temperatures[temperatureIndex] );
2278 fprintf( a_file,
" boundaries index " );
2279 std::string space( 14,
' ' );
2280 for( std::size_t index = 0; index < m_projectileMultiGroupBoundariesCollapsed.size( ); ++index ) {
2281 fprintf( a_file,
"%s%6zu", space.c_str( ), index );
2283 fprintf( a_file,
"\n" );
2284 writeVector( a_file,
"boundaries", 0, m_projectileMultiGroupBoundariesCollapsed );
2286 m_heatedCrossSections[temperatureIndex]->write( a_file );
2295 for( std::size_t index = 0; index < m_heatedCrossSections.size( ); ++index )
write( stdout,
static_cast<int>( index ) );
2324 checkZeroReaction( vector, a_zeroReactions );
2336static void writeVector( FILE *a_file, std::string
const &a_prefix, std::size_t a_offset, Vector<double>
const &a_vector ) {
2338 std::string indent( 20 * a_offset,
' ' );
2341 fprintf( a_file, fmt.c_str( ), a_prefix.c_str( ), (
int) a_vector.size( ), indent.c_str( ) );
2342 for( Vector<double>::const_iterator iter = a_vector.begin( ); iter != a_vector.end( ); ++iter ) fprintf( a_file,
" %19.11e", *iter );
2343 fprintf( a_file,
"\n" );
G4ThreadLocal T * G4GeomSplitter< T >::offset
#define DATA_MEMBER_VECTOR_INT(member, buf, mode)
#define DATA_MEMBER_VECTOR_DOUBLE(member, buf, mode)
#define DATA_MEMBER_SIZE_T(member, buf, mode)
#define DATA_MEMBER_VECTOR_SIZE_T(member, buf, mode)
#define DATA_MEMBER_DOUBLE(member, buf, mode)
#define DATA_MEMBER_INT( member, buf, mode)
#define DATA_MEMBER_VECTOR_FLOAT_OR_DOUBLE
#define PoPI_electronMass_MeV_c2
Function2dForm const * function2d() const
std::vector< double > const & Ys() const
void set(std::size_t a_index, double a_value)
std::size_t start() const
Vector multiGroupDepositionEnergy(LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, ExcludeReactionsSet const &a_reactionsToExclude=ExcludeReactionsSet {}) const
Vector multiGroupDepositionMomentum(LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, ExcludeReactionsSet const &a_reactionsToExclude=ExcludeReactionsSet {}) const
Vector multiGroupQ(LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, bool a_final, bool a_effectivePhotoAtomic=true, ExcludeReactionsSet const &a_reactionsToExclude=ExcludeReactionsSet {}) const
Vector multiGroupGain(LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID, ExcludeReactionsSet const &a_reactionsToExclude=ExcludeReactionsSet {}) const
Grid const & grid() const
std::string const & griddedCrossSection() const
std::string const & URR_probabilityTables() const
bool has(std::string const &a_label) const
T * get(std::size_t a_Index)
std::map< std::string, Particle > & particles()
bool hasParticle(std::string const &a_id) const
void setThrowOnError(bool a_throwOnError)
bool throwOnError() const
std::string const & projectileID() const
DelayedNeutrons delayedNeutrons() const
void setToValueInFlatRange(std::size_t a_start, std::size_t a_end, double a_value)
LUPI_HOST_DEVICE void incrementPlacement(std::size_t a_delta)
LUPI_HOST_DEVICE int userParticleIndex() const
LUPI_HOST_DEVICE Vector< MCGIDI_FLOAT > const & gain() const
LUPI_HOST void print(ProtareSingle const *a_protareSingle, std::string const &a_indent, std::string const &a_iFormat, std::string const &a_energyFormat, std::string const &a_dFormat) const
LUPI_HOST_DEVICE ContinuousEnergyGain()
LUPI_HOST_DEVICE int particleIntid() const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE int particleIndex() const
LUPI_HOST ContinuousEnergyGain & operator=(ContinuousEnergyGain const &a_continuousEnergyGain)
LUPI_HOST_DEVICE Vector< std::size_t > map(Vector< double > const &a_domainValues) const
LUPI_HOST_DEVICE Vector< double > const & energies() const
LUPI_HOST_DEVICE HeatedCrossSectionContinuousEnergy()
LUPI_HOST_DEVICE double depositionMomentum(std::size_t a_hashIndex, double a_energy) const
LUPI_HOST_DEVICE bool hasURR_probabilityTables() const
LUPI_HOST_DEVICE double gain(std::size_t a_hashIndex, double a_energy, int a_particleIndex) const
LUPI_HOST_DEVICE double URR_domainMax() const
LUPI_HOST_DEVICE double depositionEnergy(std::size_t a_hashIndex, double a_energy) const
LUPI_HOST_DEVICE double temperature() const
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE double threshold(std::size_t a_reactionIndex) const
LUPI_HOST_DEVICE double productionEnergy(std::size_t a_hashIndex, double a_energy) const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE double gainViaIntid(std::size_t a_hashIndex, double a_energy, int a_particleIntid) const
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST_DEVICE double reactionCrossSection2(std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos, int a_URR_index, double a_energy, std::size_t a_energyIndex, double a_energyFraction, bool a_sampling=false) const
LUPI_HOST_DEVICE ~HeatedCrossSectionContinuousEnergy()
LUPI_HOST_DEVICE Vector< MCGIDI_FLOAT > & totalCrossSection()
LUPI_HOST_DEVICE std::size_t evaluationInfo(std::size_t a_hashIndex, double a_energy, double *a_energyFraction) const
LUPI_HOST GIDI::Functions::XYs1d crossSectionAsGIDI_XYs1d() const
LUPI_HOST GIDI::Functions::XYs1d reactionCrossSectionAsGIDI_XYs1d(std::size_t a_reactionIndex) const
LUPI_HOST_DEVICE double URR_domainMin() const
LUPI_HOST void print(ProtareSingle const *a_protareSingle, std::string const &a_indent, std::string const &a_iFormat, std::string const &a_energyFormat, std::string const &a_dFormat) const
LUPI_HOST HeatedReactionCrossSectionContinuousEnergy const * reactionCrossSection(std::size_t a_index) const
LUPI_HOST_DEVICE std::size_t numberOfReactions() const
LUPI_HOST_DEVICE double crossSection(URR_protareInfos const &a_URR_protareInfos, int a_URR_index, std::size_t a_hashIndex, double a_energy, bool a_sampling=false) const
LUPI_HOST_DEVICE double gainViaIntid(std::size_t a_hashIndex, int a_particleIntid) const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST void write(FILE *a_file) const
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE double gain(std::size_t a_hashIndex, int a_particleIndex) const
LUPI_HOST_DEVICE ~HeatedCrossSectionMultiGroup()
LUPI_HOST_DEVICE HeatedCrossSectionMultiGroup()
LUPI_HOST_DEVICE double crossSection(std::size_t a_hashIndex, bool a_sampling=false) const
LUPI_HOST_DEVICE Vector< double > & totalCrossSection()
LUPI_HOST_DEVICE double threshold(std::size_t a_index) const
LUPI_HOST GIDI::Functions::XYs1d crossSectionAsGIDI_XYs1d(double a_temperature) const
Vector< HeatedCrossSectionContinuousEnergy * > & heatedCrossSections()
LUPI_HOST_DEVICE double productionEnergy(std::size_t a_hashIndex, double a_temperature, double a_energy) const
LUPI_HOST_DEVICE double depositionEnergy(std::size_t a_hashIndex, double a_temperature, double a_energy) const
LUPI_HOST_DEVICE HeatedCrossSectionsContinuousEnergy()
LUPI_HOST_DEVICE void clear()
LUPI_HOST void update(LUPI::StatusMessageReporting &a_smr, SetupInfo &a_setupInfo, Transporting::MC const &a_settings, GIDI::Transporting::Particles const &a_particles, DomainHash const &a_domainHash, GIDI::Styles::TemperatureInfos const &a_temperatureInfos, std::vector< GIDI::Reaction const * > const &a_reactions, std::vector< GIDI::Reaction const * > const &a_orphanProducts, bool a_fixedGrid, bool a_zeroReactions)
LUPI_HOST_DEVICE double crossSection(URR_protareInfos const &a_URR_protareInfos, int a_URR_index, std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling=false) const
LUPI_HOST_DEVICE double gain(std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIndex) const
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST_DEVICE ~HeatedCrossSectionsContinuousEnergy()
LUPI_HOST_DEVICE double reactionCrossSection(std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos, int a_URR_index, std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling=false) const
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE double depositionMomentum(std::size_t a_hashIndex, double a_temperature, double a_energy) const
LUPI_HOST GIDI::Functions::XYs1d reactionCrossSectionAsGIDI_XYs1d(std::size_t a_reactionIndex, double a_temperature) const
LUPI_HOST void print(ProtareSingle const *a_protareSingle, std::string const &a_indent, std::string const &a_iFormat, std::string const &a_energyFormat, std::string const &a_dFormat) const
LUPI_HOST_DEVICE double gainViaIntid(std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIntid) const
LUPI_HOST_DEVICE void crossSectionVector(double a_temperature, double a_userFactor, std::size_t a_numberAllocated, double *a_crossSectionVector) const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE double productionEnergy(std::size_t a_hashIndex, double a_temperature) const
LUPI_HOST void print() const
LUPI_HOST_DEVICE double depositionMomentum(std::size_t a_hashIndex, double a_temperature) const
LUPI_HOST_DEVICE double depositionEnergy(std::size_t a_hashIndex, double a_temperature) const
LUPI_HOST_DEVICE double gain(std::size_t a_hashIndex, double a_temperature, int a_particleIndex) const
LUPI_HOST void write(FILE *a_file, int a_temperatureIndex) const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE double crossSection(std::size_t a_hashIndex, double a_temperature, bool a_sampling=false) const
LUPI_HOST_DEVICE double reactionCrossSection(std::size_t a_reactionIndex, std::size_t a_hashIndex, double a_temperature, bool a_sampling=false) const
LUPI_HOST_DEVICE double threshold(std::size_t a_index) const
LUPI_HOST_DEVICE HeatedCrossSectionsMultiGroup()
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE ~HeatedCrossSectionsMultiGroup()
LUPI_HOST_DEVICE void crossSectionVector(double a_temperature, double a_userFactor, std::size_t a_numberAllocated, double *a_crossSectionVector) const
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST void update(LUPI::StatusMessageReporting &a_smr, GIDI::ProtareSingle const &a_protare, SetupInfo &a_setupInfo, Transporting::MC const &a_settings, GIDI::Transporting::Particles const &a_particles, GIDI::Styles::TemperatureInfos const &a_temperatureInfos, std::vector< GIDI::Reaction const * > const &a_reactions, std::vector< GIDI::Reaction const * > const &a_orphanProducts, bool a_zeroReactions, GIDI::ExcludeReactionsSet const &a_reactionsToExclude)
LUPI_HOST_DEVICE double gainViaIntid(std::size_t a_hashIndex, double a_temperature, int a_particleIntid) const
LUPI_HOST GIDI::Functions::XYs1d crossSectionAsGIDI_XYs1d(double a_temperature, Vector< double > const &a_energies) const
LUPI_HOST_DEVICE double URR_domainMin() const
LUPI_HOST_DEVICE double crossSection(std::size_t a_index) const
LUPI_HOST_DEVICE Transporting::URR_mode URR_mode() const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE double URR_domainMax() const
LUPI_HOST void print(ProtareSingle const *a_protareSingle, std::string const &a_indent, std::string const &a_iFormat, std::string const &a_energyFormat, std::string const &a_dFormat) const
LUPI_HOST_DEVICE HeatedReactionCrossSectionContinuousEnergy()
LUPI_HOST_DEVICE ~HeatedReactionCrossSectionContinuousEnergy()
LUPI_HOST void write(FILE *a_file, std::size_t a_reactionIndex) const
LUPI_HOST_DEVICE HeatedReactionCrossSectionMultiGroup()
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST void write(FILE *a_file) const
LUPI_HOST_DEVICE int particleIntid() const
LUPI_HOST_DEVICE Vector< double > const & gain() const
LUPI_HOST_DEVICE MultiGroupGain()
LUPI_HOST_DEVICE int userParticleIndex() const
LUPI_HOST MultiGroupGain & operator=(MultiGroupGain const &a_multiGroupGain)
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE int particleIndex() const
LUPI_HOST_DEVICE double averageGammaEnergy() const
LUPI_HOST_DEVICE double multiplicity() const
LUPI_HOST_DEVICE Reaction const * reaction(std::size_t a_index) const
LUPI_HOST_DEVICE bool isPhotoAtomic() const
LUPI_HOST_DEVICE const Vector< NuclideGammaBranchStateInfo * > & nuclideGammaBranchStateInfos() const
LUPI_HOST Vector< double > const & projectileMultiGroupBoundariesCollapsed() const
LUPI_HOST_DEVICE int projectileIntid() const
std::map< std::string, ACE_URR_probabilityTablesFromGIDI * > m_ACE_URR_probabilityTablesFromGIDI
std::map< std::string, int > m_particleIntids
std::map< std::string, int > m_initialStateIndices
std::map< std::string, int > m_particleIndices
ProtareSingle & m_protare
LUPI_HOST std::vector< double > fixedGridPoints() const
LUPI_HOST bool useSlowerContinuousEnergyConversion() const
LUPI_HOST Sampling::Upscatter::Model upscatterModel() const
LUPI_HOST URR_mode _URR_mode() const
LUPI_HOST bool addExpectedValueData() const
LUPI_HOST GIDI::Styles::Suite const * styles() const
LUPI_HOST_DEVICE std::size_t size() const
LUPI_HOST_DEVICE iterator begin()
LUPI_HOST_DEVICE void resize(std::size_t s, char **address=nullptr, bool mem_flag=CPU_MEM)
LUPI_HOST_DEVICE iterator end()
std::vector< Styles::TemperatureInfo > TemperatureInfos
@ multiGroupWithSnElasticUpScatter
Vector collapse(Vector const &a_vector, Transporting::Settings const &a_settings, Transporting::Particles const &a_particles, double a_temperature)
std::set< std::size_t > ExcludeReactionsSet
std::string argumentsToString(char const *a_format,...)
std::string doubleToString3(char const *a_format, double a_value, bool a_reduceBits=false)
LUPI_HOST ProbabilityBase2d * parseProbability2d(Transporting::MC const &a_settings, GIDI::Suite const &a_suite, SetupInfo *a_setupInfo)
LUPI_HOST_DEVICE std::size_t evaluationForHashIndex(std::size_t a_hashIndex, Vector< std::size_t > const &a_hashIndices, double a_energy, Vector< double > const &a_energies, double *a_energyFraction)
@ ACE_URR_probabilityTables
Simple C++ string class, useful as replacement for std::string if this cannot be used,...
LUPI_HOST_DEVICE Probabilities::ProbabilityBase2d * serializeProbability2d(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, Probabilities::ProbabilityBase2d *a_probability2d)
LUPI_HOST Vector< double > GIDI_VectorDoublesToMCGIDI_VectorDoubles(GIDI::Vector a_vector)
LUPI_HOST_DEVICE ACE_URR_probabilityTables * serializeACE_URR_probabilityTables(ACE_URR_probabilityTables *a_ACE_URR_probabilityTables, LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE Transporting::URR_mode serializeURR_mode(Transporting::URR_mode a_URR_mode, LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE int binarySearchVector(double a_x, Vector< double > const &a_Xs, bool a_boundIndex=false)
LUPI_HOST std::vector< double > vectorToSTD_vector(Vector< double > a_input)
@ ptwXY_interpolationLinLin
static std::string const photon
static std::string const electron