------------------------------------------------------------ revno: 2292 committer: Václav Šmilauer <[email protected]> branch nick: trunk timestamp: Wed 2010-06-16 18:39:17 +0200 message: 1. Remove dem6dof related classes 2. add a few more publications to the bibtex db modified: debian/control-template doc/publications.bib pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.hpp pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.cpp pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp pkg/dem/Engine/GlobalEngine/ElasticContactLaw.cpp pkg/dem/Engine/GlobalEngine/ElasticContactLaw.hpp py/utils.py scripts/test/periodic-shear.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 'debian/control-template' --- debian/control-template 2010-06-13 21:28:46 +0000 +++ debian/control-template 2010-06-16 16:39:17 +0000 @@ -2,7 +2,7 @@ Section: x11 Priority: optional Maintainer: Václav Šmilauer <[email protected]> -Build-Depends: debhelper (>= 5), scons, libqt3-mt-dev, qt3-dev-tools, freeglut3-dev, libboost-dev (>=1.35), libboost-date-time-dev (>=1.35), libboost-filesystem-dev (>=1.35), libboost-thread-dev (>=1.35), libboost-regex-dev (>=1.35), libboost-python-dev (>=1.35), libboost-iostreams-dev (>=1.35), libboost-program-options-dev, libboost-serialization-dev, liblog4cxx9-dev | liblog4cxx10-dev, docbook-to-man, ipython, libsqlite3-dev, libgts-dev, python-numpy, g++(>>4.0), libvtk5-dev, libgl1-mesa-dev, gdb, ipython, python-matplotlib, python-tk, libeigen2-dev @', libqglviewer-qt3-dev' if DISTRIBUTION!='hardy' else ''@ @', binutils-gold' if DISTRIBUTION not in ('hardy','intrepid','jaunty','lenny') else ''@ @', texlive-latex-recommended, texlive-latex-extra, lmodern, texlive-pictures, texlive-xetex, python-sphinx, python-bibtex' if DISTRIBUTION not in ('hardy','intrepid','jaunty','lenny') else ''@ +Build-Depends: debhelper (>= 5), scons, libqt3-mt-dev, qt3-dev-tools, freeglut3-dev, libboost-dev (>=1.35), libboost-date-time-dev (>=1.35), libboost-filesystem-dev (>=1.35), libboost-thread-dev (>=1.35), libboost-regex-dev (>=1.35), libboost-python-dev (>=1.35), libboost-iostreams-dev (>=1.35), libboost-program-options-dev, libboost-serialization-dev, liblog4cxx9-dev | liblog4cxx10-dev, docbook-to-man, ipython, libsqlite3-dev, libgts-dev, python-numpy, g++(>>4.0), libvtk5-dev, libgl1-mesa-dev, gdb, ipython, python-matplotlib, python-tk, libeigen2-dev @', libqglviewer-qt3-dev' if DISTRIBUTION!='hardy' else ''@ @', binutils-gold' if DISTRIBUTION not in ('hardy','intrepid','jaunty','lenny') else ''@ @', texlive-latex-recommended, texlive-latex-extra, lmodern, texlive-pictures, texlive-xetex, python-sphinx, python-bibtex, graphviz, dvipng' if DISTRIBUTION not in ('hardy','intrepid','jaunty','lenny') else ''@ Standards-Version: 3.7.2 Package: y...@_version@ === modified file 'doc/publications.bib' --- doc/publications.bib 2010-06-13 21:25:46 +0000 +++ doc/publications.bib 2010-06-16 16:39:17 +0000 @@ -1,7 +1,7 @@ @inproceedings{Stransky2010, title={Macroscopic elastic properties of particle models}, author={Jan Stránský and Milan Jirásek and Václav Šmilauer}, - booktitle={Proceedings of the Interaction Conference on Modelling and Simulation 2010, Prague}, + booktitle={Proceedings of the International Conference on Modelling and Simulation 2010, Prague}, year={2010}, month={June}, publisher={preprint}, @@ -87,3 +87,34 @@ pages={97-122}, } +...@article{jerier2010, + author = {Jerier, Jean-François and Richefeu, Vincent and Imbault, Didier and Donzé, Fréderic-Victor}, + doi = {10.1016/j.cma.2010.01.016}, + issn = {00457825}, + journal = {Computer Methods in Applied Mechanics and Engineering}, + title = {Packing spherical discrete elements for large scale simulations}, + year = {2010} +} + +...@article{jerier2009, + author = {Jerier, Jean-François and Imbault, Didier and Donzé, Fréederic-Victor and Doremus, Pierre}, + doi = {10.1007/s10035-008-0116-0}, + journal = {Granular Matter}, + year={2009}, + volume={11}, + title = {A geometric algorithm based on tetrahedral meshes to generate a dense polydisperse sphere packing}, +} + +...@article{harthong2009, + author = {Harthong, B. and Jerier, J. F. and Dorémus, P. and Imbault, D. and Donzé, F. V.}, + doi = {10.1016/j.ijsolstr.2009.05.008}, + issn = {00207683}, + journal = {International Journal of Solids and Structures}, + month = {September}, + number = {18-19}, + pages = {3357--3364}, + title = {Modeling of high-density compaction of granular materials by the Discrete Element Method}, + volume = {46}, + year = {2009} +} + === modified file 'pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp' --- pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp 2010-06-08 22:25:00 +0000 +++ pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp 2010-06-16 16:39:17 +0000 @@ -2,11 +2,11 @@ #include<yade/pkg-common/Sphere.hpp> #include<yade/core/Omega.hpp> -YADE_PLUGIN((Dem3DofGeom_SphereSphere)(Dem6DofGeom_SphereSphere) +YADE_PLUGIN((Dem3DofGeom_SphereSphere) #ifdef YADE_OPENGL (Gl1_Dem3DofGeom_SphereSphere) #endif - (Ig2_Sphere_Sphere_Dem3DofGeom)(Ig2_Sphere_Sphere_Dem6DofGeom)); + (Ig2_Sphere_Sphere_Dem3DofGeom)); Dem3DofGeom_SphereSphere::~Dem3DofGeom_SphereSphere(){} @@ -108,24 +108,6 @@ } -Dem6DofGeom_SphereSphere::~Dem6DofGeom_SphereSphere(){} - -Vector3r Dem6DofGeom_SphereSphere::relRotVector() const{ - // FIXME: this is not correct, as it assumes normal will not change (?) - Quaternionr relOri12=ori1.conjugate()*ori2; - Quaternionr oriDiff=initRelOri12.conjugate()*relOri12; - AngleAxisr aa(oriDiff); - if(aa.angle()>Mathr::PI)aa.angle()-=Mathr::TWO_PI; - // cerr<<axis<<";"<<angle<<";"<<ori1<<";"<<ori2<<";"<<oriDiff<<endl; - return aa.angle()*aa.axis(); -} - -void Dem6DofGeom_SphereSphere::bendTwistAbs(Vector3r& bend, Real& twist){ - const Vector3r& relRot=relRotVector(); - twist=relRot.dot(normal); - bend=relRot-twist*normal; -} - #ifdef YADE_OPENGL #include<yade/lib-opengl/OpenGLWrapper.hpp> @@ -223,19 +205,3 @@ return true; } -CREATE_LOGGER(Ig2_Sphere_Sphere_Dem6DofGeom); -bool Ig2_Sphere_Sphere_Dem6DofGeom::go(const shared_ptr<Shape>& cm1, const shared_ptr<Shape>& cm2, const State& state1, const State& state2, const Vector3r& shift2, const bool& force, const shared_ptr<Interaction>& c){ - bool hadIntrGeom=c->interactionGeometry; - if(!Ig2_Sphere_Sphere_Dem3DofGeom::go(cm1,cm2,state1,state2,shift2,force,c)) return false; - // HACK: dem3dof functor creates a dem3dof instance; we need to copy-construct dem6dof from it instead - // proper solution would be to factor out the computation part from the dem3dof to separate functions and call those from here, or make the dem3dof functor templated on the dem3dof/dem6dof - if(!hadIntrGeom){ - assert(c->interactionGeometry); - assert(c->interactionGeometry->getClassName()=="Dem3DofGeom_SphereSphere"); - const shared_ptr<Dem6DofGeom_SphereSphere> geom(new Dem6DofGeom_SphereSphere(*YADE_CAST<Dem3DofGeom_SphereSphere*>(c->interactionGeometry.get()))); - geom->initRelOri12=state1.ori.conjugate()*state2.ori; - c->interactionGeometry=geom; - //TRVAR3(geom->refLength,geom->contactPoint,geom->initRelOri12) - } - return true; -} === modified file 'pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.hpp' --- pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.hpp 2010-05-24 15:42:48 +0000 +++ pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.hpp 2010-06-16 16:39:17 +0000 @@ -46,21 +46,6 @@ }; REGISTER_SERIALIZABLE(Dem3DofGeom_SphereSphere); -class Dem6DofGeom_SphereSphere: public Dem3DofGeom_SphereSphere{ - public: - // return relative rotation, composed of both bend and twist - Vector3r relRotVector() const; - virtual void bendTwistAbs(Vector3r& bend, Real& twist); - virtual ~Dem6DofGeom_SphereSphere(); - Dem6DofGeom_SphereSphere(const Dem3DofGeom_SphereSphere& ss): Dem3DofGeom_SphereSphere(ss){ createIndex(); } - YADE_CLASS_BASE_DOC_ATTRS_CTOR(Dem6DofGeom_SphereSphere,Dem3DofGeom_SphereSphere,"Class representing 2 sphere in contact which computes 6 degrees of freedom (normal, shear, bending and twisting deformation)", - ((Quaternionr,initRelOri12,,"Initial relative orientation of spheres, used for bending and twisting computation.")), - /*ctor*/ createIndex(); - ); - REGISTER_CLASS_INDEX(Dem6DofGeom_SphereSphere,Dem3DofGeom_SphereSphere); -}; -REGISTER_SERIALIZABLE(Dem6DofGeom_SphereSphere); - #ifdef YADE_OPENGL #include<yade/pkg-common/GLDrawFunctors.hpp> class Gl1_Dem3DofGeom_SphereSphere:public GlInteractionGeometryFunctor{ @@ -93,13 +78,3 @@ }; REGISTER_SERIALIZABLE(Ig2_Sphere_Sphere_Dem3DofGeom); -class Ig2_Sphere_Sphere_Dem6DofGeom: public Ig2_Sphere_Sphere_Dem3DofGeom{ - public: - virtual bool go(const shared_ptr<Shape>& cm1, const shared_ptr<Shape>& cm2, const State& state1, const State& state2, const Vector3r& shift2, const bool& force, const shared_ptr<Interaction>& c); - virtual bool goReverse( const shared_ptr<Shape>&, const shared_ptr<Shape>&, const State&, const State&, const Vector3r& shift2, const bool& force, const shared_ptr<Interaction>&){throw runtime_error("goReverse on symmetric functor should never be called!");} - FUNCTOR2D(Sphere,Sphere); - DEFINE_FUNCTOR_ORDER_2D(Sphere,Sphere); - YADE_CLASS_BASE_DOC(Ig2_Sphere_Sphere_Dem6DofGeom,Ig2_Sphere_Sphere_Dem3DofGeom,"Create/update contact of 2 spheres with 6 DOFs (:yref:`Dem6DofGeom_SphereSphere` instance) [experimental]"); - DECLARE_LOGGER; -}; -REGISTER_SERIALIZABLE(Ig2_Sphere_Sphere_Dem6DofGeom); === modified file 'pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.cpp' --- pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.cpp 2010-01-24 16:27:40 +0000 +++ pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.cpp 2010-06-16 16:39:17 +0000 @@ -1,6 +1,5 @@ #include"DemXDofGeom.hpp" -YADE_PLUGIN((GenericSpheresContact)(Dem3DofGeom)(Dem6DofGeom)); +YADE_PLUGIN((GenericSpheresContact)(Dem3DofGeom)); Real Dem3DofGeom::displacementN(){throw;} Dem3DofGeom::~Dem3DofGeom(){} -Dem6DofGeom::~Dem6DofGeom(){} GenericSpheresContact::~GenericSpheresContact(){} === modified file 'pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp' --- pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp 2010-05-20 18:39:42 +0000 +++ pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp 2010-06-16 16:39:17 +0000 @@ -55,16 +55,4 @@ }; REGISTER_SERIALIZABLE(Dem3DofGeom); -#if 1 -/*! Abstract class for providing torsion and bending, in addition to inherited normal and shear strains. */ -class Dem6DofGeom: public Dem3DofGeom { - public: - //! rotations perpendicular to the normal (bending; in global coords) and parallel with the normal (torsion) - virtual void bendTwistAbs(Vector3r& bend, Real& twist) {throw std::logic_error("bendTwistAbs not overridden in derived class.");}; - void bendTwistRel(Vector3r& bend, Real& twist){ bendTwistAbs(bend,twist); bend/=refLength; twist/=refLength;} - virtual ~Dem6DofGeom(); - YADE_CLASS_BASE_DOC(Dem6DofGeom,Dem3DofGeom,"Abstract class for providing torsion and bending, in addition to inherited normal and shear strains."); -}; -REGISTER_SERIALIZABLE(Dem6DofGeom); -#endif === modified file 'pkg/dem/Engine/GlobalEngine/ElasticContactLaw.cpp' --- pkg/dem/Engine/GlobalEngine/ElasticContactLaw.cpp 2010-05-28 09:35:32 +0000 +++ pkg/dem/Engine/GlobalEngine/ElasticContactLaw.cpp 2010-06-16 16:39:17 +0000 @@ -14,7 +14,7 @@ #include<yade/core/Scene.hpp> #include<yade/core/Scene.hpp> -YADE_PLUGIN((Law2_ScGeom_FrictPhys_Basic)(Law2_Dem3DofGeom_FrictPhys_Basic)(ElasticContactLaw)(Law2_Dem6DofGeom_FrictPhys_Beam)); +YADE_PLUGIN((Law2_ScGeom_FrictPhys_Basic)(Law2_Dem3DofGeom_FrictPhys_Basic)(ElasticContactLaw)); Real Law2_ScGeom_FrictPhys_Basic::Real0=0; Real Law2_ScGeom_FrictPhys_Basic::getPlasticDissipation() {return (Real) plasticDissipation;} @@ -137,20 +137,3 @@ applyForceAtContactPoint(phys->normalForce+trialFs,geom->contactPoint,contact->getId1(),geom->se31.position,contact->getId2(),geom->se32.position,scene); } -// same as elasticContactLaw, but using Dem3DofGeom -void Law2_Dem6DofGeom_FrictPhys_Beam::go(shared_ptr<InteractionGeometry>& ig, shared_ptr<InteractionPhysics>& ip, Interaction* contact, Scene* scene){ - // normal & shear forces - Dem6DofGeom* geom=static_cast<Dem6DofGeom*>(ig.get()); - FrictPhys* phys=static_cast<FrictPhys*>(ip.get()); - Real displN=geom->displacementN(); - phys->normalForce=phys->kn*displN*geom->normal; - phys->shearForce=phys->ks*geom->displacementT(); - applyForceAtContactPoint(phys->normalForce+phys->shearForce,geom->contactPoint,contact->getId1(),geom->se31.position,contact->getId2(),geom->se32.position,scene); - // bend&twist: - Vector3r bend; Real twist; - geom->bendTwistAbs(bend,twist); - Vector3r tt=bend*phys->kn+geom->normal*twist*phys->kn; - cerr<<twist<<";"<<bend<<endl; - scene->forces.addTorque(contact->getId1(),tt); - scene->forces.addTorque(contact->getId2(),-tt); -} === modified file 'pkg/dem/Engine/GlobalEngine/ElasticContactLaw.hpp' --- pkg/dem/Engine/GlobalEngine/ElasticContactLaw.hpp 2010-05-26 08:18:36 +0000 +++ pkg/dem/Engine/GlobalEngine/ElasticContactLaw.hpp 2010-06-16 16:39:17 +0000 @@ -51,15 +51,6 @@ }; REGISTER_SERIALIZABLE(Law2_Dem3DofGeom_FrictPhys_Basic); -/* Class for demonstrating beam-like behavior of the contact (normal, shear, bend and twist) */ -class Law2_Dem6DofGeom_FrictPhys_Beam: public LawFunctor{ - public: - virtual void go(shared_ptr<InteractionGeometry>& _geom, shared_ptr<InteractionPhysics>& _phys, Interaction* I, Scene*); - FUNCTOR2D(Dem6DofGeom,FrictPhys); - YADE_CLASS_BASE_DOC(Law2_Dem6DofGeom_FrictPhys_Beam,LawFunctor,"Class for demonstrating beam-like behavior of contact (normal, shear, bend and twist) [broken][experimental]"); -}; -REGISTER_SERIALIZABLE(Law2_Dem6DofGeom_FrictPhys_Beam); - class ElasticContactLaw : public GlobalEngine{ shared_ptr<Law2_ScGeom_FrictPhys_Basic> functor; public : === modified file 'py/utils.py' --- py/utils.py 2010-05-19 21:05:54 +0000 +++ py/utils.py 2010-06-16 16:39:17 +0000 @@ -323,7 +323,7 @@ if wallMask&32: ret+=doWall(E,H,G,F) return ret -def facetCylinder(center,radius,height,orientation=[1,0,0,0],segmentsNumber=10,wallMask=7,closed=1,**kw): +def facetCylinder(center,radius,height,orientation=Quaternion.Identity,segmentsNumber=10,wallMask=7,closed=1,**kw): """ Create arbitrarily-aligned cylinder composed of facets, with given center, radius, height and orientation. Return List of facets forming the cylinder; @@ -367,10 +367,9 @@ Y=radius*math.sin(i) P1.append(Vector3(X,Y,-height/2)) P2.append(Vector3(X,Y,+height/2)) - qTemp = Quaternion(Vector3(orientation[0],orientation[1],orientation[2]),orientation[3]) for i in range(0,len(P1)): - P1[i]=qTemp.Rotate(P1[i])+Vector3(center[0],center[1],center[2]) - P2[i]=qTemp.Rotate(P2[i])+Vector3(center[0],center[1],center[2]) + P1[i]=orientation*(P1[i])+Vector3(center[0],center[1],center[2]) + P2[i]=orientation*(P2[i])+Vector3(center[0],center[1],center[2]) ret=[] for i in range(2,len(P1)): === modified file 'scripts/test/periodic-shear.py' --- scripts/test/periodic-shear.py 2010-01-10 09:09:32 +0000 +++ scripts/test/periodic-shear.py 2010-06-16 16:39:17 +0000 @@ -32,8 +32,7 @@ O.step() O.saveTmp() rdr=yade.qt.Renderer() -#rdr['Body_bounding_volume']=True -rdr['intrAllWire']=True +rdr.intrAllWire=True #from yade import log #import yade.qt,time #v=yade.qt.View()
_______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

