mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge branch 'develop' into rng-stream-changes
This commit is contained in:
commit
43804fc09d
158 changed files with 3155 additions and 2934 deletions
|
|
@ -1,17 +1,17 @@
|
|||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
#include "openmc/particle_data.h"
|
||||
#include "openmc/random_lcg.h"
|
||||
#include "openmc/source.h"
|
||||
#include "openmc/particle.h"
|
||||
|
||||
class CustomSource : public openmc::Source
|
||||
{
|
||||
openmc::Particle::Bank sample(uint64_t *seed) const
|
||||
openmc::SourceSite sample(uint64_t* seed) const
|
||||
{
|
||||
openmc::Particle::Bank particle;
|
||||
openmc::SourceSite particle;
|
||||
// wgt
|
||||
particle.particle = openmc::Particle::Type::neutron;
|
||||
particle.particle = openmc::ParticleType::neutron;
|
||||
particle.wgt = 1.0;
|
||||
// position
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
#include "openmc/particle_data.h"
|
||||
#include "openmc/source.h"
|
||||
#include "openmc/particle.h"
|
||||
|
||||
class CustomSource : public openmc::Source {
|
||||
public:
|
||||
CustomSource(double energy) : energy_(energy) { }
|
||||
|
||||
// Samples from an instance of this class.
|
||||
openmc::Particle::Bank sample(uint64_t* seed) const
|
||||
openmc::SourceSite sample(uint64_t* seed) const
|
||||
{
|
||||
openmc::Particle::Bank particle;
|
||||
openmc::SourceSite particle;
|
||||
// wgt
|
||||
particle.particle = openmc::Particle::Type::neutron;
|
||||
particle.particle = openmc::ParticleType::neutron;
|
||||
particle.wgt = 1.0;
|
||||
// position
|
||||
particle.r.x = 0.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue