yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00915
[svn] r1650 - in trunk: gui/qt3 pkg/common/Engine/StandAloneEngine
Author: sega
Date: 2009-02-01 11:04:26 +0100 (Sun, 01 Feb 2009)
New Revision: 1650
Modified:
trunk/gui/qt3/QtGeneratedSimulationController.ui
trunk/gui/qt3/SimulationController.cpp
trunk/gui/qt3/SimulationController.hpp
trunk/pkg/common/Engine/StandAloneEngine/SpheresFactory.cpp
trunk/pkg/common/Engine/StandAloneEngine/SpheresFactory.hpp
Log:
1. SpheresFactory allows now to create spheres in a convex volume.
2. SimulationController estimates total simulation time if stopAtIteration>0.
Modified: trunk/gui/qt3/QtGeneratedSimulationController.ui
===================================================================
--- trunk/gui/qt3/QtGeneratedSimulationController.ui 2009-01-31 15:28:39 UTC (rev 1649)
+++ trunk/gui/qt3/QtGeneratedSimulationController.ui 2009-02-01 10:04:26 UTC (rev 1650)
@@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>269</width>
- <height>519</height>
+ <width>271</width>
+ <height>629</height>
</rect>
</property>
<property name="sizePolicy">
@@ -29,25 +29,22 @@
<property name="frameShadow">
<enum>Plain</enum>
</property>
- <grid>
+ <vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>layout9</cstring>
+ <cstring>layout8</cstring>
</property>
- <vbox>
+ <grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <property name="spacing">
- <number>0</number>
- </property>
- <widget class="QLabel">
+ <widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>labelRealTime</cstring>
</property>
@@ -63,9 +60,9 @@
<string>real 0:00:00.000</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="QLabel" row="3" column="0">
<property name="name">
- <cstring>labelSimulTime</cstring>
+ <cstring>labelStep</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
@@ -76,10 +73,10 @@
</sizepolicy>
</property>
<property name="text">
- <string>virt 00:000.000m000u000n</string>
+ <string>step 4e-3</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>labelIter</cstring>
</property>
@@ -95,9 +92,9 @@
<string>iter #0, 0/s</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="QLabel" row="5" column="0">
<property name="name">
- <cstring>labelStep</cstring>
+ <cstring>labelEstimationTime</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
@@ -108,27 +105,123 @@
</sizepolicy>
</property>
<property name="text">
- <string>step 4e-3</string>
+ <string>estimation 00:00:00</string>
</property>
</widget>
- </vbox>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>labelStopAtIter</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>stopAtIter #0</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>labelSimulTime</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>virt 00:000.000m000u000n</string>
+ </property>
+ </widget>
+ </grid>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>layout12</cstring>
+ <cstring>layout10</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="QPushButton" row="1" column="2">
<property name="name">
- <cstring>pbReference</cstring>
+ <cstring>pbCenterScene_2</cstring>
</property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>Reference</string>
+ <string>Center</string>
</property>
</widget>
+ <widget class="QPushButton" row="2" column="2">
+ <property name="name">
+ <cstring>pbZXY</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>pbYZX</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ </widget>
<widget class="QTabWidget" row="0" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>tabWidget</cstring>
@@ -360,7 +453,7 @@
<string></string>
</property>
<property name="pixmap">
- <pixmap>image0</pixmap>
+ <pixmap>image2</pixmap>
</property>
</widget>
<widget class="QPushButton">
@@ -382,7 +475,7 @@
<string></string>
</property>
<property name="pixmap">
- <pixmap>image1</pixmap>
+ <pixmap>image3</pixmap>
</property>
</widget>
</hbox>
@@ -420,7 +513,7 @@
<string></string>
</property>
<property name="pixmap">
- <pixmap>image2</pixmap>
+ <pixmap>image4</pixmap>
</property>
</widget>
<widget class="QPushButton">
@@ -442,7 +535,7 @@
<string></string>
</property>
<property name="pixmap">
- <pixmap>image3</pixmap>
+ <pixmap>image5</pixmap>
</property>
<property name="toolTip" stdset="0">
<string>Note: currently using synchronized display can *sometimes* lead to crash when reloading file.</string>
@@ -606,7 +699,7 @@
<string></string>
</property>
<property name="pixmap">
- <pixmap>image4</pixmap>
+ <pixmap>image6</pixmap>
</property>
</widget>
<widget class="QFrame" row="0" column="0" rowspan="1" colspan="3">
@@ -634,37 +727,17 @@
</grid>
</widget>
</widget>
- <widget class="QPushButton" row="2" column="0">
+ <widget class="QPushButton" row="1" column="1">
<property name="name">
- <cstring>pbXYZ</cstring>
+ <cstring>pbReference</cstring>
</property>
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>25</height>
- </size>
- </property>
<property name="text">
- <string></string>
+ <string>Reference</string>
</property>
- <property name="pixmap">
- <pixmap>image5</pixmap>
- </property>
</widget>
- <widget class="QPushButton" row="2" column="2">
+ <widget class="QPushButton" row="2" column="0">
<property name="name">
- <cstring>pbZXY</cstring>
+ <cstring>pbXYZ</cstring>
</property>
<property name="enabled">
<bool>true</bool>
@@ -687,53 +760,9 @@
<string></string>
</property>
<property name="pixmap">
- <pixmap>image6</pixmap>
- </property>
- </widget>
- <widget class="QPushButton" row="2" column="1">
- <property name="name">
- <cstring>pbYZX</cstring>
- </property>
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>25</height>
- </size>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="pixmap">
<pixmap>image7</pixmap>
</property>
</widget>
- <widget class="QPushButton" row="1" column="2">
- <property name="name">
- <cstring>pbCenterScene_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Center</string>
- </property>
- </widget>
<widget class="QPushButton" row="1" column="0">
<property name="name">
<cstring>pbNewView_2</cstring>
@@ -755,32 +784,32 @@
</widget>
</grid>
</widget>
- </grid>
+ </vbox>
</widget>
<images>
<image name="image0">
- <data format="PNG" length="252">89504e470d0a1a0a0000000d4948445200000015000000150806000000a917a596000000c349444154388dadd4310e82401046e1b78462e8f61cda6187e7974ebabdc7764e870d2460609d59a5217f80f0e58510d2944001015545447ede4dd60c02593322c276df867e2e5d3fdb214de9f48dd7fe32033cc72978c44d5100c0cb2d0ea5a6ab743dace262d355ea15375122aa4a94080abb0d40b73bdf87613ebd7fd9a6a65e71537ae391d4227635b58add4d2de2aaa6dbf3631cc3e7f36d6d53e896eff68f4d8f84eb6e6b9a9e09ab9b9684554dbf09dd4d2d425753abd0dcd42334fd4f6bf71b0403e127c7dd51090000000049454e44ae426082</data>
+ <data format="PNG" length="435">89504e470d0a1a0a0000000d49484452000000280000002808060000008cfeb86d0000017a494441545885edd83f6a1b411480f19f8250e20b5827100494c22e5df8023e415aa74f2a1b7289fca98c5ddbe02b1877ae0de99d4689c1100c714292328952684416696777c55a9a35ec07034fc3e3e99b3768060df39c6184c7618cc25c6318e237f6b01fe26152a31c0ef12d8ca3c42eb9ace3077ea29f52a41b997f825e88d756e4b210c7f812c64962973936f0172ff12ac49b498d6638c727932dee85f83ca1cfc3659c5a001ea51628a313991f57c859098def60e305f3b62fefc7916c9b1bdfc122da63a60aad605d5ac1bab482756905eb32bd6317b93592dccb5505577efde56df1253e9b74aa83eb30b72cc691319734e545f8bc85ed10efe6e42d2a50853e6e705524b8863bbcc701befaffba504730da9d401717f88ea74582f0d66425b77853f26575469677f8839dd82ab30c324506057955a8d2c1e761fe75519158e1b2bc4504f378865f382d2b122b5c9657978ff820f28a963da8670fe0f14c4e2caf2eb14577aa24552db634b20f988df893d472dffc03abb374caa8555fb90000000049454e44ae426082</data>
</image>
<image name="image1">
- <data format="PNG" length="232">89504e470d0a1a0a0000000d4948445200000015000000150806000000a917a596000000af49444154388ded95a10ec33010435fa2810bbb5f181e1becbe7f8565c1fd85b01eeb401b2d8dc29ab2869c6ccb8ae5931217a7080608981922721afb640904922544841ed8c529764b98f12359424529e76718565880002cc46976597fbd9f6be621f01d4757fbbd8a82818a6266a828db09ff59e8079e8daffded4e614fb2cf423ff0d0ecd41f12ee37d6494bbd95b4f6fbd616eba4a5de4a5afbef4eef4eef4e7b767ac97bdaecf42c7657fc513f8f2ab9c097ced54c0000000049454e44ae426082</data>
+ <data format="PNG" length="434">89504e470d0a1a0a0000000d49484452000000280000002808060000008cfeb86d00000179494441545885edd8b14a1c4118c0f1df8928be8076218d2068114b0b5fc027486b7a5345c84b68ac24d60a798560672df800369a4040021ad11416ea59ec1c6c74766f8e3d7737b07ff860f8e6dbbbffceccceb0dbf3927e2407bd82fcab3219c9e545e67082bff5e88cc6248e708d85865da27cc103d69a1689f15eb6163f372d126349b6e6be352d52c4a9ecc198695a84f8d6d1aa6de6bfa668246b65a269816114adab7e424d2db47e045b2f98bacd3436cdad1fc132ba6d26854eb02a9d60553ac1aa748255199cb1a39c1a8d9ccba982b51f7fb129fe8e334c87380bb9d7e2183f6433d3c3cf90fb87fcc82ce21e9fb019da8b91ba54fa43aefb10fa57b01adaeb6582f0157f42ec95d48d22988f3c33b8c20e767129f24efefca259dce056f685abeccfaac4806dfcc26f6c15dd659e37b80bf1b6a42e85612308f3b9bef914c17d5c843818a3604a5d61e7807778c4063e86f67205c15492050f718ea910e721f7bc6edc240b0efb915ac97fa36ec54b52c7b879020c2e72e95070cdb80000000049454e44ae426082</data>
</image>
<image name="image2">
- <data format="PNG" length="255">89504e470d0a1a0a0000000d4948445200000015000000150806000000a917a596000000c649444154388db594d90a83400c458f0bd28542feff9ffa2f81822fadda87d176d4319d14bd20e38470b22a1c2fbd8ce7109e8fbdf050caf9555ad07bc2cf051d9db50679cdb30310176cd298690a98d2e4a37506340b5847bebdd5e7320f0840b778b7a0b99265f02ee9b68e660d4acb34683d4cb3e10b3569b30e7c073e80abfced72819ea86a0fd49014c0754f68153e6f79ec053d8743dad8e818943c41e3fb1e7b3a0b60fe13fe819e4037d62bc8b3a7004d6883adcc4cf516cedf4007942ad3ef38bd01af6e31af98932e9f0000000049454e44ae426082</data>
+ <data format="PNG" length="252">89504e470d0a1a0a0000000d4948445200000015000000150806000000a917a596000000c349444154388dadd4310e82401046e1b78462e8f61cda6187e7974ebabdc7764e870d2460609d59a5217f80f0e58510d2944001015545447ede4dd60c02593322c276df867e2e5d3fdb214de9f48dd7fe32033cc72978c44d5100c0cb2d0ea5a6ab743dace262d355ea15375122aa4a94080abb0d40b73bdf87613ebd7fd9a6a65e71537ae391d4227635b58add4d2de2aaa6dbf3631cc3e7f36d6d53e896eff68f4d8f84eb6e6b9a9e09ab9b9684554dbf09dd4d2d425753abd0dcd42334fd4f6bf71b0403e127c7dd51090000000049454e44ae426082</data>
</image>
<image name="image3">
- <data format="PNG" length="305">89504e470d0a1a0a0000000d4948445200000015000000150806000000a917a596000000f849444154388db5943b12823010863f1f95158de839b0f5021ec00bd8702b8f2117e0326ab38d54385a844748086c66f49f49917d7c2cc966412501e4a38b85a536b081abc01350c9405e0dc882cd831701600daca6539340ae57a9a44d2533c069b9bf7f77f605706e96ad83922fb5a9b25bb9e5a3b7ab2559183880c6744b7bcbf201b945248eaafdf2c6b25d7f05b555fe03fafc07741b8790fdf092c7a1c7c8c2bcf8165a59b64b24d48eb739737d1a92e44e5ee6064cbc2815b06e3dcea4f19e6181e9db12d3155bcc195e80d330b49f5a2e34c51f2a1aed207904a01d5c314f017843b2768d810191ac31e3ad1af75319bf0f04f8024c83732f0a67978c0000000049454e44ae426082</data>
+ <data format="PNG" length="232">89504e470d0a1a0a0000000d4948445200000015000000150806000000a917a596000000af49444154388ded95a10ec33010435fa2810bbb5f181e1becbe7f8565c1fd85b01eeb401b2d8dc29ab2869c6ccb8ae5931217a7080608981922721afb640904922544841ed8c529764b98f12359424529e76718565880002cc46976597fbd9f6be621f01d4757fbbd8a82818a6266a828db09ff59e8079e8daffded4e614fb2cf423ff0d0ecd41f12ee37d6494bbd95b4f6fbd616eba4a5de4a5afbef4eef4eef4e7b767ac97bdaecf42c7657fc513f8f2ab9c097ced54c0000000049454e44ae426082</data>
</image>
<image name="image4">
- <data format="PNG" length="160">89504e470d0a1a0a0000000d4948445200000015000000150806000000a917a5960000006749444154388dadccd10d80300c03d1947118a1fbcb23b00e2c4013dbc9fd9ef4168098eecae6def73b8eba70893a3085aa308d2ab084b2b08c32b08556b08d66700b3dc16d1478d628fa07b6d01368a31968a11528a30c28a12c48a30a48a12a58a20e1811f101d3512a7c38fee1ac0000000049454e44ae426082</data>
+ <data format="PNG" length="255">89504e470d0a1a0a0000000d4948445200000015000000150806000000a917a596000000c649444154388db594d90a83400c458f0bd28542feff9ffa2f81822fadda87d176d4319d14bd20e38470b22a1c2fbd8ce7109e8fbdf050caf9555ad07bc2cf051d9db50679cdb30310176cd298690a98d2e4a37506340b5847bebdd5e7320f0840b778b7a0b99265f02ee9b68e660d4acb34683d4cb3e10b3569b30e7c073e80abfced72819ea86a0fd49014c0754f68153e6f79ec053d8743dad8e818943c41e3fb1e7b3a0b60fe13fe819e4037d62bc8b3a7004d6883adcc4cf516cedf4007942ad3ef38bd01af6e31af98932e9f0000000049454e44ae426082</data>
</image>
<image name="image5">
- <data format="PNG" length="409">89504e470d0a1a0a0000000d49484452000000280000002808060000008cfeb86d00000160494441545885edd8cf2a05511cc0f1cf95c80bb0916c9462c1d2c20b7801b6ec59515e025bb628af203b6b65cfe6a2946c08c502d762ce2dae3b7f34cc8c9a6ffdea77a6697edf39bf9973eaf095135ca211e22a5cab0c4b686106b3215f2c53a8d1311ec03576d187790ce3b960af44364592b7d828d9a52b63a2d6b6425e49da82a5d353b6401a9517fcd7d4df60163a17ea36ad0cf71442e567b0f282dddad7ede728adcd959fc124ea65260bb5605e6ac1bcd48279a905f3d2de637fb26b94b22f67152c7cfbeb6c712b26fe924334d11fa219ae7d13eb644874c27096725f1a692f398157ac622de4136982bd38c63dc67f4930a923dbb80bb113f790cf6ce10d73198ae589368378c0a3a87389820b61bc9ee145b290650647f01262344970124f3848289647308e3ddc84d84f2a7c8e53d139e16f09a63185772c6325e4d37185d3be95bf103cc285e8c0b42fe44771826914be50f79659bca6083e00acfe78c833f5cc8f0000000049454e44ae426082</data>
+ <data format="PNG" length="305">89504e470d0a1a0a0000000d4948445200000015000000150806000000a917a596000000f849444154388db5943b12823010863f1f95158de839b0f5021ec00bd8702b8f2117e0326ab38d54385a844748086c66f49f49917d7c2cc966412501e4a38b85a536b081abc01350c9405e0dc882cd831701600daca6539340ae57a9a44d2533c069b9bf7f77f605706e96ad83922fb5a9b25bb9e5a3b7ab2559183880c6744b7bcbf201b945248eaafdf2c6b25d7f05b555fe03fafc07741b8790fdf092c7a1c7c8c2bcf8165a59b64b24d48eb739737d1a92e44e5ee6064cbc2815b06e3dcea4f19e6181e9db12d3155bcc195e80d330b49f5a2e34c51f2a1aed207904a01d5c314f017843b2768d810191ac31e3ad1af75319bf0f04f8024c83732f0a67978c0000000049454e44ae426082</data>
</image>
<image name="image6">
- <data format="PNG" length="435">89504e470d0a1a0a0000000d49484452000000280000002808060000008cfeb86d0000017a494441545885edd83f6a1b411480f19f8250e20b5827100494c22e5df8023e415aa74f2a1b7289fca98c5ddbe02b1877ae0de99d4689c1100c714292328952684416696777c55a9a35ec07034fc3e3e99b3768060df39c6184c7618cc25c6318e237f6b01fe26152a31c0ef12d8ca3c42eb9ace3077ea29f52a41b997f825e88d756e4b210c7f812c64962973936f0172ff12ac49b498d6638c727932dee85f83ca1cfc3659c5a001ea51628a313991f57c859098def60e305f3b62fefc7916c9b1bdfc122da63a60aad605d5ac1bab482756905eb32bd6317b93592dccb5505577efde56df1253e9b74aa83eb30b72cc691319734e545f8bc85ed10efe6e42d2a50853e6e705524b8863bbcc701befaffba504730da9d401717f88ea74582f0d66425b77853f26575469677f8839dd82ab30c324506057955a8d2c1e761fe75519158e1b2bc4504f378865f382d2b122b5c9657978ff820f28a963da8670fe0f14c4e2caf2eb14577aa24552db634b20f988df893d472dffc03abb374caa8555fb90000000049454e44ae426082</data>
+ <data format="PNG" length="160">89504e470d0a1a0a0000000d4948445200000015000000150806000000a917a5960000006749444154388dadccd10d80300c03d1947118a1fbcb23b00e2c4013dbc9fd9ef4168098eecae6def73b8eba70893a3085aa308d2ab084b2b08c32b08556b08d66700b3dc16d1478d628fa07b6d01368a31968a11528a30c28a12c48a30a48a12a58a20e1811f101d3512a7c38fee1ac0000000049454e44ae426082</data>
</image>
<image name="image7">
- <data format="PNG" length="434">89504e470d0a1a0a0000000d49484452000000280000002808060000008cfeb86d00000179494441545885edd8b14a1c4118c0f1df8928be8076218d2068114b0b5fc027486b7a5345c84b68ac24d60a798560672df800369a4040021ad11416ea59ec1c6c74766f8e3d7737b07ff860f8e6dbbbffceccceb0dbf3927e2407bd82fcab3219c9e545e67082bff5e88cc6248e708d85865da27cc103d69a1689f15eb6163f372d126349b6e6be352d52c4a9ecc198695a84f8d6d1aa6de6bfa668246b65a269816114adab7e424d2db47e045b2f98bacd3436cdad1fc132ba6d26854eb02a9d60553ac1aa748255199cb1a39c1a8d9ccba982b51f7fb129fe8e334c87380bb9d7e2183f6433d3c3cf90fb87fcc82ce21e9fb019da8b91ba54fa43aefb10fa57b01adaeb6582f0157f42ec95d48d22988f3c33b8c20e767129f24efefca259dce056f685abeccfaac4806dfcc26f6c15dd659e37b80bf1b6a42e85612308f3b9bef914c17d5c843818a3604a5d61e7807778c4063e86f67205c15492050f718ea910e721f7bc6edc240b0efb915ac97fa36ec54b52c7b879020c2e72e95070cdb80000000049454e44ae426082</data>
+ <data format="PNG" length="409">89504e470d0a1a0a0000000d49484452000000280000002808060000008cfeb86d00000160494441545885edd8cf2a05511cc0f1cf95c80bb0916c9462c1d2c20b7801b6ec59515e025bb628af203b6b65cfe6a2946c08c502d762ce2dae3b7f34cc8c9a6ffdea77a6697edf39bf9973eaf095135ca211e22a5cab0c4b686106b3215f2c53a8d1311ec03576d187790ce3b960af44364592b7d828d9a52b63a2d6b6425e49da82a5d353b6401a9517fcd7d4df60163a17ea36ad0cf71442e567b0f282dddad7ede728adcd959fc124ea65260bb5605e6ac1bcd48279a905f3d2de637fb26b94b22f67152c7cfbeb6c712b26fe924334d11fa219ae7d13eb644874c27096725f1a692f398157ac622de4136982bd38c63dc67f4930a923dbb80bb113f790cf6ce10d73198ae589368378c0a3a87389820b61bc9ee145b290650647f01262344970124f3848289647308e3ddc84d84f2a7c8e53d139e16f09a63185772c6325e4d37185d3be95bf103cc285e8c0b42fe44771826914be50f79659bca6083e00acfe78c833f5cc8f0000000049454e44ae426082</data>
</image>
</images>
<connections>
Modified: trunk/gui/qt3/SimulationController.cpp
===================================================================
--- trunk/gui/qt3/SimulationController.cpp 2009-01-31 15:28:39 UTC (rev 1649)
+++ trunk/gui/qt3/SimulationController.cpp 2009-02-01 10:04:26 UTC (rev 1650)
@@ -365,7 +365,7 @@
labelSimulTime->setText(string(strVirt));
if(Omega::instance().isRunning()){
- time_duration duration = microsec_clock::local_time()-Omega::instance().getMsStartingSimulationTime();
+ duration = microsec_clock::local_time()-Omega::instance().getMsStartingSimulationTime();
duration -= Omega::instance().getSimulationPauseDuration();
unsigned int hours = duration.hours();
@@ -379,21 +379,32 @@
if(days>0) snprintf(strReal,64,"real %dd %02d:%02d:%03d.%03d",days,hours,minutes,seconds,mseconds);
else snprintf(strReal,64,"real %02d:%02d:%03d.%03d",hours,minutes,seconds,mseconds);
labelRealTime->setText(string(strReal));
+
}
+ // update iterations per second - only one in a while (iterPerSec_TTL_ms)
+ // does someone need to display that with more precision than integer?
+ long iterPerSec_LastAgo_ms=(microsec_clock::local_time()-iterPerSec_LastLocalTime).total_milliseconds();
+ if(iterPerSec_LastAgo_ms>iterPerSec_TTL_ms){
+ iterPerSec=(1000.*(Omega::instance().getCurrentIteration()-iterPerSec_LastIter))/iterPerSec_LastAgo_ms;
+ iterPerSec_LastIter=Omega::instance().getCurrentIteration();
+ iterPerSec_LastLocalTime=microsec_clock::local_time();
+ }
+ char strIter[64];
+ /* print 0 instead of bogus values (at startup) */
+ snprintf(strIter,64,"iter #%ld, %.1f/s",Omega::instance().getCurrentIteration(),(iterPerSec<1e9 && iterPerSec>0)?iterPerSec:0.);
+ labelIter->setText(strIter);
- // update iterations per second - only one in a while (iterPerSec_TTL_ms)
- // does someone need to display that with more precision than integer?
- long iterPerSec_LastAgo_ms=(microsec_clock::local_time()-iterPerSec_LastLocalTime).total_milliseconds();
- if(iterPerSec_LastAgo_ms>iterPerSec_TTL_ms){
- iterPerSec=(1000.*(Omega::instance().getCurrentIteration()-iterPerSec_LastIter))/iterPerSec_LastAgo_ms;
- iterPerSec_LastIter=Omega::instance().getCurrentIteration();
- iterPerSec_LastLocalTime=microsec_clock::local_time();
- }
- char strIter[64];
- /* print 0 instead of bogus values (at startup) */
- snprintf(strIter,64,"iter #%ld, %.1f/s",Omega::instance().getCurrentIteration(),(iterPerSec<1e9 && iterPerSec>0)?iterPerSec:0.);
- labelIter->setText(strIter);
+ // update estimation time
+ char strEstimation[64];
+ if (Omega::instance().getRootBody()->stopAtIteration>0 && iterPerSec>0 )
+ estimation=duration+time_duration(seconds((Omega::instance().getRootBody()->stopAtIteration-Omega::instance().getCurrentIteration())/iterPerSec));
+ snprintf(strEstimation,64,"estimation %02d:%02d:%02d",estimation.hours(),estimation.minutes(),estimation.seconds());
+ labelEstimationTime->setText(strEstimation);
+ char strStopAtIter[64];
+ snprintf(strStopAtIter,64,"stopAtIter #%ld",Omega::instance().getRootBody()->stopAtIteration);
+ labelStopAtIter->setText(strStopAtIter);
+
if (changeSkipTimeStepper) Omega::instance().skipTimeStepper(skipTimeStepper);
if (changeTimeStep) {
// wrap the mantissa around
Modified: trunk/gui/qt3/SimulationController.hpp
===================================================================
--- trunk/gui/qt3/SimulationController.hpp 2009-01-31 15:28:39 UTC (rev 1649)
+++ trunk/gui/qt3/SimulationController.hpp 2009-02-01 10:04:26 UTC (rev 1650)
@@ -38,6 +38,8 @@
const int iterPerSec_TTL_ms;
long iterPerSec_LastIter;
double iterPerSec;
+ boost::posix_time::time_duration duration;
+ boost::posix_time::time_duration estimation;
boost::posix_time::ptime iterPerSec_LastLocalTime;
Modified: trunk/pkg/common/Engine/StandAloneEngine/SpheresFactory.cpp
===================================================================
--- trunk/pkg/common/Engine/StandAloneEngine/SpheresFactory.cpp 2009-01-31 15:28:39 UTC (rev 1649)
+++ trunk/pkg/common/Engine/StandAloneEngine/SpheresFactory.cpp 2009-02-01 10:04:26 UTC (rev 1650)
@@ -27,6 +27,7 @@
SpheresFactory::SpheresFactory()
{
factoryFacets.clear();
+ volumeSection=false;
maxAttempts=20;
radius=0.01;
radiusRange=0;
@@ -75,15 +76,8 @@
for (int attempt=0; attempt<maxAttempts; ++attempt)
{
- body_id_t facetId = factoryFacets[(*randomFacet)()];
- Real t1 = randomUnit();
- Real t2 = randomUnit()*(1-t1);
+ Vector3r position = (volumeSection) ? generatePositionInVolume():generatePositionOnSurface();
- shared_ptr<Body> facet = Body::byId(facetId);
- Facet* gfacet = static_cast<Facet*>(facet->geometricalModel.get());
-
- Vector3r position = t1*(gfacet->vertices[1]-gfacet->vertices[0])+t2*(gfacet->vertices[2]-gfacet->vertices[0])+gfacet->vertices[0]+facet->physicalParameters->se3.position;
-
Real r=radius+radiusRange*randomSymmetricUnit();
BoundingVolume bv;
@@ -113,9 +107,29 @@
LOG_WARN("Can't placing sphere during " << maxAttempts << " attemps.");
}
-void SpheresFactory::createSphere(shared_ptr<Body>& body,
- const Vector3r& position, Real r)
+Vector3r SpheresFactory::generatePositionOnSurface()
{
+ body_id_t facetId = factoryFacets[(*randomFacet)()];
+ Real t1 = randomUnit();
+ Real t2 = randomUnit()*(1-t1);
+
+ shared_ptr<Body> facet = Body::byId(facetId);
+ Facet* gfacet = static_cast<Facet*>(facet->geometricalModel.get());
+
+ return t1*(gfacet->vertices[1]-gfacet->vertices[0])+t2*(gfacet->vertices[2]-gfacet->vertices[0])+gfacet->vertices[0]+facet->physicalParameters->se3.position;
+
+}
+
+Vector3r SpheresFactory::generatePositionInVolume()
+{
+ Vector3r p1 = generatePositionOnSurface();
+ Vector3r p2 = generatePositionOnSurface();
+ Real t = randomUnit();
+ return p1+t*(p2-p1);
+
+}
+void SpheresFactory::createSphere(shared_ptr<Body>& body, const Vector3r& position, Real r)
+{
body = shared_ptr<Body>(new Body(body_id_t(0),1));
shared_ptr<BodyMacroParameters> physics(new BodyMacroParameters);
shared_ptr<AABB> aabb(new AABB);
Modified: trunk/pkg/common/Engine/StandAloneEngine/SpheresFactory.hpp
===================================================================
--- trunk/pkg/common/Engine/StandAloneEngine/SpheresFactory.hpp 2009-01-31 15:28:39 UTC (rev 1649)
+++ trunk/pkg/common/Engine/StandAloneEngine/SpheresFactory.hpp 2009-02-01 10:04:26 UTC (rev 1650)
@@ -26,9 +26,13 @@
/// @brief Create one sphere per call.
virtual void action(MetaBody*);
- /// @brief The geometry of the surface on which spheres will be placed.
+ /// @brief The geometry of the section on which spheres will be placed.
vector<body_id_t> factoryFacets;
+ /// @brief Factory section may be a surface or volume (convex).
+ /// By default it is a surface. To make its a volume set volumeSection=true
+ bool volumeSection;
+
/// @brief Max attemps to place sphere.
/// If placing the sphere in certain random position would cause an overlap with any other physical body in the model, SpheresFactory will try to find another position. Default 20 attempts allow.
int maxAttempts;
@@ -76,6 +80,9 @@
bool first_run;
+ Vector3r generatePositionOnSurface();
+ Vector3r generatePositionInVolume();
+
void createSphere(shared_ptr<Body>& body, const Vector3r& position, Real r);
typedef boost::variate_generator<boost::minstd_rand,boost::uniform_int<> > RandomInt;
@@ -85,6 +92,7 @@
REGISTER_ATTRIBUTES(PeriodicEngine,
(factoryFacets)
+ (volumeSection)
(maxAttempts)
(radius)
(radiusRange)