Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
MCGIDI_GRIN.cc
Go to the documentation of this file.
1/*
2# <<BEGIN-copyright>>
3# Copyright 2019, Lawrence Livermore National Security, LLC.
4# This file is part of the gidiplus package (https://github.com/LLNL/gidiplus).
5# gidiplus is licensed under the MIT license (see https://opensource.org/licenses/MIT).
6# SPDX-License-Identifier: MIT
7# <<END-copyright>>
8*/
9
10#include <MCGIDI.hpp>
11
12namespace MCGIDI {
13
14/*! \class GRIN_levelsAndProbabilities
15 * This class stores a Vector of summed probabilities and a Vector of their associated nuclide level as needed by
16 * inelastic and cpature GRIN continuum reaction data.
17 */
18
19/* *********************************************************************************************************//**
20 ***********************************************************************************************************/
21
25
26/* *********************************************************************************************************//**
27 * @param a_setupInfo [in] Used internally when constructing a Protare to pass information to other constructors.
28 * @param a_table [in] The table with a column containing nucide ids and a column with their probabilities.
29 ***********************************************************************************************************/
30
32 GIDI::Table::Table const &a_table, bool a_normalize ) {
33
34 m_summedProbabilities.reserve( a_table.rows( ) );
35 m_levels.reserve( a_table.rows( ) );
36 m_isModelledLevel.reserve( a_table.rows( ) );
37
38 double sum = 0.0;
39 auto cells = LUPI::Misc::splitString( LUPI::Misc::stripString( a_table.data( ).body( ) ), ' ', true );
40 for( std::size_t index = 0; index < cells.size( ); ++index ) {
41 m_levels.push_back( a_setupInfo.m_stateNamesToIndices[cells[index]] );
42 PoPI::Nuclide const &nuclide = a_pops.get<PoPI::Nuclide const>( cells[index] );
43
44 ++index;
45 sum += std::stod( cells[index] );
46 m_summedProbabilities.push_back( sum );
47
48 m_isModelledLevel.push_back( nuclide.kind( ) == PoPI_continuumChars );
49 }
50
51 if( a_normalize ) {
52 for( auto iter = m_summedProbabilities.begin( ); iter != m_summedProbabilities.end( ); ++iter ) (*iter) /= sum;
53 }
54}
55
56/* *********************************************************************************************************//**
57 ***********************************************************************************************************/
58
62
63/* *********************************************************************************************************//**
64 ***********************************************************************************************************/
65
66LUPI_HOST void GRIN_levelsAndProbabilities::set( std::vector<int> const &a_levels, std::vector<double> const &a_probabilities ) {
67
68 m_levels.reserve( a_levels.size( ) );
69 m_summedProbabilities.reserve( a_levels.size( ) );
70 m_isModelledLevel.reserve( a_levels.size( ) );
71
72 double sum = 0;
73 for( std::size_t index = 0; index < a_levels.size( ); ++index ) {
74 m_levels.push_back( a_levels[index] );
75 sum += a_probabilities[index];
76 m_summedProbabilities.push_back( sum );
77 m_isModelledLevel.push_back( true );
78 }
79
80 for( auto iter = m_summedProbabilities.begin( ); iter != m_summedProbabilities.end( ); ++iter ) {
81 *iter /= sum;
82 }
83}
84
85/* *********************************************************************************************************//**
86 * This method serializes *this* for broadcasting as needed for MPI and GPUs. The method can count the number of required
87 * bytes, pack *this* or unpack *this* depending on *a_mode*.
88 *
89 * @param a_buffer [in] The buffer to read or write data to depending on *a_mode*.
90 * @param a_mode [in] Specifies the action of this method.
91 ***********************************************************************************************************/
92
99
100/*! \class GRIN_inelasticForEnergy
101 * This class represents GRIN inelastic continuum reaction data which has simulated levels.
102 */
103
104/* *********************************************************************************************************//**
105 ***********************************************************************************************************/
106
110
111/* *********************************************************************************************************//**
112 * @param a_setupInfo [in] Used internally when constructing a Protare to pass information to other constructors.
113 * @param GRIN_continuumGammas [in] GIDI instance containing the GRIN capture data.
114 ***********************************************************************************************************/
115
116LUPI_HOST GRIN_inelasticForEnergy::GRIN_inelasticForEnergy( SetupInfo &a_setupInfo, double a_projectileMass, double a_targetMass,
117 PoPI::Database const &a_pops, GIDI::GRIN::InelasticIncidentEnergy const *inelasticIncidentEnergy ) :
118 m_levelsAndProbabilities( a_setupInfo, a_pops, inelasticIncidentEnergy->table( ), true ) {
119
120 std::vector<std::size_t> indices;
121 std::vector<double> thresholds;
122 std::size_t index = 0;
123 double priorThreshold = -1;
124 for( auto iter = m_levelsAndProbabilities.m_levels.begin( ); iter != m_levelsAndProbabilities.m_levels.end( ); ++iter, ++index ) {
125 NuclideGammaBranchStateInfo const *nuclideGammaBranchStateInfo = a_setupInfo.m_protare.nuclideGammaBranchStateInfos( )[static_cast<std::size_t>(*iter)];
126 double levelEnergy = nuclideGammaBranchStateInfo->nuclearLevelEnergy( );
127
128 double threshold = ( a_projectileMass + a_targetMass + levelEnergy / 2 ) * levelEnergy / a_targetMass;
129 if( threshold > priorThreshold ) {
130 if( thresholds.size( ) > 0 )
131 indices.push_back( index - 1 );
132 thresholds.push_back( threshold );
133 priorThreshold = threshold;
134 }
135 }
136 indices.push_back( m_levelsAndProbabilities.m_levels.size( ) - 1 );
137
138 m_indices = indices;
139 m_thresholds = thresholds;
140}
141
142/* *********************************************************************************************************//**
143 ***********************************************************************************************************/
144
148
149/* *********************************************************************************************************//**
150 ***********************************************************************************************************/
151
152LUPI_HOST_DEVICE int GRIN_inelasticForEnergy::sampleLevelIndex( double a_projectileEnergy, double a_random ) const {
153
154 std::size_t index = 0;
155
156 for( auto iter = m_thresholds.begin( ); iter != m_thresholds.end( ); ++iter, ++index ) {
157 if( *iter >= a_projectileEnergy ) break;
158 }
159
160 if( index == 0 ) return( -1 );
161
162 --index;
163
164 double randomMax = a_random * m_levelsAndProbabilities.m_summedProbabilities[m_indices[index]];
165 for( index = 0; index < m_levelsAndProbabilities.m_levels.size( ) - 1; ++index ) {
166 if( m_levelsAndProbabilities.m_summedProbabilities[index] >= randomMax ) {
167 break;
168 }
169 }
170 return( m_levelsAndProbabilities.m_levels[index] );
171}
172
173/* *********************************************************************************************************//**
174 * This method serializes *this* for broadcasting as needed for MPI and GPUs. The method can count the number of required
175 * bytes, pack *this* or unpack *this* depending on *a_mode*.
176 *
177 * @param a_buffer [in] The buffer to read or write data to depending on *a_mode*.
178 * @param a_mode [in] Specifies the action of this method.
179 ***********************************************************************************************************/
180
182
183 DATA_MEMBER_VECTOR_SIZE_T( m_indices, a_buffer, a_mode );
184 DATA_MEMBER_VECTOR_DOUBLE( m_thresholds, a_buffer, a_mode );
185 m_levelsAndProbabilities.serialize( a_buffer, a_mode );
186}
187
188/*! \class GRIN_inelastic
189 * This class represents GRIN inelastic continuum reaction data which has simulated levels.
190 */
191
192/* *********************************************************************************************************//**
193 ***********************************************************************************************************/
194
198
199/* *********************************************************************************************************//**
200 * @param a_setupInfo [in] Used internally when constructing a Protare to pass information to other constructors.
201 * @param GRIN_continuumGammas [in] GIDI instance containing the GRIN capture data.
202 ***********************************************************************************************************/
203
205 m_neutronIndex( a_setupInfo.m_neutronIndex ),
206 m_neutronUserParticleIndex( -1 ),
207 m_neutronMass( a_setupInfo.m_protare.projectileMass( ) ),
208
209 m_targetIntid( a_setupInfo.m_protare.targetIntid( ) ),
210 m_targetIndex( a_setupInfo.m_protare.targetIndex( ) ),
211 m_targetUserParticleIndex( -1 ),
212 m_targetMass( a_setupInfo.m_protare.targetMass( ) ) {
213
214 PoPI::Database const &pops = GRIN_continuumGammas.pops( );
215 GIDI::Suite const &inelasticIncidentEnergies = GRIN_continuumGammas.inelasticIncidentEnergies( );
216 m_energies.reserve( inelasticIncidentEnergies.size( ) );
217 m_inelasticForEnergy.reserve( inelasticIncidentEnergies.size( ) );
218 for( std::size_t index = 0; index < inelasticIncidentEnergies.size( ); ++index ) {
219
220 GIDI::GRIN::InelasticIncidentEnergy const *inelasticIncidentEnergy = inelasticIncidentEnergies.get<GIDI::GRIN::InelasticIncidentEnergy>( index );
221
222 m_energies.push_back( inelasticIncidentEnergy->energy( ) );
223 m_inelasticForEnergy.push_back( new GRIN_inelasticForEnergy( a_setupInfo, m_neutronMass, m_targetMass, pops, inelasticIncidentEnergy ) );
224 }
225}
226
227/* *********************************************************************************************************//**
228 ***********************************************************************************************************/
229
231
232 for( auto iter = m_inelasticForEnergy.begin( ); iter != m_inelasticForEnergy.end( ); ++iter ) delete *iter;
233}
234
235/* *********************************************************************************************************//**
236 * Updates the m_userParticleIndex to *a_userParticleIndex* for all particles with PoPs index *a_particleIndex*.
237 *
238 * @param a_particleIndex [in] The PoPs index of the particle whose user index is to be set.
239 * @param a_userParticleIndex [in] The particle index specified by the user.
240 ***********************************************************************************************************/
241
242LUPI_HOST void GRIN_inelastic::setUserParticleIndex( int a_particleIndex, int a_userParticleIndex ) {
243
244 if( m_neutronIndex == a_particleIndex ) m_neutronUserParticleIndex = a_userParticleIndex;
245 if( m_targetIndex == a_particleIndex ) m_targetUserParticleIndex = a_userParticleIndex;
246}
247
248/* *********************************************************************************************************//**
249 * Updates the m_userParticleIndex to *a_userParticleIndex* for all particles with PoPs intid *a_particleIntid*.
250 *
251 * @param a_particleIntid [in] The PoPs intid of the particle whose user index is to be set.
252 * @param a_userParticleIndex [in] The particle index specified by the user.
253 ***********************************************************************************************************/
254
255LUPI_HOST void GRIN_inelastic::setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex ) {
256
257 if( PoPI::Intids::neutron == a_particleIntid ) m_neutronUserParticleIndex = a_userParticleIndex;
258 if( m_targetIntid == a_particleIntid ) m_targetUserParticleIndex = a_userParticleIndex;
259}
260
261/* *********************************************************************************************************//**
262 * This method serializes *this* for broadcasting as needed for MPI and GPUs. The method can count the number of required
263 * bytes, pack *this* or unpack *this* depending on *a_mode*.
264 *
265 * @param a_buffer [in] The buffer to read or write data to depending on *a_mode*.
266 * @param a_mode [in] Specifies the action of this method.
267 ***********************************************************************************************************/
268
270
271 DATA_MEMBER_INT( m_neutronIndex, a_buffer, a_mode );
272 DATA_MEMBER_INT( m_neutronUserParticleIndex, a_buffer, a_mode );
273 DATA_MEMBER_DOUBLE( m_neutronMass, a_buffer, a_mode );
274
275 DATA_MEMBER_INT( m_targetIntid, a_buffer, a_mode );
276 DATA_MEMBER_INT( m_targetIndex, a_buffer, a_mode );
277 DATA_MEMBER_INT( m_targetUserParticleIndex, a_buffer, a_mode );
278 DATA_MEMBER_DOUBLE( m_targetMass, a_buffer, a_mode );
279
280 DATA_MEMBER_VECTOR_DOUBLE( m_energies, a_buffer, a_mode );
281
282 std::size_t vectorSize = m_inelasticForEnergy.size( );
283 int vectorSizeInt = (int) vectorSize;
284 DATA_MEMBER_INT( vectorSizeInt, a_buffer, a_mode );
285 vectorSize = (std::size_t) vectorSizeInt;
286
287 if( a_mode == LUPI::DataBuffer::Mode::Unpack ) {
288 m_inelasticForEnergy.resize( vectorSize, &a_buffer.m_placement );
289 for( std::size_t vectorIndex = 0; vectorIndex < vectorSize; ++vectorIndex ) {
290 if( a_buffer.m_placement != nullptr ) {
291 m_inelasticForEnergy[vectorIndex] = new(a_buffer.m_placement) GRIN_inelasticForEnergy;
292 a_buffer.incrementPlacement( sizeof( GRIN_inelasticForEnergy ) ); }
293 else {
294 m_inelasticForEnergy[vectorIndex] = new GRIN_inelasticForEnergy;
295 }
296 } }
297 else if( a_mode == LUPI::DataBuffer::Mode::Memory ) {
298 a_buffer.m_placement += m_inelasticForEnergy.internalSize( );
299 a_buffer.incrementPlacement( sizeof( GRIN_inelasticForEnergy ) * vectorSize );
300 }
301
302 for( std::size_t vectorIndex = 0; vectorIndex < vectorSize; ++vectorIndex ) {
303 m_inelasticForEnergy[vectorIndex]->serialize( a_buffer, a_mode );
304 }
305}
306
307/*! \class GRIN_captureToCompound
308 * This class represents
309 */
310
311/* *********************************************************************************************************//**
312 ***********************************************************************************************************/
313
317
318/* *********************************************************************************************************//**
319 * @param a_setupInfo [in] Used internally when constructing a Protare to pass information to other constructors.
320 * @param a_compoundId [in] The GNDS PoPs' id of the compound level.
321 ***********************************************************************************************************/
322
323LUPI_HOST GRIN_captureToCompound::GRIN_captureToCompound( SetupInfo &a_setupInfo, PoPI::Database const &a_pops, std::string a_compoundId ) :
324 m_index( static_cast<std::size_t>( a_setupInfo.m_stateNamesToIndices[a_compoundId] ) ),
325 m_continuumIndices( ) {
326
327 PoPI::Nuclide const &nuclide = a_pops.get<PoPI::Nuclide const>( a_compoundId );
328
329 PoPI::GammaDecayData const &gammaDecayData = nuclide.gammaDecayData( );
330 auto ids = gammaDecayData.ids( );
331 auto probabilities1 = gammaDecayData.probabilities( );
332
333 std::vector<int> levels;
334 levels.reserve( ids.size( ) );
335 std::vector<double> probabilities2;
336 probabilities2.reserve( ids.size( ) );
337 for( std::size_t index = 0; index < ids.size( ); ++index ) {
338 PoPI::Nuclide const &daughter = a_pops.get<PoPI::Nuclide const>( ids[index] );
339 if( daughter.kind( ) != PoPI_continuumChars ) continue;
340 levels.push_back( a_setupInfo.m_stateNamesToIndices[ids[index]] );
341 probabilities2.push_back( probabilities1[index] );
342 }
343 m_continuumIndices.set( levels, probabilities2 );
344}
345
346/* *********************************************************************************************************//**
347 ***********************************************************************************************************/
348
352
353/* *********************************************************************************************************//**
354 * This method serializes *this* for broadcasting as needed for MPI and GPUs. The method can count the number of required
355 * bytes, pack *this* or unpack *this* depending on *a_mode*.
356 *
357 * @param a_buffer [in] The buffer to read or write data to depending on *a_mode*.
358 * @param a_mode [in] Specifies the action of this method.
359 ***********************************************************************************************************/
360
362
363 DATA_MEMBER_SIZE_T( m_index, a_buffer, a_mode );
364 m_continuumIndices.serialize( a_buffer, a_mode );
365}
366
367/*! \class GRIN_captureLevelProbability
368 * This class represents
369 */
370
371/* *********************************************************************************************************//**
372 ***********************************************************************************************************/
373
377
378/* *********************************************************************************************************//**
379 * @param a_setupInfo [in] Used internally when constructing a Protare to pass information to other constructors.
380 * @param a_captureLevelProbability [in] GIDI instance with the data.
381 ***********************************************************************************************************/
382
384 GIDI::GRIN::CaptureLevelProbability const *a_captureLevelProbability ) :
385 m_knownLevelsAndProbabilities( a_setupInfo, a_pops, a_captureLevelProbability->table( ), false ) {
386
387 auto capturePrimaryToContinua = LUPI::Misc::splitString( a_captureLevelProbability->capturePrimaryToContinua( ), true );
388 m_captureToCompounds.reserve( capturePrimaryToContinua.size( ) );
389 for( std::size_t i1 = 0; i1 < capturePrimaryToContinua.size( ); ++i1 ) {
390 m_captureToCompounds.push_back( new GRIN_captureToCompound( a_setupInfo, a_pops, capturePrimaryToContinua[i1] ) );
391 }
392}
393
394/* *********************************************************************************************************//**
395 ***********************************************************************************************************/
396
400
401/* *********************************************************************************************************//**
402 * This method serializes *this* for broadcasting as needed for MPI and GPUs. The method can count the number of required
403 * bytes, pack *this* or unpack *this* depending on *a_mode*.
404 *
405 * @param a_buffer [in] The buffer to read or write data to depending on *a_mode*.
406 * @param a_mode [in] Specifies the action of this method.
407 ***********************************************************************************************************/
408
410
411 m_knownLevelsAndProbabilities.serialize( a_buffer, a_mode );
412
413 std::size_t vectorSize = m_captureToCompounds.size( );
414 int vectorSizeInt = (int) vectorSize;
415 DATA_MEMBER_INT( vectorSizeInt, a_buffer, a_mode );
416 vectorSize = (std::size_t) vectorSizeInt;
417
418 if( a_mode == LUPI::DataBuffer::Mode::Unpack ) {
419 m_captureToCompounds.resize( vectorSize, &a_buffer.m_placement );
420 for( std::size_t vectorIndex = 0; vectorIndex < vectorSize; ++vectorIndex ) {
421 if( a_buffer.m_placement != nullptr ) {
422 m_captureToCompounds[vectorIndex] = new(a_buffer.m_placement) GRIN_captureToCompound;
423 a_buffer.incrementPlacement( sizeof( GRIN_captureToCompound ) ); }
424 else {
425 m_captureToCompounds[vectorIndex] = new GRIN_captureToCompound;
426 }
427 } }
428 else if( a_mode == LUPI::DataBuffer::Mode::Memory ) {
429 a_buffer.m_placement += m_captureToCompounds.internalSize( );
430 a_buffer.incrementPlacement( sizeof( GRIN_captureToCompound ) * vectorSize );
431 }
432
433 for( std::size_t vectorIndex = 0; vectorIndex < vectorSize; ++vectorIndex ) {
434 m_captureToCompounds[vectorIndex]->serialize( a_buffer, a_mode );
435 }
436}
437
438/*! \class GRIN_capture
439 * Thiis class represents GRIN capture continuum reaction data which has simulated (i.e., modelled) levels.
440 */
441
442/* *********************************************************************************************************//**
443 ***********************************************************************************************************/
444
446 m_captureNeutronSeparationEnergy( 0.0 ),
447 m_residualIntid( -1 ),
448 m_residualIndex( -1 ),
449 m_residualUserIndex( -1 ),
450 m_residualMass( 0.0 ) {
451
452}
453
454/* *********************************************************************************************************//**
455 * @param a_setupInfo [in] Used internally when constructing a Protare to pass information to other constructors.
456 * @param GRIN_continuumGammas [in] GIDI instance containing the GRIN capture data.
457 ***********************************************************************************************************/
458
460 m_captureNeutronSeparationEnergy( GRIN_continuumGammas.captureNeutronSeparationEnergy( ).value( ) ),
461 m_residualIntid( GRIN_continuumGammas.captureResidualIntid( ) ),
462 m_residualIndex( GRIN_continuumGammas.captureResidualIndex( ) ),
463 m_residualUserIndex( -1 ),
464 m_residualMass( GRIN_continuumGammas.captureResidualMass( ) ) {
465
466 PoPI::Database const &pops = GRIN_continuumGammas.pops( );
467 GIDI::Suite const &captureLevelProbabilities = GRIN_continuumGammas.captureLevelProbabilities( );
468
469 m_summedProbabilities.reserve( captureLevelProbabilities.size( ) );
470 m_captureLevelProbabilities.reserve( captureLevelProbabilities.size( ) );
471 double sum = 0.0;
472 for( std::size_t index = 0; index < captureLevelProbabilities.size( ); ++index ) {
473 GIDI::GRIN::CaptureLevelProbability const *captureLevelProbability = captureLevelProbabilities.get<GIDI::GRIN::CaptureLevelProbability const>( 0 );
474
475 sum += captureLevelProbability->probabilty( );
476 m_summedProbabilities.push_back( sum );
477 m_captureLevelProbabilities.push_back( new GRIN_captureLevelProbability( a_setupInfo, pops, captureLevelProbability ) );
478 }
479}
480
481/* *********************************************************************************************************//**
482 ***********************************************************************************************************/
483
485
486 for( auto iter = m_captureLevelProbabilities.begin( ); iter != m_captureLevelProbabilities.end( ); ++iter ) delete *iter;
487}
488
489/* *********************************************************************************************************//**
490 * Updates the m_userParticleIndex to *a_userParticleIndex* for all particles with PoPs index *a_particleIndex*.
491 *
492 * @param a_particleIndex [in] The PoPs index of the particle whose user index is to be set.
493 * @param a_userParticleIndex [in] The particle index specified by the user.
494 ***********************************************************************************************************/
495
496LUPI_HOST void GRIN_capture::setUserParticleIndex( int a_particleIndex, int a_userParticleIndex ) {
497
498 if( m_residualIndex == a_particleIndex ) m_residualUserIndex = a_userParticleIndex;
499}
500
501/* *********************************************************************************************************//**
502 * Updates the m_userParticleIndex to *a_userParticleIndex* for all particles with PoPs intid *a_particleIntid*.
503 *
504 * @param a_particleIntid [in] The PoPs intid of the particle whose user index is to be set.
505 * @param a_userParticleIndex [in] The particle index specified by the user.
506 ***********************************************************************************************************/
507
508LUPI_HOST void GRIN_capture::setUserParticleIndexViaIntid( int a_particleIntid, int a_userParticleIndex ) {
509
510 if( m_residualIntid == a_particleIntid ) m_residualUserIndex = a_userParticleIndex;
511}
512
513
514/* *********************************************************************************************************//**
515 * This method serializes *this* for broadcasting as needed for MPI and GPUs. The method can count the number of required
516 * bytes, pack *this* or unpack *this* depending on *a_mode*.
517 *
518 * @param a_buffer [in] The buffer to read or write data to depending on *a_mode*.
519 * @param a_mode [in] Specifies the action of this method.
520 ***********************************************************************************************************/
521
523
524 DATA_MEMBER_DOUBLE( m_captureNeutronSeparationEnergy, a_buffer, a_mode );
525 DATA_MEMBER_VECTOR_DOUBLE( m_summedProbabilities, a_buffer, a_mode );
526 DATA_MEMBER_INT( m_residualIntid, a_buffer, a_mode );
527 DATA_MEMBER_INT( m_residualIndex, a_buffer, a_mode );
528 DATA_MEMBER_INT( m_residualUserIndex, a_buffer, a_mode );
529 DATA_MEMBER_DOUBLE( m_residualMass, a_buffer, a_mode );
530
531 std::size_t vectorSize = m_captureLevelProbabilities.size( );
532 int vectorSizeInt = (int) vectorSize;
533 DATA_MEMBER_INT( vectorSizeInt, a_buffer, a_mode );
534 vectorSize = (std::size_t) vectorSizeInt;
535
536 if( a_mode == LUPI::DataBuffer::Mode::Unpack ) {
537 m_captureLevelProbabilities.resize( vectorSize, &a_buffer.m_placement );
538 for( std::size_t vectorIndex = 0; vectorIndex < vectorSize; ++vectorIndex ) {
539 if( a_buffer.m_placement != nullptr ) {
540 m_captureLevelProbabilities[vectorIndex] = new(a_buffer.m_placement) GRIN_captureLevelProbability;
541 a_buffer.incrementPlacement( sizeof( GRIN_captureLevelProbability ) ); }
542 else {
543 m_captureLevelProbabilities[vectorIndex] = new GRIN_captureLevelProbability;
544 }
545 } }
546 else if( a_mode == LUPI::DataBuffer::Mode::Memory ) {
547 a_buffer.m_placement += m_captureLevelProbabilities.internalSize( );
548 a_buffer.incrementPlacement( sizeof( GRIN_captureLevelProbability ) * vectorSize );
549 }
550
551 for( std::size_t vectorIndex = 0; vectorIndex < vectorSize; ++vectorIndex ) {
552 m_captureLevelProbabilities[vectorIndex]->serialize( a_buffer, a_mode );
553 }
554}
555
556}
#define DATA_MEMBER_VECTOR_INT(member, buf, mode)
#define DATA_MEMBER_VECTOR_BOOL(member, buf, mode)
#define DATA_MEMBER_VECTOR_DOUBLE(member, buf, mode)
#define DATA_MEMBER_SIZE_T(member, buf, mode)
#define DATA_MEMBER_VECTOR_SIZE_T(member, buf, mode)
#define DATA_MEMBER_DOUBLE(member, buf, mode)
#define DATA_MEMBER_INT( member, buf, mode)
#define LUPI_HOST_DEVICE
#define LUPI_HOST
#define PoPI_continuumChars
Definition PoPI.hpp:99
std::string const & capturePrimaryToContinua() const
Definition GIDI.hpp:3822
Suite const & inelasticIncidentEnergies() const
Definition GIDI.hpp:3853
Suite const & captureLevelProbabilities() const
Definition GIDI.hpp:3854
PoPI::Database const & pops() const
Definition GIDI.hpp:3852
std::size_t size() const
Definition GIDI.hpp:2591
std::string const & body() const
Definition GIDI.hpp:2821
std::size_t rows() const
Definition GIDI.hpp:2848
Data const & data() const
Definition GIDI.hpp:2852
LUPI_HOST_DEVICE void incrementPlacement(std::size_t a_delta)
LUPI_HOST_DEVICE ~GRIN_captureLevelProbability()
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 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 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 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 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
std::map< std::string, int > m_stateNamesToIndices
Definition MCGIDI.hpp:277
T const & get(std::string const &a_id) const
std::vector< double > const & probabilities() const
Definition PoPI.hpp:841
std::vector< std::string > const & ids() const
Definition PoPI.hpp:840
std::vector< std::string > splitString(std::string const &a_string, char a_delimiter, bool a_strip=false)
Definition LUPI_misc.cc:103
std::string stripString(std::string const &a_string, bool a_left=true, bool a_right=true)
Definition LUPI_misc.cc:68
Simple C++ string class, useful as replacement for std::string if this cannot be used,...
Definition MCGIDI.hpp:43
static int constexpr neutron
Definition PoPI.hpp:177