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: more figures 3a7f54e09cd78a2fc2ff50d7cf5c142f04ffdc28 I am 2022-01-09 00:42:33
testcases: add proxy_prod 2D testcase edb11ab54bcf677757974f133d2d66816b701ade I am 2022-01-09 00:41:27
stm_df: fix proxy, pandas nějak nám šťourá v našich boolean maticích 1d9f360edfc03932a08dff8aad97f189b155e708 I am 2022-01-09 00:39:24
mplot.maxes: a little bit more to labels d989a2d1b69b116a14f7ff81776f5f75d80cfea0 I am 2022-01-06 17:48:57
mplot.figs: add double and triple triangulations plots 091361cc326239b552078c489f9f164ccda4f54b I am 2022-01-06 16:17:50
mplot.maxes: aspoň nějak nastavit popísky os 50e8e467c24d73d9522166183275deab547243f8 I am 2022-01-06 16:16:36
mplot.maxes: add labels to candidates plot f8aa0f271a8d30cb7d79206290409f862c406a51 I am 2022-01-06 12:14:48
mplot.maxes: add candidates sampling (rejection-like) plot 5a15e10a9a462dd409e0627528bcb8910df77c7e I am 2022-01-06 09:40:38
mplot.maxes: add candidates plot 11e156edc351ca84fde742edf7ea1d85c3b0bc38 I am 2022-01-06 08:15:43
mplot.maxes: polish tri plots a little bit 9a4e0a18061e2d9f48c0c32c200bd1a408ceb77f I am 2022-01-05 13:15:00
mplot.mart: add plot_points() function 2c799e22d9f45b825a7f8a795ce6b9fe5fbd9c76 I am 2022-01-05 13:14:12
mplot.maxes: add convergence diagrams 813b1e8e9dd9d1e51951c51234910cdf2281cde8 I am 2022-01-05 09:07:18
mplot.mgraph: hračky s legendou 198cc40947d48b2a3cde990254def7d57c1535a6 I am 2022-01-05 09:04:23
mplot: apply default settings to figures 765d830e0230b3d85f079eb26c6eddfdb624b859 I am 2022-01-05 09:03:15
simplex: try garbage collection 45148d2665eea195c05de5852b15485d83cb7223 I am 2022-01-05 06:10:46
testcases: add Gaussian Z_min testcase 50bc3f27365e60db67f100c89ebc49b52e948645 I am 2022-01-04 13:55:59
whitebox: add Gaussian Z_min whitebox e989c87895d681920056558a0b9473b93c3b299b I am 2022-01-04 13:54:37
schemes: přídat pár komentářů k schematům e8f1665d43cfb70e89716f591852538df0e27d8c I am 2022-01-04 09:00:36
mplot.maxes: tri_nodes_plot is almost ready. Zbyvá to udělat hezky 251a0f4b7909a5468453cfb518c2bbb4064cce51 I am 2022-01-04 06:42:36
mplot.maxes: add complete tri plots 08c6e421188c4251cae1aa664a69bdc3a0afb314 I am 2022-01-04 05:45:21
Commit 3a7f54e09cd78a2fc2ff50d7cf5c142f04ffdc28 - mplot: more figures
Author: I am
Author date (UTC): 2022-01-09 00:42
Committer name: I am
Committer date (UTC): 2022-01-09 00:42
Parent(s): edb11ab54bcf677757974f133d2d66816b701ade
Signer:
Signing key:
Signing status: N
Tree: a16ff4befdd68b95c313e39a65e6ae831f4ee4db
File Lines added Lines deleted
mplot/maxes.py 27 11
mplot/mfigs.py 79 9
File mplot/maxes.py changed (mode: 100644) (index 20de768..c42155e)
... ... def candidates_plot(ax):
95 95 ax.set_xlabel("$x_1$") ax.set_xlabel("$x_1$")
96 96 ax.set_ylabel("$x_2$") ax.set_ylabel("$x_2$")
97 97
98 def convergence_diagram(ax):
98 def convergence_diagram(ax, sources=['box', 'user'], apply_proxy=False):
99 99 #č pokorně jedeme použiť guessbox #č pokorně jedeme použiť guessbox
100 100 #č nic jiného nebylo pořádně implementováno #č nic jiného nebylo pořádně implementováno
101 101 from .. import stm_df from .. import stm_df
102 df = stm_df.get_tri_box_df(ax.sample_box)
103 pf_exact = ax.sample_box.pf_exact
104 pf_exact_method = ax.sample_box.pf_exact_method
105 mgraph.tri_estimation_plot(ax, df, pf_exact=pf_exact, \
106 pf_exact_method=pf_exact_method, plot_outside=True)
107
102 df = stm_df.get_tri_data_frame(ax.sample_box, sources, apply_proxy)
103 try:
104 pf_exact = ax.sample_box.pf_exact
105 pf_exact_method = ax.sample_box.pf_exact_method
106 mgraph.tri_estimation_plot(ax, df, pf_exact=pf_exact, \
107 pf_exact_method=pf_exact_method, plot_outside=True)
108 except:
109 mgraph.tri_estimation_plot(ax, df, plot_outside=True)
108 110 ax.margins(0) ax.margins(0)
109 111 ax.set_yscale('log') ax.set_yscale('log')
110 112 ax.set_xlabel("Number of points") ax.set_xlabel("Number of points")
 
... ... def tri_nodes_plot(ax, tri_space=None, tn_scheme=None,\
126 128
127 129 #č já tuhle funkciju potřebuju ne abych kreslil bodíky ve vrcholech #č já tuhle funkciju potřebuju ne abych kreslil bodíky ve vrcholech
128 130 if tn_scheme is None: if tn_scheme is None:
129 tn_scheme = ax.sample_box.Tri.tn_scheme
131 try:
132 tn_scheme = ax.sample_box.Tri.tn_scheme
133 except:
134 import quadpy
135 tn_scheme = quadpy.tn.grundmann_moeller(sample_box.nvar, 5)
136
130 137
131 138 def _draw_nodes(*args, **kwargs): def _draw_nodes(*args, **kwargs):
132 139 # callback's signature: sx, indices=, simplex=, nodes=, cell_stats= # callback's signature: sx, indices=, simplex=, nodes=, cell_stats=
 
... ... def tri_nodes_plot(ax, tri_space=None, tn_scheme=None,\
171 178 mart.tri_plot(ax, Tri=Tri, color="#B2B2B2", lw=0.5, zorder=100) mart.tri_plot(ax, Tri=Tri, color="#B2B2B2", lw=0.5, zorder=100)
172 179
173 180 mart.plot_points(ax, ms=2.5, zorder=100500) mart.plot_points(ax, ms=2.5, zorder=100500)
174 mart.plot_boundaries(ax, lw=0.7, zorder=1050)
181 try:
182 mart.plot_boundaries(ax, lw=0.7, zorder=1050)
183 except:
184 pass
175 185 _setup_labels(ax) _setup_labels(ax)
176 186
177 187 def tri_R_nodes_plot(ax, **kwargs): def tri_R_nodes_plot(ax, **kwargs):
 
... ... def tri_plot(ax, tri_space=None, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1]):
204 214 mart.tri_plot(ax, Tri=Tri, color="#B2B2B2", lw=0.5, zorder=100) mart.tri_plot(ax, Tri=Tri, color="#B2B2B2", lw=0.5, zorder=100)
205 215
206 216 mart.plot_points(ax, ms=2.5, zorder=100500) mart.plot_points(ax, ms=2.5, zorder=100500)
207 mart.plot_boundaries(ax, lw=0.7, zorder=1050)
217 try:
218 mart.plot_boundaries(ax, lw=0.7, zorder=1050)
219 except:
220 pass
208 221 _setup_labels(ax) _setup_labels(ax)
209 222
210 223
 
... ... def convex_hull_plot(ax, tri_space=None, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.
228 241 qhull = khull.QHull(ax.sample_box, space=tri_space, incremental=False) qhull = khull.QHull(ax.sample_box, space=tri_space, incremental=False)
229 242 mart.qhull_plot(ax, qhull, color="#B2B2B2", lw=0.7, zorder=100) mart.qhull_plot(ax, qhull, color="#B2B2B2", lw=0.7, zorder=100)
230 243 mart.plot_points(ax, ms=2.5, zorder=100500) mart.plot_points(ax, ms=2.5, zorder=100500)
231 mart.plot_boundaries(ax, lw=0.7, zorder=1050)
244 try:
245 mart.plot_boundaries(ax, lw=0.7, zorder=1050)
246 except:
247 pass
232 248 _setup_labels(ax) _setup_labels(ax)
233 249
234 250 def just_points(ax): def just_points(ax):
File mplot/mfigs.py changed (mode: 100644) (index fa50a45..4ca0107)
... ... from . import maxes
10 10 from . import maxes3d from . import maxes3d
11 11
12 12 __all__ = [ __all__ = [
13 'double_tri_R_plot', 'triple_plot',
13 'convergence_diagram', 'double_proxy_diagram',
14 'double_tri_R_plot', 'double_tri_R_twins_plot', 'double_plot', 'triple_plot',
14 15 'qhull_under_density', 'plane_under_density', 'dhull_vs_complete' 'qhull_under_density', 'plane_under_density', 'dhull_vs_complete'
15 16 ] ]
16 17
18 space_labels = {
19 'R': r'$\mathcal{R}$',
20 'Rn': r'$\mathcal{R}^{\mathrm{n}}$',
21 'P': r'$\mathcal{P}$',
22 'GK': r'$\mathcal{G}^{\mathrm{c}}$',
23 'G': r'$\mathcal{G}$',
24 'U': r'$\mathcal{U}$'
25 }
26
27 def convergence_diagram(fig, sample_box, space, lim=1000):
28 fig.set_figheight(2)
29 ax = fig.add_subplot(111)
30 ax.sample_box = sample_box
31 maxes.convergence_diagram(ax)
32 ax.set_xlim(0, lim)
33
17 34
18 def double_tri_R_plot(fig, sample_box, space):
35 def double_proxy_diagram(fig, sample_box, space, lim=1000):
36 ax1 = ax = fig.add_subplot(211)
37 ax.sample_box = sample_box
38 maxes.convergence_diagram(ax)
39 ax.set_xlim(0, lim)
40 ax.set_xlabel('')
41
42 ax = fig.add_subplot(212)
43 ax.sample_box = sample_box
44 maxes.convergence_diagram(ax, sources=['box'], apply_proxy=True)
45 ax.sharex(ax1)
46
47 def double_tri_R_twins_plot(fig, sample_box, space):
19 48 ax1 = ax = fig.add_subplot(121) ax1 = ax = fig.add_subplot(121)
20 49 ax.sample_box = sample_box ax.sample_box = sample_box
21 50 ax.space = 'R' ax.space = 'R'
22 51 try: try:
23 tn_scheme = sample_box.Tri.tn_scheme
52 tn_scheme = sample_box.Tri.tn_scheme
24 53 except: except:
25 import quadpy
26 tn_scheme = quadpy.tn.grundmann_moeller(sample_box.nvar, 5)
27
54 import quadpy
55 tn_scheme = quadpy.tn.grundmann_moeller(sample_box.nvar, 5)
56
28 57 maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme) maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme)
58 ax.set_title(r'$\mathcal{R}$', pad=10)
29 59 ax = fig.add_subplot(122) ax = fig.add_subplot(122)
30 60 ax.sample_box = sample_box ax.sample_box = sample_box
31 61 ax.space = 'G' ax.space = 'G'
32 62 maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme) maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme)
63 ax.set_title(r'$\mathcal{G}$', pad=10)
33 64 ax.sharey(ax1) ax.sharey(ax1)
34 65
66 def double_tri_R_plot(fig, sample_box, space):
67 ax1 = ax = fig.add_subplot(121)
68 ax.sample_box = sample_box
69 ax.space = 'R'
70 try:
71 tn_scheme = sample_box.Tri.tn_scheme
72 except:
73 import quadpy
74 tn_scheme = quadpy.tn.grundmann_moeller(sample_box.nvar, 5)
75
76 maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme)
77 ax.set_title(space_labels[space], pad=10)
78 ax = fig.add_subplot(122)
79 ax.sample_box = sample_box
80 ax.space = 'G'
81 maxes.tri_nodes_plot(ax, tri_space='R', tn_scheme=tn_scheme)
82 ax.set_title(space_labels['G'], pad=10)
83
84 def double_plot(fig, sample_box, space):
85 #fig.set_figwidth(19/2.54)
86 ax = fig.add_subplot(121)
87 ax.sample_box = sample_box[0:100]
88 ax.space = space
89 try:
90 tn_scheme = sample_box.Tri.tn_scheme
91 except:
92 import quadpy
93 tn_scheme = quadpy.tn.grundmann_moeller(sample_box.nvar, 5)
94 maxes.tri_nodes_plot(ax, tri_space=None, tn_scheme=tn_scheme)
95 ax.set_title(space_labels[space], pad=10)
96 ax = fig.add_subplot(122)
97 ax.sample_box = sample_box[0:200]
98 ax.space = space
99 maxes.tri_nodes_plot(ax, tri_space=None, tn_scheme=tn_scheme)
100 ax.set_title(space_labels[space], pad=10)
101
35 102 def triple_plot(fig, sample_box, space): def triple_plot(fig, sample_box, space):
36 103 fig.set_figwidth(19/2.54) fig.set_figwidth(19/2.54)
37 104 ax = fig.add_subplot(131) ax = fig.add_subplot(131)
38 105 ax.sample_box = sample_box[0:100] ax.sample_box = sample_box[0:100]
39 106 ax.space = space ax.space = space
40 107 try: try:
41 tn_scheme = sample_box.Tri.tn_scheme
108 tn_scheme = sample_box.Tri.tn_scheme
42 109 except: except:
43 import quadpy
44 tn_scheme = quadpy.tn.grundmann_moeller(sample_box.nvar, 5)
110 import quadpy
111 tn_scheme = quadpy.tn.grundmann_moeller(sample_box.nvar, 5)
45 112 maxes.tri_nodes_plot(ax, tri_space=None, tn_scheme=tn_scheme) maxes.tri_nodes_plot(ax, tri_space=None, tn_scheme=tn_scheme)
113 ax.set_title(space_labels[space], pad=10)
46 114 ax = fig.add_subplot(132) ax = fig.add_subplot(132)
47 115 ax.sample_box = sample_box[0:200] ax.sample_box = sample_box[0:200]
48 116 ax.space = space ax.space = space
49 117 maxes.tri_plot(ax) maxes.tri_plot(ax)
118 ax.set_title(space_labels[space], pad=10)
50 119 ax = fig.add_subplot(133) ax = fig.add_subplot(133)
51 120 ax.sample_box = sample_box ax.sample_box = sample_box
52 121 ax.space = space ax.space = space
53 122 maxes.convex_hull_plot(ax) maxes.convex_hull_plot(ax)
123 ax.set_title(space_labels[space], pad=10)
54 124
55 125 def qhull_under_density(fig, sample_box, space): def qhull_under_density(fig, sample_box, space):
56 126 from . import _axis3d_margins_patch, _axes3d from . import _axis3d_margins_patch, _axes3d
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