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

Weird behaviour in UserMaterial.get_constants() #34

Open
rjodon opened this issue Oct 26, 2020 · 1 comment
Open

Weird behaviour in UserMaterial.get_constants() #34

rjodon opened this issue Oct 26, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@rjodon
Copy link
Collaborator

rjodon commented Oct 26, 2020

In the file compas_fea2.backends.abaqus.model.materials line 276, as mentioned in the TODO I have added, I am sure self.constants does not belong inside the constant list and should be excluded.

    def get_constants(self):
        constants = []
        for k in self.__dict__:
            # TODO: I think we should we add constants in the list below?
            if k not in ['__name__', 'name', 'attr_list', 'sub_path', 'p']:
                constants.append(self.__dict__[k])
        return constants

I propose this:

    def get_constants(self):
        constants = []
        for k in self.__dict__:
            if k not in ['constants', '__name__', 'name', 'attr_list', 'sub_path', 'p']:
                constants.append(self.__dict__[k])
        return constants
@rjodon rjodon added the bug Something isn't working label Oct 26, 2020
@rjodon
Copy link
Collaborator Author

rjodon commented Oct 26, 2020

I am in charge, just waiting for your approval @franaudo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants