Calling user defined tensors in fortran in versions 5.0 and 5.2

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
mattfalc1997
Posts: 12
Joined: Wed Jun 20, 2018 3:27 pm

Calling user defined tensors in fortran in versions 5.0 and 5.2

Post 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
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Calling user defined tensors in fortran in versions 5.0 and 5.2

Post 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
mattfalc1997
Posts: 12
Joined: Wed Jun 20, 2018 3:27 pm

Re: Calling user defined tensors in fortran in versions 5.0 and 5.2

Post 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.
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Calling user defined tensors in fortran in versions 5.0 and 5.2

Post 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
mattfalc1997
Posts: 12
Joined: Wed Jun 20, 2018 3:27 pm

Re: Calling user defined tensors in fortran in versions 5.0 and 5.2

Post by mattfalc1997 »

Ok thanks again for all the help
Post Reply