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)
whitebox: add explicitly solved Gaussian 2D product distribution 23d243baed0b7b71ba887444665420d673dc3fe9 I am 2022-05-11 15:37:19
whitebox: simplify Bessel solutions d097f681f9c96d7f8c6e0c044479681bae110e98 I am 2022-05-08 03:33:44
reorganize the repo 5226fda5d5cba79b6d3471540a4a5f47109d0061 I am 2022-04-30 17:11:21
remore user stuff from the repo ffd15c3d866496bccc5358797d71f2783118235c I am 2022-04-30 16:49:03
dicebox.Goal.get_pf_estimation: fix global stats 423b68cea2d15fce8cf4a157de0160bf26987088 I am 2022-04-21 12:38:48
ghull.Shell_1DS: use geomspace placing if r is large enough. Asi funguje ac4735a382524b05a76e258d774b0e5c0bfd0ec4 I am 2022-04-21 12:37:04
testcases.testcases_2D: add beta_circle_2D case f59387e9981217fde69ba4d87a05ca4017fb5159 I am 2022-04-21 11:40:17
mplot.mart: make isodensities more reliable e18d78f623ef5893a9ecf9cb7e6309de7df7352c I am 2022-04-13 06:18:50
misc: add get_isodistances() function ee82e4a69e51c6fa6a19e1715f71173907f9c4af I am 2022-04-13 06:16:05
testcases.testcases_2D: add natafm_plane_2D case 65f6f76b97f340123083369a9f705673e9e6eb30 I am 2022-04-12 21:38:36
qt_gui.qt_dicebox: add Razitko box tab, simplify setup widget e502adfa6458c63f18b81410c0a923aeee610641 I am 2022-04-11 05:41:07
dicebox: backport assess_candidates() to Chrt 62628b5b5f0f2da1f37c504175e4b7678ff94e8e I am 2022-04-11 05:39:40
dicebox.Goal: add chee and chee2 potentials 1b7e1af9932a9761652b57f2445daa7612f8f09e I am 2022-04-11 00:34:30
ghull.Ghull: fix NaN in get_r() method 654d4d32ebf8d14f88bc78dbee27567e9aa9564e I am 2022-04-10 16:06:24
estimation: nahradit zastaralou hlavičku 00b7aa07abc3072261da2cc7ba775d5228eefdf7 I am 2022-04-04 03:34:36
testcases.testcases_2D: add more nataf ceses ff4873afb1722500e3faed3c7a7f2552496b6e08 I am 2022-04-02 18:48:42
dicebox.Goal._handle_candidates: trigger cache update 80d401d5c4aaab0894d92e6df5390aff12738880 I am 2022-03-30 22:11:24
mplot.mfigs: add G_U_distortion plot 6ed034375dfd042706a91a368c9483270095e75c I am 2022-03-20 14:42:50
mplot.mart: add number_points function dab89bdb9e5190600aa394c9b65cfa24d162be0e I am 2022-03-20 14:42:23
testcases:testcases_nD: add hyperplane_pf3 87176287101b0a15a86c7999ba9626674400d225 I am 2022-03-20 14:41:26
Commit 23d243baed0b7b71ba887444665420d673dc3fe9 - whitebox: add explicitly solved Gaussian 2D product distribution
Author: I am
Author date (UTC): 2022-05-11 15:37
Committer name: I am
Committer date (UTC): 2022-05-11 15:37
Parent(s): d097f681f9c96d7f8c6e0c044479681bae110e98
Signer:
Signing key:
Signing status: N
Tree: d9f6e5eee8ed3c807dbed8a3713ddad5da5052b3
File Lines added Lines deleted
wellmet/whitebox.py 24 7
File wellmet/whitebox.py changed (mode: 100644) (index e4d83e5..3699614)
... ... class Gaussian_Z_sum(WhiteBox): #ё куда ж без этого...
311 311 return 'Gaussian_Z_sum(nvar=%s, beta_exact=%s)' % (wt.f.nvar, wt.beta_exact) return 'Gaussian_Z_sum(nvar=%s, beta_exact=%s)' % (wt.f.nvar, wt.beta_exact)
312 312
313 313
314 def gauss_prod_CDF(z):
315 """product Z= X_1 * X_2 has probability density f(z) = K_0(|z|)/pi,
316 where K_0() is the modified Bessel function of the second kind (zero order) and
317 $X_1, X_2$ are independent standard normal variables.
318 The distribution function F(z) = \int_{-\infty}^z f(t) dt can be solved in closed form as follows
319 F_Z(z)= 1/2 + z/2/pi * (K_0(|z|) * (2 + pi * L_1(z)) + K_1(|z|) * pi * L_0(|z|)),
320 where L_0() L_1() are the modified Struve functions of orders zero and one respectively.
321 """
322 StruveL0 = special.modstruve(0, np.abs(z))
323 StruveL1 = special.modstruve(1, z)
324 BesselK0 = special.kn(0, np.abs(z))
325 BesselK1 = special.kn(1, np.abs(z))
326 return 0.5 + z/2/np.pi * (BesselK0 * (2 + np.pi * StruveL1) + BesselK1 * np.pi * StruveL0)
327
314 328 class Gaussian_Z_prod_2D(WhiteBox): class Gaussian_Z_prod_2D(WhiteBox):
315 329 def __init__(self, **kwargs): def __init__(self, **kwargs):
316 330 """ """
 
