-
Notifications
You must be signed in to change notification settings - Fork 25
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
Materials
, Exports
, DerivedQuantities
, ... should be a subclass of list
#494
Comments
Same for Exports, Traps, DerivedQuantities....? |
Materials
should have a .append()
methodMaterials
should be a subclass of list
@RemDelaporteMathurin. Could you please clarify the practical benefit of it a bit more? As I understand, this enhancement will make more like a built-in class, so the users won't need to manually create lists every time and work with them, but rather use documented methods of the FESTIM class (I assume that the docs also will be modified) + some code refactoring. Am I correct? |
my_materials = F.Materials([....])
second_material = my_materials.materials[1] thanks to this change, this will become much simpler: my_materials = F.Materials([....])
second_material = my_materials[1] Same for boundary conditions, traps, derivedquantities, exports, and others.
|
Ok, I can try. How we'll handle it: for all classes at once or iteratively? |
let's start with |
Materials
should be a subclass of list
Materials,
Exports,
DerivedQuantities, ... should be a subclass of
list`
Materials,
Exports,
DerivedQuantities, ... should be a subclass of
list`Materials
, Exports
, DerivedQuantities
, ... should be a subclass of list
@RemDelaporteMathurin, what do you think of |
I would ignore it |
Users should be able to do
To do so, the current Materials class:
FESTIM/festim/materials/materials.py
Lines 10 to 18 in 621769f
Needs to become:
Then instead of doing:
one would do:
Moreover, this:
FESTIM/festim/materials/materials.py
Line 78 in 621769f
would become:
Progress track:
Materials
: F.Materials -> subclass of list #694Exports
: F.Exports -> subclass of list #695DerivedQuantities
:F.Traps
andF.DerivedQuantities
-> subclasses of list #697Traps
:F.Traps
andF.DerivedQuantities
-> subclasses of list #697The text was updated successfully, but these errors were encountered: