NAMD
Classes | Functions
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(), ComputeConsForce::doForce(), ComputeEField::doForce(), ComputeConsTorque::doForce(), ComputeStir::doForce(), ComputeRestraints::doForce(), HomePatch::hardWallDrude(), HomePatch::minimize_rattle2(), HomePatch::mollyMollify(), HomePatch::rattle1old(), HomePatch::rattle2(), ComputeGlobal::recvResults(), and settlev().

241  {
242  Tensor tmp;
243  tmp.xx = v1.x * v2.x;
244  tmp.xy = v1.x * v2.y;
245  tmp.xz = v1.x * v2.z;
246  tmp.yx = v1.y * v2.x;
247  tmp.yy = v1.y * v2.y;
248  tmp.yz = v1.y * v2.z;
249  tmp.zx = v1.z * v2.x;
250  tmp.zy = v1.z * v2.y;
251  tmp.zz = v1.z * v2.z;
252  return tmp;
253 }
BigReal zy
Definition: Tensor.h:19
BigReal xz
Definition: Tensor.h:17
BigReal z
Definition: Vector.h:66
BigReal yz
Definition: Tensor.h:18
BigReal yx
Definition: Tensor.h:18
BigReal x
Definition: Vector.h:66
BigReal xx
Definition: Tensor.h:17
BigReal zz
Definition: Tensor.h:19
Definition: Tensor.h:15
BigReal xy
Definition: Tensor.h:17
BigReal y
Definition: Vector.h:66
BigReal yy
Definition: Tensor.h:18
BigReal zx
Definition: Tensor.h:19