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: polish 3d b78a192b0ce5c4f5f9e3a94e271bcde3f3c03fac I am 2022-01-30 23:14:16
qt_gui.gl_plot: oprašit gl_plotové prvky d4336e94b262d11db3b6a110527689a9ab101a60 Aleksei Gerasimov 2022-01-30 04:00:40
add vehicle suspension problem 1546923576c59fa15e97c082b4a9c39cdadcf690 I am 2022-01-30 10:39:08
mplot: add 3D triangulation plot addec9ba2a5a9cdfbbfea2eaf660847ea814d387 I am 2022-01-30 05:15:22
mplot: oprašit matplotlibové 3D b438c6e10bc36b6f70f54611df6c3988a7959275 I am 2022-01-30 04:28:27
qt_gui.gl_plot: dát dohromady ConvexHull třídu 19f7fc6ebf130d07897dca3496d78e3208ddfa29 Aleksei Gerasimov 2022-01-30 03:03:07
qt_gui.gl_plot: Make 3D working at least for basic box 1d285206abd77b68207fae0a771b3e69b197a5aa Aleksei Gerasimov 2022-01-30 01:15:54
qt_gui: prepare 3D view startup 21648380b72f891cd267ff57e2b9bbbb1dc1d13f I am 2022-01-30 00:24:06
mplot.maxes.convergence_legend(): úpravit jeden index 6345b5d4c70dde76102e105c1accc1ca9b3adb40 I am 2022-01-29 19:12:43
mplot.mgraph.tri_estimation_plot: adjust zorder of lines 6cf6cef6d6e19eb4cb5e8cda24f2bdc75652221d I am 2022-01-28 02:44:50
add Z_min g_model and general testcase 806fa2dfea2042cda04cff9020b891d3e033b9aa I am 2022-01-27 17:17:19
mplot.mgraph.tri_estimation_plot: draw p_mixed line navíc b59ec8cbaeb671a130edee5df206d57099ecb9bf I am 2022-01-27 16:41:53
testcases.gaussian_2D: fix four branch pf_exact f9d0f71ad6a4e6af6843c6b36688b8a002495bdc I am 2022-01-27 06:14:40
mplot: add mprod plot, polish pprod 045c5401dad6abca019da21fd42da5bfb671b909 I am 2022-01-26 04:16:00
mplot.mfigs: add quadruple plot 8ef6b85bedc31f1908ce25634bda84bdc07edef9 I am 2022-01-26 01:30:01
testcases.gaussian_2D: add final pf value to metaball case 5be29e59b1cd789da32d62caff1dcfb9c231a40e I am 2022-01-26 01:28:52
g_models: add boundary finding for metaball function 5ea3011d11572d2fa98d77819cc1ba333e6b4016 I am 2022-01-26 00:38:21
mplot: polish ad5819ced9f1be64c8d731813c575c1ec854421d I am 2022-01-25 03:39:22
testcases.gaussian_2D: add pf_exact to the black swan 38e19e42884234afc467a0ee7af9699af1f84e96 I am 2022-01-25 03:37:59
mplot.maxes: pass nrod to plot_boundaries() b87c6c58900b2b7f9a11f238eb9b7f2b054e9abf I am 2022-01-24 21:06:35
Commit b78a192b0ce5c4f5f9e3a94e271bcde3f3c03fac - mplot: polish 3d
Author: I am
Author date (UTC): 2022-01-30 23:14
Committer name: I am
Committer date (UTC): 2022-01-30 23:14
Parent(s): d4336e94b262d11db3b6a110527689a9ab101a60
Signer:
Signing key:
Signing status: N
Tree: b3ac51abccdfe4b70916c06d0d3c50fef3d089ce
File Lines added Lines deleted
mplot/__init__.py 1 1
mplot/maxes.py 6 0
mplot/maxes3d.py 3 3
mplot/mfigs.py 13 73
File mplot/__init__.py changed (mode: 100644) (index 9a37ae9..1751ea6)
... ... def show_ax(ax_function, sample_box, space='R'):
36 36
37 37 def show_ax3d(ax3d_function, sample_box, space='R'): def show_ax3d(ax3d_function, sample_box, space='R'):
38 38 fig = plt.figure(figsize=(9/2.54, 9/2.54), tight_layout=True) fig = plt.figure(figsize=(9/2.54, 9/2.54), tight_layout=True)
39 ax = fig.add_subplot(111, projection='3d')
39 ax = fig.add_subplot(111, projection='3d', azim=-90.0001, elev=89)
40 40 ax.space = space ax.space = space
41 41 ax.sample_box = sample_box ax.sample_box = sample_box
42 42 ax3d_function(ax) ax3d_function(ax)
File mplot/maxes.py changed (mode: 100644) (index 45cdaa7..90d685e)
... ... __all__ = [
30 30 'tri_R_plot', 'tri_GK_plot', 'tri_R_plot', 'tri_GK_plot',
31 31 'tri_R_nodes_plot', 'tri_GK_nodes_plot', 'tri_R_nodes_plot', 'tri_GK_nodes_plot',
32 32 'convergence_diagram', 'convergence_legend', 'convergence_diagram', 'convergence_legend',
33 'convergence_square',
33 34 'just_points', 'just_points_really', 'just_points', 'just_points_really',
34 35 'base_drawing', 'candidates_drawing', 'base_drawing', 'candidates_drawing',
35 36 'just_qhull', 'qhull_plot', 'qhull_infinite', 'just_qhull', 'qhull_plot', 'qhull_infinite',
 
... ... def candidates_plot(ax):
126 127 # ax.set_xlabel("$x_1$") # ax.set_xlabel("$x_1$")
127 128 # ax.set_ylabel("$x_2$") # ax.set_ylabel("$x_2$")
128 129
130 def convergence_square(ax):
131 convergence_diagram(ax)
132 ax.set_box_aspect(1)
133 ax.secondary_yaxis('right')
134
129 135 def convergence_diagram(ax, sources=['box', 'user'], apply_proxy=False): def convergence_diagram(ax, sources=['box', 'user'], apply_proxy=False):
130 136 #č pokorně jedeme použiť guessbox #č pokorně jedeme použiť guessbox
131 137 #č nic jiného nebylo pořádně implementováno #č nic jiného nebylo pořádně implementováno
File mplot/maxes3d.py changed (mode: 100644) (index f7c2f73..ef6e7e8)
... ... def plot3D(ax3d):
28 28 #č ten [plot] zásadně vytvaří své struktury, nepouzívá oné ze skříňky, #č ten [plot] zásadně vytvaří své struktury, nepouzívá oné ze skříňky,
29 29 #č protože já vím, že v těch obrázcích, ve kterých chcu ho použit, #č protože já vím, že v těch obrázcích, ve kterých chcu ho použit,
30 30 #č můde být třeba použit řez a skříňka tedy potřebné struktury může nemít #č můde být třeba použit řez a skříňka tedy potřebné struktury může nemít
31 def tri_plot(ax3d, tri_space=None, lw=0.5, nrid=200):
31 def tri_plot(ax3d, tri_space=None, lw=0.3, nrid=200):
32 32 from .. import simplex as six from .. import simplex as six
33 33 if tri_space is None: if tri_space is None:
34 34 tri_space = ax3d.space tri_space = ax3d.space
 
... ... def tri_plot(ax3d, tri_space=None, lw=0.5, nrid=200):
41 41 on_delete_simplex=None) on_delete_simplex=None)
42 42
43 43 if tri_space == ax3d.space: if tri_space == ax3d.space:
44 mart3d.tri_plot(ax3d, Tri=Tri, ns=2, color="#747474ff", lw=lw/1.4, zorder=100)
44 mart3d.tri_plot(ax3d, Tri=Tri, ns=2, color="#74747445", lw=lw/1.4, zorder=100)
45 45 else: else:
46 mart3d.tri_plot(ax3d, Tri=Tri, ns=nrid, color="#747474ff", lw=lw/1.4, zorder=100, rasterized=True)
46 mart3d.tri_plot(ax3d, Tri=Tri, ns=nrid, color="#74747445", lw=lw/1.4, zorder=100, rasterized=True)
47 47
48 48 mart3d.scatter_points(ax3d) mart3d.scatter_points(ax3d)
49 49
File mplot/mfigs.py changed (mode: 100644) (index 8a3047a..b7cc4bd)
... ... from matplotlib import ticker
14 14
15 15 __all__ = [ __all__ = [
16 16 'convergence_diagram', 'convergence_legend', 'double_proxy_diagram', 'convergence_diagram', 'convergence_legend', 'double_proxy_diagram',
17 'four_branch_convergence',
17 'four_branch_convergence', 'suspension_3d',
18 18 'double_tri_R_plot', 'double_tri_R_twins_plot', 'double_plot', 'double_tri_R_plot', 'double_tri_R_twins_plot', 'double_plot',
19 19 'double_pprod_R_plot', 'double_mprod_R_plot', 'double_pprod_R_plot', 'double_mprod_R_plot',
20 20 'triple_plot', 'triple_wide', 'triple_wide_50_100', 'triple_plot_50_100', 'triple_plot', 'triple_wide', 'triple_wide_50_100', 'triple_plot_50_100',
 
... ... tri_kwargs = {
40 40 } }
41 41
42 42
43 def suspension_3d(fig, sample_box, space):
44 ax3d = fig.add_subplot(121, projection='3d', azim=-90.0001, elev=89)
45 ax3d.space = space
46 ax3d.sample_box = sample_box[0:300]
47 maxes3d.tri_plot(ax3d)
48 ax3d.set_zticks([])
49
50 ax = fig.add_subplot(122)
51 ax.sample_box = sample_box
52 maxes.convergence_square(ax)
53 fig.set_figwidth(19/2.54)
54
43 55 def convergence_diagram(fig, sample_box, space, lim=1000): def convergence_diagram(fig, sample_box, space, lim=1000):
44 56 fig.set_figheight(1.8) fig.set_figheight(1.8)
45 57 ax = fig.add_subplot(111) ax = fig.add_subplot(111)
 
... ... def dhull_vs_complete(fig, sample_box, space):
356 368 maxes.completehull_plot(ax, rand_dir=rand_dir) maxes.completehull_plot(ax, rand_dir=rand_dir)
357 369
358 370
359
360
361 371
362 def subplot3D(sample_box, ax3d, space='R'):
363 Fails = getattr(sample_box.failure_samples, space)
364 Succeses = getattr(sample_box.success_samples, space)
365 xyz = [0,1,2]
366 ax3d.scatter(Fails[:,xyz[0]], Fails[:,xyz[1]], Fails[:,xyz[2]], c='r', marker='.')
367 ax3d.scatter(Succeses[:,xyz[0]], Succeses[:,xyz[1]], Succeses[:,xyz[2]], c='g', marker='.')
368
369 ax3d.set_xlabel('X')
370 ax3d.set_ylabel('Y')
371 ax3d.set_zlabel('Z')
372
373
374
375 def plot3D(sample_box, space='R', filename='', format='pdf'):
376 if not filename:
377 filename = 'store/%s_%s_%s_plot3D'%(sample_box.gm_signature, space, sample_box.nsim)
378 fig = plt.figure()
379 ax3d = fig.add_subplot(111, projection='3d')
380 subplot3D(sample_box, ax3d, space)
381
382 try: # jen pro formu zkusíme, vždyť musí funkce formálně něco dělat, žejo?
383 fig.savefig(filename + "." + format)#, dpi=300)
384 except:
385 pass # nic se neděje
386
387 # vracím plt místo figury, protože nechcem sa trapiť ivent lupem
388 # return plt insted of just fig to bypass event loop issues
389 return plt.show()
390
391
392
393 # nikdo mi neuvěří, že by tohle postačílo a nebylo by nutné tohlensto furt úpravovat
394 def plot2D(sample_box, space='R', candidates=False, filename=None, format='pdf'):
395 if filename is None:
396 try:
397 filename = sample_box.filename
398 except:
399 filename = 'store/%s_%s_%s_plot2D'%(sample_box.gm_signature, space, sample_box.nsim)
400
401 fig = plt.figure()
402 ax = fig.add_subplot(111)
403 ax.space = space
404 ax.sample_box = sample_box
405
406 mart.setup(ax)
407 mart.curly(ax)
408 mart.plot_boundaries(ax, linewidth=0.7)
409 mart.scatter_points(ax)
410 try:
411 mart.triplot(ax, color="grey", linewidth=0.4)
412 except:
413 pass
414
415 if candidates:
416 #č ax.scatter posílá parameter cmap Collections třídě.
417 #č Třída mimo jiného dědí cm.ScalarMappable,
418 #č která inicializaci deleguje funkci cm.get_cmap() ve (svém) modulu cm.
419 # cmap='viridis_r' #cmap='plasma',
420 mart.scatter_candidates(ax, s=5, marker='.', cmap='plasma_r',\
421 alpha=None, linewidths=None, edgecolors=None, plotnonfinite=False)
422 mart.plot_the_best_candidate(ax, "^", color='#3D0D5B')
423
424 try: # jen pro formu zkusíme, vždyť musí funkce formálně něco dělat, žejo?
425 fig.savefig(filename + "." + format, dpi=300)
426 except:
427 pass # nic se neděje
428
429 # vracím plt místo figury, protože nechcem sa trapiť ivent lupem
430 # return plt insted of just fig to bypass event loop issues
431 return plt.show()
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