-
Notifications
You must be signed in to change notification settings - Fork 29
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
GetStrain function #138
GetStrain function #138
Conversation
Thanks for the contribution. this looks interesting. I would propose few changes before I am willing to merge it tough. In particular I think the Also I think it would be good to conceive some unit tests to continuously test that this function gives sensible results. Would you be able to provide a unit test for this new function? |
unit testing for both stress matrix and elastic tensor
I made the If you think anything else needs change, just let me know. |
thank you for the additional work. I have few more comments:
|
'GetStress', added unittests for both "Get" functions
Indeed using einsum was way simpler, it all ended up becoming a single line. I also reduced the size of 'Cij2Sijkl' by using 'Cij2Cijkl' as part of it. For the unittests, the only way I thought of implementing them was a sort of recursive way, by creating a 'GetStress' function, testing one against the other and having a test for both. |
Thanks for the improvements. The implementation is now cleaner. The Do you think the docstrings should mention the units which should be used for the stress? Of course it depends on the units of cij which now we try to use consistently as N/m2. Also could you add your name to the copyright statement at the beginning of the files you changed? (I will add a note on that to the contributing file in the main folder) |
'GetStress' to methods in the 'Material' class
update contributing file to add note about copyright
No worries! The way I was using it previously was a function, but there's no reason for it not to be a method, so I already fixed it. I also agree on mentioning the units used for the stress, initially I intended to add that, but eventually forgot. |
thanks again for the work on this. |
Function to obtain strain matrices from a desired stress matrix using the elastic tensors from a crystal
Added a function to convert from the elastic to the Compliance tensor, and definitions for monoclinc and trigonal elastic tensors