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)
g_models: add hyperbola LSF 5f6df35b4280a11c0df1d3cd110250305805ce66 I am 2023-03-12 15:07:20
simplex._Sense: implement piece of postprocessing to get unique vectors 4088852e703947643a8388b2ba8839a694211566 I am 2023-03-10 17:22:29
simplex.SeparationAxis: in case of an unexpected linprog status print result message too 1c9346233693533afb07022c78308b3be6ea9ec7 I am 2023-03-10 15:40:06
whitebox: implement method to .get_sensitivities() from 2D boundary 5729723cfe5c93658c3739fbfec384e135b44073 I am 2023-03-09 22:14:27
simplex.SeparationAxis: make an perfectionism-driven change 8278c48915c326e7731f1934732550c5b9c18e64 I am 2023-03-09 21:51:18
simplex.SeparationAxis: little fix for an hypotetical issue 838e476387c31f9c6847cf7ae8a2a01514038a03 I am 2023-03-09 15:19:48
simplex._Sense: bugfix 3ae53e8b178107b8beb6ad960ec683c8d38a3b3c I am 2023-03-07 23:23:36
simplex._Sense: totally rework, finalized vectors are introduced 829ba58a93481541a58cd4a9f6dae0ba9fb611c6 I am 2023-03-07 13:33:38
simplex: preliminary commit of an _Sense's auxiliary class - brand new SeparationAxis c0bbb714400df48abf7a398e018c5626803bf024 I am 2023-03-04 10:17:12
simplex._Sense: one more optimization a51f4ba65ad4a55ecc74fd82a6e011a4eeed8a5d I am 2023-02-26 15:21:23
qt_gui.qt_plot: implement sensitivity-related Arrows class b5365ae3ca3ab0ed8018e60d4e8711c5c30e4d96 I am 2023-02-26 14:31:10
simplex._Sense: rename "sensibility" to sensitivity a9d56d5386730263eb27e6e31f07b99bab0620fb I am 2023-02-26 14:29:54
g_models: add quadratic 013b4ddc108b94061eaebc1a10d18427f10a34d4 I am 2023-02-24 08:04:12
simplex._Sense: one more performance trick 59b423cca53b9975da67d876110927f233506de8 I am 2023-02-24 08:03:23
simplex: implement separability-based sensibility analysis (new brand _Sense class) 9c5d58f2301893ceaec1b0e90bff76035cfa15b2 I am 2023-02-23 18:49:11
dicebox.circumtri.CirQTri: switch to GaussCubatureIntegration 5b52dd25cb7a997af4953230116deb9efc577d56 I am 2023-02-11 04:32:48
simplex: implement GaussCubatureIntegration in the most memory-friendly way 689d253ae7e2a22242258fd5bef0a069caf7cf75 I am 2023-02-11 04:31:11
convex_hull.QHullCubature: implement memory-friendly outside (chi) integration ad8210a04b1e0903de7435cad16b1304707d0e6e I am 2023-02-09 22:22:05
qt_gui.qt_plot: require box recommendation to show next point 6f726047f7f08e884359020eaa1eac6f6cc125d2 I am 2023-02-09 11:51:44
dicebox.circumtri.CirQTri.get_circum_node: limit circumcenter by explore radius, not by just R 136ec73bb06da16c1f2bce64b3c349be4c8ba975 I am 2023-02-09 03:09:51
Commit 5f6df35b4280a11c0df1d3cd110250305805ce66 - g_models: add hyperbola LSF
Author: I am
Author date (UTC): 2023-03-12 15:07
Committer name: I am
Committer date (UTC): 2023-03-12 15:07
Parent(s): 4088852e703947643a8388b2ba8839a694211566
Signer:
Signing key:
Signing status: N
Tree: b7d7efa97347a2de1b43cc7878bbc305fe527b36
File Lines added Lines deleted
wellmet/g_models.py 53 0
wellmet/testcases/gaussian_2D.py 4 0
wellmet/whitebox.py 39 0
File wellmet/g_models.py changed (mode: 100644) (index cd28f59..9043bae)
... ... class Z_prod:
342 342
343 343
344 344
345 class Z_hyperbola:
346 """
347 soucin velicin plus nějaká konstanta
348 # g= s * (X1 * X2 * X3 * X4 + c )
349 """
350 # tenhle model ani nvar si neukladá, tohle vůbec neřeší
351 def __init__(self, const=0):
352 self._const = const
353
354 # sign
355 def __repr__(self):
356 return 'Z_hyperbola(%s)' % self._const
357
358 def __call__(self, input_sample):
359 # očekávam, že get_R_coordinates mně vrátí 2D pole
360 sample = get_R_coordinates(input_sample)
361 g = self._const - np.all(sample > 0, axis=1) * np.prod(sample, axis=1)
362 return SampleBox(input_sample, g, repr(self))
363
364 # Fence off!
365 def get_2D_R_boundary(self, nrod=100, *args):
366 """
367 Fence off!
368 nrod - number of rods in fencing
369 """
370 # g= X1 * X2 + c
371 #
372 # a^2 = 2*X^2
373 # a=b= X * sqrt(2)
374 # a^2 = 2*c
375 # r = a*b / np.sqrt(b**2 * np.cos(phi)**2 - a**2 * np.sin(phi)**2)
376
377 c = -self._const
378 _c = -1
379 #č náš oblibený trik - hranici nakreslime pomoci polárních souřádnic
380 phi = np.linspace(0.25*np.pi, (0.25+_c/2)*np.pi, nrod , endpoint=False)[1:]
381 r = np.sqrt(2*c / (np.sin(phi)**2 - np.cos(phi)**2))
382 bound_x_left = r * np.cos(phi+np.pi/4)
383 bound_y_left = r * np.sin(phi+np.pi/4)
384
385 # phi = np.linspace(-0.75*np.pi, (_c/2-0.75)*np.pi, nrod , endpoint=False)[1:]
386 # r = np.sqrt(2*c / (np.sin(phi)**2 - np.cos(phi)**2))
387 # bound_x_right = r * np.cos(phi+np.pi/4)
388 # bound_y_right = r * np.sin(phi+np.pi/4)
389
390 # sample compatible
391 # малы транспонировать кароно? Озьы кулэ!
392 bound_R_left = np.array((bound_x_left, bound_y_left)).T
393 #bound_R_right = np.array((bound_x_right, bound_y_right)).T
394 # tuple of samples
395 return (Ingot(bound_R_left), ) #Ingot(bound_R_right))
396
397
345 398 class Z_min: class Z_min:
346 399 """ """
347 400 min velicin plus nějaká konstanta min velicin plus nějaká konstanta
File wellmet/testcases/gaussian_2D.py changed (mode: 100644) (index b30a311..99940ff)
... ... from ..whitebox import WhiteBox, Gaussian_Z_prod_2D
14 14 from ..whitebox import Gaussian_ProdFourBetas_2D from ..whitebox import Gaussian_ProdFourBetas_2D
15 15 from ..whitebox import Gaussian_Z_sumexp_2D from ..whitebox import Gaussian_Z_sumexp_2D
16 16 from ..whitebox import Gaussian_Z_max from ..whitebox import Gaussian_Z_max
17 from ..whitebox import Gaussian_Hyperbola_2D
17 18
18 19 __all__ = [] __all__ = []
19 20
 
