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)
voronoi.ContactVoronoi: add explore_couple() method 72f4dffa5e8e7ee3165df4648f6a35d75d6678a3 I am 2022-11-29 11:59:07
voronoi: almost finished 00b697466c226212aeb1ea76a717cf3db48c3187 I am 2022-11-28 16:28:48
voronoi: WIP 29c59822f96df4efd6d1c6555a6fa083a869a2c8 I am 2022-11-28 11:14:50
voronoi: WIP, clean up 8e776235f7603a9bc7f3d8254976224a81bb153e I am 2022-11-27 19:56:34
voronoi: WIP 41e506eacb502853a1cf70023e7b276539579af7 I am 2022-11-27 13:03:08
convex_hull: optimize orth basis generation 4ebfde2955aa792fb31075bf9ac8af718ae07b29 I am 2022-11-26 15:35:21
voronoi: WIP 8f7f3bca7c4333ab579e057438c8c64208d1f60e I am 2022-11-26 11:22:55
voronoi: remove the code already moved to wireframe module fe57b4b699e8689d35afb510f704019152566f09 I am 2022-11-25 09:25:55
qt_gui.qt_pairwise.ContactWidget: show Qhull request at most once. db6af332a70786759692175384f4b7e779b4caca I am 2022-11-16 13:26:04
wireframe.LinearSolver: polytope handle hotfix bc48de3193ce9be482cc4dd068a26f48ea1e0203 I am 2022-11-16 13:24:41
qt_gui.qt_pairwise.ContactWidget: add LP methods 8dbd480ca80aabe1c7e0e689780767b78c86c1d1 I am 2022-11-16 11:33:32
wireframe: implement two LP solvers 8aecd55104ce85ccccf872ebef0052a5937415b5 I am 2022-11-16 11:32:31
qt_gui.qt_pairwise.ContactWidget: add Gabriel adjacency 86eaf302b176612fad072a2248e2c724d32be755 I am 2022-11-16 06:17:53
wireframe: implement Gabriel adjacency f0a74b4f28cec6c2ddc68d6811e0a812fc829d63 I am 2022-11-16 06:16:58
qt_gui.qt_pairwise.ContactWidget: reflect updated wireframe b00a9be23d92d999e0020426a7a5caa1206c5862 I am 2022-11-16 03:56:57
wireframe: implement LocalizedHull class 95c19144c5144461db241df1b2bd20d8950c8d57 I am 2022-11-16 03:55:59
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
Commit 72f4dffa5e8e7ee3165df4648f6a35d75d6678a3 - voronoi.ContactVoronoi: add explore_couple() method
Author: I am
Author date (UTC): 2022-11-29 11:59
Committer name: I am
Committer date (UTC): 2022-11-29 11:59
Parent(s): 00b697466c226212aeb1ea76a717cf3db48c3187
Signer:
Signing key:
Signing status: N
Tree: 72079e3aebf0034a439ae33cb52786e42a884e39
File Lines added Lines deleted
wellmet/voronoi.py 70 8
File wellmet/voronoi.py changed (mode: 100644) (index 307bf40..9a12bdd)
... ... class ContactVoronoi:
619 619 def update_contacts(self): def update_contacts(self):
620 620 #č já vím, že sample box pokážde failsi přepočítavá #č já vím, že sample box pokážde failsi přepočítavá
621 621 self.failsi = failsi = self.sample_box.failsi self.failsi = failsi = self.sample_box.failsi
622 self.points = getattr(self.sample_box, self.model_space)
622 self.points = points = getattr(self.sample_box, self.model_space)
623 623 self.PDF = self.sample_box.pdf(self.model_space) self.PDF = self.sample_box.pdf(self.model_space)
624 624
625 625 assert len(self._indices_to_update) == 0 assert len(self._indices_to_update) == 0
626 626
627 627 nis = self.ns nis = self.ns
628 workers = self.workers
628 629
629 630 #č zde postupně v cyklu prochazíme všemi (novými) páry kontaktů #č zde postupně v cyklu prochazíme všemi (novými) páry kontaktů
630 631 #č a omezujeme se pouse nejbližšími vzorky #č a omezujeme se pouse nejbližšími vzorky
 
... ... class ContactVoronoi:
635 636 for i in range(self._nsim, self.sample_box.nsim): for i in range(self._nsim, self.sample_box.nsim):
636 637 if failsi[i]: #č první je červený if failsi[i]: #č první je červený
637 638 for j in range(i): for j in range(i):
639 tp = TwoPoints(points, (i, j), workers=workers)
638 640 if failsi[j]: if failsi[j]:
639 641 #č červený kontakt #č červený kontakt
640 642 # -1 = 'outside', 0=success, 1=failure, 2=mix # -1 = 'outside', 0=success, 1=failure, 2=mix
641 self.onboard_couple((i, j), event_id=1, nis=nis)
643 self.onboard_couple(tp, event_id=1, nis=nis)
642 644 else: else:
643 645 #č žlutý kontakt #č žlutý kontakt
644 646 # -1 = 'outside', 0=success, 1=failure, 2=mix # -1 = 'outside', 0=success, 1=failure, 2=mix
645 self.onboard_couple((i, j), event_id=2, nis=nis)
647 self.onboard_couple(tp, event_id=2, nis=nis)
646 648
647 649 else: #č první je zelený else: #č první je zelený
648 650 for j in range(i): for j in range(i):
649 651 if failsi[j]: if failsi[j]:
650 652 #č žlutý kontakt #č žlutý kontakt
651 653 # -1 = 'outside', 0=success, 1=failure, 2=mix # -1 = 'outside', 0=success, 1=failure, 2=mix
652 self.onboard_couple((i, j), event_id=2, nis=nis)
654 tp = TwoPoints(points, (i, j), workers=workers)
655 self.onboard_couple(tp, event_id=2, nis=nis)
653 656
654 657 #else: #č jinak nič #else: #č jinak nič
655 658 #оӵ Вож. Кулэ ӧвӧл #оӵ Вож. Кулэ ӧвӧл
 
