Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
MCGIDI.hpp
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#ifndef MCGIDI_hpp_included
11#define MCGIDI_hpp_included 1
12
13#define MCGIDI_USE_DOUBLES 1
14#ifndef MCGIDI_USE_DOUBLES
15 #define MCGIDI_FLOAT float
16 #define DATA_MEMBER_VECTOR_FLOAT_OR_DOUBLE DATA_MEMBER_VECTOR_FLOAT
17#else
18 #define MCGIDI_FLOAT double
19 #define DATA_MEMBER_VECTOR_FLOAT_OR_DOUBLE DATA_MEMBER_VECTOR_DOUBLE
20#endif
21
22#define _USE_MATH_DEFINES
23#include "math.h"
24
25#include <LUPI.hpp>
26#include <PoPI.hpp>
27#include <GIDI.hpp>
28
29#ifdef MCGIDI_USE_VIRTUAL_FUNCTIONS
30 #define MCGIDI_VIRTUAL_FUNCTION virtual
31 #define MCGIDI_TRUE_VIRTUAL = 0
32#else
33 #define MCGIDI_VIRTUAL_FUNCTION
34 #define MCGIDI_TRUE_VIRTUAL
35#endif
36
37#if defined(HAVE_HIP) && defined(__HIP_DEVICE_COMPILE__)
38 #define MCGIDI_PRINTF(...)
39#else
40 #define MCGIDI_PRINTF printf
41#endif
42
43namespace MCGIDI {
44
45class Protare;
46class ProtareSingle;
48class ProtareTNSL;
49class Reaction;
50class OutputChannel;
52class GRIN_capture;
53class GRIN_inelastic;
54
55} // End of namespace MCGIDI.
56
57#include <LUPI_dataBuffer.hpp>
58#include <MCGIDI_sampling.hpp>
59#include <MCGIDI_vector.hpp>
60#include <MCGIDI_string.hpp>
61
62namespace MCGIDI {
63
64#define MCGIDI_nullReaction 999999999
65
66// FIXME, this should not be used once physicalQuantity can handle changing units.
67#define MCGIDI_speedOfLight_cm_sh 299.792458
68#define MCGIDI_speedOfLight_cm_sec ( MCGIDI_speedOfLight_cm_sh * 1e8 )
69#define MCGIDI_classicalElectronRadius 0.2817940322010228 // Classical electron radius in unit of sqrt( b ).
70
71#define MCGIDI_particleBeta( a_mass_unitOfEnergy, a_kineticEnergy ) \
72 ( (a_mass_unitOfEnergy) == 0.0 ? 1 : sqrt( (a_kineticEnergy) * ( (a_kineticEnergy) + 2.0 * (a_mass_unitOfEnergy) ) ) / ( (a_kineticEnergy) + (a_mass_unitOfEnergy) ) )
73
74LUPI_HOST_DEVICE double particleKineticEnergy( double a_mass_unitOfEnergy, double a_particleBeta );
75LUPI_HOST_DEVICE double particleKineticEnergyFromBeta2( double a_mass_unitOfEnergy, double a_particleBeta2 ); // a_particleBeta2 = a_particleBeta^2.
76LUPI_HOST_DEVICE double boostSpeed( double a_massProjectile, double a_kineticEnergyProjectile, double a_massTarget );
77LUPI_HOST_DEVICE int muCOM_From_muLab( double a_muLab, double a_boostBeta, double a_productBeta, double &a_muPlus, double &a_JacobianPlus, double &a_muMinus, double &a_JacobianMinus );
78
80
81namespace Transporting {
82
84
85namespace LookupMode {
86
88 enum class Distribution { pdf_cdf, epbs };
89
90} // End of namespace LookupMode.
91
92namespace Reaction {
93
94 enum class Type { Reactions, OrphanProducts };
95
96} // End of namespace Reaction.
97
98/*
99============================================================
100============================ MC ============================
101============================================================
102*/
104
105 private:
106 GIDI::Styles::Suite const *m_styles; /**< FIXME. */
107 std::string m_label; /**< FIXME. */
108 double m_energyDomainMax; /**< All reactions with a threshold greater than or equal to this value are ignored. */
109 bool m_ignoreENDF_MT5; /**< If true, the ENDF MT 5 reaction is ignored. */
110 bool m_sampleNonTransportingParticles; /**< If true, all products are sampled, otherwise only transporting particles are sampled. */
111 bool m_useSlowerContinuousEnergyConversion; /**< If true, the old slower conversion of GIDI::ProtareSingle to MCGIDI::HeatedCrossSectionContinuousEnergy is used. */
112 bool m_addExpectedValueData; /**< If true, exected value data are included in the construction of a HeatedCrossSectionContinuousEnergy class. */
113 LookupMode::Data1d m_crossSectionLookupMode; /**< Determines how cross sections are evaluated. */
114 LookupMode::Data1d m_other1dDataLookupMode; /**< Determines how 1d data other than cross sections are evaluated. */
115 LookupMode::Distribution m_distributionLookupMode; /**< Determines how distributions are evaluated and sampled. Currently, only pdf_cdf is allowed. */
116 Sampling::Upscatter::Model m_upscatterModel; /**< This enum specified the upscatter model to use when sampling products. */
117 std::vector<double> m_upscatterModelAGroupBoundaries; /**< If specified (i.e., non-zero length) then these values are used as the group boundaries for the upscatter model A multi-group cross section. */
118 URR_mode m_URR_mode; /**< Selects if URR data are to be used, and it so, which type. */
119 bool m_wantTerrellPromptNeutronDistribution; /**< If true, prompt fission neutron distributions are sampled from the Terrell mode. */
120 bool m_wantRawTNSL_distributionSampling; /**< If true, the TNSL neutron distributions for coherent and incoherent elastic scattering are sampled from the double differential data. Otherwise, they are sampled from the distribution data. */
121 std::vector<double> m_fixedGridPoints; /**< FIXME. */
122 bool m_makePhotonEmissionProbabilitiesOne; /**< If true, all photon emission probabilities are set to 1.0 (i.e., all ICCs are set to 0.0). Default is false. */
123 bool m_zeroNuclearLevelEnergyWidth; /**< If true, all NuclideGammaBranchStateInfo.m_nuclearLevelEnergyWidth members are set to 0.0. Default is false. */
124
125 public:
126 LUPI_HOST MC( PoPI::Database const &a_pops, std::string const &a_projectileID, GIDI::Styles::Suite const *a_styles, std::string const &a_label,
127 GIDI::Transporting::DelayedNeutrons a_delayedNeutrons, double energyDomainMax );
128 LUPI_HOST MC( PoPI::Database const &a_pops, GIDI::Protare const &a_protare, std::string const &a_label,
129 GIDI::Transporting::DelayedNeutrons a_delayedNeutrons, double energyDomainMax );
130
131 LUPI_HOST GIDI::Styles::Suite const *styles( ) const { return( m_styles ); } /**< Returns the value of the **m_styles**. */
132 LUPI_HOST void styles( GIDI::Styles::Suite const *a_styles ) { m_styles = a_styles; } /**< This is needed for ProtareTNSL, but should be avoided otherwise. FIXME, need to have a better way. */
133
134 LUPI_HOST std::string label( ) const { return( m_label ); }
135
136// FIXME (1) should this not be something like
137// GIDI::Styles::Suite const &suite( ) const { return( *m_styles ); } /**< Returns a reference to **m_styles**. */
138 LUPI_HOST double energyDomainMax( ) const { return( m_energyDomainMax ); } /**< Returns the value of the **m_energyDomainMax**. */
139
140 LUPI_HOST bool ignoreENDF_MT5( ) const { return( m_ignoreENDF_MT5 ); } /**< Returns the value of the **m_ignoreENDF_MT5**. */
141 LUPI_HOST void set_ignoreENDF_MT5( bool a_ignoreENDF_MT5 ) { m_ignoreENDF_MT5 = a_ignoreENDF_MT5; }
142 LUPI_HOST void setIgnoreENDF_MT5( bool a_ignoreENDF_MT5 ) { set_ignoreENDF_MT5( a_ignoreENDF_MT5 ); }
143 /**< This function is deprecated. Use **set_ignoreENDF_MT5** instead. */
144
145 LUPI_HOST bool sampleNonTransportingParticles( ) const { return( m_sampleNonTransportingParticles); }
146 LUPI_HOST void sampleNonTransportingParticles( bool a_sampleNonTransportingParticles ) {
147 LUPI::deprecatedFunction( "MCGIDI::Transporting::MC::sampleNonTransportingParticles", "MCGIDI::Transporting::MC::setSampleNonTransportingParticles", "" );
148 setSampleNonTransportingParticles( a_sampleNonTransportingParticles ); }
149 LUPI_HOST void setSampleNonTransportingParticles( bool a_sampleNonTransportingParticles ) { m_sampleNonTransportingParticles = a_sampleNonTransportingParticles; }
150
151 LUPI_HOST bool useSlowerContinuousEnergyConversion( ) const { return( m_useSlowerContinuousEnergyConversion ); }
152 LUPI_HOST void setUseSlowerContinuousEnergyConversion( bool a_useSlowerContinuousEnergyConversion ) {
153 m_useSlowerContinuousEnergyConversion = a_useSlowerContinuousEnergyConversion; }
154
155 LUPI_HOST bool addExpectedValueData( ) const { return( m_addExpectedValueData ); } /**< Returns the value of the *m_addExpectedValueData* member. */
156 LUPI_HOST void setAddExpectedValueData( bool a_addExpectedValueData ) { m_addExpectedValueData = a_addExpectedValueData; } /**< Set the *m_addExpectedValueData* member to *a_addExpectedValueData*. */
157
158 LUPI_HOST LookupMode::Data1d crossSectionLookupMode( ) const { return( m_crossSectionLookupMode ); } /**< Returns the value of the **m_crossSectionLookupMode**. */
159 LUPI_HOST void setCrossSectionLookupMode( LookupMode::Data1d a_crossSectionLookupMode );
160 LUPI_HOST void crossSectionLookupMode( LookupMode::Data1d a_crossSectionLookupMode ) {
161 LUPI::deprecatedFunction( "MCGIDI::Transporting::MC::crossSectionLookupMode", "MCGIDI::Transporting::MC::setCrossSectionLookupMode", "" );
162 setCrossSectionLookupMode( a_crossSectionLookupMode ); } /**< See method **setCrossSectionLookupMode**. This method is deprecated. */
163
164 LUPI_HOST LookupMode::Data1d other1dDataLookupMode( ) const { return( m_other1dDataLookupMode ); } /**< Returns the value of the **m_other1dDataLookupMode**. */
165 LUPI_HOST void setOther1dDataLookupMode( LookupMode::Data1d a_other1dDataLookupMode );
166 LUPI_HOST void other1dDataLookupMode( LookupMode::Data1d a_other1dDataLookupMode ) {
167 LUPI::deprecatedFunction( "MCGIDI::Transporting::MC::other1dDataLookupMode", "MCGIDI::Transporting::MC::setOther1dDataLookupMode", "" );
168 setOther1dDataLookupMode( a_other1dDataLookupMode ); } /**< See method **setOther1dDataLookupMode**. This method is deprecated. */
169
170 LUPI_HOST LookupMode::Distribution distributionLookupMode( ) const { return( m_distributionLookupMode ); } /**< Returns the value of the **m_distributionLookupMode**. */
171 LUPI_HOST void setDistributionLookupMode( LookupMode::Distribution a_distributionLookupMode );
173 LUPI::deprecatedFunction( "MCGIDI::Transporting::MC::distributionLookupMode", "MCGIDI::Transporting::MC::setDistributionLookupMode", "" );
174 setDistributionLookupMode( a_distributionLookupMode ); } /**< See method **setDistributionLookupMode**. This method is deprecated. */
175
176 LUPI_HOST Sampling::Upscatter::Model upscatterModel( ) const { return( m_upscatterModel ); } /**< Returns the value of the **m_upscatterModel**. */
177 LUPI_HOST void setUpscatterModelA( ) { m_upscatterModel = Sampling::Upscatter::Model::A; } /**< See member *m_upscatterModel* to Sampling::Upscatter::Model::A. */
178 LUPI_HOST void setUpscatterModelB( ) { m_upscatterModel = Sampling::Upscatter::Model::B; } /**< Set member *m_upscatterModel* to Sampling::Upscatter::Model::B. */
179 LUPI_HOST void setUpscatterModelBSnLimits( ) { m_upscatterModel = Sampling::Upscatter::Model::BSnLimits; } /**< Set member *m_upscatterModel* to Sampling::Upscatter::Model::BSnLimits. */
180 LUPI_HOST void setUpscatterModelDBRC( ) { m_upscatterModel = Sampling::Upscatter::Model::DBRC; } /**< Set member *m_upscatterModel* to Sampling::Upscatter::Model::DBRC. */
181 LUPI_HOST std::vector<double> const &upscatterModelAGroupBoundaries( ) { return( m_upscatterModelAGroupBoundaries ); }
182 /**< Returns a const reference to the *m_upscatterModelAGroupBoundaries* member. */
183 LUPI_HOST void setUpscatterModelAGroupBoundaries( std::vector<double> const &a_groupBoundaries );
184
186 LUPI::deprecatedFunction( "MCGIDI::Transporting::MC::want_URR_probabilityTables", "MCGIDI::Transporting::MC::_URR_mode", "" );
187 return( m_URR_mode != URR_mode::none ); } /**< Returns *false* if *m_URR_mode* is **URR_mode::none** and *true* otherwise. This method is deprecated. Please use **_URR_mode** instead. */
188 LUPI_HOST void want_URR_probabilityTables( bool a_want_URR_probabilityTables ) {
189 LUPI::deprecatedFunction( "MCGIDI::Transporting::MC::want_URR_probabilityTables", "MCGIDI::Transporting::MC::setURR_mode", "" );
190 m_URR_mode = URR_mode::none;
191 if( a_want_URR_probabilityTables ) m_URR_mode = URR_mode::pdfs;
192 } /**< If *a_want_URR_probabilityTables* is *true* sets *m_URR_mode* to **URR_mode::pdfs**, otherwise set it to **URR_mode::none**. This method is deprecated. Please use **setURR_mode** instead. */
193
194 LUPI_HOST URR_mode _URR_mode( ) const { return( m_URR_mode ); } /**< Returns the value of the **m_URR_mode** member. */
195 LUPI_HOST void setURR_mode( URR_mode a_URR_mode ) { m_URR_mode = a_URR_mode; } /**< This methods sets member *m_URR_mode* to *a_URR_mode*. */
196
197 LUPI_HOST bool wantTerrellPromptNeutronDistribution( ) const { return( m_wantTerrellPromptNeutronDistribution ); }
198 /**< Returns the value of the **m_wantTerrellPromptNeutronDistribution** member. */
199 LUPI_HOST void setWantTerrellPromptNeutronDistribution( bool a_wantTerrellPromptNeutronDistribution ) {
200 m_wantTerrellPromptNeutronDistribution = a_wantTerrellPromptNeutronDistribution;
201 } /**< Set the *m_wantTerrellPromptNeutronDistribution* member to *a_wantTerrellPromptNeutronDistribution*. */
202 LUPI_HOST void wantTerrellPromptNeutronDistribution( bool a_wantTerrellPromptNeutronDistribution ) {
203 LUPI::deprecatedFunction( "MCGIDI::Transporting::MC::wantTerrellPromptNeutronDistribution", "MCGIDI::Transporting::MC::setWantTerrellPromptNeutronDistribution", "" );
204 setWantTerrellPromptNeutronDistribution( a_wantTerrellPromptNeutronDistribution );
205 } /**< See method *setWantTerrellPromptNeutronDistribution*. This method is deprecated. */
206
207 LUPI_HOST bool wantRawTNSL_distributionSampling( ) const { return( m_wantRawTNSL_distributionSampling ); }
208 LUPI_HOST bool wantRawTNSL_distributionSampling( ) { return( m_wantRawTNSL_distributionSampling ); }
209 LUPI_HOST void set_wantRawTNSL_distributionSampling( bool a_wantRawTNSL_distributionSampling ) {
210 m_wantRawTNSL_distributionSampling = a_wantRawTNSL_distributionSampling; }
211
212 LUPI_HOST std::vector<double> fixedGridPoints( ) const { return( m_fixedGridPoints ); }
213 LUPI_HOST void fixedGridPoints( std::vector<double> a_fixedGridPoints ) { m_fixedGridPoints = a_fixedGridPoints; }
214
215 LUPI_HOST bool makePhotonEmissionProbabilitiesOne( ) const { return( m_makePhotonEmissionProbabilitiesOne ); }
216 /**< Returns the value of the **m_makePhotonEmissionProbabilitiesOne** member. */
217 LUPI_HOST void setMakePhotonEmissionProbabilitiesOne( bool a_makePhotonEmissionProbabilitiesOne ) { m_makePhotonEmissionProbabilitiesOne = a_makePhotonEmissionProbabilitiesOne; }
218 /**< Sets member *m_makePhotonEmissionProbabilitiesOne* to *a_makePhotonEmissionProbabilitiesOne*. */
219 LUPI_HOST bool zeroNuclearLevelEnergyWidth( ) const { return( m_zeroNuclearLevelEnergyWidth ); }
220 /**< Returns the value of the **m_zeroNuclearLevelEnergyWidth** member. */
221 LUPI_HOST void setZeroNuclearLevelEnergyWidth( bool a_zeroNuclearLevelEnergyWidth ) { m_zeroNuclearLevelEnergyWidth = a_zeroNuclearLevelEnergyWidth ; }
222 /**< Sets member *m_zeroNuclearLevelEnergyWidth* to *a_zeroNuclearLevelEnergyWidth*. */
223
224 LUPI_HOST void process( GIDI::Protare const &a_protare );
225};
226
227} // End of namespace Transporting.
228
230
231/*
232============================================================
233============= ACE_URR_probabilityTablesFromGIDI ============
234============================================================
235*/
236
238
239 public:
242
243 std::map<std::string, ACE_URR_probabilityTables *> m_ACE_URR_probabilityTables; // The string is the reaction's label.
244};
245
246/*
247============================================================
248========================= SetupInfo ========================
249============================================================
250*/
252
253 public:
254 ProtareSingle &m_protare; /**< The protare the data are loaded into. */
255 GIDI::ProtareSingle const &m_GIDI_protare; /**< The GIDI protare the data are loaded from. */
256 PoPI::Database const &m_popsUser; /**< The PoPs from the user. */
257 PoPI::Database const &m_pops; /**< The PoPs from the GNDS protare. */
261 double m_Q;
269 std::string m_distributionLabel; /**< Set by the ProtareSingle constructor to the distribution label to use for all products. */
270 std::map<std::string, int> m_particleIntids; /**< A list of the particle intids for the transportable particles. */
271 std::map<std::string, int> m_particleIndices; /**< A list of the particle indices for the transportable particles. */
272 GIDI::Reaction const *m_reaction; /**< A pointer to the current reaction whose data are being filled from the GIDI::ProtareSingle reaction. */
274 int m_initialStateIndex; /**< If not -1, then reaction contains a branching gamma data with this index for the data in m_nuclideGammaBranchStateInfos member of its **ProtareSingle** instance. */
275 bool m_hasFinalStatePhotons; /**< If **true**, the reaction has a photon with finalState attribute. */
276 std::map<std::string, int> m_initialStateIndices; /**< If not -1, then reaction contains a branching gamma data with this index for the data in m_nuclideGammaBranchStateInfos member of its **ProtareSingle** instance. */
277 std::map<std::string, int> m_stateNamesToIndices; /**< A map of nuclide PoPs ids to their index in the ProtareSingle::m_nuclideGammaBranchStateInfos member. */
278 std::map<std::string, double> m_nuclearLevelEnergies; /**< A map of nuclide PoPs id to their nuclear level energy. */
279 std::map<std::string, ACE_URR_probabilityTablesFromGIDI *> m_ACE_URR_probabilityTablesFromGIDI;
281
282 LUPI_HOST SetupInfo( ProtareSingle &a_protare, GIDI::ProtareSingle const &a_GIDI_protare, PoPI::Database const &a_popsUser,
283 PoPI::Database const &a_pops );
285};
286
287/*
288============================================================
289=========================== Others =========================
290============================================================
291*/
292LUPI_HOST int MCGIDI_popsIntid( PoPI::Database const &a_pops, std::string const &a_ID );
293LUPI_HOST int MCGIDI_popsIndex( PoPI::Database const &a_pops, std::string const &a_ID );
294
295#if 0
296/* *********************************************************************************************************//**
297 * This function does a binary search of *a_Xs* for the *index* for which *a_Xs*[*index*] <= *a_x* < *a_Xs*[*index*+1].
298 * The values of *a_Xs* must be ascending (i.e., *a_Xs*[i] < *a_Xs*[i+1]).
299 *
300 *
301 * Returns -2 if a_x < a_Xs[0] or return 0 if a_boundIndex is true,
302 * -1 if a_x > last point of a_Xs or returns a_Xs.size( ) - 1 if a_boundIndex is true, or
303 * the lower index of a_Xs which bound a_x otherwise.
304 -3 if a_Xs has not data (i.e, its size is 0).
305 *
306 * Note, when *a_boundIndex* is false the returned *index* can be negative and when it is true the return
307 * value will be a valid index of *a_Xs*, including its last point unless a_Xs has not data *. The index of
308 * the last point is only returned when *a_boundIndex* is true and *a_x* is great than the last point of *a_Xs*.
309 *
310 * @param a_x [in] The values whose bounding index within *a_Xs* is to be determined.
311 * @param a_Xs [in] The list of ascending values.
312 * @param a_boundIndex [in] If true, out-of-bounds values a treated as end points.
313 *
314 * @return The *index*.
315 ***********************************************************************************************************/
316#endif
317
318LUPI_HOST_DEVICE inline int binarySearchVector( double a_x, Vector<double> const &a_Xs, bool a_boundIndex = false ) {
319
320 std::size_t lower = 0, middle, upper = a_Xs.size( ) - 1;
321
322 if( a_Xs.size( ) == 0 ) {
323 return( -3 ); }
324 else if( a_x < a_Xs[0] ) {
325 if( a_boundIndex ) return( 0 );
326 return( -2 ); }
327 else if( a_x > a_Xs.back( ) ) {
328 if( a_boundIndex ) return( static_cast<int>( upper ) );
329 return( -1 );
330 }
331
332 while( 1 ) {
333 middle = ( lower + upper ) >> 1;
334 if( middle == lower ) break;
335 if( a_x < a_Xs[middle] ) {
336 upper = middle; }
337 else {
338 lower = middle;
339 }
340 }
341 return( static_cast<int>( lower ) );
342}
343
344/* *********************************************************************************************************//**
345 ***********************************************************************************************************/
346
347LUPI_HOST_DEVICE inline int binarySearchVectorBounded( double a_x, Vector<double> const &a_Xs, std::size_t a_lower,
348 std::size_t a_upper, bool a_boundIndex ) {
349
350 std::size_t middle;
351
352 if( a_Xs.size( ) == 0 ) {
353 return( -3 ); }
354 else if( a_x < a_Xs[a_lower] ) {
355 if( a_boundIndex ) return( static_cast<int>( a_lower ) );
356 return( -2 ); }
357 else if( a_x > a_Xs[a_upper] ) {
358 if( a_boundIndex ) return( static_cast<int>( a_upper ) );
359 return( -1 );
360 }
361
362 while( 1 ) {
363 middle = ( a_lower + a_upper ) >> 1;
364 if( middle == a_lower ) break;
365 if( a_x < a_Xs[middle] ) {
366 a_upper = middle; }
367 else {
368 a_lower = middle;
369 }
370 }
371 return( static_cast<int>( a_lower ) );
372}
373
374} // End of namespace MCGIDI.
375
376#include "MCGIDI_functions.hpp"
378
379namespace MCGIDI {
380
382
383/*
384============================================================
385===================== MultiGroupHash =======================
386============================================================
387*/
389
390 private:
391 Vector<double> m_boundaries; /**< The list of multi-group boundaries. */
392
393 LUPI_HOST void initialize( GIDI::Protare const &a_protare, GIDI::Styles::TemperatureInfo const &a_temperatureInfo, std::string a_particleID );
394
395 public:
397 LUPI_HOST MultiGroupHash( std::vector<double> a_boundaries );
399 LUPI_HOST MultiGroupHash( GIDI::Protare const &a_protare, GIDI::Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_particleID = "" );
400 LUPI_HOST MultiGroupHash( GIDI::Protare const &a_protare, GIDI::Transporting::Particles const &a_particles );
401 LUPI_HOST MultiGroupHash( MultiGroupHash const &a_multiGroupHash );
403
404 LUPI_HOST_DEVICE Vector<double> const &boundaries( ) const { return( m_boundaries ); } /**< Returns a reference to **m_styles**. */
405 LUPI_HOST_DEVICE std::size_t index( double a_domain ) const {
406 int _index = binarySearchVector( a_domain, m_boundaries );
407
408 if( _index == -2 ) return( 0 );
409 if( _index == -1 ) return( m_boundaries.size( ) - 2 );
410 return( static_cast<std::size_t>( _index ) );
411 }
413};
414
415/*
416============================================================
417====================== URR_protareInfo =====================
418============================================================
419*/
421
422 public:
425
428 m_inURR = a_URR_protareInfo.m_inURR;
429 m_rng_Value = a_URR_protareInfo.m_rng_Value;
430 }
432
433 if( this != &a_rhs ) {
434 m_inURR = a_rhs.inURR( );
435 m_rng_Value = a_rhs.rng_Value( );
436 }
437
438 return( *this );
439 }
440
441 LUPI_HOST_DEVICE bool inURR( ) const { return( m_inURR ); }
442 LUPI_HOST_DEVICE double rng_Value( ) const { return( m_rng_Value ); }
444};
445
446/*
447============================================================
448===================== URR_protareInfos =====================
449============================================================
450*/
452
453 private:
454 Vector<URR_protareInfo> m_URR_protareInfos;
455
456 public:
457 LUPI_HOST_DEVICE URR_protareInfos( ) : m_URR_protareInfos( ) { }
459
460 LUPI_HOST void setup( Vector<Protare *> &a_protares );
461
462 LUPI_HOST_DEVICE std::size_t size( ) const { return( m_URR_protareInfos.size( ) ); }
463 LUPI_HOST_DEVICE URR_protareInfo const &operator[]( std::size_t a_index ) const { return( m_URR_protareInfos[a_index] ); } /**< Returns the instance of *m_URR_protareInfos* at index *a_index*. */
464template <typename RNG>
465 inline LUPI_HOST_DEVICE void updateProtare( MCGIDI::Protare const *a_protare, double a_energy, RNG && a_rng );
466
468 LUPI_HOST_DEVICE std::size_t internalSize( ) const { return m_URR_protareInfos.internalSize( ); }
469};
470
471/*
472============================================================
473================= ACE_URR_probabilityTable =================
474============================================================
475*/
476
478
479 public:
480 double m_energy; /**< The projectile energy where the data are specified. */
481 Vector<double> m_propabilities; /**< The probability for each cross section. */
482 Vector<double> m_crossSections; /**< The cross section for each probability. */
483
485 LUPI_HOST ACE_URR_probabilityTable( double a_energy, std::vector<double> const &a_propabilities, std::vector<double> const &a_crossSection );
487
488 LUPI_HOST_DEVICE double energy( ) const { return( m_energy ); }
489 LUPI_HOST_DEVICE double sample( double a_rng_Value );
491};
492
493/*
494============================================================
495================= ACE_URR_probabilityTables ================
496============================================================
497*/
498
500
501 public:
502 Vector<double> m_energies; /**< List of energies where probabilities tables are given. */
503 Vector<ACE_URR_probabilityTable *> m_ACE_URR_probabilityTables; /**< List of probabilities tables. One for each energy in *m_energies*. */
504
506 LUPI_HOST_DEVICE ACE_URR_probabilityTables( std::size_t a_capacity );
508
509 LUPI_HOST_DEVICE std::size_t capacity( ) const { return( m_energies.capacity( ) ); }
510 /**< Returns the number of energies allocated to store probability tables. */
511 LUPI_HOST_DEVICE std::size_t size( ) const { return( m_energies.size( ) ); }
512 /**< Returns the number of energies that have URR probability tables. */
513 LUPI_HOST_DEVICE void reserve( std::size_t a_capacity );
514 LUPI_HOST_DEVICE void push_back( ACE_URR_probabilityTable *a_ACE_URR_probabilityTable );
515
516 LUPI_HOST_DEVICE double domainMin( ) const { return( m_energies[0] ); } /**< Returns the minimum energy where URR data are specified. */
517 LUPI_HOST_DEVICE double domainMax( ) const { return( m_energies.back( ) ); } /**< Returns the maximum energy where URR data are specified. */
518 LUPI_HOST_DEVICE double sample( double a_energy, double a_rng_Value );
519
521};
522
523/*
524============================================================
525======== HeatedReactionCrossSectionContinuousEnergy ========
526============================================================
527*/
528
530
531 private:
532 std::size_t m_offset; /**< The offset relative to the cross section grid of the first cross section value in *m_crossSections*. */
533 double m_threshold; /**< The threshold for the reaction. */
534 Vector<MCGIDI_FLOAT> m_crossSections; /**< The reaction's cross section. */
535 Transporting::URR_mode m_URR_mode; /**< The URR data (i.e., mode) *this* has. */
536 Probabilities::ProbabilityBase2d *m_URR_probabilityTables; /**< Pointer to pdf URR probabilities if they were loaded. */
537 ACE_URR_probabilityTables *m_ACE_URR_probabilityTables; /**< The ACE URR probability tables for the reaction's cross section, if they were loaded. */
538
539 public:
541 LUPI_HOST HeatedReactionCrossSectionContinuousEnergy( std::size_t a_offset, double a_threshold, Vector<double> &a_crossSection );
542 LUPI_HOST HeatedReactionCrossSectionContinuousEnergy( double a_threshold, GIDI::Functions::Ys1d const &a_crossSection,
543 Probabilities::ProbabilityBase2d *a_URR_probabilityTables, ACE_URR_probabilityTables *a_ACE_URR_probabilityTables );
545
546 LUPI_HOST_DEVICE double threshold( ) const { return( m_threshold ); } /**< Returns the value of the **m_threshold**. */
547 LUPI_HOST_DEVICE std::size_t offset( ) const { return( m_offset ); } /**< Returns the value of the **m_offset**. */
548 LUPI_HOST Vector<MCGIDI_FLOAT> const &crossSections( ) const { return( m_crossSections ); } /**< Returns a reference to the member **m_crossSections**. */
550 return( ( m_URR_probabilityTables != nullptr ) || ( m_ACE_URR_probabilityTables != nullptr ) );
551 } /**< Returns true if URR probability tables data present and false otherwise. */
552 LUPI_HOST_DEVICE Transporting::URR_mode URR_mode( ) const { return( m_URR_mode ); } /**< Returns the value of **m_URR_mode**. */
553 LUPI_HOST_DEVICE double URR_domainMin( ) const ;
554 LUPI_HOST_DEVICE double URR_domainMax( ) const ;
555 LUPI_HOST_DEVICE Probabilities::ProbabilityBase2d *URR_probabilityTables( ) const { return( m_URR_probabilityTables ); } /**< Returns the value of the *m_URR_probabilityTables*. */
556 LUPI_HOST_DEVICE ACE_URR_probabilityTables *_ACE_URR_probabilityTables( ) const { return( m_ACE_URR_probabilityTables ); } /**< Returns the value of the *m_ACE_URR_probabilityTables*. */
557 LUPI_HOST_DEVICE double crossSection( std::size_t a_index ) const {
558 if( a_index < m_offset ) return( 0.0 );
559 a_index -= m_offset;
560 if( a_index >= m_crossSections.size( ) ) return( 0.0 );
561
562 return( m_crossSections[a_index] );
563 }
564 LUPI_HOST GIDI::Functions::XYs1d crossSectionAsGIDI_XYs1d( double a_temperature, Vector<double> const &a_energies ) const ;
565
567
568 LUPI_HOST void print( ProtareSingle const *a_protareSingle, std::string const &a_indent, std::string const &a_iFormat,
569 std::string const &a_energyFormat, std::string const &a_dFormat ) const ;
570};
571
572/*
573============================================================
574=================== ContinuousEnergyGain ===================
575============================================================
576*/
578
579 private:
580 int m_particleIntid;
581 int m_particleIndex;
582 int m_userParticleIndex;
584
585 public:
587 LUPI_HOST ContinuousEnergyGain( int a_particleIntid, int a_particleIndex, std::size_t a_size );
588
589 LUPI_HOST ContinuousEnergyGain &operator=( ContinuousEnergyGain const &a_continuousEnergyGain );
590
591 LUPI_HOST_DEVICE int particleIntid( ) const { return( m_particleIntid); } /**< Returns the value of the *m_particleIntid* member of *this*. */
592 LUPI_HOST_DEVICE int particleIndex( ) const { return( m_particleIndex ); } /**< Returns the value of the *m_particleIndex* member of *this*. */
593 LUPI_HOST_DEVICE int userParticleIndex( ) const { return( m_userParticleIndex ); } /**< Returns the value of the *m_userParticleIndex* member of *this*. */
594 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex ) {
595 if( a_particleIndex == m_particleIndex ) m_userParticleIndex = a_userParticleIndex; }
596 /**< Sets member *m_userParticleIndex* to *a_userParticleIndex* if particle's index matchs *m_particleIndex*. */
597 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex ) {
598 if( a_particleIntid == m_particleIntid ) m_userParticleIndex = a_userParticleIndex; }
599 /**< Sets member *m_userParticleIntid* to *a_userParticleIndex* if particle's intid matchs *m_particleIntid*. */
600 LUPI_HOST_DEVICE Vector<MCGIDI_FLOAT> const &gain( ) const { return( m_gain ); }
601 LUPI_HOST void adjustGain( std::size_t a_energy_index, double a_gain ) { m_gain[a_energy_index] += a_gain; }
602 LUPI_HOST_DEVICE double gain( std::size_t a_energy_index, double a_energy_fraction ) const ;
603
605 LUPI_HOST void print( ProtareSingle const *a_protareSingle, std::string const &a_indent, std::string const &a_iFormat,
606 std::string const &a_energyFormat, std::string const &a_dFormat ) const ;
607};
608
609/*
610============================================================
611=========== HeatedCrossSectionContinuousEnergy =============
612============================================================
613*/
615
616 private:
617 double m_temperature; /**< The target temperature of the data. */
618 Vector<std::size_t> m_hashIndices; /**< The indicies for the energy hash function. */
619 Vector<double> m_energies; /**< Energy grid for cross sections. */
620 Vector<MCGIDI_FLOAT> m_totalCrossSection; /**< The total cross section. */
621 Vector<MCGIDI_FLOAT> m_depositionEnergy; /**< The total continuous energy, deposition-energy cross section (related to the kinetic energy of the untracked outgoing particles). */
622 Vector<MCGIDI_FLOAT> m_depositionMomentum; /**< The total continuous energy, deposition-momentum cross section. */
623 Vector<MCGIDI_FLOAT> m_productionEnergy; /**< The total continuous energy, Q-value cross section. */
624 Vector<ContinuousEnergyGain *> m_gains; /**< The total continuous energy, gain cross section for each tracked particle. */
625 Transporting::URR_mode m_URR_mode; /**< The URR data (i.e., mode) *this* has. */
626 Vector<std::size_t> m_reactionsInURR_region; /**< A list of reactions within or below the upper URR regions. This is empty unless URR probability tables present and used. */
628 /**< Reaction cross section data for each reaction. */
629 ACE_URR_probabilityTables *m_ACE_URR_probabilityTables; /**< The ACE URR probability tables for the summed URR cross section, if they were loaded. */
630
631 public:
634 DomainHash const &a_domainHash, GIDI::Styles::TemperatureInfo const &a_temperatureInfo, std::vector<GIDI::Reaction const *> const &a_reactions,
635 std::vector<GIDI::Reaction const *> const &a_orphanProducts, bool a_fixedGrid, bool a_zeroReactions );
637
638 LUPI_HOST_DEVICE std::size_t evaluationInfo( std::size_t a_hashIndex, double a_energy, double *a_energyFraction ) const ;
639
641 { return( m_reactionCrossSections[a_index] ); } /**< Returns the reaction cross section at index *a_index*. */
642
643 LUPI_HOST_DEVICE double temperature( ) const { return( m_temperature ); } /**< Returns the value of the **m_temperature** member. */
644 LUPI_HOST_DEVICE double minimumEnergy( ) const { return( m_energies[0] ); } /**< Returns the minimum cross section domain. */
645 LUPI_HOST_DEVICE double maximumEnergy( ) const { return( m_energies.back( ) ); } /**< Returns the maximum cross section domain. */
646 LUPI_HOST_DEVICE std::size_t numberOfReactions( ) const { return( m_reactionCrossSections.size( ) ); }
647 /**< Returns the number of reaction cross section. */
648
649 LUPI_HOST_DEVICE std::size_t thresholdOffset( std::size_t a_reactionIndex ) const { return( m_reactionCrossSections[a_reactionIndex]->offset( ) ); }
650 /**< Returns the offset for the cross section for the reaction with index *a_reactionIndex*. */
651 LUPI_HOST_DEVICE double threshold( std::size_t a_reactionIndex ) const { return( m_reactionCrossSections[a_reactionIndex]->threshold( ) ); }
652 /**< Returns the threshold for the reaction with index *a_reactionIndex*. */
654 LUPI_HOST_DEVICE double URR_domainMin( ) const ;
655 LUPI_HOST_DEVICE double URR_domainMax( ) const ;
656 LUPI_HOST_DEVICE bool reactionHasURR_probabilityTables( std::size_t a_index ) const { return( m_reactionCrossSections[a_index]->hasURR_probabilityTables( ) ); }
657
658 LUPI_HOST_DEVICE Vector<MCGIDI_FLOAT> &totalCrossSection( ) { return( m_totalCrossSection ); } /**< Returns a reference to member *m_totalCrossSection*. */
659 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 ;
661
662 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_energy, bool a_sampling = false ) const ;
663 LUPI_HOST_DEVICE double reactionCrossSection2( std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos, int a_URR_index, double a_energy,
664 std::size_t a_energyIndex, double a_energyFraction, bool a_sampling = false ) const ;
665 LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos, int a_URR_index, double a_energy ) const ;
666 LUPI_HOST GIDI::Functions::XYs1d reactionCrossSectionAsGIDI_XYs1d( std::size_t a_reactionIndex ) const ;
667
668 LUPI_HOST_DEVICE double depositionEnergy( std::size_t a_hashIndex, double a_energy ) const ;
669 LUPI_HOST_DEVICE double depositionMomentum( std::size_t a_hashIndex, double a_energy ) const ;
670 LUPI_HOST_DEVICE double productionEnergy( std::size_t a_hashIndex, double a_energy ) const ;
671 LUPI_HOST_DEVICE double gain( std::size_t a_hashIndex, double a_energy, int a_particleIndex ) const ;
672 LUPI_HOST_DEVICE double gainViaIntid( std::size_t a_hashIndex, double a_energy, int a_particleIntid ) const ;
673
674 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex );
675 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex );
677
678 LUPI_HOST_DEVICE Vector<double> const &energies( ) const { return( m_energies ); } /**< Returns a reference to **m_styles**. */
679
680 LUPI_HOST void print( ProtareSingle const *a_protareSingle, std::string const &a_indent, std::string const &a_iFormat,
681 std::string const &a_energyFormat, std::string const &a_dFormat ) const ;
682};
683
684/*
685============================================================
686============ HeatedCrossSectionsContinuousEnergy ===========
687============================================================
688*/
690
691 private:
692 Vector<double> m_temperatures; /**< The list of temperatures that have **HeatedCrossSectionContinuousEnergy** data. */
693 Vector<double> m_thresholds; /**< The threshold for each reaction. */
694 Vector<HeatedCrossSectionContinuousEnergy *> m_heatedCrossSections; /**< One **HeatedCrossSectionContinuousEnergy** instance for each temperature in *m_temperature*. */
695
696 public:
699
700 LUPI_HOST_DEVICE void clear( );
701
702 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,
703 GIDI::Styles::TemperatureInfos const &a_temperatureInfos, std::vector<GIDI::Reaction const *> const &a_reactions,
704 std::vector<GIDI::Reaction const *> const &a_orphanProducts, bool a_fixedGrid, bool a_zeroReactions );
705
706 LUPI_HOST_DEVICE double minimumEnergy( ) const { return( m_heatedCrossSections[0]->minimumEnergy( ) ); }
707 /**< Returns the minimum cross section domain. */
708 LUPI_HOST_DEVICE double maximumEnergy( ) const { return( m_heatedCrossSections[0]->maximumEnergy( ) ); }
709 /**< Returns the maximum cross section domain. */
710 LUPI_HOST_DEVICE Vector<double> const &temperatures( ) const { return( m_temperatures ); } /**< Returns the value of the **m_temperatures**. */
712
713 LUPI_HOST_DEVICE double threshold( std::size_t a_index ) const { return( m_thresholds[a_index] ); } /**< Returns the threshold for the reaction at index *a_index*. */
714 LUPI_HOST_DEVICE bool hasURR_probabilityTables( ) const { return( m_heatedCrossSections[0]->hasURR_probabilityTables( ) ); }
715 LUPI_HOST_DEVICE double URR_domainMin( ) const { return( m_heatedCrossSections[0]->URR_domainMin( ) ); }
716 LUPI_HOST_DEVICE double URR_domainMax( ) const { return( m_heatedCrossSections[0]->URR_domainMax( ) ); }
717 LUPI_HOST_DEVICE bool reactionHasURR_probabilityTables( std::size_t a_index ) const { return( m_heatedCrossSections[0]->reactionHasURR_probabilityTables( a_index ) ); }
718
719 LUPI_HOST_DEVICE double crossSection( URR_protareInfos const &a_URR_protareInfos, int a_URR_index, std::size_t a_hashIndex,
720 double a_temperature, double a_energy, bool a_sampling = false ) const ;
721 LUPI_HOST_DEVICE void crossSectionVector( double a_temperature, double a_userFactor, std::size_t a_numberAllocated,
722 double *a_crossSectionVector ) const ;
723 LUPI_HOST GIDI::Functions::XYs1d crossSectionAsGIDI_XYs1d( double a_temperature ) const ;
724
725 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,
726 double a_temperature, double a_energy, bool a_sampling = false ) const ;
727 LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos, int a_URR_index, double a_temperature, double a_energy_in ) const ;
728 LUPI_HOST GIDI::Functions::XYs1d reactionCrossSectionAsGIDI_XYs1d( std::size_t a_reactionIndex, double a_temperature ) const ;
729
730 template <typename RNG>
731 inline LUPI_HOST_DEVICE std::size_t sampleReaction( URR_protareInfos const &a_URR_protareInfos, int a_URR_index,
732 std::size_t a_hashIndex, double a_temperature, double a_energy, double a_crossSection, RNG && a_rng) const ;
733
734 LUPI_HOST_DEVICE double depositionEnergy( std::size_t a_hashIndex, double a_temperature, double a_energy ) const ;
735 LUPI_HOST_DEVICE double depositionMomentum( std::size_t a_hashIndex, double a_temperature, double a_energy ) const ;
736 LUPI_HOST_DEVICE double productionEnergy( std::size_t a_hashIndex, double a_temperature, double a_energy ) const ;
737 LUPI_HOST_DEVICE double gain( std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIndex ) const ;
738 LUPI_HOST_DEVICE double gainViaIntid( std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIntid ) const ;
739
740 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex );
741 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex );
743
744 LUPI_HOST void print( ProtareSingle const *a_protareSingle, std::string const &a_indent, std::string const &a_iFormat,
745 std::string const &a_energyFormat, std::string const &a_dFormat ) const ;
746};
747
748/*
749============================================================
750====================== MultiGroupGain ======================
751============================================================
752*/
754
755 private:
756 int m_particleIntid;
757 int m_particleIndex;
758 int m_userParticleIndex;
759 Vector<double> m_gain;
760
761 public:
763 LUPI_HOST MultiGroupGain( int a_particleIntid, int a_particleIndex, GIDI::Vector const &a_gain );
764
765 LUPI_HOST MultiGroupGain &operator=( MultiGroupGain const &a_multiGroupGain );
766
767 LUPI_HOST_DEVICE int particleIntid( ) const { return( m_particleIntid ); } /**< Returns the value of the *m_particleIntid* member of *this*. */
768 LUPI_HOST_DEVICE int particleIndex( ) const { return( m_particleIndex ); } /**< Returns the value of the *m_particleIndex* member of *this*. */
769 LUPI_HOST_DEVICE int userParticleIndex( ) const { return( m_userParticleIndex ); } /**< Returns the value of the *m_userParticleIndex* member of *this*. */
770 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex ) {
771 if( a_particleIndex == m_particleIndex ) m_userParticleIndex = a_userParticleIndex; }
772 /**< Sets member *m_userParticleIndex* to *a_userParticleIndex* if particle's index matchs *m_particleIndex*. */
773 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex ) {
774 if( a_particleIntid == m_particleIntid ) m_userParticleIndex = a_userParticleIndex; }
775 /**< Sets member *m_userParticleIntid* to *a_userParticleIndex* if particle's intid matchs *m_particleIntid*. */
776 LUPI_HOST_DEVICE Vector<double> const &gain( ) const { return( m_gain ); }
777 LUPI_HOST_DEVICE double gain( std::size_t a_hashIndex ) const { return( m_gain[a_hashIndex] ); }
778
780 LUPI_HOST void write( FILE *a_file ) const ;
781};
782
783/*
784============================================================
785=========== HeatedReactionCrossSectionMultiGroup ===========
786============================================================
787*/
789
790 private:
791 double m_threshold;
792 std::size_t m_offset;
793 Vector<double> m_crossSections; // Multi-group reaction cross section
794 double m_augmentedThresholdCrossSection; // Augmented cross section at m_offset for rejecting when projectile energy is below m_threshold.
795 // This value is added to m_crossSections[m_offset] when sampling an isotope or reaction.
796
797 public:
800 std::size_t a_offset, std::vector<double> const &a_crossSection, double a_threshold );
801
802 LUPI_HOST_DEVICE double operator[]( std::size_t a_index ) const { return( m_crossSections[a_index] ); } /**< Returns the value of the cross section at multi-group index *a_index*. */
803 LUPI_HOST_DEVICE double threshold( ) const { return( m_threshold ); } /**< Returns the value of the **m_threshold**. */
804 LUPI_HOST_DEVICE std::size_t offset( ) const { return( m_offset ); } /**< Returns the value of the **m_offset**. */
805 LUPI_HOST_DEVICE double crossSection( std::size_t a_index, bool a_sampling = false ) const {
806 if( a_index < m_offset ) return( 0.0 );
807 std::size_t index = a_index - m_offset;
808 if( index >= m_crossSections.size( ) ) return( 0.0 );
809
810 double _crossSection( m_crossSections[index] );
811 if( a_sampling && ( index == 0 ) ) {
812 _crossSection += m_augmentedThresholdCrossSection;
813 }
814 return( _crossSection );
815 }
816 LUPI_HOST_DEVICE double augmentedThresholdCrossSection( ) const { return( m_augmentedThresholdCrossSection ); } /**< Returns the value of the **m_augmentedThresholdCrossSection**. */
818 LUPI_HOST void write( FILE *a_file, std::size_t a_reactionIndex ) const ;
819};
820
821/*
822============================================================
823============== HeatedCrossSectionMultiGroup ==============
824============================================================
825*/
827
828 private:
829 Vector<double> m_totalCrossSection; /**< The total multi-group cross section. */
830 Vector<double> m_augmentedCrossSection; /**< The total multi-group cross section used for sampling with rejection (i.e., null-reactions). */
831 Vector<double> m_depositionEnergy; /**< The total multi-group, deposition-energy cross section (related to the kinetic energy of the untracked outgoing particles). */
832 Vector<double> m_depositionMomentum; /**< The total multi-group, deposition-momentum cross section. */
833 Vector<double> m_productionEnergy; /**< The total multi-group, Q-value cross section. */
834 Vector<MultiGroupGain *> m_gains; /**< The total multi-group, gain cross section for each tracked particle. */
836
837 public:
840 Transporting::MC const &a_settings, GIDI::Styles::TemperatureInfo const &a_temperatureInfo,
841 GIDI::Transporting::Particles const &a_particles, std::vector<GIDI::Reaction const *> const &a_reactions, std::string const &a_label,
842 bool a_zeroReactions, GIDI::ExcludeReactionsSet const &a_reactionsToExclude );
844
845 LUPI_HOST_DEVICE HeatedReactionCrossSectionMultiGroup *operator[]( std::size_t a_index ) const { return( m_reactionCrossSections[a_index] ); }
846 /**< Returns the HeatedReactionCrossSectionMultiGroup for the reaction at index *a_index *a_index*. */
847 LUPI_HOST_DEVICE std::size_t numberOfReactions( ) const { return( m_reactionCrossSections.size( ) ); }
848 /**< Returns the number of reactions stored in *this*. */
849
850 LUPI_HOST_DEVICE std::size_t thresholdOffset( std::size_t a_index ) const { return( m_reactionCrossSections[a_index]->offset( ) ); }
851 /**< Returns the offset for the cross section for the reaction with index *a_index*. */
852 LUPI_HOST_DEVICE double threshold( std::size_t a_index ) const { return( m_reactionCrossSections[a_index]->threshold( ) ); }
853
854 LUPI_HOST_DEVICE Vector<double> &totalCrossSection( ) { return( m_totalCrossSection ); } /**< Returns a reference to member *m_totalCrossSection*. */
855 LUPI_HOST_DEVICE double crossSection( std::size_t a_hashIndex, bool a_sampling = false ) const ;
856 LUPI_HOST_DEVICE double augmentedCrossSection( std::size_t a_hashIndex ) const { return( m_augmentedCrossSection[a_hashIndex] ); }
857 /**< Returns the value of the of the augmented cross section the reaction at index *a_index*. */
858 LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex, std::size_t a_hashIndex,
859 bool a_sampling = false ) const {
860 return( m_reactionCrossSections[a_reactionIndex]->crossSection( a_hashIndex, a_sampling ) ); }
861 /**< Returns the reaction's cross section for the reaction at index *a_reactionIndex* and multi-group index *a_hashIndex*. */
862
863 LUPI_HOST_DEVICE double depositionEnergy( std::size_t a_hashIndex ) const { return( m_depositionEnergy[a_hashIndex] ); }
864 LUPI_HOST_DEVICE double depositionMomentum( std::size_t a_hashIndex ) const { return( m_depositionMomentum[a_hashIndex] ); }
865 LUPI_HOST_DEVICE double productionEnergy( std::size_t a_hashIndex ) const { return( m_productionEnergy[a_hashIndex] ); }
866 LUPI_HOST_DEVICE double gain( std::size_t a_hashIndex, int a_particleIndex ) const ;
867 LUPI_HOST_DEVICE double gainViaIntid( std::size_t a_hashIndex, int a_particleIntid ) const ;
868
869 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex );
870 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex );
871
873 LUPI_HOST void write( FILE *a_file ) const ;
874};
875
876/*
877============================================================
878============== HeatedCrossSectionsMultiGroup ==============
879============================================================
880*/
882
883 private:
884 Vector<double> m_temperatures;
885 Vector<double> m_thresholds;
886 Vector<int> m_multiGroupThresholdIndex; /**< This is the group where threshold starts, -1 otherwise. */
887 Vector<double> m_projectileMultiGroupBoundariesCollapsed;
888 Vector<HeatedCrossSectionMultiGroup *> m_heatedCrossSections;
889
890 public:
893
894 LUPI_HOST_DEVICE double minimumEnergy( ) const { return( m_projectileMultiGroupBoundariesCollapsed[0] ); }
895 LUPI_HOST_DEVICE double maximumEnergy( ) const { return( m_projectileMultiGroupBoundariesCollapsed.back( ) ); }
896 LUPI_HOST_DEVICE Vector<double> const &temperatures( ) const { return( m_temperatures ); } /**< Returns the value of the **m_temperatures**. */
897
898 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,
899 GIDI::Styles::TemperatureInfos const &a_temperatureInfos, std::vector<GIDI::Reaction const *> const &a_reactions,
900 std::vector<GIDI::Reaction const *> const &a_orphanProducts, bool a_zeroReactions, GIDI::ExcludeReactionsSet const &a_reactionsToExclude );
901
902 LUPI_HOST_DEVICE int multiGroupThresholdIndex( std::size_t a_index ) const { return( m_multiGroupThresholdIndex[a_index] ); }
903 /**< Returns the threshold for the reaction at index *a_index*. */
904 LUPI_HOST_DEVICE Vector<double> const &projectileMultiGroupBoundariesCollapsed( ) const { return( m_projectileMultiGroupBoundariesCollapsed ); }
905 /**< Returns the value of the **m_projectileMultiGroupBoundariesCollapsed**. */
906 LUPI_HOST_DEVICE Vector<HeatedCrossSectionMultiGroup *> const &heatedCrossSections( ) const { return( m_heatedCrossSections ); }
907
908 LUPI_HOST_DEVICE double threshold( std::size_t a_index ) const { return( m_thresholds[a_index] ); } /**< Returns the threshold for the reaction at index *a_index*. */
909
910 LUPI_HOST_DEVICE double crossSection( std::size_t a_hashIndex, double a_temperature, bool a_sampling = false ) const ;
911 LUPI_HOST_DEVICE void crossSectionVector( double a_temperature, double a_userFactor, std::size_t a_numberAllocated,
912 double *a_crossSectionVector ) const ;
913 LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex, std::size_t a_hashIndex, double a_temperature, bool a_sampling = false ) const ;
914 LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex, double a_temperature, double a_energy_in ) const ;
915 template <typename RNG>
916 inline LUPI_HOST_DEVICE std::size_t sampleReaction( std::size_t a_hashIndex, double a_temperature, double a_energy_in,
917 double a_crossSection, RNG &&rng) const;
918
919 LUPI_HOST_DEVICE double depositionEnergy( std::size_t a_hashIndex, double a_temperature ) const ;
920 LUPI_HOST_DEVICE double depositionMomentum( std::size_t a_hashIndex, double a_temperature ) const ;
921 LUPI_HOST_DEVICE double productionEnergy( std::size_t a_hashIndex, double a_temperature ) const ;
922 LUPI_HOST_DEVICE double gain( std::size_t a_hashIndex, double a_temperature, int a_particleIndex ) const ;
923 LUPI_HOST_DEVICE double gainViaIntid( std::size_t a_hashIndex, double a_temperature, int a_particleIntid ) const ;
924
925 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex );
926 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex );
927
929 LUPI_HOST void write( FILE *a_file, int a_temperatureIndex ) const ;
930 LUPI_HOST void print( ) const ;
931};
932
933/*
934============================================================
935================== NuclideGammaBranchInfo ==================
936============================================================
937*/
939
940 private:
941 double m_probability; /**< The probability that the level decays to state *m_residualStateIndex*. */
942 double m_photonEmissionProbability; /**< The conditional probability the the decay emitted a photon. */
943 double m_gammaEnergy; /**< The energy of the emitted photon. */
944 int m_residualStateIndex; /**< The state the residual is left in after photon decay. */
945 bool m_residualStateKindIsContinuum; /**< True if the kind of the residual state (i.e., nuclide) is 'continuum' and false otherwise. */
946
947 public:
949 LUPI_HOST NuclideGammaBranchInfo( PoPI::NuclideGammaBranchInfo const &a_nuclideGammaBranchInfo,
950 std::map<std::string, int> &a_stateNamesToIndices, bool a_makePhotonEmissionProbabilitiesOne );
951
952 LUPI_HOST_DEVICE double probability( ) const { return( m_probability ); } /**< Returns the value of the **m_probability**. */
953 LUPI_HOST_DEVICE double photonEmissionProbability( ) const { return( m_photonEmissionProbability ); } /**< Returns the value of the **m_photonEmissionProbability**. */
954 LUPI_HOST_DEVICE double gammaEnergy( ) const { return( m_gammaEnergy ); } /**< Returns the value of the **m_gammaEnergy**. */
955 LUPI_HOST_DEVICE int residualStateIndex( ) const { return( m_residualStateIndex ); } /**< Returns the value of the **m_residualStateIndex**. */
956 LUPI_HOST_DEVICE bool residualStateKindIsContinuum( ) const { return( m_residualStateKindIsContinuum ); } /**< Returns the value of the **m_residualStateKindIsContinuum. **. */
957
959 LUPI_HOST void print( ProtareSingle const *a_protareSingle, std::string const &a_indent, std::string const &a_iFormat,
960 std::string const &a_energyFormat, std::string const &a_dFormat ) const ;
961};
962
963/*
964============================================================
965============== NuclideGammaBranchStateInfo =================
966============================================================
967*/
969
970 private:
971 char m_state[16]; /**< The GNDS PoPs id for the nuclide. */
972 int m_intid; /**< The GNDS PoPs intid for the nuclide. */
973 double m_nuclearLevelEnergy; /**< The nuclear level excitation energy of the level (state). */
974 double m_nuclearLevelEnergyWidth; /**< This is 0.0 except for GRIN realized continuum levels where this is the energy width from this level to the next higher level. */
975 double m_multiplicity; /**< The average multiplicity of photons emitted including the emission from sub-levels. */
976 double m_averageGammaEnergy; /**< The average energy of photons emitted including the emission from sub-levels. */
977 Vector<std::size_t> m_branchIndices; /**< The list of indices into the ProtareSingle.m_branches member that this level decays to. */
978
979 public:
982 std::vector<NuclideGammaBranchInfo *> &a_nuclideGammaBranchInfos,
983 std::map<std::string, int> &a_stateNamesToIndices, bool a_makePhotonEmissionProbabilitiesOne,
984 bool a_ignoreNuclearLevelEnergy );
985
986 LUPI_HOST_DEVICE char const *state( ) const { return( m_state ); } /**< Returns a pointer to the **m_state** member. */
987 LUPI_HOST_DEVICE int intid( ) const { return( m_intid ); } /**< Returns a pointer to the **m_intid** member. */
988 LUPI_HOST_DEVICE double nuclearLevelEnergy( ) const { return( m_nuclearLevelEnergy ); } /**< Returns the value of the **m_nuclearLevelEnergy** member. */
989 LUPI_HOST_DEVICE double nuclearLevelEnergyWidth( ) const { return( m_nuclearLevelEnergyWidth ); }
990 /**< Returns the value of the *m_nuclearLevelEnergyWidth* member. */
991 LUPI_HOST_DEVICE double multiplicity( ) const { return( m_multiplicity ); } /**< Returns the value of the **m_multiplicity** member. */
992 LUPI_HOST_DEVICE double averageGammaEnergy( ) const { return( m_averageGammaEnergy ); } /**< Returns the value of the **m_averageGammaEnergy** member. */
993 LUPI_HOST_DEVICE Vector<std::size_t> const &branchIndices( ) const { return( m_branchIndices ); } /**< Returns the value of the **m_branchIndices** member. */
994
996 LUPI_HOST void print( ProtareSingle const *a_protareSingle, std::string const &a_indent, std::string const &a_iFormat,
997 std::string const &a_energyFormat, std::string const &a_dFormat ) const ;
998};
999
1000/*
1001============================================================
1002=============== GRIN_levelsAndProbabilities ================
1003============================================================
1004*/
1005
1007
1008 public:
1009 Vector<int> m_levels; /**< The list of nuclide indices for the nuclides in *m_state* as stored in member ProtareSingle::m_nuclideGammaBranchStateInfos. */
1010 Vector<double> m_summedProbabilities; /**< The running sum of the probability for choosing a state from m_states. */
1011 Vector<bool> m_isModelledLevel; /**< The entry for each item in *m_levels* which is true if the level is a modelled level and false otherwise. */
1012
1013 public:
1015 LUPI_HOST GRIN_levelsAndProbabilities( SetupInfo &a_setupInfo, PoPI::Database const &a_pops,
1016 GIDI::Table::Table const &a_table, bool a_normalize );
1018
1019 LUPI_HOST void set( std::vector<int> const &a_levels, std::vector<double> const &a_probabilities );
1020
1021 template <typename RNG>
1022 inline LUPI_HOST_DEVICE int sampleInelasticLevel( double a_energy, RNG && a_rng );
1024};
1025
1026/*
1027============================================================
1028================= GRIN_inelasticForEnergy ==================
1029============================================================
1030*/
1031
1033
1034 private:
1035 Vector<std::size_t> m_indices;
1036 Vector<double> m_thresholds;
1037 GRIN_levelsAndProbabilities m_levelsAndProbabilities;
1038
1039 public:
1041 LUPI_HOST GRIN_inelasticForEnergy( SetupInfo &a_setupInfo, double a_projectileMass, double a_targetMass,
1042 PoPI::Database const &a_pops, GIDI::GRIN::InelasticIncidentEnergy const *inelasticIncidentEnergy );
1044
1045 LUPI_HOST_DEVICE int sampleLevelIndex( double a_projectileEnergy, double a_random ) const ;
1047};
1048
1049/*
1050============================================================
1051====================== GRIN_inelastic ======================
1052============================================================
1053*/
1054
1056
1057 private:
1058 int m_neutronIndex;
1059 int m_neutronUserParticleIndex;
1060 double m_neutronMass;
1061
1062 int m_targetIntid;
1063 int m_targetIndex;
1064 int m_targetUserParticleIndex;
1065 double m_targetMass;
1066
1067 Vector<double> m_energies;
1068 Vector<GRIN_inelasticForEnergy *> m_inelasticForEnergy;
1069
1070 public:
1072 LUPI_HOST GRIN_inelastic( SetupInfo &a_setupInfo, GIDI::GRIN::GRIN_continuumGammas const &GRIN_continuumGammas );
1074
1075 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex );
1076 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex );
1077
1078 template <typename RNG, typename PUSHBACK>
1079 inline LUPI_HOST_DEVICE bool sampleProducts( ProtareSingle const *a_protare, double a_projectileEnergy, Sampling::Input &a_input,
1080 RNG && a_rng, PUSHBACK && a_push_back, Sampling::ProductHandler &a_products ) const ;
1082};
1083
1084/*
1085============================================================
1086================= GRIN_captureToCompound ================
1087============================================================
1088*/
1089
1091
1092 private:
1093 std::size_t m_index; /**< This is the index into ProtareSingle.m_nuclideGammaBranchStateInfos of the compound level forms by the capture. */
1094 GRIN_levelsAndProbabilities m_continuumIndices; /**< This is the list of the levels the compound can decay to minus the known levels. */
1095
1096 public:
1098 LUPI_HOST GRIN_captureToCompound( SetupInfo &a_setupInfo, PoPI::Database const &a_pops, std::string a_compoundId );
1100
1101 LUPI_HOST_DEVICE std::size_t index( ) const { return( m_index ); }
1102 template <typename RNG>
1103 inline LUPI_HOST_DEVICE int sampleCaptureLevel( ProtareSingle const *a_protare, double a_energy, RNG && a_rng, bool a_checkEnergy ) const ;
1105};
1106
1107/*
1108============================================================
1109=============== GRIN_captureLevelProbability ===============
1110============================================================
1111*/
1112
1113/*
1114* The m_capturePrimaryToContinua are the modelled primary capture nuclides needed when one of the nuclide in
1115* *m_levelsAndProbabilities* is not selected. The nuclide in *m_capturePrimaryToContinua* whose nuclear level
1116* energy as found in *m_nuclearLevelEnergies* is closest but below the * neutron separation energy plus the
1117* kinetic energy in the com frame is to be used when a nuclide in *m_levelsAndProbabilities* is not selected.
1118* the ints in *m_capturePrimaryToContinua* are indicies into ProtareSingle.m_nuclideGammaBranchStateInfos.
1119*/
1120
1122
1123 private:
1124 GRIN_levelsAndProbabilities m_knownLevelsAndProbabilities; /**< These are the known primary capture nuclide as probabilites. The probabilites do not sum to one since not all are know. */
1125 Vector<GRIN_captureToCompound *> m_captureToCompounds; /**< This is a list of nuclides that have the same spin/parity as the input channel and the needed nuclear excitation level. */
1126
1127 public:
1129 LUPI_HOST GRIN_captureLevelProbability( SetupInfo &a_setupInfo, PoPI::Database const &a_pops,
1130 GIDI::GRIN::CaptureLevelProbability const *a_captureLevelProbability );
1132
1133 template <typename RNG>
1134 inline LUPI_HOST_DEVICE int sampleCaptureLevel( ProtareSingle const *a_protare, double a_energy, RNG && a_rng );
1136};
1137
1138/*
1139============================================================
1140====================== GRIN_capture ========================
1141============================================================
1142*/
1143
1145
1146 private:
1147 double m_captureNeutronSeparationEnergy; /**< For capture, the neutron separation energy as needed to emit primary gammas. */
1148 Vector<double> m_summedProbabilities; /**< The running sum of the probabilites for the *m_captureLevelProbabilities* member data. */
1149 Vector<GRIN_captureLevelProbability *> m_captureLevelProbabilities; /**< The list of capture levels with probabilites. */
1150 int m_residualIntid; /**< The intid of the heavy residual particle. */
1151 int m_residualIndex; /**< The PoPI index of the heavy residual particle. */
1152 int m_residualUserIndex; /**< The user index of the heavy residual particle. */
1153 double m_residualMass; /**< The mass if the heavy residual particle. */
1154
1155 public:
1157 LUPI_HOST GRIN_capture( SetupInfo &a_setupInfo, GIDI::GRIN::GRIN_continuumGammas const &GRIN_continuumGammas );
1159
1160 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex );
1161 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex );
1162 template <typename RNG, typename PUSHBACK>
1163 inline LUPI_HOST_DEVICE bool sampleProducts( ProtareSingle const *a_protare, double a_projectileEnergy, Sampling::Input &a_input,
1164 RNG && a_rng, PUSHBACK && a_push_back, Sampling::ProductHandler &a_products ) const ;
1166};
1167
1168/*
1169============================================================
1170========================= Product ==========================
1171============================================================
1172*/
1173class Product {
1174
1175 private:
1176 String m_ID;
1177 int m_intid;
1178 int m_index;
1179 int m_userParticleIndex;
1180 String m_label;
1181 bool m_isCompleteParticle;
1182 double m_mass;
1183 double m_excitationEnergy;
1184 TwoBodyOrder m_twoBodyOrder;
1185 int m_initialStateIndex; /**< If the product has branching photons, then this is the state index to start the branching. */
1186 Functions::Function1d *m_multiplicity;
1187 Distributions::Distribution *m_distribution;
1188// still need *m_averageEnergy *m_averageMomentum;
1189
1190 OutputChannel *m_outputChannel;
1191
1192 public:
1194 LUPI_HOST Product( GIDI::Product const *a_product, SetupInfo &a_setupInfo, Transporting::MC const &a_settings, GIDI::Transporting::Particles const &a_particles,
1195 bool a_isFission );
1196 LUPI_HOST Product( PoPI::Database const &a_pop, std::string const &a_ID, std::string const &a_label );
1198
1199 LUPI_HOST String const &ID( ) const { return( m_ID ); } /**< Returns a const reference to the *m_ID* member. */
1200 LUPI_HOST_DEVICE int intid( ) const { return( m_intid); } /**< Returns the value of the *m_intid* member. */
1201 LUPI_HOST_DEVICE int index( ) const { return( m_index); } /**< Returns the value of the *m_index* member. */
1202 LUPI_HOST_DEVICE int userParticleIndex( ) const { return( m_userParticleIndex ); } /**< Returns the value of the **m_userParticleIndex**. */
1203 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex );
1204 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex );
1206 LUPI_HOST_DEVICE String label( ) const { return( m_label ); } /**< Returns the value of the **m_label**. */
1207 LUPI_HOST_DEVICE bool isCompleteParticle( ) const { return( m_isCompleteParticle ); } /**< Returns the value of the **m_isCompleteParticle**. */
1208 LUPI_HOST_DEVICE double mass( ) const { return( m_mass ); } /**< Returns the value of the **m_mass**. */
1209 LUPI_HOST_DEVICE double excitationEnergy( ) const { return( m_excitationEnergy ); } /**< Returns the value of the **m_excitationEnergy**. */
1210 LUPI_HOST_DEVICE TwoBodyOrder twoBodyOrder( ) const { return( m_twoBodyOrder ); } /**< Returns the value of the **m_twoBodyOrder**. */
1211 LUPI_HOST_DEVICE double finalQ( double a_x1 ) const ;
1212 LUPI_HOST_DEVICE bool hasFission( ) const ;
1213
1214// FIXME (1) see FIXME (1) in MC class.
1215 LUPI_HOST_DEVICE Functions::Function1d const *multiplicity( ) const { return( m_multiplicity ); } /**< Returns the value of the **m_multiplicity**. */
1216 LUPI_HOST void setMultiplicity( Functions::Function1d *a_multiplicity ) { m_multiplicity = a_multiplicity; }
1217 LUPI_HOST_DEVICE double productAverageMultiplicity( int a_index, double a_projectileEnergy ) const ;
1218 LUPI_HOST_DEVICE double productAverageMultiplicityViaIntid( int a_intid, double a_projectileEnergy ) const ;
1219// FIXME (1) see FIXME (1) in MC class.
1220 LUPI_HOST_DEVICE Distributions::Distribution const *distribution( ) const { return( m_distribution ); } /**< Returns the value of the **m_distribution**. */
1221 LUPI_HOST_DEVICE Distributions::Distribution *distribution( ) { return( m_distribution ); } /**< Returns the value of the **m_distribution**. */
1222 LUPI_HOST void distribution( Distributions::Distribution *a_distribution ) { m_distribution = a_distribution; }
1223// FIXME (1) see FIXME (1) in MC class.
1224 LUPI_HOST_DEVICE OutputChannel *outputChannel( ) { return( m_outputChannel ); } /**< Returns the value of the **m_outputChannel**. */
1225
1226 template <typename RNG, typename PUSHBACK>
1227 inline LUPI_HOST_DEVICE void sampleProducts( ProtareSingle const *a_protare, double a_projectileEnergy, Sampling::Input &a_input,
1228 RNG && a_rng, PUSHBACK && a_push_back, Sampling::ProductHandler &a_products ) const ;
1229 template <typename RNG, typename PUSHBACK>
1230 inline LUPI_HOST_DEVICE void sampleFinalState( ProtareSingle const *a_protare, double a_projectileEnergy, Sampling::Input &a_input,
1231 RNG && a_rng, PUSHBACK && a_push_back, Sampling::ProductHandler &a_products ) const ;
1232 template <typename RNG>
1233 inline LUPI_HOST_DEVICE void angleBiasing( Reaction const *a_reaction, int a_pid, double a_temperature, double a_energy_in, double a_mu_lab,
1234 double &a_probability, double &a_energy_out, RNG && a_rng, double &a_cumulative_weight ) const ;
1235 template <typename RNG>
1236 inline LUPI_HOST_DEVICE void angleBiasingViaIntid( Reaction const *a_reaction, int a_intid, double a_temperature, double a_energy_in, double a_mu_lab,
1237 double &a_probability, double &a_energy_out, RNG && a_rng, double &a_cumulative_weight ) const ;
1239};
1240
1241/*
1242============================================================
1243====================== DelayedNeutron ======================
1244============================================================
1245*/
1247
1248 private:
1249 int m_delayedNeutronIndex; /**< If this is a delayed fission neutron, this is its index. */
1250 double m_rate; /**< The GNDS rate for the delayed neutron. */
1251 Product m_product; /**< The GNDS <**product**> node. */
1252
1253 public:
1255 LUPI_HOST DelayedNeutron( int a_index, GIDI::DelayedNeutron const *a_delayedNeutron, SetupInfo &a_setupInfo, Transporting::MC const &a_settings, GIDI::Transporting::Particles const &a_particles );
1257
1258 LUPI_HOST_DEVICE int delayedNeutronIndex( ) const { return( m_delayedNeutronIndex ); }
1259 LUPI_HOST_DEVICE double rate( ) const { return( m_rate ); }
1260 LUPI_HOST_DEVICE Product const &product( ) const { return( m_product ); }
1261 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex );
1262 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex );
1263
1265};
1266
1267/*
1268============================================================
1269======================= OutputChannel ======================
1270============================================================
1271*/
1273
1274 private:
1275 ChannelType m_channelType;
1276 int m_neutronIndex; /**< The index of the neutron in the use PoPs database. */
1277 bool m_isFission;
1278 bool m_hasFinalStatePhotons; /**< If **true**, *this* channel has a photon with finalState attribute. */
1279
1280 Functions::Function1d_d1 *m_Q; /**< The Q-function for the output channel. Note, this is currently always the *evaluated* form even when running with multi-group data. */
1281 Vector<Product *> m_products;
1282 Functions::Function1d *m_totalDelayedNeutronMultiplicity;
1283 Vector<DelayedNeutron *> m_delayedNeutrons;
1284
1285 public:
1287 LUPI_HOST OutputChannel( GIDI::OutputChannel const *a_outputChannel, SetupInfo &a_setupInfo, Transporting::MC const &a_settings, GIDI::Transporting::Particles const &a_particles );
1289
1290 LUPI_HOST_DEVICE Product *operator[]( std::size_t a_index ) { return( m_products[a_index] ); } /**< Returns a pointer to the product at index *a_index*. */
1291
1292 LUPI_HOST_DEVICE bool isTwoBody( ) const { return( m_channelType == ChannelType::twoBody ); } /**< Returns true if output channel is two-body and false otherwise. */
1293 LUPI_HOST_DEVICE double finalQ( double a_x1 ) const ;
1294 LUPI_HOST_DEVICE bool isFission( ) const { return( m_isFission ); } /**< Returns the value of the **m_isFission**. */
1295 LUPI_HOST_DEVICE bool hasFission( ) const ;
1296// FIXME (1) see FIXME (1) in MC class.
1297 LUPI_HOST_DEVICE Functions::Function1d_d1 *Q( ) { return( m_Q ); } /**< Returns the pointer of the **m_Q** member. */
1298
1299 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex );
1300 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex );
1302// FIXME (1) see FIXME (1) in MC class.
1303 LUPI_HOST_DEVICE Vector<Product *> const &products( ) const { return( m_products ); } /**< Returns the value of the **m_products**. */
1304
1305 Vector<DelayedNeutron *> delayedNeutrons( ) const { return( m_delayedNeutrons ); }
1306 LUPI_HOST_DEVICE DelayedNeutron const *delayedNeutron( std::size_t a_index ) const { return( m_delayedNeutrons[a_index] ); }
1307
1308 LUPI_HOST void moveProductsEtAlToReaction( std::vector<Product *> &a_products, Functions::Function1d **a_totalDelayedNeutronMultiplicity,
1309 std::vector<DelayedNeutron *> &a_delayedNeutrons, std::vector<Functions::Function1d_d1 *> &a_Qs );
1310#ifdef MCGIDI_USE_OUTPUT_CHANNEL
1311 LUPI_HOST void addOrphanProductToProductList( std::vector<Product *> &a_associatedOrphanProducts ) const ;
1312 LUPI_HOST_DEVICE void addOrphanProductToProductList( Vector<Product *> &a_associatedOrphanProducts ) const ;
1313#endif
1314
1315 LUPI_HOST_DEVICE double productAverageMultiplicity( int a_index, double a_projectileEnergy ) const ;
1316 LUPI_HOST_DEVICE double productAverageMultiplicityViaIntid( int a_intid, double a_projectileEnergy ) const ;
1317
1318template <typename RNG, typename PUSHBACK>
1319 inline LUPI_HOST_DEVICE void sampleProducts( ProtareSingle const *a_protare, double a_projectileEnergy, Sampling::Input &a_input,
1320 RNG && a_rng, PUSHBACK && a_push_back, Sampling::ProductHandler &a_products ) const;
1321 template <typename RNG>
1322 inline LUPI_HOST_DEVICE void angleBiasing( Reaction const *a_reaction, int a_pid, double a_temperature, double a_energy_in, double a_mu_lab,
1323 double &a_probability, double &a_energy_out, RNG && a_rng, double &a_cumulative_weight ) const ;
1324 template <typename RNG>
1325 inline LUPI_HOST_DEVICE void angleBiasingViaIntid( Reaction const *a_reaction, int a_intid, double a_temperature, double a_energy_in, double a_mu_lab,
1326 double &a_probability, double &a_energy_out, RNG && a_rng, double &a_cumulative_weight ) const ;
1328};
1329
1330/*
1331============================================================
1332========================= Reaction =========================
1333============================================================
1334*/
1336
1337 private:
1338 ProtareSingle *m_protareSingle; /**< The ProtareSingle this reaction resides in. */
1339 std::size_t m_reactionIndex; /**< The index of the reaction in the ProtareSingle. */
1340 std::size_t m_GIDI_reactionIndex; /**< The index of the reaction in the GIDI::ProtareSingle. */
1341 String m_label; /**< The **GNDS** label for the reaction. */
1342 int m_ENDF_MT; /**< The ENDF MT value for the reaction. */
1343 int m_ENDL_C; /**< The ENDL C value for the reaction. */
1344 int m_ENDL_S; /**< The ENDL S value for the reaction. */
1345 int m_initialStateIndex; /**< If not -1, then reaction contains a branching gamma data with this index for the data in m_nuclideGammaBranchStateInfos member of its **ProtareSingle** instance. */
1346 int m_neutronIndex; /**< The index of the neutron in the use PoPs database. */
1347 bool m_hasFission; /**< Is *true* if the reaction is a fission reaction and *false* otherwise. */
1348 double m_projectileMass; /**< The mass of the projectile. */
1349 double m_targetMass; /**< The mass of the target. */
1350 double m_crossSectionThreshold; /**< The threshold for the reaction. */
1351 double m_twoBodyThreshold; /**< This is the T_1 value needed to do two-body kinematics. */
1352 bool m_hasFinalStatePhotons; /**< If **true**, *this* reaction has a photon with finalState attribute. */
1353 int m_fissionResiduaIntid; /**< The intid of the special ENDL 99120 or 99125 fission residual. */
1354 int m_fissionResiduaIndex; /**< The index of the special ENDL 99120 or 99125 fission residual. */
1355 int m_fissionResiduaUserIndex; /**< The user index of the special ENDL 99120 or 99125 fission residual. */
1356 GIDI::Construction::FissionResiduals m_fissionResiduals; /**< This member specifies what fission redisual products will be added to the list of products produced in a fission reaction. */
1357 double m_fissionResidualMass; /**< The mass of the special ENDL 99120 or 99125 fission residual. */
1358
1359 Vector<int> m_productIntids; /**< The list of all products *this* reaction can product by their intid. */
1360 Vector<int> m_productIndices; /**< The list of all products *this* reaction can product by their index. */
1361 Vector<int> m_userProductIndices; /**< The list of all products *this* reaction can product as user indices. */
1362 Vector<int> m_productMultiplicities; /**< The list of all multiplicities for each product in *m_productIntids* . */
1363 Vector<int> m_productIntidsTransportable; /**< The list of all transportabls products *this* reaction can product by their intid. */
1364 Vector<int> m_productIndicesTransportable; /**< The list of all transportabls products *this* reaction can product by their index. */
1365 Vector<int> m_userProductIndicesTransportable; /**< The list of all transportabls products *this* reaction can product as user indices. */
1366
1367 Vector<Functions::Function1d_d1 *> m_Qs; /**< A list of Q-functions that is used when the C macro MCGIDI_USE_OUTPUT is defined. */
1368 Vector<Product *> m_products; /**< A list of all transporting products directly or nested in **m_outputChannel** that is used instead of having **m_outputChannel** loop of all transporting products if the C macro MCGIDI_USE_OUTPUT_CHANNEL is not defined. */
1369 Functions::Function1d *m_totalDelayedNeutronMultiplicity;
1370 Vector<DelayedNeutron *> m_delayedNeutrons; /**< A list of all delayedNeutrons that can be used instead of having m_outputChannel loop of all transporting products. For *m_products* for more details. */
1371 /**< The total delayed neutron multiplicity used when the C macro MCGIDI_USE_OUTPUT is defined. */
1372#ifdef MCGIDI_USE_OUTPUT_CHANNEL
1373 OutputChannel *m_outputChannel; /**< The output channel for this reaction. Only used if the C macro MCGIDI_USE_OUTPUT is defined. */
1374#endif
1375 Vector<std::size_t> m_associatedOrphanProductIndices; /**< The indices in the Protare's m_orphanProducts member for the orphanProducts associated with this reaction. */
1376 Vector<Product *> m_associatedOrphanProducts; /**< The list of products from the orphanProduct reaction. */ /* Do not delete entries as owned by orphanProduct reaction. */
1377// Still need m_availableEnergy and m_availableMomentum.
1378
1379// GRIN specials: new non-GNDS GRIN stuff.
1380 bool m_GRIN_specialSampleProducts; /**< This will be true if sampling products with GRIN special inelastic or capture data. */
1381 double m_GRIN_inelasticThreshold; /**< For inelastic, the a_projectileEnergy must be greater than this value
1382 or use standard product sampling. This is needed, for example, as the Fe56 MT 91 cross section
1383 starts below the MT 89 cross section. Ergo, below the threshold for the nuclear level energy
1384 for the first simulated Fe56 nuclear level. */
1385 double m_GRIN_maximumCaptureIncidentEnergy; /**< For capture, the projectile energy must be less thans this value or use standard product sampling. */
1386 GRIN_inelastic *m_GRIN_inelastic; /**< A nullptr or a pointer to an instance of GIND_continuumInelatic (see below). */
1387 GRIN_capture *m_GRIN_capture; /**< A nullptr or a pointer to an instance of GIND_capture (see below). */
1388
1389 public:
1391 LUPI_HOST Reaction( GIDI::Reaction const &a_reaction, SetupInfo &a_setupInfo, Transporting::MC const &a_settings, GIDI::Transporting::Particles const &a_particles,
1392 GIDI::Styles::TemperatureInfos const &a_temperatureInfos );
1394
1395 inline LUPI_HOST_DEVICE void updateProtareSingleInfo( ProtareSingle *a_protareSingle, std::size_t a_reactionIndex ) {
1396 m_protareSingle = a_protareSingle;
1397 m_reactionIndex = a_reactionIndex;
1398 }
1399 LUPI_HOST_DEVICE ProtareSingle const *protareSingle( ) const { return( m_protareSingle ); } /**< Returns the value of the **m_protareSingle**. */
1400 LUPI_HOST_DEVICE std::size_t reactionIndex( ) const { return( m_reactionIndex ); } /**< Returns the value of the **m_reactionIndex**. */
1401 LUPI_HOST_DEVICE std::size_t GIDI_reactionIndex( ) const { return( m_GIDI_reactionIndex ); } /**< Returns the value of the **m_GIDI_reactionIndex** member. */
1402 LUPI_HOST_DEVICE String const &label( ) const { return( m_label ); } /**< Returns the value of the **m_label**. */
1403 LUPI_HOST_DEVICE int ENDF_MT( ) const { return( m_ENDF_MT ); } /**< Returns the value of the **m_ENDF_MT**. */
1404 LUPI_HOST_DEVICE int ENDL_C( ) const { return( m_ENDL_C ); } /**< Returns the value of the **m_ENDL_C**. */
1405 LUPI_HOST_DEVICE int ENDL_S( ) const { return( m_ENDL_S ); } /**< Returns the value of the **m_ENDL_S**. */
1406 LUPI_HOST_DEVICE int initialStateIndex( ) const { return( m_initialStateIndex ); } /**< Returns the value of the **m_initialStateIndex** member. */
1407 LUPI_HOST_DEVICE double finalQ( double a_energy ) const ;
1408 LUPI_HOST_DEVICE bool hasFission( ) const { return( m_hasFission ); } /**< Returns the value of the **m_hasFission**. */
1409 LUPI_HOST_DEVICE double projectileMass( ) const { return( m_projectileMass ); } /**< Returns the value of the **m_projectileMass**. */
1410 LUPI_HOST_DEVICE double targetMass( ) const { return( m_targetMass ); } /**< Returns the value of the **m_targetMass**. */
1411 LUPI_HOST_DEVICE double crossSectionThreshold( ) const { return( m_crossSectionThreshold ); } /**< Returns the value of the **m_crossSectionThreshold**. */
1412 LUPI_HOST_DEVICE double twoBodyThreshold( ) const { return( m_twoBodyThreshold ); } /**< Returns the value of the *m_twoBodyThreshold* member. */
1413 LUPI_HOST_DEVICE double crossSection( URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex,
1414 double a_temperature, double a_energy ) const ;
1415 LUPI_HOST_DEVICE double crossSection( URR_protareInfos const &a_URR_protareInfos, double a_temperature, double a_energy ) const ;
1416 LUPI_HOST GIDI::Functions::XYs1d crossSectionAsGIDI_XYs1d( double a_temperature ) const ;
1417
1418 LUPI_HOST_DEVICE Vector<int> const &productIntids( ) const { return( m_productIntids ); }
1419 LUPI_HOST_DEVICE Vector<int> const &productIndices( ) const { return( m_productIndices ); } /**< Returns a const reference to the *m_productIntids* member. */
1420 LUPI_HOST_DEVICE Vector<int> const &userProductIndices( ) const { return( m_userProductIndices ); } /**< Returns a const reference to the *m_productIndices* member. */
1421 LUPI_HOST_DEVICE std::size_t numberOfProducts( ) const { return( m_products.size( ) ); } /**< Returns the number of products in the **m_products** member. */
1422 LUPI_HOST_DEVICE Product const *product( std::size_t a_index ) const { return( m_products[a_index] ); }
1423 LUPI_HOST_DEVICE int productMultiplicity( int a_index ) const ;
1424 LUPI_HOST_DEVICE int productMultiplicityViaIntid( int a_intid ) const ;
1425 LUPI_HOST_DEVICE int productMultiplicities( int a_index ) const {
1426 LUPI::deprecatedFunction( "MCGIDI::Reaction::productMultiplicities", "MCGIDI::Reaction::productMultiplicity", "" );
1427 return( productMultiplicity( a_index ) ); } /**< This method is deprecated. Please use **productMultiplicity** instead. */
1428 LUPI_HOST_DEVICE double productAverageMultiplicity( int a_index, double a_projectileEnergy ) const ;
1429 LUPI_HOST_DEVICE double productAverageMultiplicityViaIntid( int a_intid, double a_projectileEnergy ) const ;
1430 LUPI_HOST_DEVICE Vector<int> const &productIntidsTransportable( ) const { return( m_productIntidsTransportable ); }
1431 /**< Returns a const reference to the *m_productIntidsTransportable* member. */
1432 LUPI_HOST_DEVICE Vector<int> const &productIndicesTransportable( ) const { return( m_productIndicesTransportable ); }
1433 /**< Returns a const reference to the *m_productIndicesTransportable* member. */
1434 LUPI_HOST_DEVICE Vector<int> const &userProductIndicesTransportable( ) const { return( m_userProductIndicesTransportable ); }
1435
1436#ifdef MCGIDI_USE_OUTPUT_CHANNEL
1437 LUPI_HOST_DEVICE OutputChannel const *outputChannel( ) const { return( m_outputChannel ); } /**< Returns the value of the **m_outputChannel**. */
1438#endif
1439 LUPI_HOST_DEVICE Vector<std::size_t> associatedOrphanProductIndices( ) const { return( m_associatedOrphanProductIndices ); } /**< Returns the value of the **m_associatedOrphanProductIndicex** member. */
1440 LUPI_HOST void addOrphanProductToProductList( std::vector<Product *> &a_associatedOrphanProducts ) const ;
1441 LUPI_HOST_DEVICE void addOrphanProductToProductList( Vector<Product *> &a_associatedOrphanProducts ) const ;
1443 LUPI_HOST void setOrphanProductData( std::vector<std::size_t> const &a_associatedOrphanProductIndcies,
1444 std::vector<Product *> const &a_associatedOrphanProducts );
1445
1446 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex );
1447 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex );
1449
1450 template <typename RNG, typename PUSHBACK>
1451 inline LUPI_HOST_DEVICE void sampleProducts( Protare const *a_protare, Sampling::Input &a_input,
1452 RNG && a_rng, PUSHBACK && a_push_back, Sampling::ProductHandler &a_products, bool a_checkOrphanProducts = true ) const ;
1453 template <typename RNG, typename PUSHBACK>
1454 inline LUPI_HOST_DEVICE static void sampleNullProducts( Protare const &a_protare, double a_projectileEnergy, Sampling::Input &a_input,
1455 RNG && a_rng, PUSHBACK && a_push_back, Sampling::ProductHandler &a_products );
1456 template <typename RNG>
1457 inline LUPI_HOST_DEVICE double angleBiasing( int a_pid, double a_temperature, double a_energy_in, double a_mu_lab, double &a_energy_out,
1458 RNG && a_rng, double *a_cumulative_weight = nullptr, bool a_checkOrphanProducts = true ) const ;
1459 template <typename RNG>
1460 inline LUPI_HOST_DEVICE double angleBiasingViaIntid( int a_intid, double a_temperature, double a_energy_in, double a_mu_lab, double &a_energy_out,
1461 RNG && a_rng, double *a_cumulative_weight = nullptr, bool a_checkOrphanProducts = true ) const ;
1463};
1464
1465/*
1466============================================================
1467========================== Protare =========================
1468============================================================
1469*/
1470class Protare {
1471
1472 private:
1473 ProtareType m_protareType; /**< The type of protare *this* is. */
1474
1475 String m_projectileID; /**< The PoPs id of the projectile. */
1476 int m_projectileIntid; /**< The PoPs intid of the projectile. */
1477 int m_projectileIndex; /**< The PoPs database index of the projectile. */
1478 int m_projectileUserIndex; /**< The projectile's index as specified by the user. */
1479 double m_projectileMass; /**< The mass of the projectile. */
1480 double m_projectileExcitationEnergy; /**< The nuclear excitation of the projectile. */
1481
1482 String m_targetID; /**< The PoPs intid of the target. */
1483 int m_targetIntid; /**< The PoPs index of the target. */
1484 int m_targetIndex; /**< The PoPs database index of the target. */
1485 int m_targetUserIndex; /**< The target's index as specified by the user. */
1486 double m_targetMass; /**< The mass of the target. */
1487 double m_targetExcitationEnergy; /**< The nuclear excitation of the target. */
1488
1489 int m_neutronIndex; /**< The neutron particle index from the user's pops database. */
1490 int m_userNeutronIndex; /**< The neutron particle index defined by the user. */
1491 int m_photonIndex; /**< The photon particle index from the user's pops database. */
1492 int m_userPhotonIndex; /**< The photon particle index defined by the user. */
1493
1494 String m_evaluation; /**< The evaluation string for the Protare. */
1495 GIDI::Frame m_projectileFrame; /**< The frame the projectile data are given in. */
1496
1497 Vector<int> m_productIntids; /**< The list of all products *this* protare can product by their intid. */
1498 Vector<int> m_productIndices; /**< The list of all products *this* reaction can product by their index. */
1499 Vector<int> m_userProductIndices; /**< The list of all products *this* reaction can product as user indices. */
1500 Vector<int> m_productIntidsTransportable; /**< The list of all transportabls products *this* protare can product by their intid. */
1501 Vector<int> m_productIndicesTransportable; /**< The list of all transportabls products *this* reaction can product by their index. */
1502 Vector<int> m_userProductIndicesTransportable; /**< The list of all transportabls products *this* reaction can product as user indices. */
1503
1504 bool m_isTNSL_ProtareSingle; /**< If *this* is a ProtareSingle instance with TNSL data *true* and otherwise *false*. */
1505
1506 LUPI_HOST void productIntidsAndIndices( std::set<int> const &a_intids, std::set<int> const &a_transportableIntids,
1507 std::set<int> const &a_indices, std::set<int> const &a_transportableIndices );
1508
1509 public:
1510 LUPI_HOST_DEVICE Protare( ProtareType a_protareType );
1511 LUPI_HOST Protare( ProtareType a_protareType, GIDI::Protare const &a_protare, Transporting::MC const &a_settings, PoPI::Database const &a_pops );
1512 virtual LUPI_HOST_DEVICE ~Protare( );
1513
1514 LUPI_HOST_DEVICE ProtareType protareType( ) const { return( m_protareType ); } /**< Returns the value of the **m_protareType** member. */
1515
1516 LUPI_HOST_DEVICE String const &projectileID( ) const { return( m_projectileID ); } /**< Returns the value of the **m_projectileID** member. */
1517 LUPI_HOST_DEVICE int projectileIntid( ) const { return( m_projectileIntid ); } /**< Returns the value of the **m_projectileIntid** member. */
1518 LUPI_HOST_DEVICE int projectileIndex( ) const { return( m_projectileIndex ); } /**< Returns the value of the **m_projectileIndex** member. */
1519 LUPI_HOST_DEVICE int projectileUserIndex( ) const { return( m_projectileUserIndex ); } /**< Returns the value of the **m_projectileUserIndex** member. */
1520 LUPI_HOST_DEVICE double projectileMass( ) const { return( m_projectileMass ); } /**< Returns the value of the **m_projectileMass** member. */
1521 LUPI_HOST_DEVICE double projectileExcitationEnergy( ) const { return( m_projectileExcitationEnergy ); } /**< Returns the value of the **m_projectileExcitationEnergy** member. */
1522
1523 LUPI_HOST_DEVICE String const &targetID( ) const { return( m_targetID ); } /**< Returns the value of the **m_targetID** member. */
1524 LUPI_HOST_DEVICE int targetIntid( ) const { return( m_targetIntid ); } /**< Returns the value of the **m_targetIntid** member. */
1525 LUPI_HOST_DEVICE int targetIndex( ) const { return( m_targetIndex ); } /**< Returns the value of the **m_targetIndex** member. */
1526 LUPI_HOST_DEVICE int targetUserIndex( ) const { return( m_targetUserIndex ); } /**< Returns the value of the **m_targetUserIndex** member. */
1527 LUPI_HOST_DEVICE double targetMass( ) const { return( m_targetMass ); } /**< Returns the value of the **m_targetMass** member. */
1528 LUPI_HOST_DEVICE double targetExcitationEnergy( ) const { return( m_targetExcitationEnergy ); } /**< Returns the value of the **m_targetExcitationEnergy** member. */
1529
1530 LUPI_HOST_DEVICE int photonIndex( ) const { return( m_photonIndex ); } /**< Returns the value of the **m_photonIndex** member. */
1531 LUPI_HOST_DEVICE int userPhotonIndex( ) const { return( m_userPhotonIndex ); } /**< Returns the value of the **m_userPhotonIndex** member. */
1532 LUPI_HOST_DEVICE String evaluation( ) const { return( m_evaluation ); } /**< Returns the value of the **m_evaluation** member. */
1533 LUPI_HOST GIDI::Frame projectileFrame( ) const { return( m_projectileFrame ); } /**< Returns the value of the **m_projectileFrame** member. */
1534
1535 LUPI_HOST Vector<int> const &productIntids( bool a_transportablesOnly ) const ;
1536 LUPI_HOST Vector<int> const &productIndices( bool a_transportablesOnly ) const ;
1537 LUPI_HOST Vector<int> const &userProductIndices( bool a_transportablesOnly ) const ;
1538 LUPI_HOST void setUserParticleIndex( int a_particleIndex, int a_userParticleIndex );
1539 LUPI_HOST void setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex );
1540
1541 LUPI_HOST_DEVICE bool isTNSL_ProtareSingle( ) const { return( m_isTNSL_ProtareSingle ); } /**< Returns the value of the **m_isTNSL_ProtareSingle** member. */
1542 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t numberOfProtares( ) const MCGIDI_TRUE_VIRTUAL; /**< Returns the number of protares contained in *this*. */
1543 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE ProtareSingle const *protare( std::size_t a_index ) const MCGIDI_TRUE_VIRTUAL; /**< Returns the **a_index** - 1 Protare contained in *this*. */
1544 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE ProtareSingle *protare( std::size_t a_index ) MCGIDI_TRUE_VIRTUAL; /**< Returns the **a_index** - 1 Protare contained in *this*. */
1545 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE ProtareSingle const *protareWithReaction( std::size_t a_index ) const MCGIDI_TRUE_VIRTUAL; /**< Returns the *ProtareSingle* that contains the (*a_index* - 1) reaction. */
1546
1547 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double minimumEnergy( ) const MCGIDI_TRUE_VIRTUAL; /**< Returns the minimum cross section domain. */
1548 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double maximumEnergy( ) const MCGIDI_TRUE_VIRTUAL ; /**< Returns the maximum cross section domain. */
1549 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE Vector<double> temperatures( std::size_t a_index = 0 ) const MCGIDI_TRUE_VIRTUAL ; /**< Returns the list of temperatures for the requested ProtareSingle. */
1550
1553
1558
1560
1562
1568
1570
1572 std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling = false ) const MCGIDI_TRUE_VIRTUAL;
1573 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE void crossSectionVector( double a_temperature, double a_userFactor,
1574 std::size_t a_numberAllocated, double *a_crossSectionVector ) const MCGIDI_TRUE_VIRTUAL;
1575 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex,
1576 URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex,
1577 double a_temperature, double a_energy, bool a_sampling = false ) const MCGIDI_TRUE_VIRTUAL;
1578 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos,
1579 double a_temperature, double a_energy ) const MCGIDI_TRUE_VIRTUAL;
1580 template <typename RNG>
1582 URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex, double a_crossSection, RNG && a_rng) const MCGIDI_TRUE_VIRTUAL;
1583
1584 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double depositionEnergy( std::size_t a_hashIndex, double a_temperature, double a_energy ) const MCGIDI_TRUE_VIRTUAL;
1585 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double depositionMomentum( std::size_t a_hashIndex, double a_temperature, double a_energy ) const MCGIDI_TRUE_VIRTUAL;
1586 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double productionEnergy( std::size_t a_hashIndex, double a_temperature, double a_energy ) const MCGIDI_TRUE_VIRTUAL;
1587 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double gain( std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIndex ) const MCGIDI_TRUE_VIRTUAL;
1588 MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double gainViaIntid( std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIntid ) const MCGIDI_TRUE_VIRTUAL;
1589
1591
1592 LUPI_HOST_DEVICE void serialize( LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode );
1593 LUPI_HOST_DEVICE void serialize2( LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode );
1594 LUPI_HOST_DEVICE void serializeCommon( LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode );
1595 LUPI_HOST_DEVICE long sizeOf( ) const ;
1597 LUPI_HOST_DEVICE void incrementMemorySize( long &a_totalMemory, long &a_sharedMemory );
1598
1602};
1603
1604/*
1605============================================================
1606====================== ProtareSingle =======================
1607============================================================
1608*/
1609class ProtareSingle : public Protare {
1610
1611 friend ProtareTNSL;
1612
1613 private:
1614 String m_interaction; /**< The protare's interaction string. */
1615 int m_URR_index; /**< The index of the protare in the URR_protareInfos list. If negative, not in list. */
1616 bool m_hasURR_probabilityTables; /**< *true* if URR probability tables present and *false* otherwise. */
1617 double m_URR_domainMin; /**< If URR probability tables present this is the minimum of the projectile energy domain for the tables. */
1618 double m_URR_domainMax; /**< If URR probability tables present this is the maximum of the projectile energy domain for the tables. */
1619 DomainHash m_domainHash; /**< A copy of the domain hash supplied by the user. */
1620 bool m_upscatterModelASupported; /**< If **true**, upscatter model A plus can be used for this protare. */
1621 Vector<double> m_projectileMultiGroupBoundaries; /**< The multi-group boundaries for the projectile. Only used if m_crossSectionLookupMode and/or m_other1dDataLookupMode is multiGroup. */
1622 Vector<double> m_projectileMultiGroupBoundariesCollapsed; /**< The collased, multi-group boundaries for the projectile. Only used if m_crossSectionLookupMode and/or m_other1dDataLookupMode is multiGroup. */
1623 Vector<double> m_upscatterModelAGroupEnergies; /**< The speed of the projectile at each multi-group boundary. Need by upscatter model A. */
1624 Vector<double> m_upscatterModelAGroupVelocities; /**< The speed of the projectile at each multi-group boundary. Need by upscatter model A. */
1625 Vector<double> m_upscatterModelACrossSection; /**< The multi-group cross section to use for upscatter model A plus. */
1626 MultiGroupHash m_multiGroupHash; /**< For upscatter model A with multi-group cross section data, this is the multi-group hash needed to lookup to cross section for the adjusted projectile energy. */
1627
1628 Vector<Reaction *> m_reactions; /**< The list of reactions. */
1629 Vector<Reaction *> m_orphanProducts; /**< The list of orphan products. */
1630 bool m_isPhotoAtomic; /**< *true* if photo-atomic protare and false otherwise. */
1631 bool m_continuousEnergy; /**< If *true*, protare has continuous energy cross sections; otherwise, multi-group cross sections. */
1632 bool m_fixedGrid; /**< If *true*, continuous energy cross sections are fixed grid. */
1633 HeatedCrossSectionsContinuousEnergy m_heatedCrossSections; /**< Stores all cross section data for total and all reactions for all requested temperatures. */
1634 HeatedCrossSectionsMultiGroup m_heatedMultigroupCrossSections; /**< Stores all multi-group cross section data for total and all reactions for all requested temperatures. */
1635
1636 Vector<NuclideGammaBranchStateInfo *> m_nuclideGammaBranchStateInfos; /**< List of all gamma branches for a nuclide. */
1637 Vector<NuclideGammaBranchInfo *> m_branches; /**< Condensed data on a nuclide's gamma branch including the gamma's energy, probability and the nuclide's residual state. */
1638
1639 LUPI_HOST void setupNuclideGammaBranchStateInfos( SetupInfo &a_setupInfo, GIDI::ProtareSingle const &a_protare,
1640 bool a_makePhotonEmissionProbabilitiesOne, bool a_zeroNuclearLevelEnergyWidth );
1641 LUPI_HOST_DEVICE void setUpscatterModelASupported( bool a_upscatterModelASupported ) { m_upscatterModelASupported = a_upscatterModelASupported; } /**< Sets the value of *m_upscatterModelASupported* to *a_upscatterModelASupported*. */
1642
1643 public:
1645 LUPI_HOST ProtareSingle( LUPI::StatusMessageReporting &a_smr, GIDI::ProtareSingle const &a_protare, PoPI::Database const &a_pops, Transporting::MC &a_settings,
1646 GIDI::Transporting::Particles const &a_particles, DomainHash const &a_domainHash, GIDI::Styles::TemperatureInfos const &a_temperatureInfos,
1647 GIDI::ExcludeReactionsSet const &a_reactionsToExclude, std::size_t a_reactionsToExcludeOffset = 0, bool a_allowFixedGrid = true );
1649
1650 LUPI_HOST_DEVICE bool isPhotoAtomic( ) const { return( m_isPhotoAtomic ); }
1651 LUPI_HOST_DEVICE bool continuousEnergy( ) const { return( m_continuousEnergy ); }
1652 LUPI_HOST_DEVICE bool fixedGrid( ) const { return( m_fixedGrid ); }
1653 LUPI_HOST_DEVICE HeatedCrossSectionsContinuousEnergy const &heatedCrossSections( ) const { return( m_heatedCrossSections ); } /**< Returns a reference to the **m_heatedCrossSections** member. */
1654 LUPI_HOST_DEVICE HeatedCrossSectionsContinuousEnergy &heatedCrossSections( ) { return( m_heatedCrossSections ); } /**< Returns a reference to the **m_heatedCrossSections** member. */
1655 LUPI_HOST_DEVICE HeatedCrossSectionsMultiGroup const &heatedMultigroupCrossSections( ) const { return( m_heatedMultigroupCrossSections ); } /**< Returns a reference to the **m_heatedMultigroupCrossSections** member. */
1656 LUPI_HOST_DEVICE HeatedCrossSectionsMultiGroup &heatedMultigroupCrossSections( ) { return( m_heatedMultigroupCrossSections ); } /**< Returns a reference to the **m_heatedMultigroupCrossSections** member. */
1657
1658 LUPI_HOST_DEVICE const Vector<NuclideGammaBranchStateInfo *> &nuclideGammaBranchStateInfos( ) const { return( m_nuclideGammaBranchStateInfos ); }
1659 /**< Returns a reference to the **m_nuclideGammaBranchStateInfos** member. */
1660 LUPI_HOST_DEVICE const Vector<NuclideGammaBranchInfo *> &branches( ) const { return( m_branches ); }
1661 /**< Returns a reference to the **m_branches** member. */
1662
1663// FIXME (1) see FIXME (1) in MC class.
1664 LUPI_HOST_DEVICE Vector<Reaction *> const &reactions( ) const { return( m_reactions ); } /**< Returns the value of the **m_reactions** member. */
1665// FIXME (1) see FIXME (1) in MC class.
1666 LUPI_HOST_DEVICE Vector<Reaction *> const &orphanProducts( ) const { return( m_orphanProducts ); } /**< Returns the value of the **m_orphanProducts** member. */
1667
1668 template <typename RNG, typename PUSHBACK>
1669 inline LUPI_HOST_DEVICE void sampleBranchingGammas( Sampling::Input &a_input, double a_projectileEnergy, int a_initialStateIndex,
1670 RNG && a_rng, PUSHBACK && push_back, Sampling::ProductHandler &a_products ) const ;
1671 LUPI_HOST void setUserParticleIndex2( int a_particleIndex, int a_userParticleIndex );
1672 LUPI_HOST void setUserParticleIndexViaIntid2( int a_particleIntid, int a_userParticleIndex );
1673
1674// The rest are virtual methods defined in the Protare class.
1675
1676 LUPI_HOST_DEVICE std::size_t numberOfProtares( ) const { return( 1 ); } /**< Returns the number of protares contained in *this*. */
1677 LUPI_HOST_DEVICE ProtareSingle const *protare( std::size_t a_index ) const ;
1678 LUPI_HOST_DEVICE ProtareSingle *protare( std::size_t a_index );
1679 LUPI_HOST_DEVICE ProtareSingle const *protareWithReaction( std::size_t a_index ) const ;
1680
1682 if( m_continuousEnergy ) return( m_heatedCrossSections.minimumEnergy( ) );
1683 return( m_heatedMultigroupCrossSections.minimumEnergy( ) ); } /**< Returns the minimum cross section domain. */
1685 if( m_continuousEnergy ) return( m_heatedCrossSections.maximumEnergy( ) );
1686 return( m_heatedMultigroupCrossSections.maximumEnergy( ) ); } /**< Returns the maximum cross section domain. */
1687 LUPI_HOST_DEVICE Vector<double> temperatures( std::size_t a_index = 0 ) const ;
1688
1689 LUPI_HOST Vector<double> const &projectileMultiGroupBoundaries( ) const { return( m_projectileMultiGroupBoundaries ); }
1690 /**< Returns the value of the **m_projectileMultiGroupBoundaries** member. */
1691 LUPI_HOST Vector<double> const &projectileMultiGroupBoundariesCollapsed( ) const { return( m_projectileMultiGroupBoundariesCollapsed ); }
1692 /**< Returns the value of the **m_projectileMultiGroupBoundariesCollapsed** member. */
1693
1694 LUPI_HOST_DEVICE std::size_t numberOfReactions( ) const { return( m_reactions.size( ) ); } /**< Returns the number of reactions of *this*. */
1695 LUPI_HOST_DEVICE Reaction const *reaction( std::size_t a_index ) const { return( m_reactions[a_index] ); } /**< Returns the (a_index-1)^th reaction of *this*. */
1696 LUPI_HOST_DEVICE std::size_t numberOfOrphanProducts( ) const { return( m_orphanProducts.size( ) ); } /**< Returns the number of orphan products of *this*. */
1697 LUPI_HOST_DEVICE Reaction const *orphanProduct( std::size_t a_index ) const { return( m_orphanProducts[a_index] ); } /**< Returns the (a_index-1)^th orphan product of *this*. */
1698
1699 LUPI_HOST_DEVICE bool hasFission( ) const ;
1700 LUPI_HOST_DEVICE String interaction( ) const { return( m_interaction ); }
1702
1703 LUPI_HOST_DEVICE int URR_index( ) const { return( m_URR_index ); }
1704 LUPI_HOST_DEVICE void setURR_index( int a_URR_index ) { m_URR_index = a_URR_index; }
1705 LUPI_HOST_DEVICE bool inURR( double a_energy ) const ;
1706 LUPI_HOST_DEVICE bool hasURR_probabilityTables( ) const { return( m_hasURR_probabilityTables ); }
1707 LUPI_HOST_DEVICE double URR_domainMin( ) const { return( m_URR_domainMin ); }
1708 LUPI_HOST_DEVICE double URR_domainMax( ) const { return( m_URR_domainMax ); }
1709 LUPI_HOST_DEVICE bool reactionHasURR_probabilityTables( std::size_t a_index ) const { return( m_heatedCrossSections.reactionHasURR_probabilityTables( a_index ) ); }
1710
1711 LUPI_HOST_DEVICE double threshold( std::size_t a_index ) const {
1712 if( m_continuousEnergy ) return( m_heatedCrossSections.threshold( a_index ) );
1713 return( m_heatedMultigroupCrossSections.threshold( a_index ) ); } /**< Returns the threshold for the reaction at index *a_index*. */
1714
1715 LUPI_HOST_DEVICE double crossSection( URR_protareInfos const &a_URR_protareInfos,
1716 std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling = false ) const ;
1717 LUPI_HOST_DEVICE void crossSectionVector( double a_temperature, double a_userFactor, std::size_t a_numberAllocated,
1718 double *a_crossSectionVector ) const ;
1719 LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos,
1720 std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling = false ) const ;
1721 LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos, double a_temperature, double a_energy ) const ;
1722
1723 template <typename RNG>
1724 inline LUPI_HOST_DEVICE bool sampleTargetBetaForUpscatterModelA( Sampling::Input &a_input, RNG && a_rng ) const ;
1725 template <typename RNG>
1726 inline LUPI_HOST_DEVICE std::size_t sampleReaction( Sampling::Input &a_input, URR_protareInfos const &a_URR_protareInfos,
1727 std::size_t a_hashIndex, double a_crossSection, RNG && a_rng ) const ;
1728
1729 LUPI_HOST_DEVICE double depositionEnergy( std::size_t a_hashIndex, double a_temperature, double a_energy ) const ;
1730 LUPI_HOST_DEVICE double depositionMomentum( std::size_t a_hashIndex, double a_temperature, double a_energy ) const ;
1731 LUPI_HOST_DEVICE double productionEnergy( std::size_t a_hashIndex, double a_temperature, double a_energy ) const ;
1732 LUPI_HOST_DEVICE double gain( std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIndex ) const ;
1733 LUPI_HOST_DEVICE double gainViaIntid( std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIntid ) const ;
1734
1735 LUPI_HOST_DEVICE bool upscatterModelASupported( ) const { return( m_upscatterModelASupported ); } /**< Returns the value of the **m_upscatterModelASupported** member. */
1736 LUPI_HOST_DEVICE Vector<double> const &upscatterModelAGroupEnergies( ) const { return( m_upscatterModelAGroupEnergies ); } /**< Returns a reference to the **m_upscatterModelAGroupEnergies** member. */
1737 LUPI_HOST_DEVICE Vector<double> const &upscatterModelAGroupVelocities( ) const { return( m_upscatterModelAGroupVelocities ); } /**< Returns a reference to the **m_upscatterModelAGroupVelocities** member. */
1738 LUPI_HOST_DEVICE Vector<double> const &upscatterModelACrossSection( ) const { return( m_upscatterModelACrossSection ); }
1739 /**< Returns the value of the **m_upscatterModelACrossSection**. */
1740
1742 LUPI_HOST_DEVICE long sizeOf2( ) const { return sizeof(*this); }
1743};
1744
1745/*
1746============================================================
1747===================== ProtareComposite =====================
1748============================================================
1749*/
1751
1752 private:
1753 Vector<ProtareSingle *> m_protares; /**< List of protares added to *this* instance. */
1754 std::size_t m_numberOfReactions; /**< The sum of the number of reaction for all stored protares. */
1755 std::size_t m_numberOfOrphanProducts; /**< The sum of the number of reaction for all stored protares. */
1756 double m_minimumEnergy; /**< The maximum of the minimum cross section domains. */
1757 double m_maximumEnergy; /**< The minimum of the maximum cross section domains. */
1758
1759 public:
1762 GIDI::Transporting::Particles const &a_particles, DomainHash const &a_domainHash, GIDI::Styles::TemperatureInfos const &a_temperatureInfos,
1763 GIDI::ExcludeReactionsSet const &a_reactionsToExclude, std::size_t a_reactionsToExcludeOffset = 0, bool a_allowFixedGrid = true );
1765
1766 Vector<ProtareSingle *> protares( ) const { return( m_protares ); } /**< Returns the value of the **m_protares** member. */
1767 LUPI_HOST void setUserParticleIndex2( int a_particleIndex, int a_userParticleIndex );
1768 LUPI_HOST void setUserParticleIndexViaIntid2( int a_particleIntid, int a_userParticleIndex );
1769
1770// The rest are virtual methods defined in the Protare class.
1771
1772 LUPI_HOST_DEVICE std::size_t numberOfProtares( ) const { return( m_protares.size( ) ); } /**< Returns the number of protares contained in *this*. */
1773 LUPI_HOST_DEVICE ProtareSingle const *protare( std::size_t a_index ) const ;
1774 LUPI_HOST_DEVICE ProtareSingle *protare( std::size_t a_index );
1775 LUPI_HOST_DEVICE ProtareSingle const *protareWithReaction( std::size_t a_index ) const ;
1776
1777 LUPI_HOST_DEVICE double minimumEnergy( ) const { return( m_minimumEnergy ); } /**< Returns the value of the **m_minimumEnergy** member. */
1778 LUPI_HOST_DEVICE double maximumEnergy( ) const { return( m_maximumEnergy ); } /**< Returns the value of the **m_maximumEnergy** member. */
1779 LUPI_HOST_DEVICE Vector<double> temperatures( std::size_t a_index = 0 ) const ;
1780
1782 /**< Returns the value of the **m_projectileMultiGroupBoundaries** member. */
1784 /**< Returns the value of the **m_projectileMultiGroupBoundariesCollapsed** member. */
1785
1786 LUPI_HOST_DEVICE std::size_t numberOfReactions( ) const { return( m_numberOfReactions ); }
1787 /**< Returns the value of the **m_numberOfReactions** member. */
1788 LUPI_HOST_DEVICE Reaction const *reaction( std::size_t a_index ) const ;
1789 LUPI_HOST_DEVICE std::size_t numberOfOrphanProducts( ) const { return( m_numberOfOrphanProducts ); }
1790 /**< Returns the value of the **m_numberOfOrphanProducts** member. */
1791 LUPI_HOST_DEVICE Reaction const *orphanProduct( std::size_t a_index ) const ;
1792
1793 LUPI_HOST_DEVICE bool hasFission( ) const ;
1795
1796 LUPI_HOST_DEVICE int URR_index( ) const { return( -1 ); }
1798 LUPI_HOST_DEVICE double URR_domainMin( ) const ;
1799 LUPI_HOST_DEVICE double URR_domainMax( ) const ;
1800 LUPI_HOST_DEVICE bool reactionHasURR_probabilityTables( std::size_t a_index ) const ;
1801
1802 LUPI_HOST_DEVICE double threshold( std::size_t a_index ) const ;
1803
1804 LUPI_HOST_DEVICE double crossSection( URR_protareInfos const &a_URR_protareInfos,
1805 std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling = false ) const ;
1806 LUPI_HOST_DEVICE void crossSectionVector( double a_temperature, double a_userFactor, std::size_t a_numberAllocated,
1807 double *a_crossSectionVector ) const ;
1808 LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos,
1809 std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling = false ) const ;
1810 LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos, double a_temperature, double a_energy ) const ;
1811 template <typename RNG>
1812 inline LUPI_HOST_DEVICE std::size_t sampleReaction( Sampling::Input &a_input, URR_protareInfos const &a_URR_protareInfos,
1813 std::size_t a_hashIndex, double a_crossSection, RNG && a_rng ) const ;
1814
1815 LUPI_HOST_DEVICE double depositionEnergy( std::size_t a_hashIndex, double a_temperature, double a_energy ) const ;
1816 LUPI_HOST_DEVICE double depositionMomentum( std::size_t a_hashIndex, double a_temperature, double a_energy ) const ;
1817 LUPI_HOST_DEVICE double productionEnergy( std::size_t a_hashIndex, double a_temperature, double a_energy ) const ;
1818 LUPI_HOST_DEVICE double gain( std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIndex ) const ;
1819 LUPI_HOST_DEVICE double gainViaIntid( std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIntid ) const ;
1820
1822 /**< Returns a reference to the **m_upscatterModelAGroupVelocities** member. */
1823
1825 LUPI_HOST_DEVICE long sizeOf2( ) const { return sizeof(*this); }
1826};
1827
1828/*
1829============================================================
1830======================== ProtareTNSL =======================
1831============================================================
1832*/
1833class ProtareTNSL : public Protare {
1834
1835 private:
1836 std::size_t m_numberOfTNSLReactions; /**< The number of reactions of the TNSL protare. */
1837 double m_TNSL_maximumEnergy; /**< The maximum energy of the cross section domain for the TNSL protare. */
1838 double m_TNSL_maximumTemperature; /**< The highest temperature for processed data for the TNSL protare. */
1839 ProtareSingle *m_protareWithElastic; /**< Protare with non thermal neutron scattering law data. */
1840 ProtareSingle *m_TNSL; /**< Protare with thermal neutron scattering law data. */
1841 ProtareSingle *m_protareWithoutElastic; /**< Same as *m_protare* but without elastic. */
1842
1843 public:
1846 GIDI::Transporting::Particles const &a_particles, DomainHash const &a_domainHash, GIDI::Styles::TemperatureInfos const &a_temperatureInfos,
1847 GIDI::ExcludeReactionsSet const &a_reactionsToExclude, std::size_t a_reactionsToExcludeOffset = 0, bool a_allowFixedGrid = true );
1849
1850 LUPI_HOST_DEVICE ProtareSingle const *protareWithElastic( ) const { return( m_protareWithElastic ); } /**< Returns the **m_protareWithElastic** member. */
1851 LUPI_HOST_DEVICE ProtareSingle const *TNSL( ) const { return( m_TNSL ); } /**< Returns the **m_TNSL** member. */
1852 LUPI_HOST_DEVICE ProtareSingle const *protareWithoutElastic( ) const { return( m_protareWithoutElastic ); } /**< Returns the **m_protareWithoutElastic** member. */
1853
1854 LUPI_HOST_DEVICE double TNSL_maximumEnergy( ) const { return( m_TNSL_maximumEnergy ); }
1855 LUPI_HOST_DEVICE double TNSL_maximumTemperature( ) const { return( m_TNSL_maximumTemperature ); }
1856 LUPI_HOST void setUserParticleIndex2( int a_particleIndex, int a_userParticleIndex );
1857 LUPI_HOST void setUserParticleIndexViaIntid2( int a_particleIntid, int a_userParticleIndex );
1858
1859// The rest are virtual methods defined in the Protare class.
1860
1861 LUPI_HOST_DEVICE std::size_t numberOfProtares( ) const { return( 2 ); } /**< Always Returns 2. */
1862 LUPI_HOST_DEVICE ProtareSingle const *protare( std::size_t a_index ) const ;
1863 LUPI_HOST_DEVICE ProtareSingle *protare( std::size_t a_index );
1864 LUPI_HOST_DEVICE ProtareSingle const *protareWithReaction( std::size_t a_index ) const ;
1865
1866 LUPI_HOST_DEVICE double minimumEnergy( ) const { return( m_protareWithElastic->minimumEnergy( ) ); } /**< Returns the minimum cross section domain. */
1867 LUPI_HOST_DEVICE double maximumEnergy( ) const { return( m_protareWithElastic->maximumEnergy( ) ); } /**< Returns the maximum cross section domain. */
1868 LUPI_HOST_DEVICE Vector<double> temperatures( std::size_t a_index = 0 ) const ;
1869
1870 LUPI_HOST Vector<double> const &projectileMultiGroupBoundaries( ) const { return( m_protareWithElastic->projectileMultiGroupBoundaries( ) ); }
1871 /**< Returns the value of the **m_projectileMultiGroupBoundaries** member. */
1872 LUPI_HOST Vector<double> const &projectileMultiGroupBoundariesCollapsed( ) const { return( m_protareWithElastic->projectileMultiGroupBoundariesCollapsed( ) ); }
1873 /**< Returns the value of the **m_projectileMultiGroupBoundariesCollapsed** member. */
1874
1875 LUPI_HOST_DEVICE std::size_t numberOfReactions( ) const { return( m_TNSL->numberOfReactions( ) + m_protareWithElastic->numberOfReactions( ) ); }
1876 LUPI_HOST_DEVICE Reaction const *reaction( std::size_t a_index ) const ;
1877 LUPI_HOST_DEVICE std::size_t numberOfOrphanProducts( ) const { return( m_protareWithElastic->numberOfOrphanProducts( ) ); }
1878 /**< Returns the number of orphan products in the normal ProtareSingle. */
1879 LUPI_HOST_DEVICE Reaction const *orphanProduct( std::size_t a_index ) const { return( m_protareWithElastic->orphanProduct( a_index ) ); }
1880 /**< Returns the (a_index - 1 )^th orphan product in the normal ProtareSingle. */
1881
1882 LUPI_HOST_DEVICE bool hasFission( ) const { return( m_protareWithElastic->hasFission( ) ); } /* Returns the normal ProtareSingle's hasFission value. */
1883 LUPI_HOST_DEVICE bool hasIncoherentDoppler( ) const { return( false ); } /* Always returns false as this is a neutron as projectile and not a photon. */
1884
1885 LUPI_HOST_DEVICE int URR_index( ) const { return( -1 ); }
1886 LUPI_HOST_DEVICE bool hasURR_probabilityTables( ) const { return( m_protareWithElastic->hasURR_probabilityTables( ) ); }
1887 LUPI_HOST_DEVICE double URR_domainMin( ) const { return( m_protareWithElastic->URR_domainMin( ) ); }
1888 LUPI_HOST_DEVICE double URR_domainMax( ) const { return( m_protareWithElastic->URR_domainMax( ) ); }
1889 LUPI_HOST_DEVICE bool reactionHasURR_probabilityTables( std::size_t a_index ) const ;
1890
1891 LUPI_HOST_DEVICE double threshold( std::size_t a_index ) const ;
1892
1893 LUPI_HOST_DEVICE double crossSection( URR_protareInfos const &a_URR_protareInfos,
1894 std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling = false ) const ;
1895 LUPI_HOST_DEVICE void crossSectionVector( double a_temperature, double a_userFactor, std::size_t a_numberAllocated,
1896 double *a_crossSectionVector ) const ;
1897 LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos,
1898 std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling = false ) const ;
1899 LUPI_HOST_DEVICE double reactionCrossSection( std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos, double a_temperature, double a_energy ) const ;
1900 template <typename RNG>
1901 inline LUPI_HOST_DEVICE std::size_t sampleReaction( Sampling::Input &a_input, URR_protareInfos const &a_URR_protareInfos,
1902 std::size_t a_hashIndex, double a_crossSection, RNG && a_rng ) const ;
1903
1904 LUPI_HOST_DEVICE double depositionEnergy( std::size_t a_hashIndex, double a_temperature, double a_energy ) const ;
1905 LUPI_HOST_DEVICE double depositionMomentum( std::size_t a_hashIndex, double a_temperature, double a_energy ) const ;
1906 LUPI_HOST_DEVICE double productionEnergy( std::size_t a_hashIndex, double a_temperature, double a_energy ) const ;
1907 LUPI_HOST_DEVICE double gain( std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIndex ) const ;
1908 LUPI_HOST_DEVICE double gainViaIntid( std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIntid ) const ;
1909
1910 LUPI_HOST_DEVICE Vector<double> const &upscatterModelAGroupVelocities( ) const { return( m_protareWithElastic->upscatterModelAGroupVelocities( ) ); }
1911 /**< Returns a reference to the **m_upscatterModelAGroupVelocities** member. */
1912
1914 LUPI_HOST_DEVICE long sizeOf2( ) const { return sizeof(*this); }
1915};
1916
1917/*
1918============================================================
1919=========================== Others =========================
1920============================================================
1921*/
1922LUPI_HOST Protare *protareFromGIDIProtare( LUPI::StatusMessageReporting &a_smr, GIDI::Protare const &a_protare, PoPI::Database const &a_pops, Transporting::MC &a_settings, GIDI::Transporting::Particles const &a_particles,
1923 DomainHash const &a_domainHash, GIDI::Styles::TemperatureInfos const &a_temperatureInfos, GIDI::ExcludeReactionsSet const &a_reactionsToExclude,
1924 std::size_t a_reactionsToExcludeOffset = 0, bool a_allowFixedGrid = true );
1926LUPI_HOST void addVectorItemsToSet( Vector<int> const &a_from, std::set<int> &a_to );
1927
1930LUPI_HOST_DEVICE void serializeProducts( LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, Vector<Product *> &a_products );
1931LUPI_HOST_DEVICE void serializeDelayedNeutrons( LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, Vector<DelayedNeutron *> &a_delayedNeutrons );
1932LUPI_HOST_DEVICE void serializeQs( LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, Vector<Functions::Function1d_d1 *> &a_Qs );
1934 LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode );
1935
1936LUPI_HOST void convertACE_URR_probabilityTablesFromGIDI( GIDI::ProtareSingle const &a_protare, Transporting::MC &a_settings, SetupInfo &a_setupInfo );
1938LUPI_HOST_DEVICE ACE_URR_probabilityTables *serializeACE_URR_probabilityTables( ACE_URR_probabilityTables *a_ACE_URR_probabilityTables,
1939 LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode );
1940
1941LUPI_HOST_DEVICE Distributions::Distribution *serializeDistribution( LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode,
1942 Distributions::Distribution *a_distribution );
1943
1944LUPI_HOST std::vector<double> vectorToSTD_vector( Vector<double> a_input );
1945LUPI_HOST std::vector<double> vectorToSTD_vector( Vector<float> a_input );
1946
1947} // End of namespace MCGIDI.
1948
1949#include "MCGIDI_headerSource.hpp"
1950
1951#endif // End of MCGIDI_hpp_included
G4ThreadLocal T * G4GeomSplitter< T >::offset
#define LUPI_HOST_DEVICE
#define LUPI_HOST
#define MCGIDI_VIRTUAL_FUNCTION
Definition MCGIDI.hpp:33
#define MCGIDI_TRUE_VIRTUAL
Definition MCGIDI.hpp:34
LUPI_HOST_DEVICE double energy() const
Definition MCGIDI.hpp:488
LUPI_HOST_DEVICE ~ACE_URR_probabilityTable()
Vector< double > m_propabilities
Definition MCGIDI.hpp:481
Vector< double > m_crossSections
Definition MCGIDI.hpp:482
LUPI_HOST_DEVICE double sample(double a_rng_Value)
LUPI_HOST_DEVICE ACE_URR_probabilityTable()
Definition MCGIDI_URR.cc:97
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
std::map< std::string, ACE_URR_probabilityTables * > m_ACE_URR_probabilityTables
Definition MCGIDI.hpp:243
LUPI_HOST_DEVICE void reserve(std::size_t a_capacity)
LUPI_HOST_DEVICE std::size_t size() const
Definition MCGIDI.hpp:511
Vector< ACE_URR_probabilityTable * > m_ACE_URR_probabilityTables
Definition MCGIDI.hpp:503
LUPI_HOST_DEVICE void push_back(ACE_URR_probabilityTable *a_ACE_URR_probabilityTable)
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE ACE_URR_probabilityTables()
LUPI_HOST_DEVICE std::size_t capacity() const
Definition MCGIDI.hpp:509
LUPI_HOST_DEVICE ~ACE_URR_probabilityTables()
LUPI_HOST_DEVICE double sample(double a_energy, double a_rng_Value)
LUPI_HOST_DEVICE double domainMin() const
Definition MCGIDI.hpp:516
LUPI_HOST_DEVICE double domainMax() const
Definition MCGIDI.hpp:517
LUPI_HOST_DEVICE int userParticleIndex() const
Definition MCGIDI.hpp:593
LUPI_HOST_DEVICE Vector< MCGIDI_FLOAT > const & gain() const
Definition MCGIDI.hpp:600
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 int particleIntid() const
Definition MCGIDI.hpp:591
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST void adjustGain(std::size_t a_energy_index, double a_gain)
Definition MCGIDI.hpp:601
LUPI_HOST_DEVICE int particleIndex() const
Definition MCGIDI.hpp:592
LUPI_HOST ContinuousEnergyGain & operator=(ContinuousEnergyGain const &a_continuousEnergyGain)
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
Definition MCGIDI.hpp:597
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
Definition MCGIDI.hpp:594
LUPI_HOST_DEVICE double rate() const
Definition MCGIDI.hpp:1259
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST_DEVICE DelayedNeutron()
LUPI_HOST_DEVICE int delayedNeutronIndex() const
Definition MCGIDI.hpp:1258
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE Product const & product() const
Definition MCGIDI.hpp:1260
LUPI_HOST_DEVICE ~DelayedNeutron()
LUPI_HOST_DEVICE ~GRIN_captureLevelProbability()
LUPI_HOST_DEVICE int sampleCaptureLevel(ProtareSingle const *a_protare, double a_energy, RNG &&a_rng)
LUPI_HOST_DEVICE GRIN_captureLevelProbability()
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE GRIN_captureToCompound()
LUPI_HOST_DEVICE std::size_t index() const
Definition MCGIDI.hpp:1101
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE ~GRIN_captureToCompound()
LUPI_HOST_DEVICE int sampleCaptureLevel(ProtareSingle const *a_protare, double a_energy, RNG &&a_rng, bool a_checkEnergy) const
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE bool sampleProducts(ProtareSingle const *a_protare, double a_projectileEnergy, Sampling::Input &a_input, RNG &&a_rng, PUSHBACK &&a_push_back, Sampling::ProductHandler &a_products) const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE GRIN_capture()
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST_DEVICE ~GRIN_capture()
LUPI_HOST_DEVICE int sampleLevelIndex(double a_projectileEnergy, double a_random) const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE GRIN_inelasticForEnergy()
LUPI_HOST_DEVICE ~GRIN_inelasticForEnergy()
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST_DEVICE ~GRIN_inelastic()
LUPI_HOST_DEVICE bool sampleProducts(ProtareSingle const *a_protare, double a_projectileEnergy, Sampling::Input &a_input, RNG &&a_rng, PUSHBACK &&a_push_back, Sampling::ProductHandler &a_products) const
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE GRIN_inelastic()
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE ~GRIN_levelsAndProbabilities()
LUPI_HOST_DEVICE int sampleInelasticLevel(double a_energy, RNG &&a_rng)
LUPI_HOST_DEVICE GRIN_levelsAndProbabilities()
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST void set(std::vector< int > const &a_levels, std::vector< double > const &a_probabilities)
Vector< double > m_summedProbabilities
Definition MCGIDI.hpp:1010
LUPI_HOST_DEVICE Vector< double > const & energies() const
Definition MCGIDI.hpp:678
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_energy, bool a_sampling=false) const
LUPI_HOST_DEVICE double depositionMomentum(std::size_t a_hashIndex, double a_energy) const
LUPI_HOST_DEVICE double maximumEnergy() const
Definition MCGIDI.hpp:645
LUPI_HOST_DEVICE std::size_t thresholdOffset(std::size_t a_reactionIndex) const
Definition MCGIDI.hpp:649
LUPI_HOST_DEVICE double gain(std::size_t a_hashIndex, double a_energy, int a_particleIndex) const
LUPI_HOST_DEVICE double depositionEnergy(std::size_t a_hashIndex, double a_energy) const
LUPI_HOST_DEVICE double temperature() const
Definition MCGIDI.hpp:643
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE bool reactionHasURR_probabilityTables(std::size_t a_index) const
Definition MCGIDI.hpp:656
LUPI_HOST_DEVICE double threshold(std::size_t a_reactionIndex) const
Definition MCGIDI.hpp:651
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 minimumEnergy() const
Definition MCGIDI.hpp:644
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 Vector< MCGIDI_FLOAT > & totalCrossSection()
Definition MCGIDI.hpp:658
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 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
Definition MCGIDI.hpp:640
LUPI_HOST_DEVICE std::size_t numberOfReactions() const
Definition MCGIDI.hpp:646
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 double augmentedCrossSection(std::size_t a_hashIndex) const
Definition MCGIDI.hpp:856
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST_DEVICE double depositionEnergy(std::size_t a_hashIndex) const
Definition MCGIDI.hpp:863
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 std::size_t numberOfReactions() const
Definition MCGIDI.hpp:847
LUPI_HOST_DEVICE HeatedReactionCrossSectionMultiGroup * operator[](std::size_t a_index) const
Definition MCGIDI.hpp:845
LUPI_HOST_DEVICE double reactionCrossSection(std::size_t a_reactionIndex, std::size_t a_hashIndex, bool a_sampling=false) const
Definition MCGIDI.hpp:858
LUPI_HOST_DEVICE std::size_t thresholdOffset(std::size_t a_index) const
Definition MCGIDI.hpp:850
LUPI_HOST_DEVICE double productionEnergy(std::size_t a_hashIndex) const
Definition MCGIDI.hpp:865
LUPI_HOST_DEVICE double depositionMomentum(std::size_t a_hashIndex) const
Definition MCGIDI.hpp:864
LUPI_HOST HeatedCrossSectionMultiGroup(LUPI::StatusMessageReporting &a_smr, GIDI::ProtareSingle const &a_protare, SetupInfo &a_setupInfo, Transporting::MC const &a_settings, GIDI::Styles::TemperatureInfo const &a_temperatureInfo, GIDI::Transporting::Particles const &a_particles, std::vector< GIDI::Reaction const * > const &a_reactions, std::string const &a_label, bool a_zeroReactions, GIDI::ExcludeReactionsSet const &a_reactionsToExclude)
LUPI_HOST_DEVICE double threshold(std::size_t a_index) const
Definition MCGIDI.hpp:852
LUPI_HOST_DEVICE double crossSection(std::size_t a_hashIndex, bool a_sampling=false) const
LUPI_HOST_DEVICE Vector< double > & totalCrossSection()
Definition MCGIDI.hpp:854
LUPI_HOST_DEVICE double threshold(std::size_t a_index) const
Definition MCGIDI.hpp:713
LUPI_HOST GIDI::Functions::XYs1d crossSectionAsGIDI_XYs1d(double a_temperature) const
LUPI_HOST_DEVICE std::size_t sampleReaction(URR_protareInfos const &a_URR_protareInfos, int a_URR_index, std::size_t a_hashIndex, double a_temperature, double a_energy, double a_crossSection, RNG &&a_rng) const
Vector< HeatedCrossSectionContinuousEnergy * > & heatedCrossSections()
Definition MCGIDI.hpp:711
LUPI_HOST_DEVICE bool reactionHasURR_probabilityTables(std::size_t a_index) const
Definition MCGIDI.hpp:717
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 bool hasURR_probabilityTables() const
Definition MCGIDI.hpp:714
LUPI_HOST_DEVICE Vector< double > const & temperatures() const
Definition MCGIDI.hpp:710
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 URR_domainMax() const
Definition MCGIDI.hpp:716
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 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_DEVICE double URR_domainMin() const
Definition MCGIDI.hpp:715
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 minimumEnergy() const
Definition MCGIDI.hpp:706
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 maximumEnergy() const
Definition MCGIDI.hpp:708
LUPI_HOST_DEVICE double productionEnergy(std::size_t a_hashIndex, double a_temperature) const
LUPI_HOST_DEVICE Vector< HeatedCrossSectionMultiGroup * > const & heatedCrossSections() const
Definition MCGIDI.hpp:906
LUPI_HOST_DEVICE Vector< double > const & projectileMultiGroupBoundariesCollapsed() const
Definition MCGIDI.hpp:904
LUPI_HOST_DEVICE double depositionMomentum(std::size_t a_hashIndex, double a_temperature) const
LUPI_HOST_DEVICE std::size_t sampleReaction(std::size_t a_hashIndex, double a_temperature, double a_energy_in, double a_crossSection, RNG &&rng) const
LUPI_HOST_DEVICE Vector< double > const & temperatures() const
Definition MCGIDI.hpp:896
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 int multiGroupThresholdIndex(std::size_t a_index) const
Definition MCGIDI.hpp:902
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 minimumEnergy() const
Definition MCGIDI.hpp:894
LUPI_HOST_DEVICE double threshold(std::size_t a_index) const
Definition MCGIDI.hpp:908
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE double maximumEnergy() const
Definition MCGIDI.hpp:895
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_DEVICE Probabilities::ProbabilityBase2d * URR_probabilityTables() const
Definition MCGIDI.hpp:555
LUPI_HOST Vector< MCGIDI_FLOAT > const & crossSections() const
Definition MCGIDI.hpp:548
LUPI_HOST GIDI::Functions::XYs1d crossSectionAsGIDI_XYs1d(double a_temperature, Vector< double > const &a_energies) const
LUPI_HOST_DEVICE bool hasURR_probabilityTables() const
Definition MCGIDI.hpp:549
LUPI_HOST_DEVICE double crossSection(std::size_t a_index) const
Definition MCGIDI.hpp:557
LUPI_HOST_DEVICE double threshold() const
Definition MCGIDI.hpp:546
LUPI_HOST_DEVICE Transporting::URR_mode URR_mode() const
Definition MCGIDI.hpp:552
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
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 std::size_t offset() const
Definition MCGIDI.hpp:547
LUPI_HOST_DEVICE ACE_URR_probabilityTables * _ACE_URR_probabilityTables() const
Definition MCGIDI.hpp:556
LUPI_HOST HeatedReactionCrossSectionMultiGroup(SetupInfo &a_setupInfo, Transporting::MC const &a_settings, std::size_t a_offset, std::vector< double > const &a_crossSection, double a_threshold)
LUPI_HOST void write(FILE *a_file, std::size_t a_reactionIndex) const
LUPI_HOST_DEVICE double operator[](std::size_t a_index) const
Definition MCGIDI.hpp:802
LUPI_HOST_DEVICE std::size_t offset() const
Definition MCGIDI.hpp:804
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE double augmentedThresholdCrossSection() const
Definition MCGIDI.hpp:816
LUPI_HOST_DEVICE double threshold() const
Definition MCGIDI.hpp:803
LUPI_HOST_DEVICE double crossSection(std::size_t a_index, bool a_sampling=false) const
Definition MCGIDI.hpp:805
LUPI_HOST void write(FILE *a_file) const
LUPI_HOST_DEVICE int particleIntid() const
Definition MCGIDI.hpp:767
LUPI_HOST_DEVICE Vector< double > const & gain() const
Definition MCGIDI.hpp:776
LUPI_HOST_DEVICE int userParticleIndex() const
Definition MCGIDI.hpp:769
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
Definition MCGIDI.hpp:773
LUPI_HOST MultiGroupGain & operator=(MultiGroupGain const &a_multiGroupGain)
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
Definition MCGIDI.hpp:770
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE int particleIndex() const
Definition MCGIDI.hpp:768
LUPI_HOST_DEVICE double gain(std::size_t a_hashIndex) const
Definition MCGIDI.hpp:777
LUPI_HOST_DEVICE std::size_t index(double a_domain) const
Definition MCGIDI.hpp:405
LUPI_HOST_DEVICE MultiGroupHash()
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST MultiGroupHash & operator=(MultiGroupHash const &a_rhs)=default
LUPI_HOST_DEVICE Vector< double > const & boundaries() const
Definition MCGIDI.hpp:404
LUPI_HOST_DEVICE double probability() const
Definition MCGIDI.hpp:952
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE int residualStateIndex() const
Definition MCGIDI.hpp:955
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 gammaEnergy() const
Definition MCGIDI.hpp:954
LUPI_HOST_DEVICE double photonEmissionProbability() const
Definition MCGIDI.hpp:953
LUPI_HOST_DEVICE bool residualStateKindIsContinuum() const
Definition MCGIDI.hpp:956
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 void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE Vector< std::size_t > const & branchIndices() const
Definition MCGIDI.hpp:993
LUPI_HOST_DEVICE double nuclearLevelEnergy() const
Definition MCGIDI.hpp:988
LUPI_HOST_DEVICE char const * state() const
Definition MCGIDI.hpp:986
LUPI_HOST_DEVICE double averageGammaEnergy() const
Definition MCGIDI.hpp:992
LUPI_HOST_DEVICE double multiplicity() const
Definition MCGIDI.hpp:991
LUPI_HOST_DEVICE int intid() const
Definition MCGIDI.hpp:987
LUPI_HOST_DEVICE double nuclearLevelEnergyWidth() const
Definition MCGIDI.hpp:989
LUPI_HOST_DEVICE void angleBiasing(Reaction const *a_reaction, int a_pid, double a_temperature, double a_energy_in, double a_mu_lab, double &a_probability, double &a_energy_out, RNG &&a_rng, double &a_cumulative_weight) const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE double finalQ(double a_x1) const
LUPI_HOST_DEVICE void angleBiasingViaIntid(Reaction const *a_reaction, int a_intid, double a_temperature, double a_energy_in, double a_mu_lab, double &a_probability, double &a_energy_out, RNG &&a_rng, double &a_cumulative_weight) const
LUPI_HOST_DEVICE bool hasFission() const
LUPI_HOST_DEVICE void sampleProducts(ProtareSingle const *a_protare, double a_projectileEnergy, Sampling::Input &a_input, RNG &&a_rng, PUSHBACK &&a_push_back, Sampling::ProductHandler &a_products) const
LUPI_HOST_DEVICE Functions::Function1d_d1 * Q()
Definition MCGIDI.hpp:1297
LUPI_HOST_DEVICE Vector< Product * > const & products() const
Definition MCGIDI.hpp:1303
Vector< DelayedNeutron * > delayedNeutrons() const
Definition MCGIDI.hpp:1305
LUPI_HOST_DEVICE OutputChannel()
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE double productAverageMultiplicity(int a_index, double a_projectileEnergy) const
LUPI_HOST_DEVICE bool isFission() const
Definition MCGIDI.hpp:1294
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST_DEVICE bool isTwoBody() const
Definition MCGIDI.hpp:1292
LUPI_HOST void moveProductsEtAlToReaction(std::vector< Product * > &a_products, Functions::Function1d **a_totalDelayedNeutronMultiplicity, std::vector< DelayedNeutron * > &a_delayedNeutrons, std::vector< Functions::Function1d_d1 * > &a_Qs)
LUPI_HOST_DEVICE Product * operator[](std::size_t a_index)
Definition MCGIDI.hpp:1290
LUPI_HOST_DEVICE double productAverageMultiplicityViaIntid(int a_intid, double a_projectileEnergy) const
LUPI_HOST_DEVICE DelayedNeutron const * delayedNeutron(std::size_t a_index) const
Definition MCGIDI.hpp:1306
LUPI_HOST void setModelDBRC_data(Sampling::Upscatter::ModelDBRC_data *a_modelDBRC_data)
LUPI_HOST_DEVICE ~OutputChannel()
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST_DEVICE Product()
LUPI_HOST_DEVICE bool isCompleteParticle() const
Definition MCGIDI.hpp:1207
LUPI_HOST_DEVICE Distributions::Distribution const * distribution() const
Definition MCGIDI.hpp:1220
LUPI_HOST_DEVICE int userParticleIndex() const
Definition MCGIDI.hpp:1202
LUPI_HOST void distribution(Distributions::Distribution *a_distribution)
Definition MCGIDI.hpp:1222
LUPI_HOST_DEVICE void sampleProducts(ProtareSingle const *a_protare, double a_projectileEnergy, Sampling::Input &a_input, RNG &&a_rng, PUSHBACK &&a_push_back, Sampling::ProductHandler &a_products) const
LUPI_HOST_DEVICE ~Product()
LUPI_HOST void setMultiplicity(Functions::Function1d *a_multiplicity)
Definition MCGIDI.hpp:1216
LUPI_HOST_DEVICE Distributions::Distribution * distribution()
Definition MCGIDI.hpp:1221
LUPI_HOST_DEVICE int index() const
Definition MCGIDI.hpp:1201
LUPI_HOST_DEVICE double productAverageMultiplicity(int a_index, double a_projectileEnergy) const
LUPI_HOST_DEVICE double productAverageMultiplicityViaIntid(int a_intid, double a_projectileEnergy) const
LUPI_HOST_DEVICE void angleBiasing(Reaction const *a_reaction, int a_pid, double a_temperature, double a_energy_in, double a_mu_lab, double &a_probability, double &a_energy_out, RNG &&a_rng, double &a_cumulative_weight) const
LUPI_HOST String const & ID() const
Definition MCGIDI.hpp:1199
LUPI_HOST void setModelDBRC_data(Sampling::Upscatter::ModelDBRC_data *a_modelDBRC_data)
LUPI_HOST_DEVICE OutputChannel * outputChannel()
Definition MCGIDI.hpp:1224
LUPI_HOST_DEVICE TwoBodyOrder twoBodyOrder() const
Definition MCGIDI.hpp:1210
LUPI_HOST_DEVICE void sampleFinalState(ProtareSingle const *a_protare, double a_projectileEnergy, Sampling::Input &a_input, RNG &&a_rng, PUSHBACK &&a_push_back, Sampling::ProductHandler &a_products) const
LUPI_HOST_DEVICE Functions::Function1d const * multiplicity() const
Definition MCGIDI.hpp:1215
LUPI_HOST_DEVICE double finalQ(double a_x1) const
LUPI_HOST_DEVICE double excitationEnergy() const
Definition MCGIDI.hpp:1209
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE int intid() const
Definition MCGIDI.hpp:1200
LUPI_HOST_DEVICE bool hasFission() const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE double mass() const
Definition MCGIDI.hpp:1208
LUPI_HOST_DEVICE String label() const
Definition MCGIDI.hpp:1206
LUPI_HOST_DEVICE void angleBiasingViaIntid(Reaction const *a_reaction, int a_intid, double a_temperature, double a_energy_in, double a_mu_lab, double &a_probability, double &a_energy_out, RNG &&a_rng, double &a_cumulative_weight) const
LUPI_HOST_DEVICE int URR_index() const
Definition MCGIDI.hpp:1796
LUPI_HOST_DEVICE std::size_t numberOfOrphanProducts() const
Definition MCGIDI.hpp:1789
LUPI_HOST_DEVICE Vector< double > const & upscatterModelAGroupVelocities() const
Definition MCGIDI.hpp:1821
LUPI_HOST_DEVICE double maximumEnergy() const
Definition MCGIDI.hpp:1778
LUPI_HOST_DEVICE std::size_t numberOfProtares() const
Definition MCGIDI.hpp:1772
LUPI_HOST ProtareComposite(LUPI::StatusMessageReporting &a_smr, GIDI::ProtareComposite const &a_protare, PoPI::Database const &a_pops, Transporting::MC &a_settings, GIDI::Transporting::Particles const &a_particles, DomainHash const &a_domainHash, GIDI::Styles::TemperatureInfos const &a_temperatureInfos, GIDI::ExcludeReactionsSet const &a_reactionsToExclude, std::size_t a_reactionsToExcludeOffset=0, bool a_allowFixedGrid=true)
LUPI_HOST Vector< double > const & projectileMultiGroupBoundaries() const
Definition MCGIDI.hpp:1781
LUPI_HOST_DEVICE long sizeOf2() const
Definition MCGIDI.hpp:1825
Vector< ProtareSingle * > protares() const
Definition MCGIDI.hpp:1766
LUPI_HOST Vector< double > const & projectileMultiGroupBoundariesCollapsed() const
Definition MCGIDI.hpp:1783
LUPI_HOST_DEVICE std::size_t numberOfReactions() const
Definition MCGIDI.hpp:1786
LUPI_HOST_DEVICE double minimumEnergy() const
Definition MCGIDI.hpp:1777
LUPI_HOST_DEVICE ProtareSingle()
LUPI_HOST_DEVICE const Vector< NuclideGammaBranchInfo * > & branches() const
Definition MCGIDI.hpp:1660
LUPI_HOST_DEVICE Reaction const * orphanProduct(std::size_t a_index) const
Definition MCGIDI.hpp:1697
LUPI_HOST_DEVICE Vector< double > const & upscatterModelACrossSection() const
Definition MCGIDI.hpp:1738
LUPI_HOST Vector< double > const & projectileMultiGroupBoundaries() const
Definition MCGIDI.hpp:1689
LUPI_HOST_DEVICE Vector< double > const & upscatterModelAGroupEnergies() const
Definition MCGIDI.hpp:1736
LUPI_HOST_DEVICE HeatedCrossSectionsMultiGroup const & heatedMultigroupCrossSections() const
Definition MCGIDI.hpp:1655
LUPI_HOST_DEVICE double maximumEnergy() const
Definition MCGIDI.hpp:1684
LUPI_HOST_DEVICE Reaction const * reaction(std::size_t a_index) const
Definition MCGIDI.hpp:1695
LUPI_HOST_DEVICE bool continuousEnergy() const
Definition MCGIDI.hpp:1651
LUPI_HOST_DEVICE Vector< Reaction * > const & reactions() const
Definition MCGIDI.hpp:1664
LUPI_HOST_DEVICE bool isPhotoAtomic() const
Definition MCGIDI.hpp:1650
LUPI_HOST_DEVICE double URR_domainMin() const
Definition MCGIDI.hpp:1707
LUPI_HOST_DEVICE HeatedCrossSectionsContinuousEnergy & heatedCrossSections()
Definition MCGIDI.hpp:1654
LUPI_HOST_DEVICE const Vector< NuclideGammaBranchStateInfo * > & nuclideGammaBranchStateInfos() const
Definition MCGIDI.hpp:1658
LUPI_HOST_DEVICE HeatedCrossSectionsContinuousEnergy const & heatedCrossSections() const
Definition MCGIDI.hpp:1653
LUPI_HOST_DEVICE double threshold(std::size_t a_index) const
Definition MCGIDI.hpp:1711
LUPI_HOST_DEVICE std::size_t numberOfOrphanProducts() const
Definition MCGIDI.hpp:1696
LUPI_HOST Vector< double > const & projectileMultiGroupBoundariesCollapsed() const
Definition MCGIDI.hpp:1691
LUPI_HOST_DEVICE Vector< double > const & upscatterModelAGroupVelocities() const
Definition MCGIDI.hpp:1737
LUPI_HOST_DEVICE int URR_index() const
Definition MCGIDI.hpp:1703
LUPI_HOST_DEVICE String interaction() const
Definition MCGIDI.hpp:1700
LUPI_HOST_DEVICE void setURR_index(int a_URR_index)
Definition MCGIDI.hpp:1704
LUPI_HOST_DEVICE std::size_t numberOfReactions() const
Definition MCGIDI.hpp:1694
LUPI_HOST_DEVICE double minimumEnergy() const
Definition MCGIDI.hpp:1681
LUPI_HOST_DEVICE bool reactionHasURR_probabilityTables(std::size_t a_index) const
Definition MCGIDI.hpp:1709
LUPI_HOST_DEVICE std::size_t numberOfProtares() const
Definition MCGIDI.hpp:1676
LUPI_HOST_DEVICE HeatedCrossSectionsMultiGroup & heatedMultigroupCrossSections()
Definition MCGIDI.hpp:1656
LUPI_HOST_DEVICE bool fixedGrid() const
Definition MCGIDI.hpp:1652
LUPI_HOST_DEVICE bool hasURR_probabilityTables() const
Definition MCGIDI.hpp:1706
LUPI_HOST_DEVICE bool upscatterModelASupported() const
Definition MCGIDI.hpp:1735
LUPI_HOST_DEVICE Vector< Reaction * > const & orphanProducts() const
Definition MCGIDI.hpp:1666
LUPI_HOST_DEVICE long sizeOf2() const
Definition MCGIDI.hpp:1742
LUPI_HOST_DEVICE double URR_domainMax() const
Definition MCGIDI.hpp:1708
LUPI_HOST_DEVICE ProtareTNSL()
LUPI_HOST_DEVICE double TNSL_maximumTemperature() const
Definition MCGIDI.hpp:1855
LUPI_HOST_DEVICE double URR_domainMax() const
Definition MCGIDI.hpp:1888
LUPI_HOST_DEVICE std::size_t numberOfOrphanProducts() const
Definition MCGIDI.hpp:1877
LUPI_HOST_DEVICE bool hasURR_probabilityTables() const
Definition MCGIDI.hpp:1886
LUPI_HOST_DEVICE std::size_t numberOfReactions() const
Definition MCGIDI.hpp:1875
LUPI_HOST_DEVICE ProtareSingle const * TNSL() const
Definition MCGIDI.hpp:1851
LUPI_HOST_DEVICE std::size_t numberOfProtares() const
Definition MCGIDI.hpp:1861
LUPI_HOST_DEVICE Reaction const * orphanProduct(std::size_t a_index) const
Definition MCGIDI.hpp:1879
LUPI_HOST_DEVICE ProtareSingle const * protareWithElastic() const
Definition MCGIDI.hpp:1850
LUPI_HOST Vector< double > const & projectileMultiGroupBoundaries() const
Definition MCGIDI.hpp:1870
LUPI_HOST_DEVICE Vector< double > const & upscatterModelAGroupVelocities() const
Definition MCGIDI.hpp:1910
LUPI_HOST_DEVICE double TNSL_maximumEnergy() const
Definition MCGIDI.hpp:1854
LUPI_HOST ProtareTNSL(LUPI::StatusMessageReporting &a_smr, GIDI::ProtareTNSL const &a_protare, PoPI::Database const &a_pops, Transporting::MC &a_settings, GIDI::Transporting::Particles const &a_particles, DomainHash const &a_domainHash, GIDI::Styles::TemperatureInfos const &a_temperatureInfos, GIDI::ExcludeReactionsSet const &a_reactionsToExclude, std::size_t a_reactionsToExcludeOffset=0, bool a_allowFixedGrid=true)
LUPI_HOST_DEVICE bool hasIncoherentDoppler() const
Definition MCGIDI.hpp:1883
LUPI_HOST_DEVICE double minimumEnergy() const
Definition MCGIDI.hpp:1866
LUPI_HOST_DEVICE bool hasFission() const
Definition MCGIDI.hpp:1882
LUPI_HOST_DEVICE int URR_index() const
Definition MCGIDI.hpp:1885
LUPI_HOST_DEVICE double URR_domainMin() const
Definition MCGIDI.hpp:1887
LUPI_HOST_DEVICE double maximumEnergy() const
Definition MCGIDI.hpp:1867
LUPI_HOST_DEVICE long sizeOf2() const
Definition MCGIDI.hpp:1914
LUPI_HOST Vector< double > const & projectileMultiGroupBoundariesCollapsed() const
Definition MCGIDI.hpp:1872
LUPI_HOST_DEVICE ProtareSingle const * protareWithoutElastic() const
Definition MCGIDI.hpp:1852
LUPI_HOST_DEVICE int projectileIntid() const
Definition MCGIDI.hpp:1517
LUPI_HOST_DEVICE double targetExcitationEnergy() const
Definition MCGIDI.hpp:1528
LUPI_HOST_DEVICE String const & targetID() const
Definition MCGIDI.hpp:1523
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST_DEVICE ProtareType protareType() const
Definition MCGIDI.hpp:1514
LUPI_HOST Vector< int > const & productIndices(bool a_transportablesOnly) const
LUPI_HOST Protare(ProtareType a_protareType, GIDI::Protare const &a_protare, Transporting::MC const &a_settings, PoPI::Database const &a_pops)
LUPI_HOST GIDI::Frame projectileFrame() const
Definition MCGIDI.hpp:1533
LUPI_HOST_DEVICE double projectileExcitationEnergy() const
Definition MCGIDI.hpp:1521
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double depositionMomentum(std::size_t a_hashIndex, double a_temperature, double a_energy) const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE bool hasIncoherentDoppler() const MCGIDI_TRUE_VIRTUAL
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE ProtareSingle const * protareWithReaction(std::size_t a_index) const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE long memorySize()
friend ProtareTNSL
Definition MCGIDI.hpp:1601
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST Vector< double > const & projectileMultiGroupBoundariesCollapsed() const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE int projectileIndex() const
Definition MCGIDI.hpp:1518
LUPI_HOST_DEVICE int userPhotonIndex() const
Definition MCGIDI.hpp:1531
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE Vector< double > temperatures(std::size_t a_index=0) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double minimumEnergy() const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE long sizeOf() const
LUPI_HOST Vector< int > const & userProductIndices(bool a_transportablesOnly) const
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double depositionEnergy(std::size_t a_hashIndex, double a_temperature, double a_energy) const MCGIDI_TRUE_VIRTUAL
friend ProtareComposite
Definition MCGIDI.hpp:1600
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double crossSection(URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling=false) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t numberOfReactions() const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE Reaction const * reaction(std::size_t a_index) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double gain(std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIndex) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double URR_domainMin() const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t numberOfOrphanProducts() const MCGIDI_TRUE_VIRTUAL
friend ProtareSingle
Definition MCGIDI.hpp:1599
LUPI_HOST_DEVICE int targetIndex() const
Definition MCGIDI.hpp:1525
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double reactionCrossSection(std::size_t a_reactionIndex, URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex, double a_temperature, double a_energy, bool a_sampling=false) const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE int projectileUserIndex() const
Definition MCGIDI.hpp:1519
LUPI_HOST_DEVICE int photonIndex() const
Definition MCGIDI.hpp:1530
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE Reaction const * orphanProduct(std::size_t a_index) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double URR_domainMax() const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE void serializeCommon(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE void serialize2(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t numberOfProtares() const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE Vector< double > const & upscatterModelAGroupVelocities() const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE bool hasURR_probabilityTables() const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST Vector< double > const & projectileMultiGroupBoundaries() const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE std::size_t sampleReaction(Sampling::Input &a_input, URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex, double a_crossSection, RNG &&a_rng) const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE String const & projectileID() const
Definition MCGIDI.hpp:1516
LUPI_HOST Vector< int > const & productIntids(bool a_transportablesOnly) const
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE bool hasFission() const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE int targetUserIndex() const
Definition MCGIDI.hpp:1526
LUPI_HOST_DEVICE Protare(ProtareType a_protareType)
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE int URR_index() const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double threshold(std::size_t a_index) const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE void incrementMemorySize(long &a_totalMemory, long &a_sharedMemory)
virtual LUPI_HOST_DEVICE ~Protare()
LUPI_HOST_DEVICE bool isTNSL_ProtareSingle() const
Definition MCGIDI.hpp:1541
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE bool reactionHasURR_probabilityTables(std::size_t a_index) const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE double projectileMass() const
Definition MCGIDI.hpp:1520
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double maximumEnergy() const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE String evaluation() const
Definition MCGIDI.hpp:1532
LUPI_HOST_DEVICE double targetMass() const
Definition MCGIDI.hpp:1527
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double gainViaIntid(std::size_t a_hashIndex, double a_temperature, double a_energy, int a_particleIntid) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE double productionEnergy(std::size_t a_hashIndex, double a_temperature, double a_energy) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE ProtareSingle const * protare(std::size_t a_index) const MCGIDI_TRUE_VIRTUAL
MCGIDI_VIRTUAL_FUNCTION LUPI_HOST_DEVICE void crossSectionVector(double a_temperature, double a_userFactor, std::size_t a_numberAllocated, double *a_crossSectionVector) const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE int targetIntid() const
Definition MCGIDI.hpp:1524
LUPI_HOST void addOrphanProductToProductList(std::vector< Product * > &a_associatedOrphanProducts) const
LUPI_HOST_DEVICE double crossSectionThreshold() const
Definition MCGIDI.hpp:1411
LUPI_HOST_DEVICE double productAverageMultiplicity(int a_index, double a_projectileEnergy) const
LUPI_HOST_DEVICE double targetMass() const
Definition MCGIDI.hpp:1410
LUPI_HOST_DEVICE void updateProtareSingleInfo(ProtareSingle *a_protareSingle, std::size_t a_reactionIndex)
Definition MCGIDI.hpp:1395
LUPI_HOST_DEVICE int productMultiplicity(int a_index) const
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST void setOrphanProductData(std::vector< std::size_t > const &a_associatedOrphanProductIndcies, std::vector< Product * > const &a_associatedOrphanProducts)
static LUPI_HOST_DEVICE void sampleNullProducts(Protare const &a_protare, double a_projectileEnergy, Sampling::Input &a_input, RNG &&a_rng, PUSHBACK &&a_push_back, Sampling::ProductHandler &a_products)
LUPI_HOST void setUserParticleIndexViaIntid(int a_particleIntid, int a_userParticleIndex)
LUPI_HOST_DEVICE int ENDL_C() const
Definition MCGIDI.hpp:1404
LUPI_HOST_DEVICE int productMultiplicityViaIntid(int a_intid) const
LUPI_HOST_DEVICE bool hasFission() const
Definition MCGIDI.hpp:1408
LUPI_HOST_DEVICE int initialStateIndex() const
Definition MCGIDI.hpp:1406
LUPI_HOST_DEVICE double twoBodyThreshold() const
Definition MCGIDI.hpp:1412
LUPI_HOST_DEVICE Vector< int > const & userProductIndicesTransportable() const
Definition MCGIDI.hpp:1434
LUPI_HOST void setUserParticleIndex(int a_particleIndex, int a_userParticleIndex)
LUPI_HOST_DEVICE double projectileMass() const
Definition MCGIDI.hpp:1409
LUPI_HOST Reaction(GIDI::Reaction const &a_reaction, SetupInfo &a_setupInfo, Transporting::MC const &a_settings, GIDI::Transporting::Particles const &a_particles, GIDI::Styles::TemperatureInfos const &a_temperatureInfos)
LUPI_HOST_DEVICE int ENDF_MT() const
Definition MCGIDI.hpp:1403
LUPI_HOST_DEVICE Vector< int > const & productIntids() const
Definition MCGIDI.hpp:1418
LUPI_HOST_DEVICE Vector< int > const & productIndices() const
Definition MCGIDI.hpp:1419
LUPI_HOST_DEVICE double angleBiasing(int a_pid, double a_temperature, double a_energy_in, double a_mu_lab, double &a_energy_out, RNG &&a_rng, double *a_cumulative_weight=nullptr, bool a_checkOrphanProducts=true) const
LUPI_HOST_DEVICE Vector< int > const & productIntidsTransportable() const
Definition MCGIDI.hpp:1430
LUPI_HOST_DEVICE std::size_t numberOfProducts() const
Definition MCGIDI.hpp:1421
LUPI_HOST_DEVICE ~Reaction()
LUPI_HOST_DEVICE double finalQ(double a_energy) const
LUPI_HOST_DEVICE Vector< int > const & productIndicesTransportable() const
Definition MCGIDI.hpp:1432
LUPI_HOST_DEVICE double crossSection(URR_protareInfos const &a_URR_protareInfos, std::size_t a_hashIndex, double a_temperature, double a_energy) const
LUPI_HOST_DEVICE double productAverageMultiplicityViaIntid(int a_intid, double a_projectileEnergy) const
LUPI_HOST_DEVICE std::size_t reactionIndex() const
Definition MCGIDI.hpp:1400
LUPI_HOST_DEVICE Reaction()
LUPI_HOST_DEVICE Product const * product(std::size_t a_index) const
Definition MCGIDI.hpp:1422
LUPI_HOST_DEVICE ProtareSingle const * protareSingle() const
Definition MCGIDI.hpp:1399
LUPI_HOST_DEVICE std::size_t GIDI_reactionIndex() const
Definition MCGIDI.hpp:1401
LUPI_HOST void setModelDBRC_data(Sampling::Upscatter::ModelDBRC_data *a_modelDBRC_data)
LUPI_HOST_DEVICE String const & label() const
Definition MCGIDI.hpp:1402
LUPI_HOST_DEVICE Vector< int > const & userProductIndices() const
Definition MCGIDI.hpp:1420
LUPI_HOST_DEVICE int productMultiplicities(int a_index) const
Definition MCGIDI.hpp:1425
LUPI_HOST_DEVICE int ENDL_S() const
Definition MCGIDI.hpp:1405
LUPI_HOST_DEVICE Vector< std::size_t > associatedOrphanProductIndices() const
Definition MCGIDI.hpp:1439
LUPI_HOST_DEVICE void sampleProducts(Protare const *a_protare, Sampling::Input &a_input, RNG &&a_rng, PUSHBACK &&a_push_back, Sampling::ProductHandler &a_products, bool a_checkOrphanProducts=true) const
LUPI_HOST GIDI::Functions::XYs1d crossSectionAsGIDI_XYs1d(double a_temperature) const
LUPI_HOST_DEVICE double angleBiasingViaIntid(int a_intid, double a_temperature, double a_energy_in, double a_mu_lab, double &a_energy_out, RNG &&a_rng, double *a_cumulative_weight=nullptr, bool a_checkOrphanProducts=true) const
double m_product2Mass
Definition MCGIDI.hpp:263
GIDI::ProtareSingle const & m_GIDI_protare
Definition MCGIDI.hpp:255
std::map< std::string, ACE_URR_probabilityTablesFromGIDI * > m_ACE_URR_probabilityTablesFromGIDI
Definition MCGIDI.hpp:279
bool m_isPhotoAtomicIncoherentScattering
Definition MCGIDI.hpp:268
GIDI::GRIN::GRIN_continuumGammas const * m_GRIN_continuumGammas
Definition MCGIDI.hpp:280
std::string m_distributionLabel
Definition MCGIDI.hpp:269
std::map< std::string, int > m_particleIntids
Definition MCGIDI.hpp:270
std::map< std::string, int > m_initialStateIndices
Definition MCGIDI.hpp:276
LUPI_HOST SetupInfo(ProtareSingle &a_protare, GIDI::ProtareSingle const &a_GIDI_protare, PoPI::Database const &a_popsUser, PoPI::Database const &a_pops)
double m_product1Mass
Definition MCGIDI.hpp:262
TwoBodyOrder m_twoBodyOrder
Definition MCGIDI.hpp:266
std::map< std::string, int > m_stateNamesToIndices
Definition MCGIDI.hpp:277
std::map< std::string, int > m_particleIndices
Definition MCGIDI.hpp:271
LUPI::FormatVersion m_formatVersion
Definition MCGIDI.hpp:260
bool m_hasFinalStatePhotons
Definition MCGIDI.hpp:275
bool m_isPairProduction
Definition MCGIDI.hpp:267
PoPI::Database const & m_popsUser
Definition MCGIDI.hpp:256
ProtareSingle & m_protare
Definition MCGIDI.hpp:254
GIDI::Reaction const * m_reaction
Definition MCGIDI.hpp:272
std::map< std::string, double > m_nuclearLevelEnergies
Definition MCGIDI.hpp:278
PoPI::Database const & m_pops
Definition MCGIDI.hpp:257
Transporting::Reaction::Type m_reactionType
Definition MCGIDI.hpp:273
LUPI_HOST ~SetupInfo()
LUPI_HOST std::vector< double > fixedGridPoints() const
Definition MCGIDI.hpp:212
LUPI_HOST bool makePhotonEmissionProbabilitiesOne() const
Definition MCGIDI.hpp:215
LUPI_HOST bool wantRawTNSL_distributionSampling()
Definition MCGIDI.hpp:208
LUPI_HOST bool useSlowerContinuousEnergyConversion() const
Definition MCGIDI.hpp:151
LUPI_HOST MC(PoPI::Database const &a_pops, std::string const &a_projectileID, GIDI::Styles::Suite const *a_styles, std::string const &a_label, GIDI::Transporting::DelayedNeutrons a_delayedNeutrons, double energyDomainMax)
LUPI_HOST std::vector< double > const & upscatterModelAGroupBoundaries()
Definition MCGIDI.hpp:181
LUPI_HOST double energyDomainMax() const
Definition MCGIDI.hpp:138
LUPI_HOST void want_URR_probabilityTables(bool a_want_URR_probabilityTables)
Definition MCGIDI.hpp:188
LUPI_HOST Sampling::Upscatter::Model upscatterModel() const
Definition MCGIDI.hpp:176
LUPI_HOST void setCrossSectionLookupMode(LookupMode::Data1d a_crossSectionLookupMode)
LUPI_HOST bool sampleNonTransportingParticles() const
Definition MCGIDI.hpp:145
LUPI_HOST void setZeroNuclearLevelEnergyWidth(bool a_zeroNuclearLevelEnergyWidth)
Definition MCGIDI.hpp:221
LUPI_HOST void set_wantRawTNSL_distributionSampling(bool a_wantRawTNSL_distributionSampling)
Definition MCGIDI.hpp:209
LUPI_HOST void wantTerrellPromptNeutronDistribution(bool a_wantTerrellPromptNeutronDistribution)
Definition MCGIDI.hpp:202
LUPI_HOST void sampleNonTransportingParticles(bool a_sampleNonTransportingParticles)
Definition MCGIDI.hpp:146
LUPI_HOST void setAddExpectedValueData(bool a_addExpectedValueData)
Definition MCGIDI.hpp:156
LUPI_HOST MC(PoPI::Database const &a_pops, GIDI::Protare const &a_protare, std::string const &a_label, GIDI::Transporting::DelayedNeutrons a_delayedNeutrons, double energyDomainMax)
LUPI_HOST void set_ignoreENDF_MT5(bool a_ignoreENDF_MT5)
Definition MCGIDI.hpp:141
LUPI_HOST bool want_URR_probabilityTables() const
Definition MCGIDI.hpp:185
LUPI_HOST bool ignoreENDF_MT5() const
Definition MCGIDI.hpp:140
LUPI_HOST void setMakePhotonEmissionProbabilitiesOne(bool a_makePhotonEmissionProbabilitiesOne)
Definition MCGIDI.hpp:217
LUPI_HOST void other1dDataLookupMode(LookupMode::Data1d a_other1dDataLookupMode)
Definition MCGIDI.hpp:166
LUPI_HOST void setUpscatterModelDBRC()
Definition MCGIDI.hpp:180
LUPI_HOST void setUpscatterModelA()
Definition MCGIDI.hpp:177
LUPI_HOST void setIgnoreENDF_MT5(bool a_ignoreENDF_MT5)
Definition MCGIDI.hpp:142
LUPI_HOST URR_mode _URR_mode() const
Definition MCGIDI.hpp:194
LUPI_HOST void setUpscatterModelBSnLimits()
Definition MCGIDI.hpp:179
LUPI_HOST bool zeroNuclearLevelEnergyWidth() const
Definition MCGIDI.hpp:219
LUPI_HOST void setOther1dDataLookupMode(LookupMode::Data1d a_other1dDataLookupMode)
LUPI_HOST bool addExpectedValueData() const
Definition MCGIDI.hpp:155
LUPI_HOST void setSampleNonTransportingParticles(bool a_sampleNonTransportingParticles)
Definition MCGIDI.hpp:149
LUPI_HOST void styles(GIDI::Styles::Suite const *a_styles)
Definition MCGIDI.hpp:132
LUPI_HOST GIDI::Styles::Suite const * styles() const
Definition MCGIDI.hpp:131
LUPI_HOST LookupMode::Data1d crossSectionLookupMode() const
Definition MCGIDI.hpp:158
LUPI_HOST void distributionLookupMode(LookupMode::Distribution a_distributionLookupMode)
Definition MCGIDI.hpp:172
LUPI_HOST bool wantRawTNSL_distributionSampling() const
Definition MCGIDI.hpp:207
LUPI_HOST void setUseSlowerContinuousEnergyConversion(bool a_useSlowerContinuousEnergyConversion)
Definition MCGIDI.hpp:152
LUPI_HOST void setWantTerrellPromptNeutronDistribution(bool a_wantTerrellPromptNeutronDistribution)
Definition MCGIDI.hpp:199
LUPI_HOST LookupMode::Data1d other1dDataLookupMode() const
Definition MCGIDI.hpp:164
LUPI_HOST void process(GIDI::Protare const &a_protare)
LUPI_HOST bool wantTerrellPromptNeutronDistribution() const
Definition MCGIDI.hpp:197
LUPI_HOST void setDistributionLookupMode(LookupMode::Distribution a_distributionLookupMode)
LUPI_HOST void setURR_mode(URR_mode a_URR_mode)
Definition MCGIDI.hpp:195
LUPI_HOST LookupMode::Distribution distributionLookupMode() const
Definition MCGIDI.hpp:170
LUPI_HOST void crossSectionLookupMode(LookupMode::Data1d a_crossSectionLookupMode)
Definition MCGIDI.hpp:160
LUPI_HOST void setUpscatterModelB()
Definition MCGIDI.hpp:178
LUPI_HOST void fixedGridPoints(std::vector< double > a_fixedGridPoints)
Definition MCGIDI.hpp:213
LUPI_HOST std::string label() const
Definition MCGIDI.hpp:134
LUPI_HOST void setUpscatterModelAGroupBoundaries(std::vector< double > const &a_groupBoundaries)
LUPI_HOST_DEVICE double rng_Value() const
Definition MCGIDI.hpp:442
LUPI_HOST_DEVICE URR_protareInfo()
Definition MCGIDI.hpp:426
LUPI_HOST_DEVICE URR_protareInfo(URR_protareInfo const &a_URR_protareInfo)
Definition MCGIDI.hpp:427
LUPI_HOST_DEVICE bool inURR() const
Definition MCGIDI.hpp:441
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
Definition MCGIDI_URR.cc:22
LUPI_HOST_DEVICE URR_protareInfo & operator=(URR_protareInfo const &a_rhs)
Definition MCGIDI.hpp:431
LUPI_HOST_DEVICE URR_protareInfos()
Definition MCGIDI.hpp:457
LUPI_HOST_DEVICE void updateProtare(MCGIDI::Protare const *a_protare, double a_energy, RNG &&a_rng)
LUPI_HOST_DEVICE std::size_t size() const
Definition MCGIDI.hpp:462
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
Definition MCGIDI_URR.cc:75
LUPI_HOST void setup(Vector< Protare * > &a_protares)
Definition MCGIDI_URR.cc:45
LUPI_HOST_DEVICE URR_protareInfo const & operator[](std::size_t a_index) const
Definition MCGIDI.hpp:463
LUPI_HOST_DEVICE std::size_t internalSize() const
Definition MCGIDI.hpp:468
LUPI_HOST_DEVICE std::size_t size() const
LUPI_HOST_DEVICE T & back()
#define inline
Definition internal.h:104
std::vector< Styles::TemperatureInfo > TemperatureInfos
Definition GIDI.hpp:3440
Frame
Definition GIDI.hpp:146
std::set< std::size_t > ExcludeReactionsSet
Definition GIDI.hpp:47
Definition LUPI.hpp:40
void deprecatedFunction(std::string const &a_functionName, std::string const &a_replacementName, std::string const &a_asOf)
Simple C++ string class, useful as replacement for std::string if this cannot be used,...
Definition MCGIDI.hpp:43
LUPI_HOST_DEVICE Distributions::Distribution * serializeDistribution(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, Distributions::Distribution *a_distribution)
LUPI_HOST int MCGIDI_popsIntid(PoPI::Database const &a_pops, std::string const &a_ID)
LUPI_HOST void addVectorItemsToSet(Vector< int > const &a_from, std::set< int > &a_to)
LUPI_HOST_DEVICE double boostSpeed(double a_massProjectile, double a_kineticEnergyProjectile, double a_massTarget)
LUPI_HOST Protare * protareFromGIDIProtare(LUPI::StatusMessageReporting &a_smr, GIDI::Protare const &a_protare, PoPI::Database const &a_pops, Transporting::MC &a_settings, GIDI::Transporting::Particles const &a_particles, DomainHash const &a_domainHash, GIDI::Styles::TemperatureInfos const &a_temperatureInfos, GIDI::ExcludeReactionsSet const &a_reactionsToExclude, std::size_t a_reactionsToExcludeOffset=0, bool a_allowFixedGrid=true)
LUPI_HOST_DEVICE void serializeFissionResiduals(GIDI::Construction::FissionResiduals &a_fissionResiduals, LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST_DEVICE void serializeDelayedNeutrons(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, Vector< DelayedNeutron * > &a_delayedNeutrons)
LUPI_HOST Vector< double > GIDI_VectorDoublesToMCGIDI_VectorDoubles(GIDI::Vector a_vector)
ProtareType
Definition MCGIDI.hpp:79
LUPI_HOST_DEVICE int binarySearchVectorBounded(double a_x, Vector< double > const &a_Xs, std::size_t a_lower, std::size_t a_upper, bool a_boundIndex)
Definition MCGIDI.hpp:347
LUPI_HOST_DEVICE void serializeQs(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, Vector< Functions::Function1d_d1 * > &a_Qs)
LUPI_HOST_DEVICE double particleKineticEnergy(double a_mass_unitOfEnergy, double a_particleBeta)
ChannelType
Definition MCGIDI.hpp:381
LUPI_HOST int MCGIDI_popsIndex(PoPI::Database const &a_pops, std::string const &a_ID)
TwoBodyOrder
Definition MCGIDI.hpp:229
LUPI_HOST_DEVICE void serializeProducts(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode, Vector< Product * > &a_products)
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)
Definition MCGIDI.hpp:318
LUPI_HOST_DEVICE double particleKineticEnergyFromBeta2(double a_mass_unitOfEnergy, double a_particleBeta2)
LUPI_HOST std::vector< double > vectorToSTD_vector(Vector< double > a_input)
LUPI_HOST_DEVICE int distributionTypeToInt(Distributions::Type a_type)
LUPI_HOST_DEVICE int muCOM_From_muLab(double a_muLab, double a_boostBeta, double a_productBeta, double &a_muPlus, double &a_JacobianPlus, double &a_muMinus, double &a_JacobianMinus)
LUPI_HOST void convertACE_URR_probabilityTablesFromGIDI(GIDI::ProtareSingle const &a_protare, Transporting::MC &a_settings, SetupInfo &a_setupInfo)
LUPI_HOST_DEVICE Distributions::Type intToDistributionType(int a_type)