yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #07822
[Branch ~yade-dev/yade/trunk] Rev 2902: 1. fix problem (segmentation fault) for save/load simulations with WireMat
------------------------------------------------------------
revno: 2902
committer: Klaus Thoeni <klaus.thoeni@xxxxxxxxx>
branch nick: yade
timestamp: Fri 2011-07-29 12:38:16 +1000
message:
1. fix problem (segmentation fault) for save/load simulations with WireMat
2. correct some typos
modified:
pkg/dem/WirePM.cpp
pkg/dem/WirePM.hpp
py/pack/pack.py
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'pkg/dem/WirePM.cpp'
--- pkg/dem/WirePM.cpp 2011-05-24 04:55:42 +0000
+++ pkg/dem/WirePM.cpp 2011-07-29 02:38:16 +0000
@@ -182,8 +182,7 @@
if ( contactPhysics->isDoubleTwist ) {
Real alpha = atan( l0 / (3.*Mathr::PI*mat1->diameter) );
Real kh = k * ( l0*mat1->diameter/crossSection ) / ( 48.*cos(alpha) * ( 41./9.*(1.+mat1->poisson) + 17./4.*pow(tan(alpha),2) ) );
-// std::cerr << kn << endl;;
-// std::cerr << kh << endl;;
+ TRVAR2( kn, kh );
k = 2. * ( mat1->lambdak*kh + (1-mat1->lambdak)*k );
Real F = k * DFValues[0](0);
Real mappingF = F/DFValues[0](1);
=== modified file 'pkg/dem/WirePM.hpp'
--- pkg/dem/WirePM.hpp 2011-04-18 08:00:23 +0000
+++ pkg/dem/WirePM.hpp 2011-07-29 02:38:16 +0000
@@ -43,7 +43,7 @@
void postLoad(WireMat&);
DECLARE_LOGGER;
YADE_CLASS_BASE_DOC_ATTRS_CTOR(WireMat,FrictMat,"Material for use with the Wire classes",
- ((Real,diameter,0.0027,," (Diameter of the single wire in [m] (the diameter is used to compute the cross-section area of the wire)."))
+ ((Real,diameter,0.0027,,"Diameter of the single wire in [m] (the diameter is used to compute the cross-section area of the wire)."))
((vector<Vector2r>,strainStressValues,,Attr::triggerPostLoad,"Piecewise linear definition of the stress-strain curve by set of points (strain[-]>0,stress[Pa]>0) for one single wire. Tension only is considered and the point (0,0) is not needed!"))
((bool,isDoubleTwist,false,,"Type of the mesh. If true two particles of the same material which body ids differ by one will be considered as double-twisted interaction."))
((Real,lambdaEps,0.4,,"Parameter between 0 and 1 to reduce the failure strain of the double-twisted wire (as used by [Bertrand2008]_). [-]"))
@@ -65,8 +65,8 @@
((Real,initD,0,,"Equilibrium distance for particles. Computed as the initial inter-particular distance when particle are linked."))
((bool,isLinked,false,,"If true particles are linked and will interact. Interactions are linked automatically by the definition of the corresponding interaction radius. The value is false if the wire breaks (no more interaction)."))
((bool,isDoubleTwist,false,,"If true the properties of the interaction will be defined as a double-twisted wire."))
- ((vector<Vector2r>,displForceValues,,(Attr::readonly|Attr::noSave),"Defines the values for force-displacement curve."))
- ((vector<Real>,stiffnessValues,,(Attr::readonly|Attr::noSave),"Defines the values for the different stiffness (first value corresponds to elastic stiffness kn)."))
+ ((vector<Vector2r>,displForceValues,,Attr::readonly,"Defines the values for force-displacement curve."))
+ ((vector<Real>,stiffnessValues,,Attr::readonly,"Defines the values for the different stiffness (first value corresponds to elastic stiffness kn)."))
((Real,plastD,0,Attr::readonly,"Plastic part of the inter-particular distance of the previous step. \n\n.. note::\n\t Only elastic displacements are reversible (the elastic stiffness is used for unloading) and compressive forces are inadmissible. The compressive stiffness is assumed to be equal to zero (see [Bertrand2005]_).\n\n.."))
((Real,limitNormalFactor,0.,,"This value indicates on how far from failing the wire is, e.g. actual normal displacement divided by admissible normal displacement multiplied by actual normal force divided by admissible normal force."))
,
=== modified file 'py/pack/pack.py'
--- py/pack/pack.py 2011-05-24 04:55:42 +0000
+++ py/pack/pack.py 2011-07-29 02:38:16 +0000
@@ -519,8 +519,8 @@
"""
# check input dimension
- if(xLength<mos): raise ValueError("xLength must be greather than mos!");
- if(yLength<2*a+b): raise ValueError("yLength must be greather than 2*a+b!");
+ if(xLength<mos): raise ValueError("xLength must be greater than mos!");
+ if(yLength<2*a+b): raise ValueError("yLength must be greater than 2*a+b!");
xstart = cornerCoord[0]
ystart = cornerCoord[1]
z = cornerCoord[2]