Add openmc_sample_external_source function and Python binding

This commit is contained in:
Paul Romano 2022-07-15 07:21:08 -05:00
parent bf6cf505cc
commit 953b35e742
3 changed files with 53 additions and 7 deletions

View file

@ -399,4 +399,14 @@ void free_memory_source()
model::external_sources.clear();
}
//==============================================================================
// C API
//==============================================================================
extern "C" int openmc_sample_external_source(uint64_t* seed, SourceSite* site)
{
*site = sample_external_source(seed);
return 0;
}
} // namespace openmc