Skip to content

Draft: Update Boundary classes to instance all quantities at initialization

Adel Kara Slimane requested to merge AdelKS/tkwant:master into master

Hello!

So here's my suggestion on making all boundary classes define what they need to at initialization:

  • I kept the __call__ member, with the same signature, but now it simply returns a class member that has been calculated at init. I think __call__ can be entirely removed though for that I need to find all the calls to that function and update them.
  • Renamed num_cells to num_total_cells or num_absorbing_cells depending on the use, for better clarity. Though not on the entire leads.py file, I didn't touch the auxiliary functions.
  • Fill num_total_cells with the correct value depending on which (child) class is used. We can easily get the cell numbers with this change.

Tell me what you think! You can normally commit on my fork :)

PS: I broke the pipeline because I change some function signatures, but I will fix that if you are happy with the changes so far.

Adel

Edited by Adel Kara Slimane

Merge request reports