yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00567
[svn] r1473 - cosurgi
-
To:
yade-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Janek Kozicki <janek_listy@xxxxx>
-
Date:
Wed, 20 Aug 2008 12:06:50 +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==
------------------------------------------------------------------------
r1473 | cosurgi | 2008-08-19 13:18:35 +0200 (wto, 19 sie 2008) | 4 lines
Changed paths:
M /trunk/SConstruct
M /trunk/pkg/lattice/PreProcessor/LatticeExample.cpp
M /trunk/pkg/lattice/PreProcessor/LatticeExample.hpp
small changes in Lattice
small bugfix in scons (by Vaclav)
------------------------------------------------------------------------
Index: pkg/lattice/PreProcessor/LatticeExample.cpp
===================================================================
--- pkg/lattice/PreProcessor/LatticeExample.cpp (revision 1472)
+++ pkg/lattice/PreProcessor/LatticeExample.cpp (revision 1473)
@@ -1714,10 +1714,10 @@
}
-bool LatticeExample::isFibre(Vector3r a,Vector3r b)
+int LatticeExample::isFibre(Vector3r a,Vector3r b)
{
- bool A=false;
- bool B=false;
+ int A=0;
+ int B=0;
for(int i = 0 ; i < fibre_count ; ++i)
{
Vector3r pos = fibres[i].first;
@@ -1728,11 +1728,11 @@
pos[0] + 1.0*j*del[0],
pos[1] + 1.0*j*del[1],
pos[2] + 1.0*j*del[2] );
- if(p == a) A=true;
- if(p == b) B=true;
+ if(p == a) A=1;
+ if(p == b) B=1;
}
}
- return A && B;
+ return A + B;
}
bool LatticeExample::fibreAllows(Vector3r a)
@@ -1770,8 +1770,9 @@
continue; // skip non-beams
LatticeBeamParameters* beam = static_cast<LatticeBeamParameters*>(body->physicalParameters.get());
- if(isFibre( (*(rootBody->bodies))[beam->id1]->physicalParameters->se3.position
- ,(*(rootBody->bodies))[beam->id2]->physicalParameters->se3.position))
+ int fibreNodes=isFibre( (*(rootBody->bodies))[beam->id1]->physicalParameters->se3.position
+ ,(*(rootBody->bodies))[beam->id2]->physicalParameters->se3.position);
+ if(fibreNodes==2) // fibre
{
beam->longitudalStiffness = fibre_longStiffness_noUnit;
beam->bendingStiffness = fibre_bendStiffness_noUnit;
@@ -1784,6 +1785,14 @@
fibres_total+=1.0;
}
+ if(fibreNodes==1) // bond
+ {
+ beam->longitudalStiffness = bond_longStiffness_noUnit;
+ beam->bendingStiffness = bond_bendStiffness_noUnit;
+ beam->torsionalStiffness = bond_torsStiffness_noUnit;
+ beam->criticalTensileStrain = bond_critTensileStrain;
+ beam->criticalCompressiveStrain = bond_critCompressStrain;
+ }
}
}
}
Index: pkg/lattice/PreProcessor/LatticeExample.hpp
===================================================================
--- pkg/lattice/PreProcessor/LatticeExample.hpp (revision 1472)
+++ pkg/lattice/PreProcessor/LatticeExample.hpp (revision 1473)
@@ -93,7 +93,7 @@
void addAggregates(shared_ptr<MetaBody>& rootBody);
void makeFibreBeams(shared_ptr<MetaBody>& rootBody);
- bool isFibre(Vector3r,Vector3r);
+ int isFibre(Vector3r,Vector3r);
bool fibreAllows(Vector3r);
////////////////////////////////////////////////////
Index: SConstruct
===================================================================
--- SConstruct (revision 1472)
+++ SConstruct (revision 1473)
@@ -79,7 +79,7 @@
if ',' in env['profile']:
profiles=env['profile'].split(',')
import threading,subprocess
- def runProfile(profile): subprocess.call([sys.argv[0],'-Q','profile='+p+'!'])
+ def runProfile(profile): subprocess.call([sys.argv[0],'-Q','profile='+profile+'!'])
profileThreads=[]
for arg in sys.argv[2:]:
print "WARNING: parallel-building, extra argument `%s' ignored!"%arg