compas-dev / compas-dev/compas_fea2

Weird behaviour in UserMaterial.get_constants()

Open
#34 1 comment 0 reactions 3 assignees Claimed by @tomvanmele View on GitHub
bug
Dominant language
Python
Stars
14
Forks
10
PR merge metrics
No merged PRs in 30d

Description

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.

```python
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:

```python
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
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.