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)
simplex.Triangulation: keep locally pdfs and failsi, send tuple on simplex invalidation d2885ce44585e22294f9940159d6313642164f4c I am 2022-12-07 04:14:05
convex_hull.QHull: manual update() fix 5ccff702b9920c7525c88d306f2300cd43b2e76b I am 2022-12-07 04:02:39
simplex: implement BetterCubatureIntegration 88b14adc4423f0587bd51bed06e74ce6d0d60bd1 I am 2022-12-05 22:20:31
convex_hull.BrickHull: add get_hyperplane_distances() method a use it as fallback for the Qhull 48d35c953a5cbbf739e5e838709bc00fe2f047d4 I am 2022-12-05 03:30:12
convex_hull.Qhull: add get_hyperplane_distances() method, add auto_update parameter 28aada4b79b52f58c4ad43d270be997ec6359166 I am 2022-12-04 22:49:41
move diceboxes to the dedicated drawer 31c7d30ed43f04b9469df843f909814c062adf5e I am 2022-12-04 21:27:37
reader: finally, add new Store class for the estimations 673b7daa8213807d0217089b3317674595156f6d I am 2022-12-03 17:46:22
f_models.SNorm: hotfix 5f364d1770e18d18fb810760b6207c905b551762 I am 2022-12-02 21:33:48
f_models: rewrite SNorm in lazy way. Old SNorm class renamed to SNormClassic 3b6805b2a1d0bce88960bc016bbe74bb5274810b I am 2022-12-02 21:11:37
simplex: implement CircumCenter class 0a1a67122854cfb331f696163f22cfc67331f3e8 I am 2022-12-01 01:40:38
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
Commit d2885ce44585e22294f9940159d6313642164f4c - simplex.Triangulation: keep locally pdfs and failsi, send tuple on simplex invalidation
Author: I am
Author date (UTC): 2022-12-07 04:14
Committer name: I am
Committer date (UTC): 2022-12-07 04:14
Parent(s): 5ccff702b9920c7525c88d306f2300cd43b2e76b
Signer:
Signing key:
Signing status: N
Tree: b8b616fff171c1a071ca3ebe6cf823576d560e58
File Lines added Lines deleted
wellmet/simplex.py 19 16
File wellmet/simplex.py changed (mode: 100644) (index 92688f5..52521fb)
... ... from . import sball
8 8 from . import f_models from . import f_models
9 9 from .candynodes import CandyNodes from .candynodes import CandyNodes
10 10 from scipy import spatial from scipy import spatial
11 from scipy.spatial.distance import cdist
12 11 from scipy import stats from scipy import stats
13 12
14 13 import quadpy import quadpy
 
... ... class _Triangulation:
254 253
255 254 sx.sample_box = sample_box sx.sample_box = sample_box
256 255 sx.tri_space = tri_space sx.tri_space = tri_space
256 sx.PDF = sample_box.pdf(tri_space)
257 sx.failsi = sample_box.failsi
257 258 sx.issi = issi #č ISSI potřebujem pro tri_estimation sx.issi = issi #č ISSI potřebujem pro tri_estimation
258 259
259 260 if weighting_space is None: if weighting_space is None:
 
... ... class _Triangulation:
377 378
378 379 def _tri_update(sx, tri_plan): def _tri_update(sx, tri_plan):
379 380 #č separujeme, abychom vědeli, kolik času žere samotný QHull #č separujeme, abychom vědeli, kolik času žere samotný QHull
380 sx.tri.add_points(tri_plan[sx.tri.npoints:])
381 sx.tri.add_points(tri_plan[sx.tri.npoints:])
382 #č ale jo, nejen QHull
383 sx.PDF = sx.sample_box.pdf(sx.tri_space)
384 sx.failsi = sx.sample_box.failsi
381 385
382 386
383 387
 
... ... class BetterCubatureIntegration(_Triangulation):
1072 1076 sx.simplex_stats.pop(simplex, None) sx.simplex_stats.pop(simplex, None)
1073 1077
1074 1078 if sx.on_delete_simplex is not None: if sx.on_delete_simplex is not None:
1075 #č zpatky do ndarray...
1076 sx.on_delete_simplex(indices=np.array(simplex))
1079 #č Bacha, teď posíláme tuple.
1080 #č Kód na té straně úplně stejně bude vyhazovat
1081 #č záznamy ze slovníků
1082 sx.on_delete_simplex(simplex)
1077 1083
1078 1084
1079 1085 #č vyhodil jsem simplex_id'y #č vyhodil jsem simplex_id'y
 
... ... class BetterCubatureIntegration(_Triangulation):
1103 1109
1104 1110 def _integrate_mixed_simplex(sx, indices): def _integrate_mixed_simplex(sx, indices):
1105 1111
1106 f = sx.f
1107 vertices = f[indices]
1108 vertices_model = getattr(vertices, sx.tri_space)
1109 PDF = vertices.pdf(sx.tri_space)
1110 failsi = sx.sample_box.failsi[indices]
1112 vertices_model = sx.tri.points[indices]
1113 PDF = sx.PDF[indices]
1114 failsi = sx.failsi[indices]
1111 1115
1112 1116 # quadpy # quadpy
1113 1117 def _get_pdf(x): def _get_pdf(x):
1114 dmv = 1 / cdist(x.T, vertices_model)
1118 dmv = 1 / spatial.distance.cdist(x.T, vertices_model)
1115 1119 dmw = dmv * PDF dmw = dmv * PDF
1116 1120
1117 1121 # same as np.sum(dmv[:, failsi], axis=1) / np.sum(dmv, axis=1) # same as np.sum(dmv[:, failsi], axis=1) / np.sum(dmv, axis=1)
 
... ... class BetterCubatureIntegration(_Triangulation):
1120 1124
1121 1125 # side effect # side effect
1122 1126 if sx.on_add_simplex is not None: if sx.on_add_simplex is not None:
1123 nodes = f.new_sample(x.T, sx.tri_space)
1127 nodes = sx.f.new_sample(x.T, sx.tri_space)
1124 1128 fx = nodes.pdf(sx.tri_space) fx = nodes.pdf(sx.tri_space)
1125 1129 # -1=outside, 0=success, 1=failure, 2=mix # -1=outside, 0=success, 1=failure, 2=mix
1126 1130 args = {'event_id':2, 'indices':indices} args = {'event_id':2, 'indices':indices}
1127 1131 sx.on_add_simplex(CandyNodes(nodes, args, pfv=pfv, pfw=pfw)) sx.on_add_simplex(CandyNodes(nodes, args, pfv=pfv, pfw=pfw))
1128 1132 else: else:
1129 fx = f.sample_pdf(x.T, sx.tri_space)
1133 fx = sx.f.sample_pdf(x.T, sx.tri_space)
1130 1134
1131 1135 return fx, pfv, pfw return fx, pfv, pfw
1132 1136
 
... ... class BetterCubatureIntegration(_Triangulation):
1153 1157
1154 1158 def _integrate_red_simplex(sx, indices): def _integrate_red_simplex(sx, indices):
1155 1159
1156 f = sx.f
1157 vertices_model = getattr(f, sx.tri_space)[indices]
1160 vertices_model = sx.tri.points[indices]
1158 1161
1159 1162 # quadpy # quadpy
1160 1163 def _get_pdf(x): def _get_pdf(x):
1161 1164
1162 1165 # side effect # side effect
1163 1166 if sx.on_add_simplex is not None: if sx.on_add_simplex is not None:
1164 nodes = f.new_sample(x.T, sx.tri_space)
1167 nodes = sx.f.new_sample(x.T, sx.tri_space)
1165 1168 fx = nodes.pdf(sx.tri_space) fx = nodes.pdf(sx.tri_space)
1166 1169 # -1=outside, 0=success, 1=failure, 2=mix # -1=outside, 0=success, 1=failure, 2=mix
1167 1170 args = {'event_id':1, 'indices':indices} args = {'event_id':1, 'indices':indices}
1168 1171 sx.on_add_simplex(CandyNodes(nodes, args)) sx.on_add_simplex(CandyNodes(nodes, args))
1169 1172 else: else:
1170 fx = f.sample_pdf(x.T, sx.tri_space)
1173 fx = sx.f.sample_pdf(x.T, sx.tri_space)
1171 1174
1172 1175 return fx return fx
1173 1176
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