fusion-energy / openmc-plasma-source

Creates a plasma source as an openmc.source object from input parameters that describe the plasma
MIT License
25 stars 11 forks source link

removed Parameterized #81

Closed shimwell closed 1 year ago

shimwell commented 1 year ago

This appears to fix the issue #80 that I noticed.

I think the CI runs with the current openmc release so this might need changing to the develop version

RemDelaporteMathurin commented 1 year ago

Not really sure what a metaclass is but looks like it can be solved.

@pshriwise any idea why replacing openmc.Source by openmc.IndependentSource broke things?

pshriwise commented 1 year ago

Not really sure what a metaclass is but looks like it can be solved.

@pshriwise any idea why replacing openmc.Source by openmc.IndependentSource broke things?

I believe it has to do with SourceBase inheriting from the abstract base class type (ABC). We added some abstract methods that are implemented in the derived classes related to XML exports.

RemDelaporteMathurin commented 1 year ago

I believe it has to do with SourceBase inheriting from the abstract base class type (ABC). We added some abstract methods that are implemented in the derived classes related to XML exports.

Ok. Does that need we need to add a metaclass argument to our derived classes?

pshriwise commented 1 year ago

Ok. Does that need we need to add a metaclass argument to our derived classes?

I'm honestly not sure how to handle this. Parameterized inherits from Python's built-in type while openmc.SourceBase inherits from ABC. I'm not sure how to get a new class to resolve the order in which it should try to satisfy the new type definition for a class that inherits from both of these.

shimwell commented 1 year ago

closing in favor of #83