... ... def prod_03():
102 103 def prod_5(): def prod_5():
103 104 return Gaussian_Z_prod_2D(const=-5, sign=-1) return Gaussian_Z_prod_2D(const=-5, sign=-1)
104 105
106 add('hyperbola_2')
107 def hyperbola_2():
108 return Gaussian_Hyperbola_2D(const=2)
105 109
106 110
107 111 class ProxyProd: class ProxyProd:
File wellmet/whitebox.py changed (mode: 100644) (index 0a36430..0dff08c)
... ... class Gaussian_Z_prod_2D(WhiteBox):
472 472 def __repr__(wt): def __repr__(wt):
473 473 return 'Gaussian_Z_prod_2D(const=%s)' % wt.const return 'Gaussian_Z_prod_2D(const=%s)' % wt.const
474 474
475
476
477 class Gaussian_Hyperbola_2D(WhiteBox):
478 def __init__(self, **kwargs):
479 """
480 Breitung RESS 182 (2019) p. 99
481 """
482 if 'const' in kwargs:
483 self.const = kwargs['const']
484 elif 'beta' in kwargs:
485 self.beta = kwargs['beta']
486 self.const = self.beta**2/2
487 else:
488 raise ValueError
489
490
491 #č g-modelu je to samozřejmě šuma, ale bílá skříňka nechť raději
492 #č pečlivěji zpracovává vstup
493 self.gm = g_models.Z_hyperbola(self.const)
494 self.f = f_models.SNorm(2)
495 #č na začatku nemáme vzorky - pouze rozdělení a podpís
496 self.sample_box = SampleBox(self.f(), gm_signature=self.gm_signature)
497 #č Rozdělení transformovaného náhodného čísla je zadano jako
498 # special.kn(0, np.abs(x)) / np.pi # Breitung RESS 182 (2019) p. 99
499 # kn(n, x) Modified Bessel function of the second kind of integer order n
500 # modstruve(v, x) Modified Struve function of order v at x
501 #č Odvození pf_exact z Maple
502 #self.pf_exact = 0.5 - const/2 * (StruveL1 * BesselK0 + StruveL0 * BesselK1 + 2/np.pi * BesselK0)
503 self.pf_exact = gauss_prod_CDF(-self.const) / 2
504 self.pf_exact_method = 'exact (Bessel) solution'
505 self.r_exact = np.sqrt(np.abs(self.const) * 2)
506
507 def __str__(wt):
508 return 'Gaussian_Hyperbola_2D'
509
510 def __repr__(wt):
511 return 'Gaussian_Hyperbola_2D(const=%s)' % wt.const
512
513
475 514 #č já jsem si najednou uvědomil, že v tomto modulu #č já jsem si najednou uvědomil, že v tomto modulu
476 515 #č mám náprosto hrozný mix Camel- a snailcas'u. #č mám náprosto hrozný mix Camel- a snailcas'u.
477 516 #č Výmluvím z toho tak, podtržitko odděluje rozdělení a nazev g-modelu #č Výmluvím z toho tak, podtržitko odděluje rozdělení a nazev g-modelu
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