Merge branch 'mcpl_output_dev' of github.com:ebknudsen/openmc into mcpl_output_dev

This commit is contained in:
Erik B Knudsen 2022-09-16 15:59:19 +02:00
commit 563665f161

View file

@ -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