-
Notifications
You must be signed in to change notification settings - Fork 3
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
Deduplicate elastic #166
Conversation
Instead of defining `ElasticMatrixOutputElastic` by populating the template `OutputElastic` with callables from the `engine` `ElasticProperties`, just make `OutputElastic` do the job to start with.
@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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Instead of defining
ElasticMatrixOutputElastic
by populating the templateOutputElastic
with callables from theengine
ElasticProperties
, just makeOutputElastic
do the job to start with.