Hi Wolfgang, Thanks. I think I'll then use FullMatrix::copy_to() then to convert it to a tensor.
I'm working (very slowly) on re-implementing our method on the basis of deal.ii. It is based on the variational multiscale framework where the stabilization tensor \tau is solved by the fine-scale problems. The fine-scale problem is discretized with bubble functions which yield a local (within an element) linear system. I guess this explains my previous threads about bubble function, tensor contraction, and other stuff. I really appreciate the help from you and this community. Here is our latest work: Zhu, Lixing, and Arif Masud. "Residual-based closure model for density-stratified incompressible turbulent flows." *Computer Methods in Applied Mechanics and Engineering* 386 (2021): 113931. Best regards, Lixing On Monday, September 27, 2021 at 12:12:11 AM UTC+8 Wolfgang Bangerth wrote: > On 9/26/21 5:47 AM, Lixing Zhu wrote: > > > > I am implementing a stabilized weak form of a vector-valued problem > (e.g., > > displacement u and pressure p with corresponding weighting functions w > and q). > > One of the stabilization terms takes the form (grad q, \tau grad p), > where > > \tau is actually a tensor. Here \tau is locally determined by solving an > > element-wise linear system. Therefore I am using a FullMatrix class for > \tau. > > > > However, since \tau is involved in the numerical integration, it seems > more > > convenient to convert \tau into a Tensor class. > > > > Is there a quick method to convert a FullMatrix into a Tensor? Or is > there a > > better way to code this workflow? Any suggestion is appreciated. If more > info > > is needed, please let me know also. > > Lixing > I don't think there is an easy way short of just copying elements one by > one. > > Out of curiosity, what is the equation that defines tau, and why can't you > just write this equation in terms of tensors right away? > > Best > W> > > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: [email protected] > www: http://www.math.colostate.edu/~bangerth/ > > -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/9a496256-7545-4532-92e6-78fffd51187cn%40googlegroups.com.
