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.ContactWidget: polish UI bd48c8a6342e20dac1d635b963dd44e62c371379 I am 2022-11-13 20:03:39
wireframe: add convex_slice() method efada4c62f88b6106c687217472e0b8c52374fed I am 2022-11-13 19:51:49
qt_gui.qt_pairwise.ContactWidget: finish widget and clean up 10753a104879d6b9c109735e959b18b5a60a4616 I am 2022-11-10 05:02:01
wireframe: finish and clean up module. implement DirectContact. f7ff9c02f25a3ed8fe04e99036da69766afa5a49 I am 2022-11-10 04:58:58
qt_gui.qt_pairwise.ContactWidget: implement Qhull check e362df1f8b87ab7c6a27643cd6f4091b9caec9a3 I am 2022-11-09 21:35:10
wireframe: add Qframe class cf52d85dd1663537cd8c52a98514c7d041913979 I am 2022-11-09 21:34:12
qt_gui.qt_pairwise: add auto arnge and auto levels controls 9bc2cf10a9a1695c2c1a5f6a9959f375d3808a71 I am 2022-11-09 18:16:47
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
Commit bd48c8a6342e20dac1d635b963dd44e62c371379 - qt_gui.qt_pairwise.ContactWidget: polish UI
Author: I am
Author date (UTC): 2022-11-13 20:03
Committer name: I am
Committer date (UTC): 2022-11-13 20:03
Parent(s): efada4c62f88b6106c687217472e0b8c52374fed
Signer:
Signing key:
Signing status: N
Tree: 9c4890fff52341e14b947ab7bd09568c15195a6f
File Lines added Lines deleted
wellmet/qt_gui/qt_pairwise.py 66 19
File wellmet/qt_gui/qt_pairwise.py changed (mode: 100644) (index cf0ec32..9575b89)
... ... class ContactWidget(pg.LayoutWidget):
630 630
631 631 self.setup() self.setup()
632 632 self.kwargs = {} self.kwargs = {}
633 self.check_contact = self.peacefully_check_contact
633 634 self.setup_CS() self.setup_CS()
634 635
635 636 def on_nsim_changed(self, n): def on_nsim_changed(self, n):
636 637 try: try:
637 del self.condensed_qontacts
638 638 del self.qframe del self.qframe
639 del self.condensed_qontacts
639 640 except AttributeError: except AttributeError:
640 641 pass pass
641 642 size = n * (n - 1) // 2 size = n * (n - 1) // 2
 
... ... class ContactWidget(pg.LayoutWidget):
708 709 def discover(self): def discover(self):
709 710 nsim = self.nsim nsim = self.nsim
710 711 if nsim > 0: if nsim > 0:
711 self.setup_CS()
712 712 self.stopbtn.setEnabled(True) self.stopbtn.setEnabled(True)
713 713 self.stopbtn.setCheckable(True) self.stopbtn.setCheckable(True)
714 714
 
... ... class ContactWidget(pg.LayoutWidget):
817 817 self.dlg += 1 self.dlg += 1
818 818 return self.dlg.wasCanceled() return self.dlg.wasCanceled()
819 819
820
820 821
821 822 @staticmethod @staticmethod
822 823 def get_user_consent(): def get_user_consent():
 
... ... class ContactWidget(pg.LayoutWidget):
825 826 "Would you like to start Qhull anyway?" "Would you like to start Qhull anyway?"
826 827 ) == QtWidgets.QMessageBox.Yes ) == QtWidgets.QMessageBox.Yes
827 828
829
830 def get_qhull(self):
831 try:
832 return True, self.qframe
833 except AttributeError:
834 sample_box = self.w.get_sample_box()
835 if (sample_box.nvar < 10) or self.get_user_consent():
836 sample_space = getattr(sample_box, self.w.space)
837 self.qframe = wireframe.Qframe(sample_space)
838 return True, self.qframe
839 else:
840 return False, None
841
842
828 843 def check(self): def check(self):
829 sample_box = self.w.get_sample_box()
830 if (sample_box.nvar < 10) or self.get_user_consent():
831 sample_space = getattr(sample_box, self.w.space)
832 self.qframe = wireframe.Qframe(sample_space)
844 if self.get_qhull()[0]:
833 845 with pg.ProgressDialog("Going over all the simplices..", 0, with pg.ProgressDialog("Going over all the simplices..", 0,
834 846 self.qframe.nsimplex, cancelText='Stop', self.qframe.nsimplex, cancelText='Stop',
835 847 busyCursor=True) as dlg: busyCursor=True) as dlg:
836 848 self.dlg = dlg self.dlg = dlg
837 849 self.qframe.generate_wireframe(self.qframe_callback) self.qframe.generate_wireframe(self.qframe_callback)
838 self.condensed_qontacts = self.qframe.condensed_contacts
839 self.show()
850 if not self.dlg.wasCanceled():
851 self.condensed_qontacts = self.qframe.condensed_contacts
852 self.show()
840 853
841 854
842 855
843 856 def clear(self): def clear(self):
844 857 self.condensed_contacts[:] = 0 self.condensed_contacts[:] = 0
845 858 try: try:
846 del self.condensed_qontacts
847 859 del self.qframe del self.qframe
860 del self.condensed_qontacts
848 861 except AttributeError: except AttributeError:
849 862 pass pass
850 863
 
