PyFemtet 0.3.6__tar.gz → 0.3.7__tar.gz

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.
Files changed (25) hide show
  1. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/PKG-INFO +1 -1
  2. pyfemtet-0.3.7/pyfemtet/__init__.py +1 -0
  3. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/opt/base.py +4 -3
  4. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/opt/interface.py +2 -0
  5. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyproject.toml +1 -1
  6. pyfemtet-0.3.6/pyfemtet/__init__.py +0 -1
  7. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/LICENSE +0 -0
  8. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/README.md +0 -0
  9. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/FemtetPJTSample/NX_ex01/NX_ex01.femprj +0 -0
  10. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/FemtetPJTSample/NX_ex01/NX_ex01.prt +0 -0
  11. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/FemtetPJTSample/NX_ex01/NX_ex01.py +0 -0
  12. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/FemtetPJTSample/gau_ex08_parametric.femprj +0 -0
  13. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/FemtetPJTSample/gau_ex08_parametric.py +0 -0
  14. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/FemtetPJTSample/her_ex40_parametric.femprj +0 -0
  15. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/FemtetPJTSample/her_ex40_parametric.py +0 -0
  16. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/FemtetPJTSample/wat_ex14_parallel_parametric.py +0 -0
  17. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/FemtetPJTSample/wat_ex14_parametric.femprj +0 -0
  18. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/FemtetPJTSample/wat_ex14_parametric.py +0 -0
  19. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/_old/_SW_Femtet.py +0 -0
  20. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/core.py +0 -0
  21. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/dispatch_extensions.py +0 -0
  22. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/logger.py +0 -0
  23. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/opt/_FemtetWithNX/update_model.py +0 -0
  24. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/opt/__init__.py +0 -0
  25. {pyfemtet-0.3.6 → pyfemtet-0.3.7}/pyfemtet/opt/monitor.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyfemtet
3
- Version: 0.3.6
3
+ Version: 0.3.7
4
4
  Summary: Design parameter optimization using Femtet.
5
5
  Home-page: https://github.com/pyfemtet/pyfemtet
6
6
  License: BSD-3-Clause
@@ -0,0 +1 @@
1
+ __version__ = "0.3.7"
@@ -217,7 +217,7 @@ class Function:
217
217
  # Femtet 特有の処理
218
218
  if isinstance(fem, FemtetInterface):
219
219
  args = (fem.Femtet, *args)
220
- return self.fun(*args, **self.kwargs)
220
+ return float(self.fun(*args, **self.kwargs))
221
221
 
222
222
  def _restore_constants(self):
223
223
  """Helper function for parallelize Femtet."""
@@ -280,7 +280,7 @@ class Objective(Function):
280
280
 
281
281
  ret = symlog(ret)
282
282
 
283
- return ret
283
+ return float(ret)
284
284
 
285
285
 
286
286
  class Constraint(Function):
@@ -1296,7 +1296,8 @@ class FEMOpt:
1296
1296
  if not self.opt.is_cluster:
1297
1297
  subprocess_indices = subprocess_indices[1:]
1298
1298
  worker_addresses = list(self.client.nthreads().keys())
1299
- assert max(subprocess_indices) <= len(worker_addresses)-1, f'コア数{len(worker_addresses)}は不足しています。'
1299
+ if len(subprocess_indices)>0:
1300
+ assert max(subprocess_indices) <= len(worker_addresses)-1, f'コア数{len(worker_addresses)}は不足しています。'
1300
1301
  worker_addresses = worker_addresses[:len(range(n_parallel))] # TODO: ノードごとに適度に振り分ける
1301
1302
  if not self.opt.is_cluster:
1302
1303
  worker_addresses[0] = 'Main'
@@ -128,6 +128,7 @@ class FemtetInterface(FEMInterface):
128
128
  femprj_path (str or None, optional): The path to the .femprj file. Defaults to None.
129
129
  model_name (str or None, optional): The name of the analysis model. Defaults to None.
130
130
  connect_method (str, optional): The connection method to use. Can be 'new', 'existing', or 'auto'. Defaults to 'auto'.
131
+ strict_pid_specify (bool): If True and connect_method=='new', search launched Femtet process strictly based on its process id. This option requires large overhead time. So It is recommended to set False in large n_parallel.
131
132
 
132
133
  Tip:
133
134
  If you search for information about the method to connect python and Femtet, see :func:`connect_femtet`.
@@ -176,6 +177,7 @@ class FemtetInterface(FEMInterface):
176
177
  super().__init__(
177
178
  femprj_path=self.femprj_path,
178
179
  model_name=self.model_name,
180
+ strict_pid_specify=self.strict_pid_specify,
179
181
  **kwargs
180
182
  )
181
183
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyfemtet"
3
- version = "0.3.6" # ignored by versioning plugin
3
+ version = "0.3.7" # ignored by versioning plugin
4
4
  description = "Design parameter optimization using Femtet."
5
5
  authors = ["kazuma.naito <kazuma.naito@murata.com>"]
6
6
  readme = "README.md"
@@ -1 +0,0 @@
1
- __version__ = "0.3.6"
File without changes
File without changes
File without changes
File without changes