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)
mplot.maxes: prepare GRaph plot 68774535915af3deaf6104a0bbe9b3c4d24c0cec I am 2023-01-12 02:43:20
mplot.mgraph.tri_estimation_plot: use planar vertex estimator 1d300fa56248be9cdab5a4e5b0d4372f68fd5255 I am 2023-01-11 15:48:28
mplot.mart: implement lsf_boundary() contouring 8642d2f0c043f4e71af1cc45b9e25da326afd3ca I am 2023-01-11 05:20:00
mplot.mart.setup_labels: make labels more adaptive 60cd0b34a67b38df1c730dddc9e0771139818f33 I am 2023-01-11 04:35:47
simplex._SamplingTriangulation: self reference fix 79204ff15cba7c5ca24bb5b48e2073058acf00ae I am 2023-01-11 03:21:34
testcases.testcases_2D: add pf for rastrigin 4f3b35fe18496fcb9f59860174c876cb7a82749a I am 2023-01-10 23:39:45
dicebox.circumtri: fix initialization on ED loading. Use simple potential for space filling c02656e588a164685c4a750ce865c4b50f716563 I am 2023-01-10 23:37:30
simplex.FullCubatureIntegration.get_failure_moments: negative probabilities fix 27dd6bb1e5bb0eb1e28eef88e28913d1eca461da I am 2023-01-10 20:16:09
add more nD problems from literature 2380cdbdcf17dd5e0af19506c6f7bb1e838de03b I am 2023-01-10 06:13:56
f_models: implement Norm class 698c3216b1c8a0e2d57bfb33340a7ea8758d4e63 I am 2023-01-09 23:13:48
simplex.FullCabatureIntegration: implement get_failure_moments() 0742ee3d3932d7c3c0b6bbe6e327c92ced04aedd I am 2023-01-09 19:53:55
simplex._Triangulation: add get_failure_moments() method 3e362970b67a50643c1e486729efbf554cacf03f I am 2023-01-08 03:26:02
simplex: use advanced indexing instead of isin function 568c8623ad4cfaa343df05ae880d099556037cf0 I am 2023-01-06 13:41:00
dicebox.circumtri: fill in global simplex index only in case of full integration 065668f1810396f55be0860416f1c6ad507a9573 I am 2023-01-04 21:44:57
dicebox.circumtri: implement "holyday", breaks the greatest safe simplex 14f067d43cde14f990e7a4136b61c548f3acde92 I am 2023-01-04 16:28:51
simplex: implement FullCubatureIntegration 072927115a8a641f89b39265085eb6cac27aa492 I am 2023-01-04 16:27:39
dicebox.circumtri: use mixed facet outside nodes as candidates only. 03c1c974dafa8ff041f032c89149da7fc5b90b39 I am 2023-01-03 15:55:57
shell: use query() method of the convex hull 321a3fab33684cb9bef3c2344200c6519b595bb0 I am 2023-01-03 15:54:45
convex_hull.QHull: implement query() method. Use myshovskych sheme as fallback bc79a6fbee4d488211bf55c88702f39a0126be1b I am 2023-01-03 15:53:00
dicebox.circumtri: handle singular matrix error of CircumCenter 8207789777268039e7a866a594191063c6429c04 I am 2023-01-02 23:56:40
Commit 68774535915af3deaf6104a0bbe9b3c4d24c0cec - mplot.maxes: prepare GRaph plot
Author: I am
Author date (UTC): 2023-01-12 02:43
Committer name: I am
Committer date (UTC): 2023-01-12 02:43
Parent(s): 1d300fa56248be9cdab5a4e5b0d4372f68fd5255
Signer:
Signing key:
Signing status: N
Tree: ed63b3800acfa7367c2346fd406fd13641194681
File Lines added Lines deleted
wellmet/mplot/maxes.py 76 0
File wellmet/mplot/maxes.py changed (mode: 100644) (index 288a7be..766ada5)
... ... from matplotlib import lines as mlines
24 24
25 25 # it is mostly for qt_plot, it offers availiable options to user # it is mostly for qt_plot, it offers availiable options to user
26 26 __all__ = [ __all__ = [
27 'GRaph',
27 28 'rbf_plot', 'rbf_density_plot', 'rbf_diagram', 'rbf_plot', 'rbf_density_plot', 'rbf_diagram',
28 29 'candidates_plot', 'rejection_sampling_plot', 'candidates_plot', 'rejection_sampling_plot',
29 30 'candidates_sampling_plot', 'candidates_sampling_plot',
 
... ... __all__ = [
42 43 ] ]
43 44
44 45
46 def GRaph(ax, df=None, ls='', **kwargs):
47 from .. import sball
48 ax.margins(0)
49 #ax.yaxis.set_ticks_position('right')
50 #ax.yaxis.set_label_position('right')
51 ax.set_xlabel(r"Limit-state evaluations, $N_{\mathrm{sim}}$")
52 ax.set_ylabel("$r$")
53
54 s_ball = sball.Sball(ax.sample_box.nvar)
55
56
57 secax = ax.secondary_yaxis(1, functions=(s_ball.sf, s_ball.isf))
58 secax.set_ylabel("$S_{\chi} (r; N_{\mathrm{var}})$")
59 secax.yaxis.set_major_locator(ticker.LogLocator())
60 secax.yaxis.set_major_formatter(ticker.LogFormatterMathtext())
61
62 lengths = np.sum(np.square(ax.sample_box.G), axis=1)
63 lengths = np.sqrt(lengths, out=lengths) #lengths of each radius-vector
64
65 x = np.arange(len(lengths)) + 1
66 y = lengths
67
68 failsi = ax.sample_box.failsi
69
70 try: # proxy denotes to implicitly-known values
71 proxy = ax.sample_box.proxy.astype(bool)
72 except AttributeError:
73 proxy = np.full(len(lengths), False, dtype=np.bool)
74
75
76 #č byl jsem svědkem, že matplotlib zlobil ve 3D
77 #č kvůli tomu, že nebyl žádný safe vzorek
78 #č proto raději budu přidávat tečky podmíněne
79 mask = np.all((~failsi, ~proxy), axis=0)
80 if np.any(mask): #success
81 ax.plot(x[mask], y[mask], mec='g', mfc='g', marker='P', ls=ls, **kwargs)
82
83 mask = np.all((failsi, ~proxy), axis=0)
84 if np.any(mask): #failures
85 ax.plot(x[mask], y[mask], mec='r', mfc='r', marker='X', ls=ls, **kwargs)
86
87 mask = np.all((~failsi, proxy), axis=0)
88 if np.any(mask): #proxy_successes
89 ax.plot(x[mask], y[mask],
90 mec='#77AC30', mfc=(0,0,0,0), marker='h', ls=ls, **kwargs)
91
92 mask = np.all((failsi, proxy), axis=0)
93 if np.any(mask): #proxy_failures
94 ax.plot(x[mask], y[mask],
95 mec='#D95319', mfc=(0,0,0,0), marker='H', ls=ls, **kwargs)
96
97
98 if np.any(failsi):
99 ax.axhline(np.min(y[failsi]), c='r', zorder=-1, **kwargs)
100
101 if df is None:
102 try:
103 import pandas as pd
104 df = pd.DataFrame(ax.sample_box.box_estimations)
105 except BaseException as e:
106 print(repr(e))
107 return
108
109 x = df.nsim.to_numpy()
110 r = df.r.to_numpy()
111 R = df.R.to_numpy()
112 ax.fill_between(x, R, y2=0, color='#C3C3C3', step='post', zorder=-20)
113 ax.fill_between(x, r, y2=0, color='#FFFFFF', step='post', zorder=-10)
114 ax.set_facecolor('#E1E1E1')
115
116
117
118
119
120
45 121 def rbf_diagram(ax): def rbf_diagram(ax):
46 122 from .. import misc as wmisc from .. import misc as wmisc
47 123 rbf_stm = [] rbf_stm = []
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