Struct basis3D¶
Defined in File basis3D.hpp
Struct Documentation¶
-
struct basis3D¶
represent a basis of 3D vectors
The use of a “working basis” (e.g. Cartesian) is assumed throughout, and all vectors of the basis3D object are expressed in terms of this working basis.
Public Functions
-
inline basis3D()¶
-
basis3D(vector<double> _e)¶
-
inline void trivial()¶
-
void init()¶
initialises the basis once its vectors have been defined.
Calculates the matrix M necessary for basis changes, and the volume.
-
void inverse()¶
Used when the basis vectors provided, instead of being expressed in the working basis, are rather the working basis vectors expressed in the basis we are interested in.
In other words, the basis needs to be inverted. The matrix M is read directly (without need to invert) and then a copy of it is inverted in order to read the components of the vectors.
-
vector3D<double> to(const vector3D<double> &v)¶
from a vector V expressed in the working basis, provides as output its components in the current basis
- Parameters:
V – vector expressed in the working (Cartesian) basis
Public Members
-
double vol¶
volume of the triad (triple product of the basis vectors)
-
inline basis3D()¶