Unified the calculate XS functions, as its not really necessary to split them up. Also cleaned up simulation headers.

This commit is contained in:
John Tramm 2020-01-14 02:40:41 +00:00
parent 2ea0859fd3
commit e1abbe6fcb
4 changed files with 5 additions and 18 deletions

View file

@ -7,7 +7,7 @@
#include <vector>
#include "openmc/particle.h"
#include "openmc/tallies/filter.h"
//#include "openmc/tallies/filter.h"
namespace openmc {

View file

@ -226,8 +226,7 @@ public:
//! \param src Source site data
void from_source(const Bank* src);
void event_calculate_xs_I();
void event_calculate_xs_II();
void event_calculate_xs();
void event_advance();
void event_cross_surface();
void event_collide();

View file

@ -130,7 +130,7 @@ Particle::from_source(const Bank* src)
}
void
Particle::event_calculate_xs_I()
Particle::event_calculate_xs()
{
// Set the random number stream
if (type_ == Particle::Type::neutron) {
@ -168,11 +168,7 @@ Particle::event_calculate_xs_I()
if (write_track_) write_particle_track(*this);
if (settings::check_overlaps) check_cell_overlap(this);
}
void
Particle::event_calculate_xs_II()
{
// Calculate microscopic and macroscopic cross sections
if (material_ != MATERIAL_VOID) {
if (settings::run_CE) {

View file

@ -2,30 +2,23 @@
#include "openmc/bank.h"
#include "openmc/capi.h"
//#include "openmc/cell.h"
#include "openmc/container_util.h"
#include "openmc/eigenvalue.h"
#include "openmc/error.h"
//#include "openmc/geometry.h"
#include "openmc/material.h"
#include "openmc/message_passing.h"
//#include "openmc/mgxs_interface.h"
#include "openmc/nuclide.h"
#include "openmc/output.h"
#include "openmc/particle.h"
#include "openmc/photon.h"
//#include "openmc/physics.h"
//#include "openmc/physics_mg.h"
#include "openmc/random_lcg.h"
#include "openmc/settings.h"
#include "openmc/source.h"
#include "openmc/state_point.h"
//#include "openmc/thermal.h"
#include "openmc/timer.h"
#include "openmc/tallies/derivative.h"
#include "openmc/tallies/filter.h"
#include "openmc/tallies/tally.h"
//#include "openmc/tallies/tally_scoring.h"
#include "openmc/tallies/trigger.h"
#include "openmc/track_output.h"
@ -47,8 +40,7 @@ namespace openmc {
void transport_history_based_single_particle(Particle& p)
{
while(true) {
p.event_calculate_xs_I();
p.event_calculate_xs_II();
p.event_calculate_xs();
p.event_advance();
if( p.collision_distance_ > p.boundary_.distance )
p.event_cross_surface();