Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
如何提取一个volSymmTensorField量(比如Tij)的x方向的分量 (即 (Txx,Txy,Txz) ) 作为volVectorField呢?我看到GeometricField成员函数component()可以提取其分量,但是得到的好像是一个volScalarFIeld,那么如何才能得到向量场呢
@肖恩曼
Tensor好像可以返回某个方向的分量,SymmTensor能不能就不知道了,TensorI.H里的代码如下
template<class Cmpt> inline Foam::Vector<Cmpt> Foam::Tensor<Cmpt>::x() const { return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]); }
@izumi 查了一下symmTensor应该是没有的
@肖恩曼 那可能就需要用循环一个个赋值了