48 console.
XDebug() <<
"calculating " << m_interactions.size() <<
" soft bonded wall forces\n" ;
52 it != m_interactions.end();
68 console.
XDebug() <<
"CSoftBWallInteractionGroup<T>::applyForce: F = " << F <<
"\n";
74 it!=m_interactions.end();
77 K+=it->getStiffness();
78 console.
XDebug() <<
"CSoftBWallInteractionGroup<T>::applyForce: K = " << K <<
"\n";
82 double K_global=this->m_comm->sum_all(K);
83 console.
XDebug() <<
"CSoftBWallInteractionGroup<T>::applyForce: K_global = " << K_global <<
"\n";
88 console.
XDebug() <<
"CSoftBWallInteractionGroup<T>::applyForce: unitF = " << O_f <<
"\n";
95 iter!=m_interactions.end();
100 F_local+=(f_i*O_f)*O_f;
106 double fgx=this->m_comm->sum_all(F_local.
X());
107 double fgy=this->m_comm->sum_all(F_local.
Y());
108 double fgz=this->m_comm->sum_all(F_local.
Z());
112 d=((F+F_global)*O_f)/K_global;
114 <<
"CBWallInteractionGroup<T>::applyForce: iteration " << it <<
", d = " << fabs(d) <<
"\n";
118 <<
"CBWallInteractionGroup<T>::applyForce: moving wall by " << d*O_f <<
"\n";
119 this->m_wall->moveBy(d*O_f);
121 }
while((it<10)&&(fabs(d)>10e-6));
123 <<
"CBWallInteractionGroup<T>::applyForce: d = " << fabs(d)
124 <<
", num iterations = " << it <<
"\n";
132 console.
XDebug() <<
"CSoftBWallInteractionGroup::Update()\n" ;
135 m_interactions.erase(m_interactions.begin(),m_interactions.end());
142 if((*iter)->getTag()==m_tag){
143 bool iflag=PPA->
isInInner((*iter)->getPos());
147 console.
XDebug() <<
"end CSoftBWallInteractionGroup::Update()\n";
151 ostream& operator<<(ostream& ost,const CSoftBWallInteractionGroup<T>& IG)
153 ost <<
"CBWallInteractionGroup" << endl << flush;
154 ost << *(IG.m_wall) << endl << flush;
CWall * m_wall
the wall
Definition: WallIG.h:33
NeighborTable< T >::particlelist::iterator ParticleListIterator
Definition: pp_array.h:80
virtual bool isInInner(const Vec3 &)
Definition: pp_array.hpp:208
VEC3_INLINE double & Z()
Definition: vec3.h:121
virtual void Update(ParallelParticleArray< T > *)
Definition: SoftBWallInteractionGroup.hpp:129
VEC3_INLINE double & Y()
Definition: vec3.h:120
bool getScaling() const
Definition: SoftBWallInteractionGroup.h:41
boost::python::object iter(const boost::python::object &pyOb)
Definition: Util.h:25
virtual void calcForces()
Definition: SoftBWallInteractionGroup.hpp:45
ParticleListHandle getParticlesAtPlane(Vec3 o, Vec3 n)
Get list of particles along a plane. Forwards to NTable::getParticlesAtPlane.
Definition: pp_array.h:191
base class for all walls
Definition: Wall.h:39
CSoftBWallInteractionGroup(TML_Comm *)
Definition: SoftBWallInteractionGroup.hpp:20
parrallel particle storage array with neighborsearch and variable exchange
Definition: SubLattice.h:61
Abstract Base class for a group of interactions between particles and a wall.
Definition: WallIG.h:30
double getShearK() const
Definition: SoftBWallInteractionGroup.h:40
int getTag() const
Definition: BWallInteractionGroup.h:47
virtual void applyForce(const Vec3 &)
Definition: SoftBWallInteractionGroup.hpp:66
abstract base class for communicator
Definition: comm.h:46
BasicCon & XDebug(bool h=true)
set verbose level of next message to "xdg"
Definition: console.cpp:316
bool m_scaling
Definition: SoftBWallInteractionGroup.h:64
int m_tag
Definition: SoftBWallInteractionGroup.h:63
double m_normalK
Definition: SoftBWallInteractionGroup.h:62
Interaction group parameters for CSoftBWallInteractionGroups.
Definition: SoftBWallInteractionGroup.h:31
VEC3_INLINE double & X()
Definition: vec3.h:119
Template class for a handle/ref. counted pointer.
Definition: handle.h:26
bonded elastic interaction between a particle and a wall with different spring constants in the norma...
Definition: SoftBWallInteraction.h:29
double getNormalK() const
Definition: SoftBWallInteractionGroup.h:39
double m_shearK
spring constants for each direction
Definition: SoftBWallInteractionGroup.h:62
VEC3_INLINE Vec3 unit() const
Definition: vec3.hpp:225