ParticleRef< T > Class Template Reference

#include <TAPsParticleRef.hpp>

Collaboration diagram for ParticleRef< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

Vector3< T > const & GetAcceleration () const
bool GetFixStatus () const
Vector3< T > const & GetForce () const
GetMass () const
 Assignment operator.
Vector3< T > const & GetPosition () const
Vector3< T > const & GetVelocity () const
 ParticleRef (T mass, Vector3< T > &vPosition, Vector3< T > const &vVelocity, Vector3< T > const &vAcceleration, Vector3< T > const &vForce, bool fixed=false)
 Constructor.
 ParticleRef (Vector3< T > &vPosition, bool fixed=false)
 Constructor.
void SetAcceleration (T x, T y, T z)
void SetAcceleration (Vector3< T > const &)
void SetFixStatus (bool)
void SetForce (T x, T y, T z)
void SetForce (Vector3< T > const &)
void SetMass (T)
void SetPosition (T x, T y, T z)
void SetPosition (Vector3< T > const &)
void SetRefPosition (Vector3< T > *ptrPos)
void SetVelocity (T x, T y, T z)
void SetVelocity (Vector3< T > const &)
 ~ParticleRef ()
 Destructor.

Static Public Member Functions

static void ParticlesCreation (HEVertexList< T > *meshVertex, std::list< int > &vertexNo, ParticleRef< T > *particleNo, T mass=1)
static void ParticlesCreation (XVertex< T > *meshVertex, int *vertexNo, ParticleRef< T > *particleNo, T mass=1)
static void ParticlesCreation (Vertex< T > *meshVertex, int *vertexNo, ParticleRef< T > *particleNo, T mass=1)

Private Member Functions

ParticleRef< T > const & operator= (ParticleRef< T > const &S)

Private Attributes

bool m_bFixed
Vector3< T > * m_refPosit
m_tMass
Vector3< T > m_vtAccel
Vector3< T > m_vtForce
Vector3< T > m_vtVeloc

Friends

std::ostream & operator<< (std::ostream &output, ParticleRef< T > const &P)


Detailed Description

template<typename T>
class ParticleRef< T >

Definition at line 22 of file TAPsParticleRef.hpp.


Constructor & Destructor Documentation

template<typename T>
BEGIN_NAMESPACE_TAPs ParticleRef< T >::ParticleRef ( Vector3< T > &  vPosition,
bool  fixed = false 
) [inline]

Constructor.

Parameters:
vPosition  ref position
fixed  fix status

Definition at line 37 of file TAPsParticleRef.cpp.

00044     :
00045     m_tMass( 1 ), 
00046 #ifdef  TAPs_USE_DATA_POOL
00047     m_refPosit( ptrPos ), 
00048 #else //TAPs_USE_DATA_POOL
00049     m_refPosit( &vPosition ), 
00050 #endif//TAPs_USE_DATA_POOL
00051     m_vtVeloc(), 
00052     m_vtAccel(), 
00053     m_vtForce(), 
00054     m_bFixed( fixed )
00055 {}
//------------------------------------------------------------------------------

template<typename T>
ParticleRef< T >::ParticleRef ( mass,
Vector3< T > &  vPosition,
Vector3< T > const &  vVelocity,
Vector3< T > const &  vAcceleration,
Vector3< T > const &  vForce,
bool  fixed = false 
) [inline]

Constructor.

Parameters:
mass  mass
vPosition  ref position
vVelocity  velocity
vAcceleration  acceleration
vForce  force
fixed  fix status

Definition at line 60 of file TAPsParticleRef.cpp.

00071     :
00072     m_tMass( mass ), 
00073 #ifdef  TAPs_USE_DATA_POOL
00074     m_refPosit( ptrPos ), 
00075 #else //TAPs_USE_DATA_POOL
00076     m_refPosit( &vPosition ), 
00077 #endif//TAPs_USE_DATA_POOL
00078     m_vtVeloc( vVelocity ), 
00079     m_vtAccel( vAcceleration ), 
00080     m_vtForce( vForce ), 
00081     m_bFixed( fixed )
00082 {}
//------------------------------------------------------------------------------

template<typename T>
ParticleRef< T >::~ParticleRef (  )  [inline]

Destructor.

Definition at line 86 of file TAPsParticleRef.cpp.

00087 {}


Member Function Documentation

template<typename T>
Vector3< T > const & ParticleRef< T >::GetAcceleration (  )  const [inline]

Definition at line 174 of file TAPsParticleRef.cpp.

00175 {   return m_vtAccel;   }

template<typename T>
bool ParticleRef< T >::GetFixStatus (  )  const [inline]

Definition at line 200 of file TAPsParticleRef.cpp.

00201 {   return m_bFixed;    }

template<typename T>
Vector3< T > const & ParticleRef< T >::GetForce (  )  const [inline]

Definition at line 187 of file TAPsParticleRef.cpp.

00188 {   return m_vtForce;   }

template<typename T>
T ParticleRef< T >::GetMass (  )  const [inline]

Assignment operator.

Definition at line 110 of file TAPsParticleRef.cpp.

00111 {   return m_tMass; }

template<typename T>
Vector3< T > const & ParticleRef< T >::GetPosition (  )  const [inline]

Definition at line 144 of file TAPsParticleRef.cpp.

00145     {   return *m_refPosit; }

template<typename T>
Vector3< T > const & ParticleRef< T >::GetVelocity (  )  const [inline]

Definition at line 161 of file TAPsParticleRef.cpp.

00162 {   return m_vtVeloc;   }

template<typename T>
ParticleRef<T> const& ParticleRef< T >::operator= ( ParticleRef< T > const &  S  )  [inline, private]

Definition at line 154 of file TAPsParticleRef.hpp.

00155     {
00156         std::cerr << "ParticleRef<T> operator= must not be used!\n";
00157         exit( 1 );
00158     }

template<typename T>
static void ParticleRef< T >::ParticlesCreation ( HEVertexList< T > *  meshVertex,
std::list< int > &  vertexNo,
ParticleRef< T > *  particleNo,
mass = 1 
) [static]

template<typename T>
static void ParticleRef< T >::ParticlesCreation ( XVertex< T > *  meshVertex,
int *  vertexNo,
ParticleRef< T > *  particleNo,
mass = 1 
) [static]

template<typename T>
static void ParticleRef< T >::ParticlesCreation ( Vertex< T > *  meshVertex,
int *  vertexNo,
ParticleRef< T > *  particleNo,
mass = 1 
) [static]

template<typename T>
void ParticleRef< T >::SetAcceleration ( x,
y,
z 
) [inline]

Definition at line 182 of file TAPsParticleRef.cpp.

00183 {   m_vtAccel.SetXYZ( x, y, z );    }

template<typename T>
void ParticleRef< T >::SetAcceleration ( Vector3< T > const &  v  )  [inline]

Definition at line 178 of file TAPsParticleRef.cpp.

00179 {   m_vtAccel = v;  }

template<typename T>
void ParticleRef< T >::SetFixStatus ( bool  b  )  [inline]

Definition at line 204 of file TAPsParticleRef.cpp.

00205 {   m_bFixed = b;   }

template<typename T>
void ParticleRef< T >::SetForce ( x,
y,
z 
) [inline]

Definition at line 195 of file TAPsParticleRef.cpp.

00196 {   m_vtForce.SetXYZ( x, y, z );    }

template<typename T>
void ParticleRef< T >::SetForce ( Vector3< T > const &  v  )  [inline]

Definition at line 191 of file TAPsParticleRef.cpp.

00192 {   m_vtForce = v;  }

template<typename T>
void ParticleRef< T >::SetMass ( m  )  [inline]

Definition at line 114 of file TAPsParticleRef.cpp.

00115 {   m_tMass = m;    }

template<typename T>
void ParticleRef< T >::SetPosition ( x,
y,
z 
) [inline]

Definition at line 152 of file TAPsParticleRef.cpp.

00153     {   m_refPosit->SetXYZ( x, y, z );  }

template<typename T>
void ParticleRef< T >::SetPosition ( Vector3< T > const &  v  )  [inline]

Definition at line 148 of file TAPsParticleRef.cpp.

00149     {   *m_refPosit = v;    }

template<typename T>
void ParticleRef< T >::SetRefPosition ( Vector3< T > *  ptrPos  )  [inline]

Definition at line 140 of file TAPsParticleRef.cpp.

00141     {   m_refPosit = ptrPos;    }

template<typename T>
void ParticleRef< T >::SetVelocity ( x,
y,
z 
) [inline]

Definition at line 169 of file TAPsParticleRef.cpp.

00170 {   m_vtVeloc.SetXYZ( x, y, z );    }

template<typename T>
void ParticleRef< T >::SetVelocity ( Vector3< T > const &  v  )  [inline]

Definition at line 165 of file TAPsParticleRef.cpp.

00166 {   m_vtVeloc = v;  }


Friends And Related Function Documentation

template<typename T>
std::ostream& operator<< ( std::ostream &  output,
ParticleRef< T > const &  P 
) [friend]

Definition at line 26 of file TAPsParticleRef.hpp.

00027     {
00028         // put it through ostream
00029         output  << "ParticleRef<" << typeid(T).name() << "> ==> "
00030                 << "\n  Mass:         " << P.m_tMass
00031                 << "\n  Position:     " << *(P.m_refPosit)
00032                 << "\n  Velocity:     " << P.m_vtVeloc
00033                 << "\n  Acceleration: " << P.m_vtAccel
00034                 << "\n  Force:        " << P.m_vtForce
00035                 << "\n  Fix Status:   " << ( P.m_bFixed == true ? "true" : "false" )
00036                 << "\n";
00037         return output;
00038     }


Member Data Documentation

template<typename T>
bool ParticleRef< T >::m_bFixed [private]

Definition at line 51 of file TAPsParticleRef.hpp.

template<typename T>
Vector3<T>* ParticleRef< T >::m_refPosit [private]

Definition at line 46 of file TAPsParticleRef.hpp.

template<typename T>
T ParticleRef< T >::m_tMass [private]

Definition at line 42 of file TAPsParticleRef.hpp.

template<typename T>
Vector3<T> ParticleRef< T >::m_vtAccel [private]

Definition at line 49 of file TAPsParticleRef.hpp.

template<typename T>
Vector3<T> ParticleRef< T >::m_vtForce [private]

Definition at line 50 of file TAPsParticleRef.hpp.

template<typename T>
Vector3<T> ParticleRef< T >::m_vtVeloc [private]

Definition at line 48 of file TAPsParticleRef.hpp.


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

Generated on Mon Oct 13 11:45:50 2008 for TAPs by  doxygen 1.5.6