pyvale 2025.4.0__py3-none-any.whl → 2025.4.1__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 pyvale might be problematic. Click here for more details.

Files changed (98) hide show
  1. pyvale/__init__.py +51 -52
  2. pyvale/analyticmeshgen.py +101 -0
  3. pyvale/{core/analyticsimdatafactory.py → analyticsimdatafactory.py} +32 -9
  4. pyvale/{core/analyticsimdatagenerator.py → analyticsimdatagenerator.py} +151 -21
  5. pyvale/{core/camera.py → camera.py} +13 -14
  6. pyvale/{core/cameradata.py → cameradata.py} +6 -19
  7. pyvale/{core/cameradata2d.py → cameradata2d.py} +7 -7
  8. pyvale/{core/cameratools.py → cameratools.py} +18 -19
  9. pyvale/{core/cython → cython}/rastercyth.py +9 -9
  10. pyvale/data/__init__.py +5 -7
  11. pyvale/data/case00_HEX20_out.e +0 -0
  12. pyvale/data/case00_HEX27_out.e +0 -0
  13. pyvale/data/case00_HEX8_out.e +0 -0
  14. pyvale/data/case00_TET10_out.e +0 -0
  15. pyvale/data/case00_TET14_out.e +0 -0
  16. pyvale/data/case00_TET4_out.e +0 -0
  17. pyvale/{core/dataset.py → dataset.py} +24 -8
  18. pyvale/{core/errorcalculator.py → errorcalculator.py} +7 -8
  19. pyvale/{core/errordriftcalc.py → errordriftcalc.py} +6 -7
  20. pyvale/{core/errorintegrator.py → errorintegrator.py} +8 -9
  21. pyvale/{core/errorrand.py → errorrand.py} +9 -10
  22. pyvale/{core/errorsysdep.py → errorsysdep.py} +8 -9
  23. pyvale/{core/errorsysfield.py → errorsysfield.py} +13 -14
  24. pyvale/{core/errorsysindep.py → errorsysindep.py} +9 -10
  25. pyvale/examples/__init__.py +5 -7
  26. pyvale/examples/analyticdatagen/__init__.py +5 -7
  27. pyvale/examples/ex1_1_thermal2d.py +6 -9
  28. pyvale/examples/ex1_2_thermal2d.py +6 -9
  29. pyvale/examples/ex1_3_thermal2d.py +6 -9
  30. pyvale/examples/ex1_4_thermal2d.py +6 -9
  31. pyvale/examples/ex1_5_thermal2d.py +6 -9
  32. pyvale/examples/ex2_1_thermal3d .py +6 -9
  33. pyvale/examples/ex2_3_thermal3d.py +6 -9
  34. pyvale/examples/ex3_1_displacement2d.py +6 -9
  35. pyvale/examples/ex3_2_displacement2d.py +5 -8
  36. pyvale/examples/ex3_3_displacement2d.py +6 -9
  37. pyvale/examples/ex3_4_displacement2d.py +6 -9
  38. pyvale/examples/ex4_1_strain2d.py +6 -9
  39. pyvale/examples/ex4_2_strain2d.py +5 -8
  40. pyvale/examples/ex4_3_strain2d.py +6 -9
  41. pyvale/examples/ex5_1_multiphysics2d.py +5 -8
  42. pyvale/examples/ex6_1_multiphysics2d_expsim.py +6 -9
  43. pyvale/examples/ex6_2_multiphysics3d_expsim.py +15 -13
  44. pyvale/examples/features/__init__.py +5 -7
  45. pyvale/examples/rasterisation/ex_rastenp.py +5 -7
  46. pyvale/examples/rasterisation/ex_rastercyth_oneframe.py +5 -7
  47. pyvale/examples/rasterisation/ex_rastercyth_static_cypara.py +5 -7
  48. pyvale/examples/rasterisation/ex_rastercyth_static_pypara.py +5 -7
  49. pyvale/{core/experimentsimulator.py → experimentsimulator.py} +7 -8
  50. pyvale/{core/field.py → field.py} +6 -7
  51. pyvale/{core/fieldconverter.py → fieldconverter.py} +138 -17
  52. pyvale/{core/fieldsampler.py → fieldsampler.py} +9 -10
  53. pyvale/{core/fieldscalar.py → fieldscalar.py} +9 -10
  54. pyvale/{core/fieldtensor.py → fieldtensor.py} +10 -11
  55. pyvale/{core/fieldtransform.py → fieldtransform.py} +6 -7
  56. pyvale/{core/fieldvector.py → fieldvector.py} +10 -11
  57. pyvale/{core/generatorsrandom.py → generatorsrandom.py} +6 -7
  58. pyvale/{core/imagedef2d.py → imagedef2d.py} +9 -10
  59. pyvale/{core/integratorfactory.py → integratorfactory.py} +12 -13
  60. pyvale/{core/integratorquadrature.py → integratorquadrature.py} +9 -10
  61. pyvale/{core/integratorrectangle.py → integratorrectangle.py} +9 -10
  62. pyvale/{core/integratorspatial.py → integratorspatial.py} +7 -8
  63. pyvale/{core/integratortype.py → integratortype.py} +6 -7
  64. pyvale/{core/optimcheckfuncs.py → optimcheckfuncs.py} +1 -1
  65. pyvale/{core/raster.py → raster.py} +6 -7
  66. pyvale/{core/rastercy.py → rastercy.py} +9 -10
  67. pyvale/{core/rasternp.py → rasternp.py} +10 -13
  68. pyvale/{core/rendermesh.py → rendermesh.py} +8 -21
  69. pyvale/{core/sensorarray.py → sensorarray.py} +7 -8
  70. pyvale/{core/sensorarrayfactory.py → sensorarrayfactory.py} +15 -16
  71. pyvale/{core/sensorarraypoint.py → sensorarraypoint.py} +12 -13
  72. pyvale/{core/sensordata.py → sensordata.py} +7 -8
  73. pyvale/{core/sensordescriptor.py → sensordescriptor.py} +6 -7
  74. pyvale/{core/sensortools.py → sensortools.py} +7 -8
  75. pyvale/simcases/case00_HEX20.i +5 -5
  76. pyvale/simcases/case00_HEX27.i +5 -5
  77. pyvale/simcases/case00_HEX8.i +242 -0
  78. pyvale/simcases/case00_TET10.i +2 -2
  79. pyvale/simcases/case00_TET14.i +2 -2
  80. pyvale/simcases/case00_TET4.i +242 -0
  81. pyvale/simcases/run_1case.py +1 -1
  82. pyvale/{core/visualexpplotter.py → visualexpplotter.py} +8 -10
  83. pyvale/{core/visualimagedef.py → visualimagedef.py} +6 -7
  84. pyvale/{core/visualimages.py → visualimages.py} +8 -9
  85. pyvale/{core/visualopts.py → visualopts.py} +6 -7
  86. pyvale/{core/visualsimanimator.py → visualsimanimator.py} +10 -11
  87. pyvale/{core/visualsimplotter.py → visualsimplotter.py} +30 -30
  88. pyvale/{core/visualtools.py → visualtools.py} +7 -8
  89. pyvale/{core/visualtraceplotter.py → visualtraceplotter.py} +9 -10
  90. {pyvale-2025.4.0.dist-info → pyvale-2025.4.1.dist-info}/METADATA +1 -1
  91. pyvale-2025.4.1.dist-info/RECORD +163 -0
  92. {pyvale-2025.4.0.dist-info → pyvale-2025.4.1.dist-info}/WHEEL +1 -1
  93. pyvale/core/__init__.py +0 -7
  94. pyvale/core/analyticmeshgen.py +0 -59
  95. pyvale/core/cython/rastercyth.c +0 -32267
  96. pyvale-2025.4.0.dist-info/RECORD +0 -157
  97. {pyvale-2025.4.0.dist-info → pyvale-2025.4.1.dist-info}/licenses/LICENSE +0 -0
  98. {pyvale-2025.4.0.dist-info → pyvale-2025.4.1.dist-info}/top_level.txt +0 -0
@@ -1,16 +1,15 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  from typing import Callable
9
8
  import numpy as np
10
- from pyvale.core.field import IField
11
- from pyvale.core.integratorspatial import (IIntegratorSpatial,
9
+ from pyvale.field import IField
10
+ from pyvale.integratorspatial import (IIntegratorSpatial,
12
11
  create_int_pt_array)
13
- from pyvale.core.sensordata import SensorData
12
+ from pyvale.sensordata import SensorData
14
13
 
15
14
  #TODO: Docstrings
16
15
 
@@ -1,15 +1,14 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  import numpy as np
9
- from pyvale.core.field import IField
10
- from pyvale.core.integratorspatial import (IIntegratorSpatial,
8
+ from pyvale.field import IField
9
+ from pyvale.integratorspatial import (IIntegratorSpatial,
11
10
  create_int_pt_array)
12
- from pyvale.core.sensordata import SensorData
11
+ from pyvale.sensordata import SensorData
13
12
 
14
13
 
15
14
  #TODO: Docstrings
@@ -1,13 +1,12 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  from abc import ABC, abstractmethod
9
8
  import numpy as np
10
- from pyvale.core.sensordata import SensorData
9
+ from pyvale.sensordata import SensorData
11
10
 
12
11
 
13
12
  def create_int_pt_array(sens_data: SensorData,
@@ -1,10 +1,9 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  import enum
9
8
 
10
9
 
@@ -7,7 +7,7 @@ https://en.wikipedia.org/wiki/Test_functions_for_optimization
7
7
  from typing import Callable,Any
8
8
  import numpy as np
9
9
  import matplotlib.pyplot as plt
10
- from pyvale.core.visualopts import PlotOptsGeneral
10
+ from pyvale.visualopts import PlotOptsGeneral
11
11
 
12
12
 
13
13
  def ackley(x: np.ndarray,
@@ -1,10 +1,9 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  from abc import ABC, abstractmethod
9
8
  import numpy as np
10
9
 
@@ -1,16 +1,15 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  from pathlib import Path
9
8
  from multiprocessing.pool import Pool
10
9
  import numpy as np
11
- from pyvale.core.cameradata import CameraData
12
- from pyvale.core.rendermesh import RenderMeshData
13
- import pyvale.core.cython.rastercyth as rastercyth
10
+ from pyvale.cameradata import CameraData
11
+ from pyvale.rendermesh import RenderMeshData
12
+ import pyvale.cython.rastercyth as rastercyth
14
13
 
15
14
  # NOTE: This module is a feature under developement.
16
15
 
@@ -1,23 +1,20 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  from pathlib import Path
9
8
  from multiprocessing.pool import Pool
10
9
  import numpy as np
11
10
  import numba
12
- from pyvale.core.cameradata import CameraData
13
- from pyvale.core.cameratools import CameraTools
14
- from pyvale.core.rendermesh import RenderMeshData
15
- import pyvale.core.cython.rastercyth as rastercyth
16
-
11
+ from pyvale.cameradata import CameraData
12
+ from pyvale.cameratools import CameraTools
13
+ from pyvale.rendermesh import RenderMeshData
14
+ import pyvale.cython.rastercyth as rastercyth
17
15
 
18
16
  # NOTE: This module is a feature under developement.
19
17
 
20
-
21
18
  class RasterNP:
22
19
  @staticmethod
23
20
  def world_to_raster_coords(cam_data: CameraData,
@@ -1,27 +1,14 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  from enum import Enum
9
8
  from dataclasses import dataclass, field
10
9
  import numpy as np
11
10
  import mooseherder as mh
12
- from pyvale.core.fieldconverter import simdata_to_pyvista
13
-
14
-
15
- # class ImageFormat(Enum):
16
- # NPY = 0
17
- # TIFF = 1
18
-
19
- # @dataclass(slots=True)
20
- # class RenderOpts:
21
- # image_tag: str = "image"
22
- # image_formats: tuple[ImageFormat,...]
23
- # bits_per_unit: int = 1
24
- # parallel: int | None = None
11
+ from pyvale.fieldconverter import simdata_to_pyvista
25
12
 
26
13
 
27
14
  @dataclass(slots=True)
@@ -64,7 +51,7 @@ def create_render_mesh(sim_data: mh.SimData,
64
51
 
65
52
  (pv_grid,_) = simdata_to_pyvista(sim_data,
66
53
  extract_keys,
67
- spat_dim=sim_spat_dim)
54
+ elem_dims=sim_spat_dim)
68
55
 
69
56
  pv_surf = pv_grid.extract_surface()
70
57
  faces = np.array(pv_surf.faces)
@@ -1,13 +1,12 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  from abc import ABC, abstractmethod
9
8
  import numpy as np
10
- from pyvale.core.field import IField
9
+ from pyvale.field import IField
11
10
 
12
11
 
13
12
  class ISensorArray(ABC):
@@ -1,23 +1,22 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  import numpy as np
9
8
 
10
9
  import mooseherder as mh
11
10
 
12
- from pyvale.core.fieldscalar import FieldScalar
13
- from pyvale.core.fieldvector import FieldVector
14
- from pyvale.core.fieldtensor import FieldTensor
15
- from pyvale.core.sensordescriptor import SensorDescriptorFactory
16
- from pyvale.core.sensorarraypoint import SensorArrayPoint, SensorData
17
- from pyvale.core.errorintegrator import ErrIntegrator
18
- from pyvale.core.errorsysindep import ErrSysUniformPercent
19
- from pyvale.core.errorrand import ErrRandNormPercent
20
- from pyvale.core.errorsysdep import (ErrSysDigitisation,
11
+ from pyvale.fieldscalar import FieldScalar
12
+ from pyvale.fieldvector import FieldVector
13
+ from pyvale.fieldtensor import FieldTensor
14
+ from pyvale.sensordescriptor import SensorDescriptorFactory
15
+ from pyvale.sensorarraypoint import SensorArrayPoint, SensorData
16
+ from pyvale.errorintegrator import ErrIntegrator
17
+ from pyvale.errorsysindep import ErrSysUniformPercent
18
+ from pyvale.errorrand import ErrRandNormPercent
19
+ from pyvale.errorsysdep import (ErrSysDigitisation,
21
20
  ErrSysSaturation)
22
21
 
23
22
  #TODO: Docstrings
@@ -1,17 +1,16 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  import numpy as np
9
- from pyvale.core.field import IField
10
- from pyvale.core.sensorarray import ISensorArray
11
- from pyvale.core.errorintegrator import ErrIntegrator
12
- from pyvale.core.sensordescriptor import SensorDescriptor
13
- from pyvale.core.sensordata import SensorData
14
- from pyvale.core.fieldsampler import sample_field_with_sensor_data
8
+ from pyvale.field import IField
9
+ from pyvale.sensorarray import ISensorArray
10
+ from pyvale.errorintegrator import ErrIntegrator
11
+ from pyvale.sensordescriptor import SensorDescriptor
12
+ from pyvale.sensordata import SensorData
13
+ from pyvale.fieldsampler import sample_field_with_sensor_data
15
14
 
16
15
 
17
16
  class SensorArrayPoint(ISensorArray):
@@ -1,14 +1,13 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  from dataclasses import dataclass
9
8
  import numpy as np
10
9
  from scipy.spatial.transform import Rotation
11
- from pyvale.core.integratortype import EIntSpatialType
10
+ from pyvale.integratortype import EIntSpatialType
12
11
 
13
12
 
14
13
  @dataclass(slots=True)
@@ -1,11 +1,10 @@
1
1
 
2
- """
3
- ================================================================================
4
- pyvale: the python validation engine
5
- License: MIT
6
- Copyright (C) 2025 The Computer Aided Validation Team
7
- ================================================================================
8
- """
2
+ # ================================================================================
3
+ # pyvale: the python validation engine
4
+ # License: MIT
5
+ # Copyright (C) 2025 The Computer Aided Validation Team
6
+ # ================================================================================
7
+
9
8
  from dataclasses import dataclass
10
9
  import numpy as np
11
10
 
@@ -1,13 +1,12 @@
1
- """
2
- ================================================================================
3
- pyvale: the python validation engine
4
- License: MIT
5
- Copyright (C) 2025 The Computer Aided Validation Team
6
- ================================================================================
7
- """
1
+ # ================================================================================
2
+ # pyvale: the python validation engine
3
+ # License: MIT
4
+ # Copyright (C) 2025 The Computer Aided Validation Team
5
+ # ================================================================================
6
+
8
7
  import numpy as np
9
8
  import mooseherder as mh
10
- from pyvale.core.sensorarray import ISensorArray
9
+ from pyvale.sensorarray import ISensorArray
11
10
 
12
11
 
13
12
  def create_sensor_pos_array(num_sensors: tuple[int,int,int],
@@ -5,7 +5,7 @@
5
5
  #-------------------------------------------------------------------------
6
6
  #_* MOOSEHERDER VARIABLES - START
7
7
 
8
- endTime = 50
8
+ endTime = 20
9
9
  timeStep = 1
10
10
 
11
11
  # Geometric Properties
@@ -14,9 +14,9 @@ lengY = 10e-3 # m
14
14
  lengZ = 10e-3 # m
15
15
 
16
16
  # Mesh Properties
17
- nElemX = 1
18
- nElemY = 1
19
- nElemZ = 1
17
+ nElemX = 2
18
+ nElemY = 2
19
+ nElemZ = 2
20
20
  eType = HEX20 # TET10, TET11, HEX20, HEX27
21
21
 
22
22
  # Thermal BCs
@@ -89,7 +89,7 @@ ThermExp = 17.8e-6 # 1/degC
89
89
  add_variables = true
90
90
  material_output_family = MONOMIAL # MONOMIAL, LAGRANGE
91
91
  material_output_order = FIRST # CONSTANT, FIRST, SECOND,
92
- generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_xz strain_xx strain_yy strain_zz strain_xy strain_yz strain_xz'
92
+ generate_output = 'strain_xx strain_yy strain_zz strain_xy strain_yz strain_xz'
93
93
  []
94
94
  []
95
95
 
@@ -5,7 +5,7 @@
5
5
  #-------------------------------------------------------------------------
6
6
  #_* MOOSEHERDER VARIABLES - START
7
7
 
8
- endTime = 50
8
+ endTime = 20
9
9
  timeStep = 1
10
10
 
11
11
  # Geometric Properties
@@ -14,9 +14,9 @@ lengY = 10e-3 # m
14
14
  lengZ = 10e-3 # m
15
15
 
16
16
  # Mesh Properties
17
- nElemX = 1
18
- nElemY = 1
19
- nElemZ = 1
17
+ nElemX = 2
18
+ nElemY = 2
19
+ nElemZ = 2
20
20
  eType = HEX27 # TET10, TET11, HEX20, HEX27
21
21
 
22
22
  # Thermal BCs
@@ -89,7 +89,7 @@ ThermExp = 17.8e-6 # 1/degC
89
89
  add_variables = true
90
90
  material_output_family = MONOMIAL # MONOMIAL, LAGRANGE
91
91
  material_output_order = FIRST # CONSTANT, FIRST, SECOND,
92
- generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_xz strain_xx strain_yy strain_zz strain_xy strain_yz strain_xz'
92
+ generate_output = 'strain_xx strain_yy strain_zz strain_xy strain_yz strain_xz'
93
93
  []
94
94
  []
95
95