generalized_inner_product() and handling of symmetric tensors #1886
-
Hello! I am working on a script with pyDPF-core and had a question about how generalized_inner_product() works. I am computing the traction vector from the stress vector and surface normal. However, when I use the generalized_inner_product() operator, I got unexpected results. Made a minimal example:
Output: Expected Output: This confirmed that when acting on fields with nature=symmatrix, generalized_inner_product() divides the off-diagonal components by 2 before computing the product. Wanted to know if this is intended behavior. Is there some property I can set to get around this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi @jiyanshagarwal Mike |
Beta Was this translation helpful? Give feedback.
-
@jiyanshagarwal to get correct matrix multiplication, you can define your stress tensor as a 3x3 matrix and your surface normal as a 3x1 matrix. See example below, let me know if this works for you.
|
Beta Was this translation helpful? Give feedback.
@jiyanshagarwal the issue has been fixed but I do not yet have a date for the release where the fix will be available. In the mean time please implement the method Ayush posted...or another as you see fit.