Page 1 of 1
Calling user defined tensors in fortran in versions 5.0 and 5.2
Posted: Sat Feb 23, 2019 9:05 am
by mattfalc1997
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
Re: Calling user defined tensors in fortran in versions 5.0 and 5.2
Posted: Sat Feb 23, 2019 11:51 am
by Yvan Fournier
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
Re: Calling user defined tensors in fortran in versions 5.0 and 5.2
Posted: Sat Feb 23, 2019 12:52 pm
by mattfalc1997
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.
Re: Calling user defined tensors in fortran in versions 5.0 and 5.2
Posted: Sun Feb 24, 2019 2:29 pm
by Yvan Fournier
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
Re: Calling user defined tensors in fortran in versions 5.0 and 5.2
Posted: Sun Feb 24, 2019 2:31 pm
by mattfalc1997
Ok thanks again for all the help