mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -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
|
|
@ -141,7 +141,7 @@ IndependentSource::IndependentSource(pugi::xml_node node)
|
|||
}
|
||||
}
|
||||
|
||||
Particle::Bank IndependentSource::sample(uint64_t* seed)
|
||||
Particle::Bank IndependentSource::sample(uint64_t* seed) const
|
||||
{
|
||||
Particle::Bank site;
|
||||
|
||||
|
|
@ -261,7 +261,7 @@ FileSource::FileSource(std::string path)
|
|||
file_close(file_id);
|
||||
}
|
||||
|
||||
Particle::Bank FileSource::sample(uint64_t* seed)
|
||||
Particle::Bank FileSource::sample(uint64_t* seed) const
|
||||
{
|
||||
size_t i_site = sites_.size()*prn(seed);
|
||||
return sites_[i_site];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue