← Back to team overview

yade-dev team mailing list archive

Re: [Branch ~yade-dev/yade/trunk] Rev 2950: remove unused bool "is2D".

 

Hi Bruno,

this or previous commit breaks "--test".
==============
FAIL: SpherePack_toSimulation (yade.pack)
Doctest: yade.pack.SpherePack_toSimulation
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/doctest.py", line 2166, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for yade.pack.SpherePack_toSimulation

==============
The buildbot is not working these days.
Please, have a look.

Thanks

Anton




On Mon, Oct 31, 2011 at 7:07 PM,  <noreply@xxxxxxxxxxxxx> wrote:
> ------------------------------------------------------------
> revno: 2950
> committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
> branch nick: trunk
> timestamp: Mon 2011-10-31 19:05:09 +0100
> message:
>  remove unused bool "is2D".
> modified:
>  pkg/dem/SpherePack.cpp
>
>
> --
> 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/SpherePack.cpp'
> --- pkg/dem/SpherePack.cpp      2011-10-31 17:43:05 +0000
> +++ pkg/dem/SpherePack.cpp      2011-10-31 18:05:09 +0000
> @@ -87,7 +87,6 @@
>        static boost::variate_generator<boost::minstd_rand&, boost::uniform_real<Real> > rnd(randGen, boost::uniform_real<Real>(0,1));
>        vector<Real> psdRadii; // holds plain radii (rather than diameters), scaled down in some situations to get the target number
>        vector<Real> psdCumm2; // psdCumm but dimensionally transformed to match mass distribution
> -       bool is2D = false;// Are we generating spheres alligned on a plane?
>        Vector3r size;
>        bool hSizeFound =(hSize!=Matrix3r::Zero());//is hSize passed to the function?
>        if (!hSizeFound) {size=mx-mn; hSize=size.asDiagonal();}
> @@ -104,14 +103,11 @@
>                mode=RDIST_NUM;
>                // the term (1+rRelFuzz²) comes from the mean volume for uniform distribution : Vmean = 4/3*pi*Rmean*(1+rRelFuzz²)
>                if (volume) rMean=pow(volume*(1-porosity)/(Mathr::PI*(4/3.)*(1+rRelFuzz*rRelFuzz)*num),1/3.);
> -               else //The volume is null, we will generate a 2D packing with the following rMean
> -               {
> -                       is2D=true;
> +               else {//The volume is null, we will generate a 2D packing with the following rMean
>                        size=mx-mn;
>                        Real area=abs(size[0]*size[2]+size[0]*size[1]+size[1]*size[2]);//2 terms will be null if one coordinate is 0, the other is the area
>                        if (!area) throw invalid_argument("The box defined as null volume AND null surface. Define at least maxCorner of the box, or hSize if periodic.");
> -                       rMean=pow(area*(1-porosity)/(Mathr::PI*(1+rRelFuzz*rRelFuzz)*num),0.5);
> -               }
> +                       rMean=pow(area*(1-porosity)/(Mathr::PI*(1+rRelFuzz*rRelFuzz)*num),0.5); }
>        }
>        if(psdSizes.size()>0){
>                err=(mode>=0); mode=RDIST_PSD;
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev
> Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp
>
>


References