[Yade-dev] [svn] r1898 - trunk/scripts
Author: gladky_anton Date: 2009-07-29 10:00:56 +0200 (Wed, 29 Jul 2009) New Revision: 1898 Modified: trunk/scripts/simple-scene-graph.py trunk/scripts/simple-scene-player.py Log: 1. Updated simple-scene-graph.py according to a new syntax 2. Updated simple-scene-video.py according to a new syntax Modified: trunk/scripts/simple-scene-graph.py === --- trunk/scripts/simple-scene-graph.py 2009-07-28 22:43:38 UTC (rev 1897) +++ trunk/scripts/simple-scene-graph.py 2009-07-29 08:00:56 UTC (rev 1898) @@ -2,8 +2,8 @@ # -*- encoding=utf-8 -*- O.initializers=[ - MetaEngine('BoundingVolumeMetaEngine',[EngineUnit('InteractingSphere2AABB'),EngineUnit('InteractingBox2AABB'),EngineUnit('MetaInteractingGeometry2AABB')]) - ] + BoundingVolumeMetaEngine([InteractingSphere2AABB(),InteractingBox2AABB(),MetaInteractingGeometry2AABB()]) +] O.engines=[ BexResetter(), BoundingVolumeMetaEngine([InteractingSphere2AABB(),InteractingBox2AABB(),MetaInteractingGeometry2AABB()]), Modified: trunk/scripts/simple-scene-player.py === --- trunk/scripts/simple-scene-player.py2009-07-28 22:43:38 UTC (rev 1897) +++ trunk/scripts/simple-scene-player.py2009-07-29 08:00:56 UTC (rev 1898) @@ -1,30 +1,24 @@ #!/usr/local/bin/yade-trunk -x # -*- encoding=utf-8 -*- - -o=Omega() +o=Omega() o.initializers=[ - MetaEngine('BoundingVolumeMetaEngine',[EngineUnit('InteractingSphere2AABB'),EngineUnit('InteractingBox2AABB'),EngineUnit('MetaInteractingGeometry2AABB')]) - ] + BoundingVolumeMetaEngine([InteractingSphere2AABB(),InteractingBox2AABB(),MetaInteractingGeometry2AABB()]) +] o.engines=[ - StandAloneEngine('PhysicalActionContainerReseter'), - MetaEngine('BoundingVolumeMetaEngine',[ - EngineUnit('InteractingSphere2AABB'), - EngineUnit('InteractingBox2AABB'), - EngineUnit('MetaInteractingGeometry2AABB') - ]), - StandAloneEngine('PersistentSAPCollider'), - MetaEngine('InteractionGeometryMetaEngine',[ - EngineUnit('InteractingSphere2InteractingSphere4SpheresContactGeometry'), - EngineUnit('InteractingBox2InteractingSphere4SpheresContactGeometry') - ]), - MetaEngine('InteractionPhysicsMetaEngine',[EngineUnit('SimpleElasticRelationships')]), - StandAloneEngine('ElasticContactLaw'), - DeusExMachina('GravityEngine',{'gravity':[0,0,-9.81]}), + BexResetter(), + BoundingVolumeMetaEngine([InteractingSphere2AABB(),InteractingBox2AABB(),MetaInteractingGeometry2AABB()]), + InsertionSortCollider(), + InteractionDispatchers( + [InteractingSphere2InteractingSphere4SpheresContactGeometry(),InteractingBox2InteractingSphere4SpheresContactGeometry()], + [SimpleElasticRelationships()], + [ef2_Spheres_Elastic_ElasticLaw()] + ), + GravityEngine(gravity=(0,0,-9.81)), NewtonsDampedLaw(damping=.2), ### ### NOTE this extra engine. ### - StandAloneEngine('SQLiteRecorder',{'recorders':['se3','rgb'],'dbFile':'/tmp/player.sqlite','iterPeriod':50}) + SQLiteRecorder(recorders=['se3','rgb'],dbFile='/tmp/player.sqlite',iterPeriod=50) ] from yade import utils o.bodies.append(utils.box(center=[0,0,0],extents=[.5,.5,.5],dynamic=False,color=[1,0,0],young=30e9,poisson=.3,density=2400)) ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [svn] r1899 - in trunk/pkg: common/Engine/StandAloneEngine dem/PreProcessor
Author: eudoxos Date: 2009-07-29 10:04:35 +0200 (Wed, 29 Jul 2009) New Revision: 1899 Modified: trunk/pkg/common/Engine/StandAloneEngine/InsertionSortCollider.cpp trunk/pkg/dem/PreProcessor/TriaxialTest.cpp Log: 1. Hopefully fix https://bugs.launchpad.net/yade/+bug/402098 2. Fast in TriaxialTest uses nBins==5 and binCoeff==2 for VelocityBins Modified: trunk/pkg/common/Engine/StandAloneEngine/InsertionSortCollider.cpp === --- trunk/pkg/common/Engine/StandAloneEngine/InsertionSortCollider.cpp 2009-07-29 08:00:56 UTC (rev 1898) +++ trunk/pkg/common/Engine/StandAloneEngine/InsertionSortCollider.cpp 2009-07-29 08:04:35 UTC (rev 1899) @@ -216,20 +216,35 @@ // skip bodies without bbox since we would possibly never meet the upper bound again (std::sort may not be stable) and we don't want to collide those anyway if(!(V[i].flags.isMin V[i].flags.hasBB)) continue; const body_id_t iid=V[i].id; + /* If std::sort swaps equal min/max bounds, there are 2 cases distinct cases to handle: + + 1. i is inside V, j gets to the end of V (since it loops till the maxbound is found) + here, we swap min/max to get the in the right order and continue with the loop over i; + next time this j-bound is handled (with a different i, for sure), it will be OK. + 2. i is at the end of V, therefore (j=i+1)==2*nBodies, therefore V[j] doesn't exist (past the end) + here, we can just check for that and break the loop if it happens. + It is the last i that we process, nothing will come after. + + NOTE: XX,YY,ZZ containers don't guarantee that i_mini_max. This is needed only here and is + handled only for the sortAxis. Functionality-wise, this has no impact on further collision + detection, though. + */ // TRVAR3(i,iid,V[i].coord); // go up until we meet the upper bound - for(size_t j=i+1; V[j].id!=iid; j++){ + for(size_t j=i+1; V[j].id!=iid /* handle case 2. of swapped min/max */ j2*nBodies; j++){ const body_id_t jid=V[j].id; /// Not sure why this doesn't work. If this condition is commented out, we have exact same interactions as from SpatialQuickSort. Otherwise some interactions are missing! // skip bodies with smaller (arbitrary, could be greater as well) id, since they will detect us when their turn comes //if(jidiid) { /* LOG_TRACE(Skip #V[j].id(V[j].flags.isMin?(min):(max)) with iid (smaller id)); */ continue; } + // take 2 of the same condition (only handle collision [min_i..max_i]+min_j, not [min_i..max_i]+min_i (symmetric) + if(!V[j].flags.isMin) continue; /* abuse the same function here; since it does spatial overlap check first, it is OK to use it */ handleBoundInversion(iid,jid,interactions,rb); // now we are at the last element, but we still have not met the upper bound of V[i].id // that means that the upper bound is before the upper one; that can only happen if they // are equal and the unstable std::sort has swapped them. In that case, we need to go reverse // from V[i] until we meet the upper bound and swap the isMin flag - if(j==2*nBodies-1){ + if(j==2*nBodies-1){ /* handle case 1. of swapped min/max */ size_t k=i-1; while(V[k].id!=iid k0) k--; assert(V[k].id==iid); // if this fails, we didn't meet the other bound in the downwards sense either; that should never happen Modified: trunk/pkg/dem/PreProcessor/TriaxialTest.cpp === --- trunk/pkg/dem/PreProcessor/TriaxialTest.cpp 2009-07-29 08:00:56 UTC (rev 1898) +++ trunk/pkg/dem/PreProcessor/TriaxialTest.cpp 2009-07-29 08:04:35 UTC (rev 1899) @@ -573,6 +573,7 @@
Re: [Yade-dev] [svn] r1898 - trunk/scripts
__ [ENG] Best Regards [GER] Mit freundlichen Grüßen [RUS] С наилучшими пожеланиями [UKR] З найкращими побажаннями Anton Gladkyy simple-scene-player.py updated, not simple-scene-video.py. Vaclav, could you not check qt.py, it seems there SnapshotEngine has an old syntax. Not sure how to fix it. Also simple-scene-player.py has also an old syntax. 2009/7/29 gladky_an...@mail.berlios.de Author: gladky_anton Date: 2009-07-29 10:00:56 +0200 (Wed, 29 Jul 2009) New Revision: 1898 Modified: trunk/scripts/simple-scene-graph.py trunk/scripts/simple-scene-player.py Log: 1. Updated simple-scene-graph.py according to a new syntax 2. Updated simple-scene-video.py according to a new syntax ___ Mailing list: https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] old/new python syntax
simple-scene-player.py updated, not simple-scene-video.py. Vaclav, could you not check qt.py, it seems there SnapshotEngine has an old syntax. Not sure how to fix it. Also simple-scene-player.py has also an old syntax. Hi, the old syntax was RootClass(ClassName,{'attr1':value1,'attr2':value2,...}) and the new one is (straightforward translation) ClassName(attr1=value1,attr2=value2,...) Thanks for your work on that, I will fix qt.py. Vaclav ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [svn] r1900 - in trunk: core gui/qt3 scripts
Author: eudoxos Date: 2009-07-29 10:23:29 +0200 (Wed, 29 Jul 2009) New Revision: 1900 Modified: trunk/core/yade.cpp trunk/gui/qt3/SnapshotEngine.cpp trunk/gui/qt3/SnapshotEngine.hpp trunk/gui/qt3/qt.py trunk/scripts/simple-scene-video.py Log: 1. Fix SnapshotEngine and simple-scene-video.py to run. It doesn't work, though, because of the makeCurrent() failed error (probably getting snapshot from another thread...) Modified: trunk/core/yade.cpp === --- trunk/core/yade.cpp 2009-07-29 08:04:35 UTC (rev 1899) +++ trunk/core/yade.cpp 2009-07-29 08:23:29 UTC (rev 1900) @@ -256,7 +256,9 @@ LOG_INFO(Loading yadeConfigFile.string()); IOFormatManager::loadFromFile(XMLFormatManager,yadeConfigFile.string(),preferences,Omega::instance().preferences); - LOG_INFO(Loading plugins); Omega::instance().scanPlugins(string(PREFIX /lib/yade SUFFIX /plugins )); + LOG_INFO(Loading plugins); + Omega::instance().scanPlugins(string(PREFIX /lib/yade SUFFIX /plugins )); + Omega::instance().scanPlugins(string(PREFIX /lib/yade SUFFIX /gui )); Omega::instance().init(); Omega::instance().setSimulationFileName(simulationFileName); //init() resets to ; Modified: trunk/gui/qt3/SnapshotEngine.cpp === --- trunk/gui/qt3/SnapshotEngine.cpp2009-07-29 08:04:35 UTC (rev 1899) +++ trunk/gui/qt3/SnapshotEngine.cpp2009-07-29 08:23:29 UTC (rev 1900) @@ -2,6 +2,7 @@ #includesstream #includeiomanip CREATE_LOGGER(SnapshotEngine); +YADE_PLUGIN(SnapshotEngine); void SnapshotEngine::action(MetaBody* rb){ shared_ptrGLViewer glv; if(!YadeQtMainWindow::self || ((size_t)viewNo=YadeQtMainWindow::self-glViews.size()) || !(glv=YadeQtMainWindow::self-glViews[viewNo])){ @@ -15,4 +16,3 @@ savedSnapshots.push_back(fss.str()); usleep((long)(msecSleep*1000)); } - Modified: trunk/gui/qt3/SnapshotEngine.hpp === --- trunk/gui/qt3/SnapshotEngine.hpp2009-07-29 08:04:35 UTC (rev 1899) +++ trunk/gui/qt3/SnapshotEngine.hpp2009-07-29 08:23:29 UTC (rev 1900) @@ -1,5 +1,4 @@ #pragma once -#includeyade/core/StandAloneEngine.hpp #includeyade/gui-qt3/GLViewer.hpp #includeyade/gui-qt3/YadeQtMainWindow.hpp #includeyade/pkg-common/PeriodicEngines.hpp Modified: trunk/gui/qt3/qt.py === --- trunk/gui/qt3/qt.py 2009-07-29 08:04:35 UTC (rev 1899) +++ trunk/gui/qt3/qt.py 2009-07-29 08:23:29 UTC (rev 1900) @@ -22,19 +22,17 @@ See makePlayerVideo for more documentation. import os - from yade import utils,wrapper - o=wrapper.Omega() # create primary view if none if len(views())==0: View() # remove existing SnaphotEngines - se=wrapper.StandAloneEngine('SnapshotEngine',{'iterPeriod':iterPeriod,'realPeriod':realPeriod,'virtPeriod':virtPeriod,'fileBase':os.tmpnam(),'ignoreErrors':False,'viewNo':viewNo,'msecSleep':msecSleep}) - origEngines=o.engines; o.engines=[e for e in o.engines if e.name!='SnapshotEngine']+[se] - o.run(); o.wait(); + se=SnapshotEngine(iterPeriod=iterPeriod,realPeriod=realPeriod,virtPeriod=virtPeriod,fileBase=os.tmpnam(),ignoreErrors=False,viewNo=viewNo,msecSleep=msecSleep) + origEngines=O.engines; O.engines=[e for e in O.engines if e.name!='SnapshotEngine']+[se] + O.run(); O.wait(); wildcard=se['fileBase']+'%04d.png' print Number of frames:,len(se['savedSnapshots']) utils.encodeVideoFromFrames(wildcard,output,renameNotOverwrite=True,fps=fps) for f in se['savedSnapshots']: os.remove(f) - o.engines=origEngines + O.engines=origEngines def makePlayerVideo(playerDb,out,viewerState=None,dispParamsNo=-1,stride=1,fps=24,postLoadHook=None,startWait=False): Modified: trunk/scripts/simple-scene-video.py === --- trunk/scripts/simple-scene-video.py 2009-07-29 08:04:35 UTC (rev 1899) +++ trunk/scripts/simple-scene-video.py 2009-07-29 08:23:29 UTC (rev 1900) @@ -1,35 +1,26 @@ #!/usr/local/bin/yade-trunk -x # -*- encoding=utf-8 -*- -o=Omega() -o.initializers=[ - MetaEngine('BoundingVolumeMetaEngine',[EngineUnit('InteractingSphere2AABB'),EngineUnit('InteractingBox2AABB'),EngineUnit('MetaInteractingGeometry2AABB')]) - ] -o.engines=[ - StandAloneEngine('PhysicalActionContainerReseter'), - MetaEngine('BoundingVolumeMetaEngine',[ - EngineUnit('InteractingSphere2AABB'), - EngineUnit('InteractingBox2AABB'), - EngineUnit('MetaInteractingGeometry2AABB') - ]), - StandAloneEngine('PersistentSAPCollider'), - MetaEngine('InteractionGeometryMetaEngine',[ -
[Yade-dev] BZR migration
I propose to migrate to BZR on Launchpad after 0.20.0 release. Doing that, we will be able to refuse from Berlios.de. __ [ENG] Best Regards [GER] Mit freundlichen Grüßen [RUS] С наилучшими пожеланиями [UKR] З найкращими побажаннями Anton Gladkyy ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [svn] r1901 - in trunk: . gui/qt3 py
Author: eudoxos Date: 2009-07-29 11:17:45 +0200 (Wed, 29 Jul 2009) New Revision: 1901 Modified: trunk/SConstruct trunk/gui/qt3/GLViewer.cpp trunk/gui/qt3/GLViewer.hpp trunk/gui/qt3/SnapshotEngine.cpp trunk/gui/qt3/qt.py trunk/py/utils.py Log: 1. Add GLViewer::nextFrameSnapshotFilename to save frame in postDraw 2. Adjust SnapshotEngine to take advantage of that. This should solve https://bugs.launchpad.net/yade/+bug/396023 3. utils.encodeVideoFromFrames can take list of files (instead of just wildcard). Backwards-compatible. 4. scons doc skips debian/ directory (would mess up if deb package was build) Modified: trunk/SConstruct === --- trunk/SConstruct2009-07-29 08:23:29 UTC (rev 1900) +++ trunk/SConstruct2009-07-29 09:17:45 UTC (rev 1901) @@ -210,7 +210,7 @@ else: print Nothing to clean: %s.%buildDir sys.argv.remove('clean') if 'tags' in sys.argv: - cmd=ctags -R --extra=+q --fields=+n --exclude='.*' --exclude=doc --exclude=scons-local --exclude=include --exclude='*.so' --langmap=c++:+.inl,c++:+.tpp,c++:+.ipp + cmd=ctags -R --extra=+q --fields=+n --exclude='.*' --exclude=doc --exclude=scons-local --exclude=include --exclude=debian --exclude='*.so' --langmap=c++:+.inl,c++:+.tpp,c++:+.ipp print cmd; os.system(cmd) sys.argv.remove('tags') if 'doc' in sys.argv: Modified: trunk/gui/qt3/GLViewer.cpp === --- trunk/gui/qt3/GLViewer.cpp 2009-07-29 08:23:29 UTC (rev 1900) +++ trunk/gui/qt3/GLViewer.cpp 2009-07-29 09:17:45 UTC (rev 1901) @@ -606,6 +606,12 @@ } } QGLViewer::postDraw(); + if(!nextFrameSnapshotFilename.empty()){ + // save the snapshot + saveSnapshot(QString(nextFrameSnapshotFilename),/*overwrite*/ true); + // notify the caller that it is done already (probably not an atomic op :-|, though) + nextFrameSnapshotFilename.clear(); + } } string GLViewer::getRealTimeString(){ Modified: trunk/gui/qt3/GLViewer.hpp === --- trunk/gui/qt3/GLViewer.hpp 2009-07-29 08:23:29 UTC (rev 1900) +++ trunk/gui/qt3/GLViewer.hpp 2009-07-29 09:17:45 UTC (rev 1901) @@ -89,6 +89,10 @@ void initFromDOMElement(const QDomElement element); int viewId; + // if defined, snapshot will be saved to this file right after being drawn and the string will be reset. + // this way the caller will be notified of the frame being saved successfully. + string nextFrameSnapshotFilename; + boost::posix_time::ptime getLastUserEvent(); Modified: trunk/gui/qt3/SnapshotEngine.cpp === --- trunk/gui/qt3/SnapshotEngine.cpp2009-07-29 08:23:29 UTC (rev 1900) +++ trunk/gui/qt3/SnapshotEngine.cpp2009-07-29 09:17:45 UTC (rev 1901) @@ -12,7 +12,14 @@ ostringstream fss; fssfileBasesetw(4)setfill('0')counter++.png; LOG_DEBUG(GL view #viewNo → fss.str()) glv-setSnapshotFormat(PNG); - glv-saveSnapshot(QString(fss.str()),/*overwrite*/ true); + glv-nextFrameSnapshotFilename=fss.str(); + // wait for the renderer to save the frame (will happen at next postDraw) + timespec t1,t2; t1.tv_sec=0; t1.tv_nsec=1000; /* 10 ms */ + long waiting=0; + while(!glv-nextFrameSnapshotFilename.empty()){ + nanosleep(t1,t2); + if(((++waiting) % 1000)==0) LOG_WARN(Already waiting waiting/100s for snapshot to be saved. Something went wrong?); + } savedSnapshots.push_back(fss.str()); usleep((long)(msecSleep*1000)); } Modified: trunk/gui/qt3/qt.py === --- trunk/gui/qt3/qt.py 2009-07-29 08:23:29 UTC (rev 1900) +++ trunk/gui/qt3/qt.py 2009-07-29 09:17:45 UTC (rev 1901) @@ -22,6 +22,7 @@ See makePlayerVideo for more documentation. import os + from yade import utils # create primary view if none if len(views())==0: View() # remove existing SnaphotEngines Modified: trunk/py/utils.py === --- trunk/py/utils.py 2009-07-29 08:23:29 UTC (rev 1900) +++ trunk/py/utils.py 2009-07-29 09:17:45 UTC (rev 1901) @@ -331,14 +331,29 @@ o.bodies[i].shape['diffuseColor']=color return imported -def encodeVideoFromFrames(wildcard,out,renameNotOverwrite=True,fps=24): - import pygst,sys,gobject,os +def encodeVideoFromFrames(frameSpec,out,renameNotOverwrite=True,fps=24): + Create .ogg video from external image files. + + @param frameSpec If string, wildcard in
Re: [Yade-dev] BZR migration
Anton Gladky said: (by the date of Wed, 29 Jul 2009 10:36:05 +0200) I propose to migrate to BZR on Launchpad after 0.20.0 release. Doing that, we will be able to refuse from Berlios.de. we tried to migrate once. The problem was an insanely long first checkout and huge amount of used disk space. Does this problem is still present in BZR ? Also see: https://lists.launchpad.net/yade-dev/msg00163.html Two years passed since then, so BZR should have improved now. -- Janek Kozicki | ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] build order (random) problem
This error occurs randomly, I've been hit by it several times. This mostly happens when demoing yade to someone ;) Make a fresh checkout, then built with lots of jobs (for example jobs=8). And there's a 50% chance that you will get this build error: yade/gui-qt3/SimulationController.hpp:22 error:QtGeneratedSimulationController.h: No such file or directory When you invoke scons second time - it will just work. This problem occurs because sometimes SimulationController.hpp is included compiled *before* the file QtGeneratedSimulationController.h had a chance to be generated. Of course on second build it is already generated, so the second time it works. Vaclav can you think of adding some preconditioning/dependency which would make sure that QtGeneratedSimulationController.h is generated before compiling a file that wants to include it? The same applies to all QtGenerated* files in fact. -- Janek Kozicki | ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] BZR migration
We can just to try. But Canonical seems improves their services all the time. __ [ENG] Best Regards [GER] Mit freundlichen Grüßen [RUS] С наилучшими пожеланиями [UKR] З найкращими побажаннями Anton Gladkyy 2009/7/29 Janek Kozicki janek_li...@wp.pl Anton Gladky said: (by the date of Wed, 29 Jul 2009 10:36:05 +0200) I propose to migrate to BZR on Launchpad after 0.20.0 release. Doing that, we will be able to refuse from Berlios.de. we tried to migrate once. The problem was an insanely long first checkout and huge amount of used disk space. Does this problem is still present in BZR ? Also see: https://lists.launchpad.net/yade-dev/msg00163.html Two years passed since then, so BZR should have improved now. -- Janek Kozicki | ___ Mailing list: https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] BZR migration
we tried to migrate once. The problem was an insanely long first checkout and huge amount of used disk space. Does this problem is still present in BZR ? Also see: https://lists.launchpad.net/yade-dev/msg00163.html Two years passed since then, so BZR should have improved now. The initial full checkout is quite fast if you get the full history (say a few minutes, depending on your connection; the very low speed was caused by many roundtrips), which takes something like 40MB on the disk (just guessing, as there is only a part of history in at the launchpad mirror branch). Then, all operations (like diff) are local and run fast. If you do a shallow checkout (just the latest version), it is very fast. On the other hand, all commands on the branch depend on access to the repository (including diff); speaking of myself, I use this only before commit to check what everything changes, so no big deal. There is a feature called history horizons in development, that will allow you to get just a few version's history; that would be best for us, but it is not yet available (maybe in a few months?). For my part, what I find the most compelling is the ability to commit locally (and revert etc), so you can save snapshots of your work and push to the shared repository only once everything works. Handling renames and moves is more intelligent. And we would have most things at launchpad, which would allos us to easily have separate branch for a release backporting some fixes and so on. Brnching is very powerful concept and bzr is nice that it allows you to have decentralized workflow, but also centralized (svn-like) one if you want so. Vaclav ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] BZR migration
So, what decision we accept? Do we switch to BZR? __ [ENG] Best Regards [GER] Mit freundlichen Grüßen [RUS] С наилучшими пожеланиями [UKR] З найкращими побажаннями Anton Gladkyy 2009/7/29 Václav Šmilauer eudo...@arcig.cz we tried to migrate once. The problem was an insanely long first checkout and huge amount of used disk space. Does this problem is still present in BZR ? Also see: https://lists.launchpad.net/yade-dev/msg00163.html Two years passed since then, so BZR should have improved now. The initial full checkout is quite fast if you get the full history (say a few minutes, depending on your connection; the very low speed was caused by many roundtrips), which takes something like 40MB on the disk (just guessing, as there is only a part of history in at the launchpad mirror branch). Then, all operations (like diff) are local and run fast. If you do a shallow checkout (just the latest version), it is very fast. On the other hand, all commands on the branch depend on access to the repository (including diff); speaking of myself, I use this only before commit to check what everything changes, so no big deal. There is a feature called history horizons in development, that will allow you to get just a few version's history; that would be best for us, but it is not yet available (maybe in a few months?). For my part, what I find the most compelling is the ability to commit locally (and revert etc), so you can save snapshots of your work and push to the shared repository only once everything works. Handling renames and moves is more intelligent. And we would have most things at launchpad, which would allos us to easily have separate branch for a release backporting some fixes and so on. Brnching is very powerful concept and bzr is nice that it allows you to have decentralized workflow, but also centralized (svn-like) one if you want so. Vaclav ___ Mailing list: https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] BZR migration
Anton Gladky said: (by the date of Wed, 29 Jul 2009 14:58:15 +0200) So, what decision we accept? It will be a drastic change to everyone who has SVN access. So everyone should state his opinion about that. The http://yade.wikia.com/wiki/Quick_subversion_tutorial needs a 1:1 equivalent about BZR. Look at those more tricky commands from SVN, do they work with BZR too? For example those: Check local diff with SVN-HEAD, other people's changes svn st -qu svn diff -rHEAD | kompare -o - Check if svn up may have conflicts: svn merge --dry-run -r BASE:HEAD . -- Janek Kozicki | ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [svn] r1903 - trunk/pkg/lattice/PreProcessor
Author: cosurgi Date: 2009-07-29 17:50:47 +0200 (Wed, 29 Jul 2009) New Revision: 1903 Modified: trunk/pkg/lattice/PreProcessor/LatticeExample.cpp Log: - some improvements wrt to generation of densely packed aggregates and steel fibres in the concrete structure Modified: trunk/pkg/lattice/PreProcessor/LatticeExample.cpp === --- trunk/pkg/lattice/PreProcessor/LatticeExample.cpp 2009-07-29 11:05:36 UTC (rev 1902) +++ trunk/pkg/lattice/PreProcessor/LatticeExample.cpp 2009-07-29 15:50:47 UTC (rev 1903) @@ -1515,21 +1515,26 @@ { // first make a list of circles std::vectorCircle c; +std::vectorint penalty; Real AGGREGATES_X=speciemen_size_in_meters[0]; Real AGGREGATES_Y=speciemen_size_in_meters[1]; Real AGGREGATES_Z=speciemen_size_in_meters[2]; if(AGGREGATES_Z cellsizeUnit_in_meters ) AGGREGATES_Z = 0.0; -Real MAX_DIAMETER =aggregateMaxDiameter; -Real MIN_DIAMETER =aggregateMinDiameter; -Real MEAN_DIAMETER =aggregateMeanDiameter; -Real SIGMA_DIAMETER=aggregateSigmaDiameter; typedef boost::minstd_rand StdGenerator; static StdGenerator generator; static boost::variate_generatorStdGenerator, boost::uniform_real random1(generator, boost::uniform_real(0,1)); +/// +/// stage 2 /// +/// + +Real MAX_DIAMETER =aggregateMaxDiameter; +Real MIN_DIAMETER =aggregateMinDiameter; +Real MEAN_DIAMETER =aggregateMeanDiameter; +Real SIGMA_DIAMETER=aggregateSigmaDiameter; static boost::variate_generatorStdGenerator, boost::normal_distribution randomN(generator, boost::normal_distribution(MEAN_DIAMETER,SIGMA_DIAMETER)); @@ -1564,22 +1569,36 @@ } //while(aggregatePercent/100.0 aggsAreas(c)/(AGGREGATES_X*AGGREGATES_Y) ); while( progress() 1.0 ); - - + std::cerr placing aggregates with repulsion ... ; setStatus( aggregates repulsion ...); setProgress(0); + penalty.clear(); + penalty.resize(c.size(),0); +/// +/// stage 3 /// +/// + + int overlap_count; overlap_count=overlapCount(c,1.05); - int begin_overlap_count = overlap_count; + int begin_overlap_count(overlap_count); // repulsion !! for( ; overlap_count 0 ; ) { overlap_count=overlapCount(c,1.05); - setStatus(std::string(repulsion )+boost::lexical_caststd::string(overlap_count)); + int last_overlap( ((int)(overlap_count)/10)*10+10 ); + if(overlap_count = last_overlap - 10) + { + //setStatus(std::string(repulsion )+boost::lexical_caststd::string(overlap_count)); + last_overlap = ((int)(overlap_count)/10)*10; + std::cerr . last_overlap; + if(last_overlap = 11) + last_overlap = 11; + } setProgress(1.0 - (float)(overlap_count)/(float)(begin_overlap_count)); std::vectorVector3r moves; @@ -1591,12 +1610,13 @@ Vector3r c1(c[i].x,c[i].y,c[i].z); //emulate periodic boundary - for(int px = -1 ; px 2 ; ++px ) - for(int py = -1 ; py 2 ; ++py ) - for(int pz = ((AGGREGATES_Z==0)?0:-1) ; pz ((AGGREGATES_Z==0)?1:2) ; ++pz ) + //for(int px = -1 ; px 2 ; ++px ) + //for(int py = -1 ; py 2 ; ++py ) + //for(int pz = ((AGGREGATES_Z==0)?0:-1) ; pz ((AGGREGATES_Z==0)?1:2) ; ++pz ) + int px(0),py(0),pz(0); { Vector3r PERIODIC_DELTA(px*AGGREGATES_X,py*AGGREGATES_Y,pz*AGGREGATES_Z); - for(unsigned int j = 0 ; j fibres.size() ; ++j ) + for(unsigned int j = 0 ; j c.size() ; ++j ) if(i != j) { Vector3r c2 = Vector3r(c[j].x, c[j].y, c[j].z) + PERIODIC_DELTA; @@ -1609,11 +1629,16 @@ dir[0]=random1()-0.5, dir[1]=random1()-0.5, dir[2]=((AGGREGATES_Z==0)?(0):(random1()-0.5)); dir.Normalize();
[Yade-dev] [svn] r1904 - in trunk/gui: . qt3
Author: eudoxos Date: 2009-07-29 22:05:42 +0200 (Wed, 29 Jul 2009) New Revision: 1904 Modified: trunk/gui/SConscript trunk/gui/qt3/QtGUI.cpp trunk/gui/qt3/QtSimulationPlayer.hpp Log: 1. Fix for https://bugs.launchpad.net/yade/+bug/406343 (at least for me) Modified: trunk/gui/SConscript === --- trunk/gui/SConscript2009-07-29 15:50:47 UTC (rev 1903) +++ trunk/gui/SConscript2009-07-29 20:05:42 UTC (rev 1904) @@ -9,18 +9,18 @@ 'qt3/GLViewer.cpp', 'qt3/MessageDialog.cpp', 'qt3/QtFileGenerator.cpp', - 'qt3/QtFileGeneratorController.ui', 'qt3/QtGUI.cpp', 'qt3/QtGUIPreferences.cpp', - 'qt3/QtGeneratedMessageDialog.ui', - 'qt3/QtGeneratedSimulationController.ui', 'qt3/SimulationController.cpp', - 'qt3/YadeQtGeneratedMainWindow.ui', 'qt3/YadeQtMainWindow.cpp', 'qt3/YadeCamera.cpp', 'qt3/GLSimulationPlayerViewer.cpp', + 'qt3/QtSimulationPlayer.cpp', + 'qt3/QtGeneratedSimulationController.ui', 'qt3/QtGeneratedSimulationPlayer.ui', - 'qt3/QtSimulationPlayer.cpp', + 'qt3/QtGeneratedMessageDialog.ui', + 'qt3/YadeQtGeneratedMainWindow.ui', + 'qt3/QtFileGeneratorController.ui', ], LIBS=(['PythonUI'] if 'YADE_PYTHON' in env['CPPDEFINES'] else [])+[ 'yade-serialization-qt', @@ -30,6 +30,12 @@ ), env.SharedLibrary('SnapshotEngine',['qt3/SnapshotEngine.cpp'],LIBS=env['LIBS']+['QtGUI','$QGLVIEWER_LIB'],CPPPATH=env['CPPPATH']+['qt3']), ]) + ### + ### HACK that works around https://bugs.launchpad.net/yade/+bug/406343 + ### (not clear why scons is not picking up the dependency automatically, though) + ### + gens=['$buildDir/gui/qt3/'+h for h in 'QtGeneratedSimulationController.h','QtGeneratedSimulationPlayer.h','QtGeneratedMessageDialog.h','YadeQtGeneratedMainWindow.h','QtFileGeneratorController.h'] + env.Depends(['qt3/FileDialog.cpp','qt3/GLViewer.cpp','qt3/MessageDialog.cpp','qt3/QtFileGenerator.cpp','qt3/QtGUI.cpp','qt3/QtGUIPreferences.cpp','qt3/SimulationController.cpp','qt3/YadeQtMainWindow.cpp','qt3/YadeCamera.cpp','qt3/GLSimulationPlayerViewer.cpp','qt3/QtSimulationPlayer.cpp'],gens) import os.path Modified: trunk/gui/qt3/QtGUI.cpp === --- trunk/gui/qt3/QtGUI.cpp 2009-07-29 15:50:47 UTC (rev 1903) +++ trunk/gui/qt3/QtGUI.cpp 2009-07-29 20:05:42 UTC (rev 1904) @@ -7,19 +7,19 @@ */ #includeQtGUI.hpp -#includeYadeQtMainWindow.hpp -#includeGLViewer.hpp +#includeyade/gui-qt3/YadeQtMainWindow.hpp +#includeyade/gui-qt3/GLViewer.hpp #includeboost/algorithm/string.hpp #includeboost/bind.hpp -#include boost/filesystem/operations.hpp -#include boost/filesystem/convenience.hpp +#includeboost/filesystem/operations.hpp +#includeboost/filesystem/convenience.hpp //#ifdef HAVE_CONFIG_H // #include config.h //#endif //#ifdef Q_WS_X11 - #include X11/Xlib.h + #includeX11/Xlib.h //#endif -#include qapplication.h +#includeqapplication.h #ifdef YADE_PYTHON #includeyade/gui-py/PythonUI.hpp Modified: trunk/gui/qt3/QtSimulationPlayer.hpp === --- trunk/gui/qt3/QtSimulationPlayer.hpp2009-07-29 15:50:47 UTC (rev 1903) +++ trunk/gui/qt3/QtSimulationPlayer.hpp2009-07-29 20:05:42 UTC (rev 1904) @@ -11,7 +11,7 @@ #includeyade/core/Omega.hpp #includeyade/lib-factory/Factorable.hpp #includeyade/lib-serialization-qt/QtGUIGenerator.hpp -#include QtGeneratedSimulationPlayer.h +#includeQtGeneratedSimulationPlayer.h #includeqlayout.h #includeqframe.h #includeqscrollview.h ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [svn] r1905 - in trunk/pkg/dem: DataClass/InteractionGeometry Engine/StandAloneEngine
Author: eudoxos Date: 2009-07-29 22:36:40 +0200 (Wed, 29 Jul 2009) New Revision: 1905 Modified: trunk/pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp trunk/pkg/dem/DataClass/InteractionGeometry/SpheresContactGeometry.hpp trunk/pkg/dem/Engine/StandAloneEngine/GlobalStiffnessTimeStepper.cpp Log: 1. Add GenericSpheresContactClass to unit radius1, radius2 and normal between SpheresContactGeometry and Dem3DofGeom (to make it work with GlobalSitffnessTimeStepper). Partially solves https://bugs.launchpad.net/yade/+bug/399963 Modified: trunk/pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp === --- trunk/pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp 2009-07-29 20:05:42 UTC (rev 1904) +++ trunk/pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp 2009-07-29 20:36:40 UTC (rev 1905) @@ -2,15 +2,26 @@ #pragma once #includeyade/core/InteractionGeometry.hpp +/*! Abstract class that unites SpheresContactGeometry and Dem3DofGeom, + created for the purposes of GlobalStiffnessTimeStepper. + It exists purely on the c++, i.e. registers no attributes (the derived classes do register + their attributes that are initialized as references here) and doesn't exist in the yade + hierarchy. */ +class GenericSpheresContact: public InteractionGeometry{ + public: + Vector3r normal; + Real refR1, refR2; +}; + /*! Abstract base class for representing contact geometry of 2 elements that has 3 degrees of freedom: * normal (1 component) and shear (Vector3r, but in plane perpendicular to the normal) */ -class Dem3DofGeom: public InteractionGeometry{ +class Dem3DofGeom: public GenericSpheresContact{ public: //! some length used to convert displacements to strains Real refLength; //! some unit reference vector (in the direction of the interaction) - Vector3r normal; + Vector3r normal; //! some reference point for the interaction Vector3r contactPoint; //! make strain go to -∞ for length going to zero @@ -18,8 +29,10 @@ //! se3 of both bodies (needed to compute torque from the contact, strains etc). Must be updated at every step. Se3r se31, se32; //! reference radii of particles (for initial contact stiffness computation) - Real refR1, refR2; + Real refR1, refR2; + Dem3DofGeom(): normal(GenericSpheresContact::normal), refR1(GenericSpheresContact::refR1), refR2(GenericSpheresContact::refR2) {} + // API that needs to be implemented in derived classes virtual Real displacementN(); virtual Vector3r displacementT(){throw;} Modified: trunk/pkg/dem/DataClass/InteractionGeometry/SpheresContactGeometry.hpp === --- trunk/pkg/dem/DataClass/InteractionGeometry/SpheresContactGeometry.hpp 2009-07-29 20:05:42 UTC (rev 1904) +++ trunk/pkg/dem/DataClass/InteractionGeometry/SpheresContactGeometry.hpp 2009-07-29 20:36:40 UTC (rev 1905) @@ -6,6 +6,7 @@ #includeyade/core/InteractionGeometry.hpp #includeyade/lib-base/yadeWm3.hpp #includeyade/pkg-common/RigidBodyParameters.hpp +#includeyade/pkg-dem/DemXDofGeom.hpp /*! Class representing geometry of two spheres in contact. * * The code under SCG_SHEAR is experimental and is used only if ElasticContactLaw::useShear is explicitly true @@ -13,12 +14,12 @@ #define SCG_SHEAR -class SpheresContactGeometry: public InteractionGeometry { +class SpheresContactGeometry: public GenericSpheresContact { public: - Vector3r normal, // unit vector in the direction from sphere1 center to sphere2 center - contactPoint; + Vector3r normal; // unit vector in the direction from sphere1 center to sphere2 center + Vector3r contactPoint; Real penetrationDepth; - Real radius1, radius2; + Real radius1, radius2; #ifdef SCG_SHEAR //! Total value of the current shear. Update the value using updateShear. @@ -39,7 +40,7 @@ #endif - SpheresContactGeometry():contactPoint(Vector3r::ZERO),radius1(0.),radius2(0.) + SpheresContactGeometry():contactPoint(Vector3r::ZERO),normal(GenericSpheresContact::normal),radius1(GenericSpheresContact::refR1),radius2(GenericSpheresContact::refR2) #ifdef SCG_SHEAR ,shear(Vector3r::ZERO), prevNormal(Vector3r::ZERO) /*initialized to proper value by geom functor*/ #endif Modified: trunk/pkg/dem/Engine/StandAloneEngine/GlobalStiffnessTimeStepper.cpp === ---