pyfemtet 0.9.0__py3-none-any.whl → 0.9.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyfemtet might be problematic. Click here for more details.
- pyfemtet/__init__.py +1 -1
- pyfemtet/opt/_femopt.py +19 -0
- pyfemtet/opt/_femopt_core.py +12 -0
- {pyfemtet-0.9.0.dist-info → pyfemtet-0.9.2.dist-info}/METADATA +1 -1
- {pyfemtet-0.9.0.dist-info → pyfemtet-0.9.2.dist-info}/RECORD +9 -9
- {pyfemtet-0.9.0.dist-info → pyfemtet-0.9.2.dist-info}/LICENSE +0 -0
- {pyfemtet-0.9.0.dist-info → pyfemtet-0.9.2.dist-info}/LICENSE_THIRD_PARTY.txt +0 -0
- {pyfemtet-0.9.0.dist-info → pyfemtet-0.9.2.dist-info}/WHEEL +0 -0
- {pyfemtet-0.9.0.dist-info → pyfemtet-0.9.2.dist-info}/entry_points.txt +0 -0
pyfemtet/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.9.
|
|
1
|
+
__version__ = "0.9.2"
|
pyfemtet/opt/_femopt.py
CHANGED
|
@@ -367,6 +367,12 @@ class FEMOpt:
|
|
|
367
367
|
|
|
368
368
|
"""
|
|
369
369
|
|
|
370
|
+
# ===== warning for v1.0 =====
|
|
371
|
+
if name in None:
|
|
372
|
+
logger.warning('From version 1.0, `name` will be the first required argument. '
|
|
373
|
+
'For more details, please see https://pyfemtet.readthedocs.io/en/stable/pages/migration_to_v1.html. '
|
|
374
|
+
'(日本語版サイト; https://pyfemtet.readthedocs.io/ja/stable/pages/migration_to_v1.html)')
|
|
375
|
+
|
|
370
376
|
# 引数の処理
|
|
371
377
|
if fun is None:
|
|
372
378
|
from pyfemtet.opt.interface import SurrogateModelInterfaceBase
|
|
@@ -401,6 +407,13 @@ class FEMOpt:
|
|
|
401
407
|
args: tuple or None = None,
|
|
402
408
|
kwargs: dict or None = None,
|
|
403
409
|
):
|
|
410
|
+
|
|
411
|
+
# ===== warning for v1.0 =====
|
|
412
|
+
if names in None:
|
|
413
|
+
logger.warning('From version 1.0, `names` will be the first required argument. '
|
|
414
|
+
'For more details, please see https://pyfemtet.readthedocs.io/en/stable/pages/migration_to_v1.html. '
|
|
415
|
+
'(日本語版サイト; https://pyfemtet.readthedocs.io/ja/stable/pages/migration_to_v1.html)')
|
|
416
|
+
|
|
404
417
|
from pyfemtet.opt._femopt_core import ObjectivesFunc
|
|
405
418
|
components = ObjectivesFunc(fun, n_return)
|
|
406
419
|
|
|
@@ -493,6 +506,12 @@ class FEMOpt:
|
|
|
493
506
|
|
|
494
507
|
"""
|
|
495
508
|
|
|
509
|
+
# ===== warning for v1.0 =====
|
|
510
|
+
if name in None:
|
|
511
|
+
logger.warning('From version 1.0, `name` will be the first required argument. '
|
|
512
|
+
'For more details, please see https://pyfemtet.readthedocs.io/en/stable/pages/migration_to_v1.html. '
|
|
513
|
+
'(日本語版サイト; https://pyfemtet.readthedocs.io/ja/stable/pages/migration_to_v1.html)')
|
|
514
|
+
|
|
496
515
|
# 引数の処理
|
|
497
516
|
if args is None:
|
|
498
517
|
args = tuple()
|
pyfemtet/opt/_femopt_core.py
CHANGED
|
@@ -295,6 +295,9 @@ class Function:
|
|
|
295
295
|
|
|
296
296
|
def __init__(self, fun, name, args, kwargs):
|
|
297
297
|
|
|
298
|
+
# ===== for 1.0 warning =====
|
|
299
|
+
self._shown = False
|
|
300
|
+
|
|
298
301
|
# serializable でない COM 定数を parallelize するため
|
|
299
302
|
# COM 定数を一度 _Scapegoat 型のオブジェクトにする
|
|
300
303
|
# ParametricIF で使う dll 関数は _FuncPtr 型であって __globals__ を持たないが、
|
|
@@ -326,6 +329,15 @@ class Function:
|
|
|
326
329
|
# Femtet 特有の処理
|
|
327
330
|
if isinstance(fem, FemtetInterface):
|
|
328
331
|
args = (fem.object_passed_to_functions, *args)
|
|
332
|
+
else:
|
|
333
|
+
# ===== for 1.0 warning =====
|
|
334
|
+
if not self._shown:
|
|
335
|
+
logger.warning('From version 1.0, an object associated with the Interface '
|
|
336
|
+
'will be automatically passed as the first argument. '
|
|
337
|
+
'For more details, please see https://pyfemtet.readthedocs.io/en/stable/pages/migration_to_v1.html. '
|
|
338
|
+
'(日本語版サイト; https://pyfemtet.readthedocs.io/ja/stable/pages/migration_to_v1.html)')
|
|
339
|
+
self._shown = True
|
|
340
|
+
|
|
329
341
|
return float(self.fun(*args, **self.kwargs))
|
|
330
342
|
|
|
331
343
|
def _restore_constants(self):
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pyfemtet/__init__.py,sha256=
|
|
1
|
+
pyfemtet/__init__.py,sha256=cxk7oxXizAG_GjsNSdk-6FcleGyxJl6tl4bJGRzIQGU,21
|
|
2
2
|
pyfemtet/_femtet_config_util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
pyfemtet/_femtet_config_util/autosave.py,sha256=dNirA9XGuFehas8_Jkj2BW9GOzMbPyhnt1WHcH_ObSU,2070
|
|
4
4
|
pyfemtet/_femtet_config_util/exit.py,sha256=0BWID-tjOkmZwmgPFkcJMkWW39voccz5ARIBWvZbHaw,1877
|
|
@@ -24,8 +24,8 @@ pyfemtet/dispatch_extensions/_impl.py,sha256=yH_yeAnQ-Xi9GfjX-FQt9u3yHnrLYIteRb6
|
|
|
24
24
|
pyfemtet/logger/__init__.py,sha256=UOJ9n_U2xwdTrp0Xgg-N6geySxNzKqTBQlXsaH0kW_w,420
|
|
25
25
|
pyfemtet/logger/_impl.py,sha256=rsAd0HpmveOaLS39ucp3U2OcDhQMWjC5fnVGhbJtWVw,6375
|
|
26
26
|
pyfemtet/opt/__init__.py,sha256=wRR8LbEhb5I6MUgmnCgjB6-tqHlOVxDIo7yPkq0QbBs,758
|
|
27
|
-
pyfemtet/opt/_femopt.py,sha256=
|
|
28
|
-
pyfemtet/opt/_femopt_core.py,sha256=
|
|
27
|
+
pyfemtet/opt/_femopt.py,sha256=pbuv6hm7FRIEL19ck0gA1cxFJ3wINcmerL1RQJsejgI,41904
|
|
28
|
+
pyfemtet/opt/_femopt_core.py,sha256=HknVLJQlOI1Uau3DvbaL8a6dHa7wg5uVZIMQtw5U5tg,41016
|
|
29
29
|
pyfemtet/opt/_test_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
30
|
pyfemtet/opt/_test_utils/control_femtet.py,sha256=8oAl9y5V2n8Nnsgx_ebcZVzwFt1eI3swkdiKg6pg3-M,1085
|
|
31
31
|
pyfemtet/opt/_test_utils/hyper_sphere.py,sha256=nQhw8EIY0DwvcTqrbKhkxiITLZifr4-nG77E-_6ggmA,700
|
|
@@ -150,9 +150,9 @@ pyfemtet/opt/visualization/result_viewer/.gitignore,sha256=ryvb4aqbbsHireHWlPQfx
|
|
|
150
150
|
pyfemtet/opt/visualization/result_viewer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
151
151
|
pyfemtet/opt/visualization/result_viewer/application.py,sha256=WcHBx_J5eNLKSaprpk9BGifwhO04oN8FiNGYTWorrXA,1691
|
|
152
152
|
pyfemtet/opt/visualization/result_viewer/pages.py,sha256=MZAjzbuq0toZrR-iJhElM3A12_jHVCTt65gz1kdNPbw,32193
|
|
153
|
-
pyfemtet-0.9.
|
|
154
|
-
pyfemtet-0.9.
|
|
155
|
-
pyfemtet-0.9.
|
|
156
|
-
pyfemtet-0.9.
|
|
157
|
-
pyfemtet-0.9.
|
|
158
|
-
pyfemtet-0.9.
|
|
153
|
+
pyfemtet-0.9.2.dist-info/LICENSE,sha256=LWUL5LlMGjSRTvsalS8_fFuwS4VMw18fJSNWFwDK8pc,1060
|
|
154
|
+
pyfemtet-0.9.2.dist-info/LICENSE_THIRD_PARTY.txt,sha256=8_9-cgzTpmeuCqItPZb9-lyAZcH2Qp9sZTU_hYuOZIQ,191
|
|
155
|
+
pyfemtet-0.9.2.dist-info/METADATA,sha256=5cLMZUOXk1OpNC3diby6QpPMkEdR5B8badMXBL50mO4,3559
|
|
156
|
+
pyfemtet-0.9.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
157
|
+
pyfemtet-0.9.2.dist-info/entry_points.txt,sha256=ZfYqRaoiPtuWqFi2_msccyrVF0LurMn-IHlYamAegZo,104
|
|
158
|
+
pyfemtet-0.9.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|