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)
IS_stat: add sample_alike() function 2e5394d264b7aaaf5f2486c736ed8cc37afbd030 I am 2022-10-19 13:00:17
voronoi: WIP c3bfa60b6db2042df11528fe95a51d7cc88d3c6b I am 2022-10-19 11:18:13
voronoi: WIP baff3c5ccaf857f60194917fe5d6e33c40b01265 I am 2022-10-19 09:28:33
voronoi.ConvexSpline: little fix of np.sign() for better sleep 968f649e54d97abd596cd60749872fa3ef788c06 I am 2022-10-19 06:28:46
implement even more optimized Convex.. now ConvexSpline class c08511aecb32b880e73c9f10d07feff4dc588e8b I am 2022-10-19 04:11:13
voronoi: WIP cbb61d4544367a67c9a5c3fe6d64a9dc284eb364 I am 2022-10-18 05:05:44
voronoi: WIP e9c247fef30cfb678bad9b955d6f6a94a0ff61e7 I am 2022-10-18 01:02:30
candynodex: hotfix to support numpy masking indexing f359123b72a3d998d5eed4b9e611a5e402a18c8d I am 2022-10-17 09:02:33
add new lightweight candynodes module to replace old heavy ugly candybox ca97509f47c100df90e1e06d82ed7c759627bfd0 I am 2022-10-17 06:31:33
qt_gui: move CandyBox creating to the individual DiceBox widgets 29253625129219b5e550f82cae3da0e53ef5bd47 I am 2022-10-16 03:17:55
voronoi: WIP 4855190869e06df740cc05c64e8b27b2c3c5a88d I am 2022-10-15 22:46:51
voronoi: WIP 0298b3a0563587ea4fc24fa99b51d2e01d517203 I am 2022-10-15 20:00:25
voronoi: WIP 4b80757fa26e3d40dceac888480ec3d814f6abc9 I am 2022-10-15 17:30:11
voronoi: WIP 7cadd1d01d7f4bc3f51e785fe6ebf8cae6ff839a I am 2022-10-15 03:12:54
voronoi: clean up and comment out ContactSolver 543f8482a925ff6cf8485b9be616b5bd3c714d13 I am 2022-10-14 04:24:40
qt_gui.qt_gui: use ConvexSolver instead of ContactSolver (which did not work correctly) c1e49a9b2c3cc13886d317b460d7598f661cf216 I am 2022-10-14 04:01:06
voronoi: add fantastic ConvexSolver 2853826e5ef1abc79d3ac2fb8289b13c45211a31 I am 2022-10-14 04:00:14
qt_gui.qt_plot: add (finally!) Numbers class 4cdc658c0fcc857c23c0e39e91e7a1ce5e1b30a1 I am 2022-10-13 06:23:46
qt_gui.qt_gui: show contacts in distance matrix. Based on ContactSolver for now 21bd6101888d9f06d7d6a7c6ba2732ff30fdd68d I am 2022-10-13 04:16:41
voronoi: ContactSolver is ready. Ale je to na nic. Pomalá, potvora 28e2442b0101eac2407ed4a69c6f757ffd579cf1 I am 2022-10-13 04:14:59
Commit 2e5394d264b7aaaf5f2486c736ed8cc37afbd030 - IS_stat: add sample_alike() function
Author: I am
Author date (UTC): 2022-10-19 13:00
Committer name: I am
Committer date (UTC): 2022-10-19 13:00
Parent(s): c3bfa60b6db2042df11528fe95a51d7cc88d3c6b
Signer:
Signing key:
Signing status: N
Tree: 6170fad8535599b15f0183e1ad70019343b79245
File Lines added Lines deleted
wellmet/IS_stat.py 44 0
File wellmet/IS_stat.py changed (mode: 100644) (index 0907e38..789008d)
... ... def IS_like(f_plan, sampling_space='G', weights=None, nis=1000, d=1, design=None
362 362 return CandyBox(h_plan, w=w) return CandyBox(h_plan, w=w)
363 363
364 364
365
366
367
368
369
370 # for simplex: d = nvar+2
371 # for cell: it's not so easy
372 def sample_alike(plan, weights=None, nis=1000, d=1, design=None):
373 """
374 takes sample and returns sampling plan with the same cov (in case d=1)
375 covariance matrix we'll divide by d
376 """
377
378 nsim, ndim = plan.shape
379
380 if nsim < ndim + 1:
381 return False, None, None
382
383 S_bc = np.cov(plan, rowvar=False, bias=True, aweights=weights)
384 #č matika
385 w, v = np.linalg.eig(S_bc)
386
387 if not np.all(w > 0):
388 return False, None, None
389
390 barycenter = np.average(plan, axis=0, weights=weights)
391
392
393 # use IS sampling density with center equal to the simplex's barycenter
394 # set the minimum distance as the standard deviation of IS densisty
395 #č u stats.norm zadáváme směrodatnou odchylku, to je asi správné
396 sigmas = np.sqrt(w/d)
397 mean = 0
398 h_plan_N, pdf_N = get_norm_plan(nis, ndim, mean, sigmas, design)
399
400 #ёӵ здесь уже так легко не отделаемся. Трансформовать кароно.
401 h_plan_bc = (v @ h_plan_N.T).T
402 h_plan_sing = h_plan_bc + barycenter
403
404 return True, h_plan_sing, pdf_N
405
406
407
408
365 409
366 410 #č tím "TrueIS" bylo myšleno abosolutně matematicky korektní #č tím "TrueIS" bylo myšleno abosolutně matematicky korektní
367 411 #č započítávání sad vzorků, vybraných z libovolných (navzajem odlišných) #č započítávání sad vzorků, vybraných z libovolných (navzajem odlišných)
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