I am trying to call in a user-defined tensor and I was wondering if it could be done using field_get_val_v_by_name and what the indexes would be. I am using both versions 5.0 and 5.2.
Thanks in advance
Calling user defined tensors in fortran in versions 5.0 and 5.2
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 12
- Joined: Wed Jun 20, 2018 3:27 pm
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Calling user defined tensors in fortran in versions 5.0 and 5.2
Hello,
Yes, that should work. indices in order are xx, yy, zz, xy, yz, xz (for a symmetric tensor; I'd need to check for the non-symmetric case).
Best regards,
Yvan
Yes, that should work. indices in order are xx, yy, zz, xy, yz, xz (for a symmetric tensor; I'd need to check for the non-symmetric case).
Best regards,
Yvan
-
- Posts: 12
- Joined: Wed Jun 20, 2018 3:27 pm
Re: Calling user defined tensors in fortran in versions 5.0 and 5.2
Thanks a lot, clarification on the non-symmetric case would be ideal, currently I'm just using the same order as they appear in the listing file.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Calling user defined tensors in fortran in versions 5.0 and 5.2
Hello,
For non-symmetric tensors, the order seems to be xx, xy, xy, yx, yy, yz, zx, zy, zz.
There are not so many cases of non-symmetric tensors in the code, but this is at least what I 'grep'ed.
Also, using non-symmetric tensors, if you output a field in the EnSight format, it will be readable by EnSight, but it seems ParaView/VTK might not handle this case (I have to file a bug for this).
Best regards,
Yvan
For non-symmetric tensors, the order seems to be xx, xy, xy, yx, yy, yz, zx, zy, zz.
There are not so many cases of non-symmetric tensors in the code, but this is at least what I 'grep'ed.
Also, using non-symmetric tensors, if you output a field in the EnSight format, it will be readable by EnSight, but it seems ParaView/VTK might not handle this case (I have to file a bug for this).
Best regards,
Yvan
-
- Posts: 12
- Joined: Wed Jun 20, 2018 3:27 pm
Re: Calling user defined tensors in fortran in versions 5.0 and 5.2
Ok thanks again for all the help