Open alberto743 opened 4 months ago
I've been working through the openmc code to make openmc classes fully constructed on class initialization
here are the PRs
https://github.com/openmc-dev/openmc/pulls?q=is%3Apr+constructor+is%3Aclosed+author%3Ashimwell
Once this is complete for all the geometry classes then making the python code from openmc xml files will be easy
src/geouned/GEOUNED/Write/OpenMCFormat.py
contains theOpenmcInput
output driver class, which in turn exposes to main functionswriteXML
andwritePY
. ThewriteXML
method should be rewritten employing theElementTree
Python package since it provides a standard way to deal with XML documents in Python. ThewritePY
method is constructed as a code generator, in which a Python script is written to be run later. Instead, we should think about calling directly the relevant OpenMC Python API. It should be noted that OpenMC Python API shall be managed viamultiprocessing
into a different interpreter instance, to avoid side effects of the internal object persistence due to the current nature of the OpenMC Python to C++ bindings.