#include <math.h>
#include <stdio.h>
#include "common.h"
#include "Vector.h"
Go to the source code of this file.
Classes | |
class | Tensor |
Functions | |
Tensor | outer (const Vector &v1, const Vector &v2) |
Definition at line 241 of file Tensor.h.
References Vector::x, Tensor::xx, Tensor::xy, Tensor::xz, Vector::y, Tensor::yx, Tensor::yy, Tensor::yz, Vector::z, Tensor::zx, Tensor::zy, and Tensor::zz.
Referenced by HomePatch::addRattleForce(), Controller::calcPressure(), ComputeGridForce::do_calc(), ComputeStir::doForce(), ComputeRestraints::doForce(), ComputeEField::doForce(), ComputeConsTorque::doForce(), ComputeConsForce::doForce(), HomePatch::hardWallDrude(), HomePatch::minimize_rattle2(), HomePatch::mollyMollify(), HomePatch::rattle1old(), HomePatch::rattle2(), ComputeGlobal::recvResults(), and settlev().
00241 { 00242 Tensor tmp; 00243 tmp.xx = v1.x * v2.x; 00244 tmp.xy = v1.x * v2.y; 00245 tmp.xz = v1.x * v2.z; 00246 tmp.yx = v1.y * v2.x; 00247 tmp.yy = v1.y * v2.y; 00248 tmp.yz = v1.y * v2.z; 00249 tmp.zx = v1.z * v2.x; 00250 tmp.zy = v1.z * v2.y; 00251 tmp.zz = v1.z * v2.z; 00252 return tmp; 00253 }