Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconsider names of base classes "Component" and "Assembly" #73

Open
lukethehuman opened this issue Sep 9, 2024 · 1 comment
Open
Labels
documentation Improvements or additions to documentation

Comments

@lukethehuman
Copy link
Collaborator

This issue might be unavoidable, and we may already be using the best terms available, or there may be no alternative terms better enough to warrant a potentially breaking change, but...

Currently:

  • Components are the simplest objects in hypnos, comprised of geometric volumes and materials assigned to those volumes.
  • Assemblies are collections of components and other assemblies, such that an assembly can iterate through all its components recursively.

The nomenclature can be a little confusing, leading to classes like PinAssembly which is an Assembly subclass describing a blanket pin. In a breeder blanket, pins are assembled together in an array called a "pin assembly", which this class does not describe. The class describing such an assembly would likely be called PinAssemblyAssembly under this naming scheme.

It would be impossible to choose meaningful terms for what is currently "component" and "assembly" that don't have the potential for other uses of the same terms for "simple things" and "collections of simple things". However, given hypnos is to be specifically a tokamak blanket geometry tool, we should try to avoid clashes with the existing nomenclature in this specific application.

One possible alternative could be to replace Component and Assembly with SolidBody & CompoundBody respectively, as I believe these are terms used in CAD. Or replace Assembly with a fairly direct if overlong ComponentCollection. Another solution could be to keep the names but avoid including them in the subclass names for specific components, giving so PinAssembly(CreatedComponentAssembly) --> Pin(CreatedComponentAssembly) or maybe BlanketPin(CreatedComponentAssembly).

@lukethehuman
Copy link
Collaborator Author

Note that Collection could clash with python abstract base class for sized iterables: https://docs.python.org/3/library/collections.abc.html#collections.abc.Collection

@lukethehuman lukethehuman added the documentation Improvements or additions to documentation label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant