yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00571
[svn] r1475 - eudoxos
-
To:
yade-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Janek Kozicki <janek_listy@xxxxx>
-
Date:
Wed, 20 Aug 2008 12:08:04 +0200
-
Face:
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUBAQEtLS1KSkpRUVFXV1dYWFhjY2Nzc3N3d3eHh4eKioqdnZ24uLjLy8vc3NxVIagyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2AIVEzgS1fgQtQAAAjRJREFUOMtt1DFv00AUAOAzFQNbjigSyoQaRaBMhKgLUyKXpVNNeUpk9vyDqFJhQ1kiBuaqAwJCqvPtSLY7RlTn5+5IdnYkkt/AOyfxXVLe5vf53Z1875kd34tOEax8djmj6GyjhB5bxz50GdsVZr9fqRjZwAtKOJw5Wqs2MMZ16ALHsaDncF7xAHix1oEFHAB8f+pRjcO4gfZDykcYzbiucRolOLUJ6kjA0xtVt+A6TySlM0RajIpK6DzwKZ/nOYbF/gclHMo1ZOHYY/+Ha+AWuM+3oMS4eeqYzZ8FiCltgUqI8cd2wwAVpJk+8LWYjBtnJdQpHQqJMd4Oxt4bU9ESiFGc5hkqaH74asAX4iabP5I5gZ+qjgGlJCqZa3h3lxhoeVcSE1qLQC4sqKOK9MGW9E3izFqqHokoztLFEgXg31sbZEKnWi2T74A4NxfVQqlkjKtcAWD+zcArFEES01dR0E/nnV0IgugmDd/2L84sOAouRBBHEc7gtc8teDkRlE0iNQPo2w3Xhh/D4TCIQ4LRLoTvgwjj6RRgavdurxYGMaIuGOyAW/PpNlCcU9/93AHenAWYjPoAwa+G3e3to/MgFNTAEKvKDjzuCzHTnY3qqdXtx24VijzQfZ0yewZ5cwRFQaa+mIYr1uI0I76+3W4xhlvoVRwOA0Fdl64HlJnxP6T8YpX/Lga4Wv4A3ErrU5oTfN7Mu/llXMl8RXEPji/lQkN3H7qXqgC2By47EXeU/7PJ/wPxRKMnuZwIeAAAAABJRU5ErkJggg==
------------------------------------------------------------------------
r1475 | eudoxos | 2008-08-19 20:33:29 +0200 (wto, 19 sie 2008) | 2 lines
Changed paths:
M /trunk/pkg/dem/Engine/StandAloneEngine/GlobalStiffnessCounter.cpp
M /trunk/pkg/dem/Engine/StandAloneEngine/GlobalStiffnessCounter.hpp
Fix physical action index.
------------------------------------------------------------------------
Index: pkg/dem/Engine/StandAloneEngine/GlobalStiffnessCounter.cpp
===================================================================
--- pkg/dem/Engine/StandAloneEngine/GlobalStiffnessCounter.cpp (revision 1474)
+++ pkg/dem/Engine/StandAloneEngine/GlobalStiffnessCounter.cpp (revision 1475)
@@ -8,6 +8,7 @@
#include<yade/pkg-dem/SpheresContactGeometry.hpp>
#include<yade/pkg-common/NormalShearInteractions.hpp>
+#include<yade/pkg-dem/ElasticContactInteraction.hpp>
#include<yade/core/Omega.hpp>
#include<yade/core/MetaBody.hpp>
#include<yade/pkg-common/Force.hpp>
@@ -58,8 +59,9 @@
SpheresContactGeometry* geom=YADE_CAST<SpheresContactGeometry*>(contact->interactionGeometry.get()); assert(geom);
// FIXME: for some reason, the following cast is not successful. Please help!
- cerr<<__FILE__<<":"<<__LINE__<<" Interaction physics of type "<<contact->interactionPhysics->getClassName()<<" ("<<typeid(*contact->interactionPhysics).name()<<")"<<endl;
- NormalShearInteraction* phys=YADE_CAST<NormalShearInteraction*>(contact->interactionPhysics.get()); assert(phys);
+ //cerr<<__FILE__<<":"<<__LINE__<<" Interaction physics of type "<<contact->interactionPhysics->getClassName()<<" ("<<typeid(*contact->interactionPhysics).name()<<")"<<endl;
+ //NormalShearInteraction* phys=YADE_CAST<NormalShearInteraction*>(contact->interactionPhysics.get()); assert(phys);
+ ElasticContactInteraction* phys=YADE_CAST<ElasticContactInteraction*>(contact->interactionPhysics.get()); assert(phys);
// all we need for getting stiffness
Vector3r& normal=geom->normal; Real& kn=phys->kn; Real& ks=phys->ks; Real& radius1=geom->radius1; Real& radius2=geom->radius2;
// FIXME? NormalShearInteraction knows nothing about whether the contact is "active" (force!=0) or not;
@@ -82,11 +84,11 @@
diag_Rstiffness *= ks;
//cerr << "diag_Rstifness=" << diag_Rstiffness << endl;
- PhysicalAction* st = ncb->physicalActions->find(contact->getId1(),actionStiffness->getClassIndex()).get();
+ PhysicalAction* st = ncb->physicalActions->find(contact->getId1(),actionStiffnessIndex).get();
GlobalStiffness* s = static_cast<GlobalStiffness*>(st);
s->stiffness += diag_stiffness;
s->Rstiffness += diag_Rstiffness*pow(radius1,2);
- st = ncb->physicalActions->find(contact->getId2(),actionStiffness->getClassIndex()).get();
+ st = ncb->physicalActions->find(contact->getId2(),actionStiffnessIndex).get();
s = static_cast<GlobalStiffness*>(st);
s->stiffness += diag_stiffness;
s->Rstiffness += diag_Rstiffness*pow(radius2,2);
@@ -143,11 +145,11 @@
//cerr << "diag_Rstifness=" << diag_Rstiffness << endl;
- PhysicalAction* st = ncb->physicalActions->find(id1,actionStiffness->getClassIndex()).get();
+ PhysicalAction* st = ncb->physicalActions->find(id1,actionStiffnessIndex).get();
GlobalStiffness* s = static_cast<GlobalStiffness*>(st);
s->stiffness += diag_stiffness;
s->Rstiffness += diag_Rstiffness*pow(currentContactGeometry->radius1,2);
- st = ncb->physicalActions->find(id2,actionStiffness->getClassIndex()).get();
+ st = ncb->physicalActions->find(id2,actionStiffnessIndex).get();
s = static_cast<GlobalStiffness*>(st);
s->stiffness += diag_stiffness;
s->Rstiffness += diag_Rstiffness*pow(currentContactGeometry->radius2,2);
Index: pkg/dem/Engine/StandAloneEngine/GlobalStiffnessCounter.hpp
===================================================================
--- pkg/dem/Engine/StandAloneEngine/GlobalStiffnessCounter.hpp (revision 1474)
+++ pkg/dem/Engine/StandAloneEngine/GlobalStiffnessCounter.hpp (revision 1475)
@@ -23,9 +23,6 @@
{
/// Attributes
private :
- shared_ptr<PhysicalAction> actionForce;
- shared_ptr<PhysicalAction> actionMomentum;
- shared_ptr<PhysicalAction> actionStiffness;
int actionForceIndex;
int actionMomentumIndex;
int actionStiffnessIndex;