mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Merge branch 'mcpl_output_dev' of github.com:ebknudsen/openmc into mcpl_output_dev
This commit is contained in:
commit
563665f161
1 changed files with 0 additions and 25 deletions
|
|
@ -390,31 +390,6 @@ CustomSourceWrapper::~CustomSourceWrapper()
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef OPENMC_MCPL
|
||||
//===========================================================================
|
||||
// Read particles from an MCPL-file
|
||||
//===========================================================================
|
||||
MCPLFileSource::MCPLFileSource(std::string path)
|
||||
{
|
||||
// Check if source file exists
|
||||
if (!file_exists(path)) {
|
||||
fatal_error(fmt::format("Source file '{}' does not exist.", path));
|
||||
}
|
||||
|
||||
// Read the source from a binary file instead of sampling from some
|
||||
// assumed source distribution
|
||||
write_message(6, "Reading mcpl source file from {}",path);
|
||||
|
||||
// Open the mcpl file
|
||||
mcpl_file = mcpl_open_file(path.c_str());
|
||||
|
||||
//do checks on the mcpl_file to see if particles are many enough.
|
||||
// should model this on the example source shown in the docs.
|
||||
n_sites=mcpl_hdr_nparticles(mcpl_file);
|
||||
|
||||
read_source_bank(sites_);
|
||||
}
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// Non-member functions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue