HG-MD  1
Public Member Functions | Public Attributes | Friends
CTangentialSpring Class Reference

Stores the tangential spring $\vec{\delta}_{ij}^t$ needed to compute a tangential elastic force between particles PI, PJ. More...

#include <CTangentialSpring.h>

Collaboration diagram for CTangentialSpring:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CTangentialSpring ()
 constructors
 CTangentialSpring (int pParticle_, int pWall_, Mdouble time_)
 CTangentialSpring (const CTangentialSpring &ts)
 copy constructor
void print (std::ostream &os)
 outputs tangential spring

Public Attributes

Vec3D delta
Vec3D forcedelta
Vec3D RollingSpring
Vec3D TorsionSpring
int pParticle
 A pointer to the particle in contact; NULL if the contact is with a wall (The other particle is the particle in which CDeltaMax is located)
int pWall
 A pointer to the wall in contact; NULL if the contact is with a particle (The other particle is the particle in which CDeltaMax is located)
Mdouble time
 stores the last time the tangential spring was read (if it was not read during the last timestep, the contact is old and will be deleted)
bool sliding

Friends

std::ostream & operator<< (std::ostream &os, const CTangentialSpring &p)
 writes spring
std::istream & operator>> (std::istream &is, CTangentialSpring &p)
 reads spring

Detailed Description

Stores the tangential spring $\vec{\delta}_{ij}^t$ needed to compute a tangential elastic force between particles PI, PJ.


Constructor & Destructor Documentation

constructors

CTangentialSpring::CTangentialSpring ( int  pParticle_,
int  pWall_,
Mdouble  time_ 
) [inline]
                                                                     {  
                delta.set_zero();
                RollingSpring.set_zero();
                TorsionSpring.set_zero();
                pParticle = pParticle_;
                pWall = pWall_;
                time = time_;
                sliding = false;
                //~ cout << endl << "D" << endl;
        }

copy constructor

References delta, pParticle, pWall, RollingSpring, sliding, time, and TorsionSpring.

                                                        {
                delta = ts.delta;
                RollingSpring = ts.RollingSpring;
                TorsionSpring = ts.TorsionSpring;
                pParticle = ts.pParticle;
                pWall = ts.pWall;
                time = ts.time;
                sliding = ts.sliding;
                //~ cout << "c";
        }

Member Function Documentation

void CTangentialSpring::print ( std::ostream &  os) [inline]

outputs tangential spring

                                   {
                os << "delta:" << delta 
                        << ", particle:" << pParticle
                        << ", wall:" << pWall 
                        << ", time:" << time;
        }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CTangentialSpring p 
) [friend]

writes spring

        {
                os << p.delta << " " << p.RollingSpring << " " << p.TorsionSpring << " " << p.pParticle << " " << p.pWall << " " << p.time;
                return os;
        }       
std::istream& operator>> ( std::istream &  is,
CTangentialSpring p 
) [friend]

reads spring

        {
                is >> p.delta >> p.RollingSpring >> p.TorsionSpring >> p.pParticle >> p.pWall >> p.time;
                return is;
        }

Member Data Documentation

A pointer to the particle in contact; NULL if the contact is with a wall (The other particle is the particle in which CDeltaMax is located)

Referenced by CTangentialSpring(), and ParticleHandler::removeParticle().

A pointer to the wall in contact; NULL if the contact is with a particle (The other particle is the particle in which CDeltaMax is located)

Referenced by CTangentialSpring().

stores the last time the tangential spring was read (if it was not read during the last timestep, the contact is old and will be deleted)

Referenced by CTangentialSpring(), and CTangentialSprings::check_spring_time::operator()().


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