MechSys  1.0
Computing library for simulations in continuum and discrete mechanics
Public Member Functions | Public Attributes
Particle Class Reference

#include <particle.h>

List of all members.

Public Member Functions

 Particle ()
 Particle (int Tag, Array< Vec3_t > const &V, Array< Array< int > > const &E, Array< Array< int > > const &F, Vec3_t const &v0, Vec3_t const &w0, double R, double rho=1.0)
 Density of the material.
 Particle (int Tag, Mesh::Generic const &M, double R, double rho=1.0)
 ~Particle ()
void Initialize (size_t i=0, size_t NCalls=5000)
 Initialize this particle.
void InitializeVelocity (double dt=1.0)
 Initialize this particle.
void Rotate (double dt)
 Apply rotation on the particle once the total torque is found.
void Rotate (Quaternion_t &Q, Vec3_t &V)
 Apply rotation given by Quaternion Q at point v.
void Translate (double dt)
 Apply translation once the total force is found.
void Translate (Vec3_t &t)
 Apply translation by vector t.
void ResetDisplacements ()
 Reset the displacements for the verlet algorithm.
double MaxDisplacement ()
 Maximun displacement for the verlet algorithm.
void Draw (std::ostream &os, char const *Color="Blue", bool BPY=false)
 Draw the particle.
void FixVeloc (double vx=0.0, double vy=0.0, double vz=0.0)
 Fix all velocities.
bool IsFree ()
void CalcProps (size_t NCalls=5000)
 Calculate properties: mass, center of mass, and moment of inertia.
bool IsInside (Vec3_t &V)
 Find whether the point V is inside the particle or not.
bool IsInsideAlt (Vec3_t &V)
 Find whether the point V is inside the particle or not.
double IsInside (double *V)
 Find whether the point V is inside the particle or not.
double MaxX ()
 Find Maximun X coordinate.
double MaxY ()
 Find Maximun Y coordinate.
double MaxZ ()
 Find Maximun Y coordinate.
double MinX ()
 Find Minimun X coordinate.
double MinY ()
 Find Minimun Y coordinate.
double MinZ ()
 Find Minimun Y coordinate.
double Vol (double *X)
 Calculate the volume of the sample at X.
double Xc (double *X)
 Calculate the coordinates of the center of mass at X.
double Yc (double *X)
 Calculate the coordinates of the center of mass at X.
double Zc (double *X)
 Calculate the coordinates of the center of mass at X.
double Ixx (double *X)
 Calculate the inertia tensor at X.
double Iyy (double *X)
 Calculate the inertia tensor at X.
double Izz (double *X)
 Calculate the inertia tensor at X.
double Ixy (double *X)
 Calculate the inertia tensor at X.
double Ixz (double *X)
 Calculate the inertia tensor at X.
double Iyz (double *X)
 Calculate the inertia tensor at X.

Public Attributes

int Tag
 Ask if the particle has any constrain in its movement.
size_t Index
 index of the particle in the domain
bool PropsReady
 Are the properties calculated ready ?
bool IsBroken
 True if the particle has at least one broken bond in cohesive simulations.
bool vxf
bool vyf
bool vzf
 Fixed components of velocity.
bool wxf
bool wyf
bool wzf
 Fixed components of angular velocity.
Vec3_t x
 Position of the center of mass.
Vec3_t xb
 Former position for the Verlet algorithm.
Vec3_t v
 Velocity.
Vec3_t w
 Angular velocity.
Vec3_t wb
 Former angular velocity for the leap frog algorithm.
Vec3_t F
 Force over the particle.
Vec3_t Ff
 Fixed Force over the particle.
Vec3_t T
 Torque over the particle.
Vec3_t Tf
 Fixed Torque over the particle.
Vec3_t I
 Vector containing the principal components of the inertia tensor.
Quaternion_t Q
 The quaternion representing the rotation.
Mat3_t M
 Momment tensor for the calculation of stress.
Mat3_t B
 Branch tensor for the study of isotropy.
double Erot
 Rotational energy of the particle.
double Ekin
 Kinetical energy of the particle.
double Dmax
 Maximal distance from the center of mass to the surface of the body.
double Diam
 Diameter of the parallelogram containing the particle.
double Cn
 Coordination number (number of contacts)
Array< Vec3_t * > Verts
 Vertices.
ParticleProps Props
 Properties.
Array< Vec3_t * > Vertso
 Original postion of the Vertices.
Array< Array< int > > EdgeCon
 Conectivity of Edges.
Array< Array< int > > FaceCon
 Conectivity of Faces.
Array< Edge * > Edges
 Edges.
Array< Face * > Faces
 Faces.
Array< Torus * > Tori
 Toroidal features.
Array< Cylinder * > Cylinders
 Cylindrical features.

Constructor & Destructor Documentation

Particle::Particle ( ) [inline]
Particle::Particle ( int  Tag,
Array< Vec3_t > const &  V,
Array< Array< int > > const &  E,
Array< Array< int > > const &  F,
Vec3_t const &  v0,
Vec3_t const &  w0,
double  R,
double  rho = 1.0 
) [inline]

Density of the material.

Parameters:
TagTag of the particle
VList of vertices
EList of edges with connectivity
FList of faces with connectivity
v0Initial velocity
w0Initial angular velocity
RSpheroradius
Particle::Particle ( int  Tag,
Mesh::Generic const &  M,
double  R,
double  rho = 1.0 
) [inline]
Particle::~Particle ( ) [inline]

Member Function Documentation

void Particle::CalcProps ( size_t  NCalls = 5000) [inline]

Calculate properties: mass, center of mass, and moment of inertia.

void Particle::Draw ( std::ostream &  os,
char const *  Color = "Blue",
bool  BPY = false 
) [inline]

Draw the particle.

void Particle::FixVeloc ( double  vx = 0.0,
double  vy = 0.0,
double  vz = 0.0 
) [inline]

Fix all velocities.

void Particle::Initialize ( size_t  i = 0,
size_t  NCalls = 5000 
) [inline]

Initialize this particle.

void Particle::InitializeVelocity ( double  dt = 1.0) [inline]

Initialize this particle.

bool Particle::IsFree ( ) [inline]
bool Particle::IsInside ( Vec3_t V) [inline]

Find whether the point V is inside the particle or not.

double Particle::IsInside ( double *  V) [inline]

Find whether the point V is inside the particle or not.

bool Particle::IsInsideAlt ( Vec3_t V) [inline]

Find whether the point V is inside the particle or not.

double Particle::Ixx ( double *  X) [inline]

Calculate the inertia tensor at X.

double Particle::Ixy ( double *  X) [inline]

Calculate the inertia tensor at X.

double Particle::Ixz ( double *  X) [inline]

Calculate the inertia tensor at X.

double Particle::Iyy ( double *  X) [inline]

Calculate the inertia tensor at X.

double Particle::Iyz ( double *  X) [inline]

Calculate the inertia tensor at X.

double Particle::Izz ( double *  X) [inline]

Calculate the inertia tensor at X.

double Particle::MaxDisplacement ( ) [inline]

Maximun displacement for the verlet algorithm.

double Particle::MaxX ( ) [inline]

Find Maximun X coordinate.

double Particle::MaxY ( ) [inline]

Find Maximun Y coordinate.

double Particle::MaxZ ( ) [inline]

Find Maximun Y coordinate.

double Particle::MinX ( ) [inline]

Find Minimun X coordinate.

double Particle::MinY ( ) [inline]

Find Minimun Y coordinate.

double Particle::MinZ ( ) [inline]

Find Minimun Y coordinate.

void Particle::ResetDisplacements ( ) [inline]

Reset the displacements for the verlet algorithm.

void Particle::Rotate ( double  dt) [inline]

Apply rotation on the particle once the total torque is found.

void Particle::Rotate ( Quaternion_t Q,
Vec3_t V 
) [inline]

Apply rotation given by Quaternion Q at point v.

void Particle::Translate ( double  dt) [inline]

Apply translation once the total force is found.

void Particle::Translate ( Vec3_t t) [inline]

Apply translation by vector t.

double Particle::Vol ( double *  X) [inline]

Calculate the volume of the sample at X.

double Particle::Xc ( double *  X) [inline]

Calculate the coordinates of the center of mass at X.

double Particle::Yc ( double *  X) [inline]

Calculate the coordinates of the center of mass at X.

double Particle::Zc ( double *  X) [inline]

Calculate the coordinates of the center of mass at X.


Member Data Documentation

Branch tensor for the study of isotropy.

double Particle::Cn

Coordination number (number of contacts)

Cylindrical features.

Diameter of the parallelogram containing the particle.

Maximal distance from the center of mass to the surface of the body.

Conectivity of Edges.

Edges.

Kinetical energy of the particle.

Rotational energy of the particle.

Force over the particle.

Conectivity of Faces.

Faces.

Fixed Force over the particle.

Vector containing the principal components of the inertia tensor.

index of the particle in the domain

True if the particle has at least one broken bond in cohesive simulations.

Momment tensor for the calculation of stress.

Properties.

Are the properties calculated ready ?

The quaternion representing the rotation.

Torque over the particle.

Ask if the particle has any constrain in its movement.

Tag of the particle

Fixed Torque over the particle.

Toroidal features.

Velocity.

Vertices.

Original postion of the Vertices.

Fixed components of velocity.

Angular velocity.

Former angular velocity for the leap frog algorithm.

Fixed components of angular velocity.

Position of the center of mass.

Former position for the Verlet algorithm.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines