mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Make Source::sample() method const
This commit is contained in:
parent
b271399f63
commit
9af5541e88
7 changed files with 12 additions and 12 deletions
|
|
@ -196,7 +196,7 @@ below.
|
|||
|
||||
class CustomSource : public openmc::Source
|
||||
{
|
||||
openmc::Particle::Bank sample(uint64_t* seed)
|
||||
openmc::Particle::Bank sample(uint64_t* seed) const
|
||||
{
|
||||
openmc::Particle::Bank particle;
|
||||
// weight
|
||||
|
|
@ -271,7 +271,7 @@ the source class when it is created:
|
|||
CustomSource(double energy) : energy_{energy} { }
|
||||
|
||||
// Samples from an instance of this class.
|
||||
openmc::Particle::Bank sample(uint64_t* seed)
|
||||
openmc::Particle::Bank sample(uint64_t* seed) const
|
||||
{
|
||||
openmc::Particle::Bank particle;
|
||||
// weight
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue