iam-git / WellMet (public) (License: MIT) (since 2021-08-31) (hash sha1)
WellMet is pure Python framework for spatial structural reliability analysis. Or, more specifically, for "failure probability estimation and detection of failure surfaces by adaptive sequential decomposition of the design domain".
List of commits:
Subject Hash Author Date (UTC)
qt_gui.qt_pairwise: set blue -1 by default. Add force_update option in Contact widget 7371575784df7fd41bd76ad29caf38f474a06a26 I am 2022-11-09 15:39:03
qt_gui.qt_pairwise: prepare Contact widget bfa78d7493f5eb04b6bd3a4ad26dd1a92d17a895 I am 2022-11-09 03:36:05
qt_gui.qt_pairwise: prepare more mouse event signals c60e613508480c68483b3d0d6ad6c876b27f539c I am 2022-11-08 01:55:14
qt_gui: introduce reworked matrix view window e28b95c5f418a7a3cea0cb84ca82b40275a71061 I am 2022-11-07 02:20:45
introduce wireframe module for the contacts finding functionality b6068dd92663699859ea7cbf3aac00178d120e0f I am 2022-10-25 14:24:37
voronoi.TwoPoints: atleast_2d() one line fix 9f8bd9e5370ccf30887b6218331ee664788a3b91 I am 2022-10-25 07:09:57
voronoi: implement faster TwoPoints class. c0af78f64bc78a6b8cf06e3ea244339549318b66 I am 2022-10-24 13:03:26
voronoi: implement TwoHorses class. Třída je, bohužel, bezcenná :( 4f6fe186f3f344fa7ee9e518798499099615b466 I am 2022-10-23 10:00:43
voronoi: WIP 23c63ede5bc2ec51d25aed850dc59299db438e34 I am 2022-10-21 12:27:01
IS_stat.sample_alike: use any possible fallback options to sample 80fb6d086e9f17350a1725a319e40bf29591869e I am 2022-10-20 08:56:42
voronoi: WIP ba912d406de12142f2e15a73090118184a0166a4 I am 2022-10-20 02:43:12
IS_stat: add sample_alike() function 2e5394d264b7aaaf5f2486c736ed8cc37afbd030 I am 2022-10-19 13:00:17
voronoi: WIP c3bfa60b6db2042df11528fe95a51d7cc88d3c6b I am 2022-10-19 11:18:13
voronoi: WIP baff3c5ccaf857f60194917fe5d6e33c40b01265 I am 2022-10-19 09:28:33
voronoi.ConvexSpline: little fix of np.sign() for better sleep 968f649e54d97abd596cd60749872fa3ef788c06 I am 2022-10-19 06:28:46
implement even more optimized Convex.. now ConvexSpline class c08511aecb32b880e73c9f10d07feff4dc588e8b I am 2022-10-19 04:11:13
voronoi: WIP cbb61d4544367a67c9a5c3fe6d64a9dc284eb364 I am 2022-10-18 05:05:44
voronoi: WIP e9c247fef30cfb678bad9b955d6f6a94a0ff61e7 I am 2022-10-18 01:02:30
candynodex: hotfix to support numpy masking indexing f359123b72a3d998d5eed4b9e611a5e402a18c8d I am 2022-10-17 09:02:33
add new lightweight candynodes module to replace old heavy ugly candybox ca97509f47c100df90e1e06d82ed7c759627bfd0 I am 2022-10-17 06:31:33
Commit 7371575784df7fd41bd76ad29caf38f474a06a26 - qt_gui.qt_pairwise: set blue -1 by default. Add force_update option in Contact widget
Author: I am
Author date (UTC): 2022-11-09 15:39
Committer name: I am
Committer date (UTC): 2022-11-09 15:39
Parent(s): bfa78d7493f5eb04b6bd3a4ad26dd1a92d17a895
Signer:
Signing key:
Signing status: N
Tree: 12ece636d678ada3b239542def10d7ce9b263e20
File Lines added Lines deleted
wellmet/qt_gui/qt_pairwise.py 35 16
File wellmet/qt_gui/qt_pairwise.py changed (mode: 100644) (index 39ccfc0..1fa2028)
... ... class MView(pg.ImageView):
435 435 self.nsim = nsim = w.slider.value() self.nsim = nsim = w.slider.value()
436 436
437 437 self.data = np.empty((3, nsim, nsim)) self.data = np.empty((3, nsim, nsim))
438 self.data[2] = 0
438 self.data[2] = -1 #č kvuli ContactWidgetu
439 439
440 440 self.show() self.show()
441 441 #self.setImage(data, levelMode='rgba') #self.setImage(data, levelMode='rgba')
 
... ... class MView(pg.ImageView):
478 478 self.data = np.empty((3, nsim, nsim)) self.data = np.empty((3, nsim, nsim))
479 479 #č zelené-červené barvy přepíše distance matrix #č zelené-červené barvy přepíše distance matrix
480 480 #č za modrou ale nikdo zodpovednost nenese #č za modrou ale nikdo zodpovednost nenese
481 self.data[2] = 0
481 self.data[2] = -1 #č kvuli ContactWidgetu
482 482 self.nsim = nsim self.nsim = nsim
483 483
484 484
 
... ... class ContactWidget(pg.LayoutWidget):
653 653 m = self.nsim m = self.nsim
654 654 i, j = min(x, y), max(x, y) i, j = min(x, y), max(x, y)
655 655 entry = m * i + j - ((i + 2) * (i + 1)) // 2 entry = m * i + j - ((i + 2) * (i + 1)) // 2
656 val = self.condensed_contacts[entry]
657 if val == 0:
658 self.condensed_contacts[entry] = val = self.get_contact(i, j)
656 val = self.check_contact(entry, i, j)
659 657 self.show() self.show()
660 658
661 659 if val > 0: if val > 0:
 
... ... class ContactWidget(pg.LayoutWidget):
670 668 m = self.nsim m = self.nsim
671 669 i, j = min(x, y), max(x, y) i, j = min(x, y), max(x, y)
672 670 entry = m * i + j - ((i + 2) * (i + 1)) // 2 entry = m * i + j - ((i + 2) * (i + 1)) // 2
673 self.condensed_contacts[entry] = val = self.get_contact(i, j)
671 val = self.force_check_contact(entry, i, j)
674 672 self.show() self.show()
675 673
676 674 if val > 0: if val > 0:
 
... ... class ContactWidget(pg.LayoutWidget):
682 680 def discover(self): def discover(self):
683 681 nsim = self.nsim nsim = self.nsim
684 682 if nsim > 0: if nsim > 0:
683 self.setup_CS()
685 684 self.stopbtn.setEnabled(True) self.stopbtn.setEnabled(True)
686 685 self.stopbtn.setCheckable(True) self.stopbtn.setCheckable(True)
687 contacts = self.condensed_contacts
686
688 687 if self.param.getValues()['check_all'][0]: if self.param.getValues()['check_all'][0]:
689 688 for i in range(nsim-1, -1, -1): for i in range(nsim-1, -1, -1):
690 689 # keep the GUI responsive :) # keep the GUI responsive :)
 
... ... class ContactWidget(pg.LayoutWidget):
694 693 break break
695 694 preentry = nsim * i - ((i + 2) * (i + 1)) // 2 preentry = nsim * i - ((i + 2) * (i + 1)) // 2
696 695 for j in range(i+1, nsim): for j in range(i+1, nsim):
697 contacts[preentry + j] = self.get_contact(i, j)
696 self.check_contact(preentry + j, i, j)
698 697 else: else:
699 698 failsi = self.w.get_sample_box().failsi failsi = self.w.get_sample_box().failsi
700 699 for i in range(nsim-1, -1, -1): for i in range(nsim-1, -1, -1):
 
... ... class ContactWidget(pg.LayoutWidget):
706 705 preentry = nsim * i - ((i + 2) * (i + 1)) // 2 preentry = nsim * i - ((i + 2) * (i + 1)) // 2
707 706 if failsi[i]: #č první je červený if failsi[i]: #č první je červený
708 707 for j in range(i+1, nsim): for j in range(i+1, nsim):
709 contacts[preentry + j] = self.get_contact(i, j)
708 self.check_contact(preentry + j, i, j)
710 709 else: else:
711 710 for j in range(i+1, nsim): for j in range(i+1, nsim):
712 711 if failsi[j]: if failsi[j]:
713 contacts[preentry + j] = self.get_contact(i, j)
712 self.check_contact(preentry + j, i, j)
714 713 self.stopbtn.setChecked(False) self.stopbtn.setChecked(False)
715 714 self.stopbtn.setEnabled(False) self.stopbtn.setEnabled(False)
716 715 self.show() self.show()
717 716
718 717
719 def get_contact(self, i, j):
720 return -1 + 2 * self.CS.is_couple((i, j), **self.kwargs)
721
718 def force_check_contact(self, entry, i, j):
719 val = -1 + 2 * self.CS.is_couple((i, j), **self.kwargs)
720 self.condensed_contacts[entry] = val
721 #č není to úplně ideální kód style. Nastavit a zaroveň vrácet :(
722 return val
723
724
725 def peacefully_check_contact(self, entry, i, j):
726 val = self.condensed_contacts[entry]
727 if val == 0:
728 return self.force_check_contact(entry, i, j)
729 else:
730 return val
731
722 732
723 733 def setup(self): def setup(self):
724 734 self.toolbar = QtWidgets.QToolBar(self) self.toolbar = QtWidgets.QToolBar(self)
 
... ... class ContactWidget(pg.LayoutWidget):
782 792 del self.qframe del self.qframe
783 793 except AttributeError: except AttributeError:
784 794 pass pass
785
786 self.w.image_view.blue[self.mask] = 0
795
796 self.w.image_view.blue[self.mask] = -1
787 797 self.w.image_view.update() self.w.image_view.update()
788 798
789 799 def show(self): def show(self):
790 800 self.w.image_view.blue[self.mask] = self.condensed_contacts self.w.image_view.blue[self.mask] = self.condensed_contacts
791 801 try: try:
792 802 self.w.image_view.blue[self.mask] -= self.condensed_qontacts self.w.image_view.blue[self.mask] -= self.condensed_qontacts
803 self.w.image_view.blue[self.mask] /= 2
793 804 except AttributeError: except AttributeError:
794 805 pass pass
795 806 self.w.image_view.update(autoRange=False) self.w.image_view.update(autoRange=False)
796 807
797 808 def hide(self): def hide(self):
798 self.w.image_view.blue[self.mask] = 0
809 self.w.image_view.blue[self.mask] = -1
799 810 self.w.image_view.update() self.w.image_view.update()
800 811
801 812
 
... ... class ContactWidget(pg.LayoutWidget):
804 815 params.append({'name': 'check_all', 'title': 'all contacts', params.append({'name': 'check_all', 'title': 'all contacts',
805 816 'type': 'bool', 'value': True, 'type': 'bool', 'value': True,
806 817 'tip': 'allows to skip "green" contacts'}) 'tip': 'allows to skip "green" contacts'})
818 params.append({'name': 'force_update', 'title': 'reevaluate',
819 'type': 'bool', 'value': False,
820 'tip': "always reevaluate even discovered contacts"})
807 821 params.append({'name': 'method', 'type': 'list', 'value': 'DirectHull', \ params.append({'name': 'method', 'type': 'list', 'value': 'DirectHull', \
808 822 'values': ['SBall', 'BrickHull', 'DirectHull', 'CompleteHull', 'QHull', 'Grick']}) 'values': ['SBall', 'BrickHull', 'DirectHull', 'CompleteHull', 'QHull', 'Grick']})
809 823
 
... ... class ContactWidget(pg.LayoutWidget):
837 851 sample_space = getattr(sample_box, self.w.space) sample_space = getattr(sample_box, self.w.space)
838 852 self.CS = ConvexSpline(sample_space) self.CS = ConvexSpline(sample_space)
839 853
854 if self.param.getValues()['force_update'][0]:
855 self.check_contact = self.force_check_contact
856 else:
857 self.check_contact = self.peacefully_check_contact
858
840 859 # #
841 860 # #
842 861 # #č bez semplu se neobejde # #č bez semplu se neobejde
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/iam-git/WellMet

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/iam-git/WellMet

Clone this repository using git:
git clone git://git.rocketgit.com/user/iam-git/WellMet

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main