... ... class ContactWidget(pg.LayoutWidget):
867 880
868 881 def _set_param(self): def _set_param(self):
869 882 params = list() params = list()
883 #č check_all ovlivňuje discover(). discover ho i kontroluje
870 884 params.append({'name': 'check_all', 'title': 'all contacts', params.append({'name': 'check_all', 'title': 'all contacts',
871 885 'type': 'bool', 'value': True, 'type': 'bool', 'value': True,
872 886 'tip': 'allows to skip "green" contacts'}) 'tip': 'allows to skip "green" contacts'})
 
... ... class ContactWidget(pg.LayoutWidget):
878 892 'title': "method"}) 'title': "method"})
879 893
880 894 params.append({'name': 'solver', 'title': "solver", 'type': 'list', 'value': 'convex_sprite', params.append({'name': 'solver', 'title': "solver", 'type': 'list', 'value': 'convex_sprite',
881 'values': ['convex_solver', 'convex_spline', 'convex_sort', 'convex_sprite'],
895 'values': ['convex_solver', 'convex_spline', 'convex_sort', 'convex_sprite', 'convex_slice'],
882 896 'tip': "Versions from the earliest (the worst) to the latest (the best). Names have no any special meaning."}) 'tip': "Versions from the earliest (the worst) to the latest (the best). Names have no any special meaning."})
883 897
884 898 params.append({'name': 'tries_to_fix', 'type': 'int', params.append({'name': 'tries_to_fix', 'type': 'int',
 
... ... class ContactWidget(pg.LayoutWidget):
894 908
895 909 #č chlapi tomu svému stromu dali zabrat #č chlapi tomu svému stromu dali zabrat
896 910 #č udělali i signaly #č udělali i signaly
897 contact_finder = self.param.child('method')
898 contact_finder.sigValueChanged.connect(self.method_changed)
911 p = self.param.child('force_update')
912 p.sigValueChanged.connect(self.check_method_changed)
913
914 p = self.param.child('solver')
915 p.sigValueChanged.connect(self.cs_solver_changed)
916
917 p = self.param.child('method')
918 p.sigValueChanged.connect(self.method_changed)
919
920
921 p = self.param.child('tries_to_fix')
922 p.sigValueChanged.connect(self.convex_paremeters_changed)
923
924 p = self.param.child('tol')
925 p.sigValueChanged.connect(self.convex_paremeters_changed)
926
927
928 def convex_paremeters_changed(self, *args, **kwargs):
929 self.kwargs['tries_to_fix'] = self.param.getValues()['tries_to_fix'][0]
930 self.kwargs['tol'] = self.param.getValues()['tol'][0]
931
932
933 def check_method_changed(self, parameter):
934 if parameter.value():
935 self.check_contact = self.force_check_contact
936 else:
937 self.check_contact = self.peacefully_check_contact
938
939 def cs_solver_changed(self, parameter):
940 #č ale.. lezeme do vnítřku cizí třídy..
941 solver = getattr(wireframe, parameter.value())
942 self.CS.convex_solver = solver
899 943
900 944 def method_changed(self, parameter): def method_changed(self, parameter):
945 self.setup_CS()
901 946 if parameter.value() == 'ConvexSolver': if parameter.value() == 'ConvexSolver':
902 947 self.param.child('solver').show() self.param.child('solver').show()
903 948 self.param.child('tries_to_fix').show() self.param.child('tries_to_fix').show()
 
... ... class ContactWidget(pg.LayoutWidget):
911 956 def setup_CS(self): def setup_CS(self):
912 957 sample_box = self.w.get_sample_box() sample_box = self.w.get_sample_box()
913 958 sample_space = getattr(sample_box, self.w.space) sample_space = getattr(sample_box, self.w.space)
914 self.kwargs.clear()
915
916 959
960 #č kvůli Qhull se může stát, že budeme muset zachovat starý CS
961 #č proto opatrně mažeme kwargs no a tak.
917 962 method = self.param.child('method').value() method = self.param.child('method').value()
918 963 if method == 'Qhull': if method == 'Qhull':
919 self.CS = wireframe.Qframe(sample_space)
964 status, qframe = self.get_qhull()
965 if status:
966 self.CS = qframe
967 self.kwargs.clear()
920 968 elif method == 'DirectContact': elif method == 'DirectContact':
921 969 self.CS = wireframe.DirectContact(sample_space) self.CS = wireframe.DirectContact(sample_space)
970 self.kwargs.clear()
922 971 elif method == 'ConvexSolver': elif method == 'ConvexSolver':
923 972 solver = getattr(wireframe, self.param.child('solver').value()) solver = getattr(wireframe, self.param.child('solver').value())
924 973 self.CS = wireframe.ConvexSolver(sample_space, convex_solver=solver) self.CS = wireframe.ConvexSolver(sample_space, convex_solver=solver)
974 #self.kwargs.clear() #č aby se to neztratilo až bude 100500 metodů
925 975 self.kwargs['tries_to_fix'] = self.param.getValues()['tries_to_fix'][0] self.kwargs['tries_to_fix'] = self.param.getValues()['tries_to_fix'][0]
926 976 self.kwargs['tol'] = self.param.getValues()['tol'][0] self.kwargs['tol'] = self.param.getValues()['tol'][0]
927 977 else: else:
928 978 raise ValueError("ContactWidget: unknown method") raise ValueError("ContactWidget: unknown method")
929 979
930 if self.param.getValues()['force_update'][0]:
931 self.check_contact = self.force_check_contact
932 else:
933 self.check_contact = self.peacefully_check_contact
980
934 981
935 982
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