O P A R - Open Architecture Particle in Cell Simulation - Version 3.0
Plasma simulations with dust particles
 All Classes Files Functions Variables Friends Macros Groups Pages
Public Member Functions | Public Attributes
Velocity_< T > Class Template Reference

Velocity_ holds the template of a 3-dimensional 'vector'. More...

#include <dimensionality.h>

List of all members.

Public Member Functions

T & x ()
 Returns the first, ie x–element.
T & y ()
 Returns the second, ie y–element.
T & z ()
 Returns the third, ie z–element.
 Velocity_ ()
 Default constructor.
 Velocity_ (T ax, T ay, T az)
 Construct with a 3 individual values.
 Velocity_ (T x)
 Construct with one value. All components are set to the value.
 operator T * ()
 Returns a pointer to the first element.
volume () const
 Returns the 3-dim volume, ie the product of all components.
sum () const
 Returns the sum of all components.
double length () const
 Returns the length of the vector.
void stretch (const Position_< T > &A)
 Stretches the vector componentwise with other vector.
void limitto (const Velocity_< T > &pos)
 If any component of the vector is larger than pos, it is limited to the value given in pos.
arraypos (const Velocity_< T > &pos) const
 Assuming pos is the size of a 3-dim array, this converts the vector to a position in the according one dimensional array.
template<class T2 >
 operator Velocity_< T2 > () const
 Typecast into a Velocity_<T2> where T2 is different from T.
Velocity_< T > scale (const Velocity_< T > &V) const
 Returns a nonuniformly scaled Velocity_.
double sqr ()
 Returns the sum of the squares of the components.
T & operator[] (const int i)
 < Return the i-th value
operator[] (const int i) const

Public Attributes

P [3]
 < The array containing the values

Detailed Description

template<class T>
class Velocity_< T >

Velocity_ holds the template of a 3-dimensional 'vector'.


The documentation for this class was generated from the following file: