Tensor.h File Reference

#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)


Function Documentation

Tensor outer ( const Vector v1,
const Vector v2 
) [inline]

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 }


Generated on Sat Nov 18 01:17:17 2017 for NAMD by  doxygen 1.4.7