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

Deduplicate elastic #166

Closed
wants to merge 5 commits into from
Closed

Deduplicate elastic #166

wants to merge 5 commits into from

Conversation

liamhuber
Copy link
Member

Instead of defining ElasticMatrixOutputElastic by populating the template OutputElastic with callables from the engine ElasticProperties, just make OutputElastic do the job to start with.

Instead of defining `ElasticMatrixOutputElastic` by populating the template `OutputElastic` with callables from the `engine` `ElasticProperties`, just make `OutputElastic` do the job to start with.
@liamhuber liamhuber mentioned this pull request Jan 2, 2024
Comment on lines -80 to -97
@dataclasses.dataclass
class OutputElastic(Output):
elastic_matrix: callable
elastic_matrix_inverse: callable
bulkmodul_voigt: callable
bulkmodul_reuss: callable
bulkmodul_hill: callable
shearmodul_voigt: callable
shearmodul_reuss: callable
shearmodul_hill: callable
youngsmodul_voigt: callable
youngsmodul_reuss: callable
youngsmodul_hill: callable
poissonsratio_voigt: callable
poissonsratio_reuss: callable
poissonsratio_hill: callable
AVR: callable
elastic_matrix_eigval: callable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While currently only the ElasticMatrix implements the calculation of the elastic moduli, @samwaseda developed the ElasticTensor class which can also calculate the elastic moduli. https://github.com/pyiron/pyiron_atomistics/blob/main/pyiron_atomistics/atomistics/master/elastic.py So I would prefer to have a reference interface for the elastic moduli defined in shared/output and a specific implementation in the workflows/elastic/workflow.py module.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to make it specific now anyhow, then introduce a shared parent if and when failing to do so would result in code duplication or a lack of clarity about the relationship between the two approaches.

@liamhuber liamhuber closed this Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants