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)
add line and two lines problems for sensitivity analysis 0c620f7960399ed8b34e02d663772d0eb34e66f1 I am 2023-01-14 08:30:56
simplex.FullCubatureIntegration.get_sensitivities: do not normalize global gradient c648c484a5599a00236ab70c36cdf407c24f5306 I am 2023-01-14 04:51:16
simplex: implement sensitivities 65056319c51fd93deb76ce14e52c08869dfc04a2 I am 2023-01-13 11:27:46
mplot.maxes: prepare GRaph plot 68774535915af3deaf6104a0bbe9b3c4d24c0cec I am 2023-01-12 02:43:20
mplot.mgraph.tri_estimation_plot: use planar vertex estimator 1d300fa56248be9cdab5a4e5b0d4372f68fd5255 I am 2023-01-11 15:48:28
mplot.mart: implement lsf_boundary() contouring 8642d2f0c043f4e71af1cc45b9e25da326afd3ca I am 2023-01-11 05:20:00
mplot.mart.setup_labels: make labels more adaptive 60cd0b34a67b38df1c730dddc9e0771139818f33 I am 2023-01-11 04:35:47
simplex._SamplingTriangulation: self reference fix 79204ff15cba7c5ca24bb5b48e2073058acf00ae I am 2023-01-11 03:21:34
testcases.testcases_2D: add pf for rastrigin 4f3b35fe18496fcb9f59860174c876cb7a82749a I am 2023-01-10 23:39:45
dicebox.circumtri: fix initialization on ED loading. Use simple potential for space filling c02656e588a164685c4a750ce865c4b50f716563 I am 2023-01-10 23:37:30
simplex.FullCubatureIntegration.get_failure_moments: negative probabilities fix 27dd6bb1e5bb0eb1e28eef88e28913d1eca461da I am 2023-01-10 20:16:09
add more nD problems from literature 2380cdbdcf17dd5e0af19506c6f7bb1e838de03b I am 2023-01-10 06:13:56
f_models: implement Norm class 698c3216b1c8a0e2d57bfb33340a7ea8758d4e63 I am 2023-01-09 23:13:48
simplex.FullCabatureIntegration: implement get_failure_moments() 0742ee3d3932d7c3c0b6bbe6e327c92ced04aedd I am 2023-01-09 19:53:55
simplex._Triangulation: add get_failure_moments() method 3e362970b67a50643c1e486729efbf554cacf03f I am 2023-01-08 03:26:02
simplex: use advanced indexing instead of isin function 568c8623ad4cfaa343df05ae880d099556037cf0 I am 2023-01-06 13:41:00
dicebox.circumtri: fill in global simplex index only in case of full integration 065668f1810396f55be0860416f1c6ad507a9573 I am 2023-01-04 21:44:57
dicebox.circumtri: implement "holyday", breaks the greatest safe simplex 14f067d43cde14f990e7a4136b61c548f3acde92 I am 2023-01-04 16:28:51
simplex: implement FullCubatureIntegration 072927115a8a641f89b39265085eb6cac27aa492 I am 2023-01-04 16:27:39
dicebox.circumtri: use mixed facet outside nodes as candidates only. 03c1c974dafa8ff041f032c89149da7fc5b90b39 I am 2023-01-03 15:55:57
Commit 0c620f7960399ed8b34e02d663772d0eb34e66f1 - add line and two lines problems for sensitivity analysis
Author: I am
Author date (UTC): 2023-01-14 08:30
Committer name: I am
Committer date (UTC): 2023-01-14 08:30
Parent(s): c648c484a5599a00236ab70c36cdf407c24f5306
Signer:
Signing key:
Signing status: N
Tree: addf67aed9f0593cf70666275578af4723b46f78
File Lines added Lines deleted
wellmet/g_models.py 68 0
wellmet/testcases/testcases_nD.py 9 0
wellmet/whitebox.py 49 0
File wellmet/g_models.py changed (mode: 100644) (index aadb119..b8d7311)
... ... class Linear_nD:
176 176 return (Ingot(bound_R),) return (Ingot(bound_R),)
177 177
178 178
179 class X1:
180 """
181 suma velicin plus beta*sqrt(Nvar. )
182 Pro IID Gaussian ma tohle ind. spol. beta = beta
183 The same as Linear_nD, but defined via
184 beta in sense of reliability index
185 """
186 def __init__(self, beta_exact):
187 self._beta_exact = beta_exact
188
189 # sign
190 def __repr__(self):
191 return 'X1(%s)' % repr(self._beta_exact)
192
193 def __call__(self, input_sample):
194 # očekávam, že get_R_coordinates mně vrátí 2D pole
195 sample = get_R_coordinates(input_sample)
196 g = -sample[:, 0] + self._beta_exact
197 return SampleBox(input_sample, g, repr(self))
198
199 # Fence off!
200 def get_2D_R_boundary(self, nrod=100, xlim=(-5,5), ylim=(-5,5), *args):
201 """
202 Fence off!
203 nrod - number of rods in fencing
204 """
205
206 bound_R = np.empty((nrod, 2))
207 bound_R[:, 0] = self._beta_exact
208 bound_R[:, 1] = np.linspace(ylim[0], ylim[1], nrod, endpoint=True)
209 # tuple of tuple
210 return (Ingot(bound_R),)
211
212
213 class AbsX1:
214 """
215 suma velicin plus beta*sqrt(Nvar. )
216 Pro IID Gaussian ma tohle ind. spol. beta = beta
217 The same as Linear_nD, but defined via
218 beta in sense of reliability index
219 """
220 def __init__(self, beta_exact):
221 self._beta_exact = beta_exact
222
223 # sign
224 def __repr__(self):
225 return 'X1(%s)' % repr(self._beta_exact)
226
227 def __call__(self, input_sample):
228 # očekávam, že get_R_coordinates mně vrátí 2D pole
229 sample = get_R_coordinates(input_sample)
230 g = -np.abs(sample[:, 0]) + self._beta_exact
231 return SampleBox(input_sample, g, repr(self))
232
233 # Fence off!
234 def get_2D_R_boundary(self, nrod=100, xlim=(-5,5), ylim=(-5,5), *args):
235 """
236 Fence off!
237 nrod - number of rods in fencing
238 """
239
240 bound_R = np.empty((nrod, 2))
241 bound_R[:, 0] = self._beta_exact
242 bound_R[:, 1] = np.linspace(ylim[0], ylim[1], nrod, endpoint=True)
243 # tuple of tuple
244 return (Ingot(bound_R), Ingot(-bound_R))
245
246
179 247 class Z_sum: class Z_sum:
180 248 """ """
181 249 suma velicin plus beta*sqrt(Nvar. ) suma velicin plus beta*sqrt(Nvar. )
File wellmet/testcases/testcases_nD.py changed (mode: 100644) (index 4600f59..63ffbe6)
... ... def snorm_neverfall(ndim):
30 30 return whitebox.WhiteBox(f_models.SNorm(ndim), gm.neverfall) return whitebox.WhiteBox(f_models.SNorm(ndim), gm.neverfall)
31 31
32 32
33 add('snorm_line_pf6')
34 def snorm_line_pf6(ndim):
35 return whitebox.Line(ndim, -stats.norm.ppf(1e-6))
36
37 add('snorm_twoline_pf6')
38 def snorm_twoline_pf6(ndim):
39 return whitebox.TwoLine(ndim, -stats.norm.ppf(1e-6 / 2))
40
41
33 42 # HyperRovina, куда ж без неё? # HyperRovina, куда ж без неё?
34 43 # Gauß # Gauß
35 44 add('hyperplane_pf3') add('hyperplane_pf3')
File wellmet/whitebox.py changed (mode: 100644) (index 3699614..9b87bb9)
... ... class HyperPlane(WhiteBox): # куда ж без него...
287 287
288 288 def __repr__(wt): def __repr__(wt):
289 289 return 'HyperPlane(%s)' % repr(wt._betas) return 'HyperPlane(%s)' % repr(wt._betas)
290
291
292 class Line(WhiteBox):
293 def __init__(self, nvar=2, beta=5):
294 """
295 Class takes for inicialization tuple of betas
296 Betas are coeffitients in sense of Regression Analysis (well, not really)
297 g= a*X1 + b*X2 + c
298 betas=(a,b,c)
299 """
300 self.beta_exact = beta
301 self.gm = g_models.X1(beta)
302 self.f = f_models.SNorm(nvar)
303 # na začatku nemáme vzorky - pouze rozdělení a podpís
304 self.sample_box = SampleBox(self.f(), gm_signature=self.gm_signature)
305
306 self.pf_exact = stats.norm.cdf(-beta)
307 self.pf_exact_method = 'FORM (exact solution)' # Ang, Tang and Pythagoras
308
309
310 def __str__(wt):
311 return 'Line%sD' % wt.f.nvar
312
313 def __repr__(wt):
314 return 'Line(%s, %s)' % repr(wt.f.nvar, wt.beta_exact)
315
316 class TwoLine(WhiteBox):
317 def __init__(self, nvar=2, beta=5):
318 """
319 Class takes for inicialization tuple of betas
320 Betas are coeffitients in sense of Regression Analysis (well, not really)
321 g= a*X1 + b*X2 + c
322 betas=(a,b,c)
323 """
324 self.beta = beta
325 self.gm = g_models.AbsX1(beta)
326 self.f = f_models.SNorm(nvar)
327 # na začatku nemáme vzorky - pouze rozdělení a podpís
328 self.sample_box = SampleBox(self.f(), gm_signature=self.gm_signature)
329
330 self.pf_exact = stats.norm.cdf(-beta) * 2
331 self.pf_exact_method = '2FORM (exact solution)' # Ang, Tang and Pythagoras
332
333
334 def __str__(wt):
335 return 'TwoLine%sD' % wt.f.nvar
336
337 def __repr__(wt):
338 return 'TwoLine(%s, %s)' % repr(wt.f.nvar, wt.beta)
290 339
291 340
292 341 class Gaussian_Z_sum(WhiteBox): #ё куда ж без этого... class Gaussian_Z_sum(WhiteBox): #ё куда ж без этого...
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