From e3f1bdaca1f5144563c4ceac45f10e4b0b5b7963 Mon Sep 17 00:00:00 2001 From: Erik B Knudsen Date: Wed, 12 Oct 2022 19:30:38 +0200 Subject: [PATCH] enable mcpl from the python layer if the source filename ends with mcpl use that --- openmc/source.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openmc/source.py b/openmc/source.py index 48e14f6f71..fdb2d5bc25 100644 --- a/openmc/source.py +++ b/openmc/source.py @@ -223,7 +223,10 @@ class Source: if self.particle != 'neutron': element.set("particle", self.particle) if self.file is not None: - element.set("file", self.file) + if (self.file.endswith('.mcpl')): + element.set("mcpl", self.file) + else: + element.set("file", self.file) if self.library is not None: element.set("library", self.library) if self.parameters is not None: