26 #ifndef CTANGENTIALSPRING_H
27 #define CTANGENTIALSPRING_H
83 os <<
"delta:" <<
delta
148 std::vector<int> retval;
149 for (
unsigned int i=0; i<size(); i++)
150 if (
operator[](i).time<time) {
169 for (CTangentialSprings::iterator it=begin(); it!=end();it++){
170 if (it->pParticle==P)
191 back().time=time_+dt;
208 for (CTangentialSprings::iterator it=begin(); it!=end();it++){
209 if (it->pParticle==P)
226 for (CTangentialSprings::iterator it=begin(); it!=end();it++){
247 os <<
"Tangential Springs: N=" << size() << std::endl;
248 for (CTangentialSprings::iterator it=begin(); it!=end(); it++)
249 if (it->time>=time_) {
250 it->print(os); os << std::endl;
259 for (
unsigned int i=0; i<p.size(); i++) os <<
" " << p[i];
272 for (
unsigned int i=0; i<p.size(); i++) is >> p[i];
void to_erase(Mdouble time)
Function selects the tangential spring vector for particle-particle interations (also removed not use...
CTangentialSpring()
constructors
bool operator()(const CTangentialSpring a, const Mdouble b) const
int pParticle
A pointer to the particle in contact; NULL if the contact is with a wall (The other particle is the p...
int pWall
A pointer to the wall in contact; NULL if the contact is with a particle (The other particle is the p...
void print(std::ostream &os, Mdouble time_)
outputs all current active tangential springs
void print(std::ostream &os)
outputs tangential spring
Vec3D delta
stores the spring
CTangentialSpring * select_wall_spring(int W, Mdouble time_, Mdouble dt)
Function selects the tangential spring vector for particle-particle interations (also removed not use...
Construction required for the erase/remove_if stuff.
friend std::ostream & operator<<(std::ostream &os, const CTangentialSpring &p)
writes spring
friend std::istream & operator>>(std::istream &is, CTangentialSprings &p)
reads all springs
Member variable of #Particle storing all tangential springs of particle PI with contacting particles...
Stores the tangential spring needed to compute a tangential elastic force between particles PI...
CTangentialSpring * create_new(int P, Mdouble time_, Mdouble dt)
void reset()
Resets the tangential springs.
friend std::ostream & operator<<(std::ostream &os, const CTangentialSprings &p)
writes all springs
std::vector< int > to_be_erased(Mdouble time)
Function selects the tangential spring vector for particle-particle interations (also removed not use...
CTangentialSpring * select_particle_spring(int P, Mdouble time_, Mdouble dt)
Function selects the tangential spring vector for particle-particle interations (also removed not use...
CTangentialSpring * create_new_wall(int W, Mdouble time_, Mdouble dt)
bool has_particle_spring(int P, Mdouble time_)
Vec3D SlidingForce
Stores the force (for some non-linear, hysteretic spring models)
Mdouble time
stores the last time the tangential spring was read (if it was not read during the last timestep...
CTangentialSpring(int pParticle_, int pWall_, Mdouble time_)
Implementation of a 3D vector (by Vitaliy).
CTangentialSpring * create_new(int P, Mdouble time_, Mdouble dt, CTangentialSpring &CTS)
CTangentialSpring(const CTangentialSpring &ts)
copy constructor
friend std::istream & operator>>(std::istream &is, CTangentialSpring &p)
reads spring