SEMAFORInformatik / femagtools

Python API for FEMAG
BSD 2-Clause "Simplified" License
19 stars 13 forks source link

Small Typo in isa7.py #75

Closed sasrigais closed 1 year ago

sasrigais commented 1 year ago

Hi!

In line 1075 of isa7.py, there is a small typo. It should be s.elements() instead of s.elemnts, as elements is a function of Subregion, not a field...

Regards Thomas

ronaldtanner commented 1 year ago

Thanks. I checked the code in class SubRegion:

    def elements(self):
        """return elements of this subregion"""
        return [e for s in self.superelements for e in s.elements]

    def area(self):
        """return area of this subregion"""
        return sum([e.area for e in self.elements()])

It seems correct to me. The for loop touches all superelements and elements is a field of superelements. Please tell me if I'm wrong.

sasrigais commented 1 year ago

Hi. Yes, elements is a field of superelements. But I referred to class windings, and there you need to call function elements() of class subregion in the for-loop, as subregion has no field elements.

Cheers Thomas

ronaldtanner commented 1 year ago

Oh. my bad. I got it. Thanks