... ... class Gaussian_Z_prod_2D(WhiteBox):
319 333 #č měníme logiku. #č měníme logiku.
320 334 #č u této třídy známenko constanty bude ovlivňovat #č u této třídy známenko constanty bude ovlivňovat
321 335 #č poruchové kvadranty. #č poruchové kvadranty.
336 if 'sign' in kwargs:
337 self.sign = kwargs['sign']
338 else:
339 self.sign = 1
322 340 if 'const' in kwargs: if 'const' in kwargs:
323 341 self.const = kwargs['const'] self.const = kwargs['const']
324 342 elif 'beta' in kwargs: elif 'beta' in kwargs:
 
... ... class Gaussian_Z_prod_2D(WhiteBox):
330 348
331 349 #č g-modelu je to samozřejmě šuma, ale bílá skříňka nechť raději #č g-modelu je to samozřejmě šuma, ale bílá skříňka nechť raději
332 350 #č pečlivěji zpracovává vstup #č pečlivěji zpracovává vstup
333 self.gm = g_models.Z_prod(const=self.const, sign=np.sign(self.const))
351 self.gm = g_models.Z_prod(const=self.const, sign=np.sign(self.sign))
334 352 self.f = f_models.SNorm(2) self.f = f_models.SNorm(2)
335 353 #č na začatku nemáme vzorky - pouze rozdělení a podpís #č na začatku nemáme vzorky - pouze rozdělení a podpís
336 354 self.sample_box = SampleBox(self.f(), gm_signature=self.gm_signature) self.sample_box = SampleBox(self.f(), gm_signature=self.gm_signature)
 
... ... class Gaussian_Z_prod_2D(WhiteBox):
339 357 # kn(n, x) Modified Bessel function of the second kind of integer order n # kn(n, x) Modified Bessel function of the second kind of integer order n
340 358 # modstruve(v, x) Modified Struve function of order v at x # modstruve(v, x) Modified Struve function of order v at x
341 359 #č Odvození pf_exact z Maple #č Odvození pf_exact z Maple
342 const = np.abs(self.const)
343 StruveL0 = special.modstruve(0, const)
344 StruveL1 = special.modstruve(1, const)
345 BesselK0 = special.kn(0, const)
346 BesselK1 = special.kn(1, const)
347 self.pf_exact = 0.5 - const/2 * (StruveL1 * BesselK0 + StruveL0 * BesselK1 + 2/np.pi * BesselK0)
360 #self.pf_exact = 0.5 - const/2 * (StruveL1 * BesselK0 + StruveL0 * BesselK1 + 2/np.pi * BesselK0)
361 if self.sign > 0:
362 self.pf_exact = gauss_prod_CDF(-self.const)
363 else:
364 self.pf_exact = 1 - gauss_prod_CDF(-self.const)
348 365 self.pf_exact_method = 'exact (Bessel) solution' self.pf_exact_method = 'exact (Bessel) solution'
349 366
350 367
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