Skip to content

Conversation

@samuel-hg-engel
Copy link
Contributor

Added an argument to the LoadCase class that allows for the load to be rotated by an arbitrary rotation matrix.

Rotation matrix may be specified to rotate the load case.
Changed 'rotation' key to 'rotation_matrix' for use in damask_parse.
@samuel-hg-engel samuel-hg-engel requested a review from a team as a code owner December 16, 2025 12:21
@samuel-hg-engel samuel-hg-engel added the enhancement New feature or request label Dec 16, 2025
Copy link
Collaborator

@aplowman aplowman left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! Just some minor changes.

@aplowman
Copy link
Collaborator

Failures are unrelated, and due to upstream failures in the hpcflow release workflow, which means there hasn't been a bump-hpcflow PR recently.

samuel-hg-engel and others added 2 commits December 16, 2025 14:55
Co-authored-by: Adam Plowman <adam.jp@live.co.uk>
Copy link
Collaborator

@aplowman aplowman left a comment

Choose a reason for hiding this comment

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

My initial review should have been been more thorough 😄 Just tried it out and it doesn't work because damask-parse's write_load_case is expecting rotation_matrix, and it's currently getting rotation.

So, two things to do:

  1. Where you have rotation_matrix in the various _method_args dicts, change this to just rotation. This is just meant to be a record of how the class method was initially parametrised, and so should reflect the method signature
  2. In the method LoadCase.create_damask_loading_plan, add something like: dct["rotation_matrix"] = dct.pop("rotation", None) to rename the rotation key appropriately.

Thanks!

@samuel-hg-engel
Copy link
Contributor Author

My initial review should have been been more thorough 😄 Just tried it out and it doesn't work because damask-parse's write_load_case is expecting rotation_matrix, and it's currently getting rotation.

So, two things to do:

  1. Where you have rotation_matrix in the various _method_args dicts, change this to just rotation. This is just meant to be a record of how the class method was initially parametrised, and so should reflect the method signature
  2. In the method LoadCase.create_damask_loading_plan, add something like: dct["rotation_matrix"] = dct.pop("rotation", None) to rename the rotation key appropriately.

Thanks!

That makes sense, I got the wrong end of the stick and assumed the _method_args was passed passed to damask-parse.

Copy link
Collaborator

@aplowman aplowman left a comment

Choose a reason for hiding this comment

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

Great, thanks. It works!

But let's not merge this until I've fixed the hpcflow release workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants