wavesimpro 1.6.0__tar.gz → 1.6.1__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 (20) hide show
  1. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/PKG-INFO +1 -1
  2. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/pyproject.toml +1 -1
  3. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro/__init__.py +1 -1
  4. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro/client.py +6 -0
  5. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro/execute.py +4 -1
  6. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro/json_helper.py +738 -733
  7. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro/simulate.py +11 -7
  8. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro/validate.py +102 -93
  9. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro.egg-info/PKG-INFO +1 -1
  10. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/setup.cfg +0 -0
  11. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro/__main__.py +0 -0
  12. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro/binary_utils.py +0 -0
  13. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro/config.py +0 -0
  14. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro/exceptions.py +0 -0
  15. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro/py.typed +0 -0
  16. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro/setup.py +0 -0
  17. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro.egg-info/SOURCES.txt +0 -0
  18. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro.egg-info/dependency_links.txt +0 -0
  19. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro.egg-info/requires.txt +0 -0
  20. {wavesimpro-1.6.0 → wavesimpro-1.6.1}/src/wavesimpro.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wavesimpro
3
- Version: 1.6.0
3
+ Version: 1.6.1
4
4
  Summary: WavesimPro Python API — cloud execution client for the Rayfos simulation platform
5
5
  Author: Rayfos
6
6
  Project-URL: Repository, https://github.com/rayfos/wavesimpro
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "wavesimpro"
7
- version = "1.6.0"
7
+ version = "1.6.1"
8
8
  description = "WavesimPro Python API — cloud execution client for the Rayfos simulation platform"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -45,7 +45,7 @@ from .json_helper import (
45
45
  parse_progress_data,
46
46
  )
47
47
 
48
- __version__ = "1.6.0"
48
+ __version__ = "1.6.1"
49
49
  __all__ = [
50
50
  # Client
51
51
  "RayfosClient",
@@ -285,6 +285,7 @@ class RayfosClient:
285
285
  periodic: tuple = (False, False, False),
286
286
  engine_preference: str = "Any",
287
287
  use_gpu: Optional[bool] = None,
288
+ is_vectorial: Optional[bool] = None,
288
289
  ) -> Dict[str, Any]:
289
290
  """
290
291
  Ask the server (cloud or machine-service) whether a simulation of the
@@ -301,6 +302,10 @@ class RayfosClient:
301
302
  periodic: (periodic_x, periodic_y, periodic_z) — periodic axes don't get boundary padding
302
303
  engine_preference: "Any" | "Python" | "Cpp"
303
304
  use_gpu: None (auto), True (require GPU), False (force CPU)
305
+ is_vectorial: True = Maxwell (vectorial, 3 field components), False =
306
+ Helmholtz (scalar). Memory differs ~3x between the two, so ALWAYS
307
+ pass it: this payload carries no sources, and without the flag the
308
+ server falls back to "Maxwell unless engine_preference is Python".
304
309
 
305
310
  Returns:
306
311
  PreflightCheckResponse dict with keys:
@@ -339,6 +344,7 @@ class RayfosClient:
339
344
  },
340
345
  "enginePreference": engine_preference,
341
346
  "useGpu": use_gpu,
347
+ "isVectorial": is_vectorial,
342
348
  }
343
349
  # Machine service URL takes precedence (local single-machine preflight); else cloud aggregator.
344
350
  if self.config.machine_service_url:
@@ -333,6 +333,7 @@ def execute_via_api(
333
333
  periodic=(bool(periodic[0]), bool(periodic[1]), bool(periodic[2])),
334
334
  engine_preference=engine_preference,
335
335
  use_gpu=use_gpu,
336
+ is_vectorial=is_vectorial,
336
337
  )
337
338
  except Exception as exc:
338
339
  logger.warning(f"Preflight check failed (server may not support /api/preflightCheck yet): {exc}. Proceeding without it.")
@@ -342,9 +343,10 @@ def execute_via_api(
342
343
  status = (pre.get("status") or "").lower()
343
344
  pre_description = pre.get("description") or ""
344
345
  est = pre.get("estimate") or {}
346
+ solver = est.get("solver") or ("Maxwell" if est.get("isVectorial") else "Helmholtz")
345
347
  logger.info(
346
348
  f"Preflight: status={status} "
347
- f"est_total={est.get('totalMemoryGB', 0):.2f} GB "
349
+ f"est_total={est.get('totalMemoryGB', 0):.2f} GB ({solver}) "
348
350
  f"(E-field {est.get('efieldMemoryGB', 0):.2f} GB + workspace {est.get('workspaceMemoryGB', 0):.2f} GB) "
349
351
  f"grid={est.get('nx')}x{est.get('ny')}x{est.get('nz')}"
350
352
  )
@@ -391,6 +393,7 @@ def execute_via_api(
391
393
  gpu_memory_max_gb=gpu_memory_max_gb,
392
394
  periodic=periodic,
393
395
  pseudo_propagation_distance=pseudo_propagation_distance,
396
+ data_type=data_type,
394
397
  )
395
398
 
396
399
  # 8. Upload RI/permittivity