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

Use less dictionary object and create more classes #26

Open
rjodon opened this issue Oct 14, 2020 · 2 comments
Open

Use less dictionary object and create more classes #26

rjodon opened this issue Oct 14, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@rjodon
Copy link
Collaborator

rjodon commented Oct 14, 2020

I can see everywhere this object components = {'x': x, 'y': y, 'z': z, 'xx': xx, 'yy': yy, 'zz': zz}
I would rather create a component like this:

class Components:
    def __init__(x=0. y=0, z=0, xx=0, yy=0, zz=0):
        self.x = x
        self.y = y 
        etc... 

after it's much easier to access the individual components self.components.x is much lighter than self.components['x'] also we can add plenty of helpers inside the components class

@rjodon rjodon added the enhancement New feature or request label Oct 14, 2020
@tomvanmele
Copy link
Member

indeed, in the case of compas_fea the bottleneck will always be the actual analysis, so we should design the entire infrastructure for convenience and not performance...

@franaudo
Copy link
Contributor

Agree. most of those dictionary are obsolete anyways. I will remove the unnecessary ones and then we can refactor the remaining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants