@@ -88,13 +88,13 @@ inline HOST_DEVICE void updateTrajectory(double energy, double angle, MC_Particl
8888}
8989HOST_DEVICE_END
9090
91- inline HOST_DEVICE bool CollisionEvent (MonteCarlo *monteCarlo, MC_Particle &mc_particle, unsigned int tally_index, int particle_index, int *tallyArray)
91+ inline HOST_DEVICE bool CollisionEvent (MonteCarlo_d *monteCarlo, MC_Particle &mc_particle, unsigned int tally_index, int particle_index, int *tallyArray)
9292{
93- #ifdef __CUDA_ARCH__
93+ // #ifdef __CUDA_ARCH__
9494 const MC_Cell_State &cell = monteCarlo->domain_d [mc_particle.domain ].cell_state [mc_particle.cell ];
95- #else
96- const MC_Cell_State &cell = monteCarlo->domain [mc_particle.domain ].cell_state [mc_particle.cell ];
97- #endif
95+ // #else
96+ // const MC_Cell_State &cell = monteCarlo->domain[mc_particle.domain].cell_state[mc_particle.cell];
97+ // #endif
9898
9999 int globalMatIndex = cell._material ;
100100
@@ -107,21 +107,21 @@ inline HOST_DEVICE bool CollisionEvent(MonteCarlo *monteCarlo, MC_Particle &mc_p
107107 int selectedIso = -1 ;
108108 int selectedUniqueNumber = -1 ;
109109 int selectedReact = -1 ;
110- #ifdef __CUDA_ARCH__
110+ // #ifdef __CUDA_ARCH__
111111 int numIsos = (int )monteCarlo->_material_d [globalMatIndex]._isosize ;
112- #else
113- int numIsos = (int )monteCarlo->_materialDatabase ->_mat [globalMatIndex]._iso .size ();
114- #endif
112+ // #else
113+ // int numIsos = (int)monteCarlo->_materialDatabase->_mat[globalMatIndex]._iso.size();
114+ // #endif
115115
116116 for (int isoIndex = 0 ; isoIndex < numIsos && currentCrossSection >= 0 ; isoIndex++)
117117 {
118- #ifdef __CUDA_ARCH__
118+ // #ifdef __CUDA_ARCH__
119119 int uniqueNumber = monteCarlo->_material_d [globalMatIndex]._iso [isoIndex]._gid ;
120120 int numReacts = monteCarlo->_nuclearData_d ->getNumberReactions (uniqueNumber);
121- #else
122- int uniqueNumber = monteCarlo->_materialDatabase ->_mat [globalMatIndex]._iso [isoIndex]._gid ;
123- int numReacts = monteCarlo->_nuclearData ->getNumberReactions (uniqueNumber);
124- #endif
121+ // #else
122+ // int uniqueNumber = monteCarlo->_materialDatabase->_mat[globalMatIndex]._iso[isoIndex]._gid;
123+ // int numReacts = monteCarlo->_nuclearData->getNumberReactions(uniqueNumber);
124+ // #endif
125125 for (int reactIndex = 0 ; reactIndex < numReacts; reactIndex++)
126126 {
127127 currentCrossSection -= macroscopicCrossSection (monteCarlo, reactIndex, mc_particle.domain , mc_particle.cell ,
@@ -145,58 +145,58 @@ inline HOST_DEVICE bool CollisionEvent(MonteCarlo *monteCarlo, MC_Particle &mc_p
145145 double energyOut[MAX_PRODUCTION_SIZE];
146146 double angleOut[MAX_PRODUCTION_SIZE];
147147 int nOut = 0 ;
148- #ifdef __CUDA_ARCH__
148+ // #ifdef __CUDA_ARCH__
149149 double mat_mass = monteCarlo->_material_d [globalMatIndex]._mass ;
150150 monteCarlo->_nuclearData_d ->_isotopes [selectedUniqueNumber]._species [0 ]._reactions [selectedReact].sampleCollision (
151151 mc_particle.kinetic_energy , mat_mass, &energyOut[0 ], &angleOut[0 ], nOut, &(mc_particle.random_number_seed ), MAX_PRODUCTION_SIZE);
152- #else
153- double mat_mass = monteCarlo->_materialDatabase ->_mat [globalMatIndex]._mass ;
154- monteCarlo->_nuclearData ->_isotopes [selectedUniqueNumber]._species [0 ]._reactions [selectedReact].sampleCollision (
155- mc_particle.kinetic_energy , mat_mass, &energyOut[0 ], &angleOut[0 ], nOut, &(mc_particle.random_number_seed ), MAX_PRODUCTION_SIZE);
156- #endif
152+ // #else
153+ // double mat_mass = monteCarlo->_materialDatabase->_mat[globalMatIndex]._mass;
154+ // monteCarlo->_nuclearData->_isotopes[selectedUniqueNumber]._species[0]._reactions[selectedReact].sampleCollision(
155+ // mc_particle.kinetic_energy, mat_mass, &energyOut[0], &angleOut[0], nOut, &(mc_particle.random_number_seed), MAX_PRODUCTION_SIZE);
156+ // #endif
157157
158158// --------------------------------------------------------------------------------------------------------------
159159// Post-Collision Phase 1:
160160// Tally the collision
161161// --------------------------------------------------------------------------------------------------------------
162162
163163// Set the reaction for this particle.
164- #ifdef __CUDA_ARCH__
164+ // #ifdef __CUDA_ARCH__
165165 ATOMIC_UPDATE (tallyArray[tally_index * NUM_TALLIES + 3 ]);
166- #else
167- ATOMIC_UPDATE (monteCarlo->_tallies ->_balanceTask [tally_index]._collision );
168- #endif
166+ // #else
167+ // ATOMIC_UPDATE(monteCarlo->_tallies->_balanceTask[tally_index]._collision);
168+ // #endif
169169
170- #ifdef __CUDA_ARCH__
170+ // #ifdef __CUDA_ARCH__
171171 NuclearDataReaction::Enum reactionType = (NuclearDataReaction::Enum)monteCarlo->_nuclearData_d ->_isotopes [selectedUniqueNumber]._species [0 ]._reactions [selectedReact]._reactionType ;
172- #else
173- NuclearDataReaction::Enum reactionType = monteCarlo->_nuclearData ->_isotopes [selectedUniqueNumber]._species [0 ]._reactions [selectedReact]._reactionType ;
174- #endif
172+ // #else
173+ // NuclearDataReaction::Enum reactionType = monteCarlo->_nuclearData->_isotopes[selectedUniqueNumber]._species[0]._reactions[selectedReact]._reactionType;
174+ // #endif
175175
176176 switch (reactionType)
177177 {
178178 case NuclearDataReaction::Scatter:
179- #ifdef __CUDA_ARCH__
179+ // #ifdef __CUDA_ARCH__
180180 ATOMIC_UPDATE (tallyArray[tally_index * NUM_TALLIES + 4 ]);
181- #else
182- ATOMIC_UPDATE (monteCarlo->_tallies ->_balanceTask [tally_index]._scatter );
183- #endif
181+ // #else
182+ // ATOMIC_UPDATE(monteCarlo->_tallies->_balanceTask[tally_index]._scatter);
183+ // #endif
184184 break ;
185185 case NuclearDataReaction::Absorption:
186- #ifdef __CUDA_ARCH__
186+ // #ifdef __CUDA_ARCH__
187187 ATOMIC_UPDATE (tallyArray[tally_index * NUM_TALLIES + 5 ]);
188- #else
189- ATOMIC_UPDATE (monteCarlo->_tallies ->_balanceTask [tally_index]._absorb );
190- #endif
188+ // #else
189+ // ATOMIC_UPDATE(monteCarlo->_tallies->_balanceTask[tally_index]._absorb);
190+ // #endif
191191 break ;
192192 case NuclearDataReaction::Fission:
193- #ifdef __CUDA_ARCH__
193+ // #ifdef __CUDA_ARCH__
194194 ATOMIC_UPDATE (tallyArray[tally_index * NUM_TALLIES + 6 ]);
195195 ATOMIC_ADD (tallyArray[tally_index * NUM_TALLIES + 7 ], nOut);
196- #else
197- ATOMIC_UPDATE (monteCarlo->_tallies ->_balanceTask [tally_index]._fission );
198- ATOMIC_ADD (monteCarlo->_tallies ->_balanceTask [tally_index]._produce , nOut);
199- #endif
196+ // #else
197+ // ATOMIC_UPDATE(monteCarlo->_tallies->_balanceTask[tally_index]._fission);
198+ // ATOMIC_ADD(monteCarlo->_tallies->_balanceTask[tally_index]._produce, nOut);
199+ // #endif
200200 break ;
201201 case NuclearDataReaction::Undefined:
202202#ifdef DEBUG
@@ -219,7 +219,7 @@ inline HOST_DEVICE bool CollisionEvent(MonteCarlo *monteCarlo, MC_Particle &mc_p
219219 updateTrajectory (energyOut[secondaryIndex], angleOut[secondaryIndex], secondaryParticle);
220220
221221 // Atomic capture will be called here
222- monteCarlo->_particleVaultContainer ->addExtraParticle (secondaryParticle);
222+ monteCarlo->_particleVaultContainer_d ->addExtraParticle (secondaryParticle);
223223 }
224224
225225 updateTrajectory (energyOut[0 ], angleOut[0 ], mc_particle);
@@ -231,15 +231,15 @@ inline HOST_DEVICE bool CollisionEvent(MonteCarlo *monteCarlo, MC_Particle &mc_p
231231 if (nOut > 1 )
232232 {
233233 // Atomic capture will be called here
234- monteCarlo->_particleVaultContainer ->addExtraParticle (mc_particle);
234+ monteCarlo->_particleVaultContainer_d ->addExtraParticle (mc_particle);
235235 }
236236
237237// If we are still tracking this particle the update its energy group
238- #ifdef __CUDA_ARCH__
238+ // #ifdef __CUDA_ARCH__
239239 mc_particle.energy_group = monteCarlo->_nuclearData_d ->getEnergyGroup (mc_particle.kinetic_energy );
240- #else
241- mc_particle.energy_group = monteCarlo->_nuclearData ->getEnergyGroup (mc_particle.kinetic_energy );
242- #endif
240+ // #else
241+ // mc_particle.energy_group = monteCarlo->_nuclearData->getEnergyGroup(mc_particle.kinetic_energy);
242+ // #endif
243243
244244 return nOut == 1 ;
245245}
0 commit comments