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

Include rotation matrix in cell values #25

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

DRollin
Copy link
Collaborator

@DRollin DRollin commented Dec 17, 2024

No description provided.

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 87.75510% with 6 lines in your changes missing coverage. Please review.

Project coverage is 87.82%. Comparing base (42da30d) to head (aec6ee6).

Files with missing lines Patch % Lines
src/cellvalues.jl 87.75% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
- Coverage   88.61%   87.82%   -0.80%     
==========================================
  Files           5        5              
  Lines         281      312      +31     
==========================================
+ Hits          249      274      +25     
- Misses         32       38       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DRollin DRollin linked an issue Dec 17, 2024 that may be closed by this pull request
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could use some help defining a proper test case...
Not sure if the current one is fine.

@fredrikekre fredrikekre requested a review from kimauth December 17, 2024 13:06
Copy link
Member

@KnutAM KnutAM left a comment

Choose a reason for hiding this comment

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

For cohesive elements, this would be very useful to make the traction-separation implementation interface cleaner.

I believe there is a mistake (added a test proposal to show). I think the way one would need to calculate this would be (but haven't tested)

v1 = J[:, 1]
if 3d
    v3 = v1 × J[:, 2] # normal vector
    v2 = v3 × v1 # Ensures v2 perpendicular to v1 and v3
    R = Tensor{2, 3}((normalize(v1)..., normalize(v2)..., normalize(v3)...))
else if 2d
    v2 = Vec{2}(((-v[2], v[1]))
    R = Tensor{2, 2}((normalize(v1)..., normalize(v2)...))
end

test/test_cellvalues.jl Outdated Show resolved Hide resolved
@DRollin
Copy link
Collaborator Author

DRollin commented Jan 21, 2025

Thanks for the feedback 👍
I updated the code and tests.

@KnutAM
Copy link
Member

KnutAM commented Jan 28, 2025

Regarding the notation here, I believe that formally this should always be a coordinate transformation tensor, $\boldsymbol{Q}$.

That has no practical meaning since Tensors.jl don't include the coordinate bases. But still wanted to put it out here, to maybe motivate calling it something like

  • coordinate_transformation
  • orientation or surface_orientation
    (could be potentially be owned by Ferrite to extend the current getnormal API for facetvalues). I would imagine this would be useful for e.g. contact simulations.
  • surface_transformation
  • facet_transformation / facet_orientation

(personally I think the midplane is implied by being an interface, and if needed on either "side", that could be given explicitly as extra argument).

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.

How to get the rotation matrix of interface cell?
2 participants