... ... class ContactVoronoi:
824 827 self.mixed_couples.pop(couple_indices, None) self.mixed_couples.pop(couple_indices, None)
825 828 self.red_couples.pop(couple_indices, None) self.red_couples.pop(couple_indices, None)
826 829
827 def onboard_couple(self, couple_indices, event_id, nis):
828 #č (i, j)? poprvé ta čísla vidíme
829 i, j = couple_indices
830 def explore_couple(self, couple_indices, nis):
831 """
832 Method is dedicated for the external usage.
833 If someone thinks CV missed out some pair,
834 it could say about and try to fix the thing.
835 """
836 i, j = max(couple_indices), min(couple_indices)
837 couple_indices = (i, j)
838 failsi = self.sample_box.failsi
839 if failsi[i]: #č první je červený
840 if failsi[j]:
841 #č červený kontakt
842 # -1 = 'outside', 0=success, 1=failure, 2=mix
843 event_id = 1
844 else:
845 #č žlutý kontakt
846 # -1 = 'outside', 0=success, 1=failure, 2=mix
847 event_id = 2
848
849 else: #č první je zelený
850 if failsi[j]:
851 #č žlutý kontakt
852 # -1 = 'outside', 0=success, 1=failure, 2=mix
853 event_id = 2
854 else:
855 return
856 #оӵ Вож. Кулэ ӧвӧл
830 857
831 858 tp = TwoPoints(self.points, couple_indices, workers=self.workers) tp = TwoPoints(self.points, couple_indices, workers=self.workers)
859 #č pokud pár známe, jen přídáme další sadu bodů
860 if couple_indices in self.couples:
861 if event_id == 2:
862 best_nodes = self.mixed_couples[couple_indices]
863 else:
864 best_nodes = self.red_couples[couple_indices]
865 nodes = self.sample_alike(tp, best_nodes, nis)
866 if nodes is not None:
867 self.couples[couple_indices].append(nodes.idx)
868 if nodes.score > best_nodes.score:
869 self._recommend_to_integration(nodes)
870
871 return nodes
872
873 #č pár nám není znám. Ještě jednou pokusíme nasypat body
874 nodes = self.onboard_couple(tp, event_id=event_id, nis=nis)
875
876 #č project páry na update
877 for couple_indices in self._indices_to_update:
878 #č nepodporuje slovník množinové operace
879 self.update_couple(couple_indices)
880 self._indices_to_update.clear()
881
882 return nodes
883
884
885
886
887
888 def onboard_couple(self, tp, event_id, nis):
889 #č (i, j)? poprvé ta čísla vidíme
890 i, j = couple_indices = tp.couple_indices
891
832 892 midpoint = tp.half_point midpoint = tp.half_point
833 893 #č Nejdřív - zda je přímy kontakt, prostě na usečce #č Nejdřív - zda je přímy kontakt, prostě na usečce
834 894 #TData(X=nodes[gmask], imask, dd) #TData(X=nodes[gmask], imask, dd)
 
... ... class ContactVoronoi:
836 896 if nodes is not None: if nodes is not None:
837 897 #č kontakt existuje, dáme vědět aktualizovačce #č kontakt existuje, dáme vědět aktualizovačce
838 898 ##č (snad jediné místo kde tuhle funkci voláme) ##č (snad jediné místo kde tuhle funkci voláme)
899 self._add_indices_to_update(i) #č může nás volat i explore_couple()
839 900 self._add_indices_to_update(j) self._add_indices_to_update(j)
840 901 self.couples[couple_indices].append(nodes.idx) self.couples[couple_indices].append(nodes.idx)
841 902
 
... ... class ContactVoronoi:
875 936
876 937 #č kontakt existuje, dáme vědět aktualizovačce #č kontakt existuje, dáme vědět aktualizovačce
877 938 ##č (druhé místo kde tuhle funkci voláme) ##č (druhé místo kde tuhle funkci voláme)
939 self._add_indices_to_update(i) #č může nás volat i explore_couple()
878 940 self._add_indices_to_update(j) self._add_indices_to_update(j)
879 941 self.couples[couple_indices].append(nodes.idx) self.couples[couple_indices].append(nodes.idx)
880 942
 
... ... class ContactVoronoi:
897 959 #č zde je to totálná zbytečnost #č zde je to totálná zbytečnost
898 960 # -1 = 'outside', 0=success, 1=failure, 2=mix # -1 = 'outside', 0=success, 1=failure, 2=mix
899 961 self._recommend_to_integration(best_nodes) self._recommend_to_integration(best_nodes)
900
962 return best_nodes
901 963
902 964
903 965
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