bsplyne 1.0.0__tar.gz → 1.0.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 (26) hide show
  1. {bsplyne-1.0.0/bsplyne.egg-info → bsplyne-1.0.1}/PKG-INFO +24 -19
  2. bsplyne-1.0.1/pyproject.toml +58 -0
  3. {bsplyne-1.0.0 → bsplyne-1.0.1/src}/bsplyne/__init__.py +1 -1
  4. {bsplyne-1.0.0 → bsplyne-1.0.1/src}/bsplyne/b_spline.py +6 -0
  5. {bsplyne-1.0.0 → bsplyne-1.0.1/src}/bsplyne/b_spline_basis.py +8 -8
  6. {bsplyne-1.0.0 → bsplyne-1.0.1/src}/bsplyne/multi_patch_b_spline.py +21 -21
  7. {bsplyne-1.0.0 → bsplyne-1.0.1/src}/bsplyne/save_utils.py +2 -2
  8. {bsplyne-1.0.0 → bsplyne-1.0.1/src/bsplyne.egg-info}/PKG-INFO +24 -19
  9. bsplyne-1.0.1/src/bsplyne.egg-info/SOURCES.txt +19 -0
  10. bsplyne-1.0.1/src/bsplyne.egg-info/requires.txt +17 -0
  11. bsplyne-1.0.0/MANIFEST.in +0 -3
  12. bsplyne-1.0.0/bsplyne.egg-info/SOURCES.txt +0 -21
  13. bsplyne-1.0.0/bsplyne.egg-info/requires.txt +0 -6
  14. bsplyne-1.0.0/context.txt +0 -77
  15. bsplyne-1.0.0/setup.py +0 -21
  16. {bsplyne-1.0.0 → bsplyne-1.0.1}/LICENSE.txt +0 -0
  17. {bsplyne-1.0.0 → bsplyne-1.0.1}/README.md +0 -0
  18. {bsplyne-1.0.0 → bsplyne-1.0.1}/setup.cfg +0 -0
  19. {bsplyne-1.0.0 → bsplyne-1.0.1/src}/bsplyne/geometries_in_3D.py +0 -0
  20. {bsplyne-1.0.0 → bsplyne-1.0.1/src}/bsplyne/my_wide_product.py +0 -0
  21. {bsplyne-1.0.0 → bsplyne-1.0.1/src}/bsplyne/parallel_utils.py +0 -0
  22. {bsplyne-1.0.0 → bsplyne-1.0.1/src}/bsplyne.egg-info/dependency_links.txt +0 -0
  23. {bsplyne-1.0.0 → bsplyne-1.0.1/src}/bsplyne.egg-info/top_level.txt +0 -0
  24. {bsplyne-1.0.0 → bsplyne-1.0.1}/tests/test_b_spline_advanced.py +0 -0
  25. {bsplyne-1.0.0 → bsplyne-1.0.1}/tests/test_b_spline_basis.py +0 -0
  26. {bsplyne-1.0.0 → bsplyne-1.0.1}/tests/test_b_spline_basis_advanced.py +0 -0
@@ -1,30 +1,35 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bsplyne
3
- Version: 1.0.0
4
- Summary: A package for N dimensions B-splines.
5
- Home-page: https://github.com/Dorian210/bsplyne
6
- Author: Dorian Bichet
7
- Author-email: dbichet@insa-toulouse.fr
3
+ Version: 1.0.1
4
+ Summary: N-dimensional B-spline library for numerical mechanics and geometry
5
+ Author-email: Dorian Bichet <dbichet@insa-toulouse.fr>
6
+ Project-URL: Homepage, https://github.com/Dorian210/bsplyne
7
+ Project-URL: Repository, https://github.com/Dorian210/bsplyne
8
+ Project-URL: Issues, https://github.com/Dorian210/bsplyne/issues
8
9
  Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3 :: Only
9
11
  Classifier: Operating System :: OS Independent
10
12
  Classifier: License :: OSI Approved :: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1)
13
+ Classifier: Topic :: Scientific/Engineering
14
+ Classifier: Intended Audience :: Science/Research
15
+ Requires-Python: >=3.9
11
16
  Description-Content-Type: text/markdown
12
17
  License-File: LICENSE.txt
13
- Requires-Dist: numpy
14
- Requires-Dist: numba
15
- Requires-Dist: scipy
16
- Requires-Dist: matplotlib
17
- Requires-Dist: meshio
18
- Requires-Dist: tqdm
19
- Dynamic: author
20
- Dynamic: author-email
21
- Dynamic: classifier
22
- Dynamic: description
23
- Dynamic: description-content-type
24
- Dynamic: home-page
18
+ Requires-Dist: numpy>=1.20
19
+ Requires-Dist: numba>=0.55
20
+ Requires-Dist: scipy>=1.8
21
+ Requires-Dist: matplotlib>=3.5
22
+ Requires-Dist: meshio>=5.0
23
+ Requires-Dist: tqdm>=4.60
24
+ Provides-Extra: viz
25
+ Requires-Dist: pyvista>=0.41; extra == "viz"
26
+ Provides-Extra: dev
27
+ Requires-Dist: build; extra == "dev"
28
+ Requires-Dist: twine; extra == "dev"
29
+ Provides-Extra: docs
30
+ Requires-Dist: wkhtmltopdf; extra == "docs"
31
+ Requires-Dist: pdoc>=12.0; extra == "docs"
25
32
  Dynamic: license-file
26
- Dynamic: requires-dist
27
- Dynamic: summary
28
33
 
29
34
  # bsplyne
30
35
 
@@ -0,0 +1,58 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "bsplyne"
7
+ version = "1.0.1"
8
+ description = "N-dimensional B-spline library for numerical mechanics and geometry"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+
12
+ authors = [
13
+ { name = "Dorian Bichet", email = "dbichet@insa-toulouse.fr" }
14
+ ]
15
+
16
+ license = { file = "LICENSE" }
17
+
18
+ dependencies = [
19
+ "numpy>=1.20",
20
+ "numba>=0.55",
21
+ "scipy>=1.8",
22
+ "matplotlib>=3.5",
23
+ "meshio>=5.0",
24
+ "tqdm>=4.60"
25
+ ]
26
+
27
+ classifiers = [
28
+ "Programming Language :: Python :: 3",
29
+ "Programming Language :: Python :: 3 :: Only",
30
+ "Operating System :: OS Independent",
31
+ "License :: OSI Approved :: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1)",
32
+ "Topic :: Scientific/Engineering",
33
+ "Intended Audience :: Science/Research"
34
+ ]
35
+
36
+ [project.urls]
37
+ Homepage = "https://github.com/Dorian210/bsplyne"
38
+ Repository = "https://github.com/Dorian210/bsplyne"
39
+ Issues = "https://github.com/Dorian210/bsplyne/issues"
40
+
41
+ [project.optional-dependencies]
42
+ viz = [
43
+ "pyvista>=0.41"
44
+ ]
45
+ dev = [
46
+ "build",
47
+ "twine"
48
+ ]
49
+ docs = [
50
+ "wkhtmltopdf",
51
+ "pdoc>=12.0"
52
+ ]
53
+
54
+ [tool.setuptools]
55
+ package-dir = {"" = "src"}
56
+
57
+ [tool.setuptools.packages.find]
58
+ where = ["src"]
@@ -1,5 +1,5 @@
1
1
  """
2
- .. include:: ../README.md
2
+ .. include:: ../../README.md
3
3
  """
4
4
 
5
5
  from bsplyne.b_spline_basis import BSplineBasis
@@ -1,6 +1,7 @@
1
1
  import os
2
2
  from typing import Iterable, Literal, Union
3
3
  import json, pickle
4
+ import warnings
4
5
 
5
6
  import numpy as np
6
7
  import scipy.sparse as sps
@@ -1943,6 +1944,11 @@ class BSpline:
1943
1944
  show,
1944
1945
  )
1945
1946
  else:
1947
+ if not _can_visualize_pyvista:
1948
+ warnings.warn(
1949
+ "Can't use PyVista. Fallback to Matplotlib plotter. "
1950
+ "For better visualization, install PyVista."
1951
+ )
1946
1952
  return self.plotMPL(
1947
1953
  ctrl_pts,
1948
1954
  n_eval_per_elem,
@@ -511,7 +511,7 @@ class BSplineBasis:
511
511
  Row index of D.
512
512
  j : int
513
513
  Column index of D.
514
- new_knot : numpy.array of float
514
+ new_knot : np.ndarray[np.floating]
515
515
  New knot vector to use.
516
516
  p : int
517
517
  Degree of the BSpline.
@@ -547,7 +547,7 @@ class BSplineBasis:
547
547
 
548
548
  Parameters
549
549
  ----------
550
- new_knot : numpy.array of float
550
+ new_knot : np.ndarray[np.floating]
551
551
  The new knot vector for the knot insertion.
552
552
 
553
553
  Returns
@@ -802,7 +802,7 @@ def _funcNElemOneXi(i, p, knot, xi):
802
802
  Index of the basis function wanted.
803
803
  p : int
804
804
  Degree of the BSpline evaluated.
805
- knot : numpy.array of float
805
+ knot : np.ndarray[np.floating]
806
806
  Knot vector of the BSpline basis.
807
807
  xi : float
808
808
  Value in the parametric space at which the BSpline is evaluated.
@@ -846,7 +846,7 @@ def _funcDNElemOneXi(i, p, knot, xi, k):
846
846
  Index of the basis function wanted.
847
847
  p : int
848
848
  Degree of the BSpline evaluated.
849
- knot : numpy.array of float
849
+ knot : np.ndarray[np.floating]
850
850
  Knot vector of the BSpline basis.
851
851
  xi : float
852
852
  Value in the parametric space at which the BSpline is evaluated.
@@ -904,7 +904,7 @@ def _findElem(p, m, n, knot, xi):
904
904
  Last index of the knot vector.
905
905
  n : int
906
906
  Last index of the basis.
907
- knot : numpy.array of float
907
+ knot : np.ndarray[np.floating]
908
908
  Knot vector of the BSpline basis.
909
909
  xi : float
910
910
  Value in the parametric space.
@@ -955,16 +955,16 @@ def _DN(p, m, n, knot, XI, k):
955
955
  Last index of the knot vector.
956
956
  n : int
957
957
  Last index of the basis.
958
- knot : numpy.array of float
958
+ knot : np.ndarray[np.floating]
959
959
  Knot vector of the BSpline basis.
960
- XI : numpy.array of float
960
+ XI : np.ndarray[np.floating]
961
961
  Values in the parametric space at which the BSpline is evaluated.
962
962
  k : int
963
963
  `k`-th derivative of the BSpline evaluated. The default is 0.
964
964
 
965
965
  Returns
966
966
  -------
967
- (vals, row, col) : (numpy.array of float, numpy.array of int, numpy.array of int)
967
+ (vals, row, col) : (np.ndarray[np.floating], np.ndarray[np.integer], np.ndarray[np.integer])
968
968
  Values and indices of the `k`-th derivative matrix of the BSpline
969
969
  basis functions in the columns for each value of `XI` in the rows.
970
970
 
@@ -62,9 +62,9 @@ class MultiPatchBSplineConnectivity:
62
62
 
63
63
  Attributes
64
64
  ----------
65
- unique_nodes_inds : numpy.ndarray of int
65
+ unique_nodes_inds : np.ndarray[np.integer]
66
66
  The indices of the unique representation needed to create the unpacked one.
67
- shape_by_patch : numpy.ndarray of int
67
+ shape_by_patch : np.ndarray[np.integer]
68
68
  The shape of the separated nodes by patch.
69
69
  nb_nodes : int
70
70
  The total number of unpacked nodes.
@@ -88,9 +88,9 @@ class MultiPatchBSplineConnectivity:
88
88
 
89
89
  Parameters
90
90
  ----------
91
- unique_nodes_inds : numpy.ndarray of int
91
+ unique_nodes_inds : np.ndarray[np.integer]
92
92
  The indices of the unique representation needed to create the unpacked one.
93
- shape_by_patch : numpy.ndarray of int
93
+ shape_by_patch : np.ndarray[np.integer]
94
94
  The shape of the separated nodes by patch.
95
95
  nb_unique_nodes : int
96
96
  The total number of unique nodes.
@@ -108,10 +108,10 @@ class MultiPatchBSplineConnectivity:
108
108
 
109
109
  Parameters
110
110
  ----------
111
- nodes_couples : numpy.ndarray of int
111
+ nodes_couples : np.ndarray[np.integer]
112
112
  Couples of indices of unpacked nodes that are considered the same.
113
113
  Its shape should be (# of couples, 2)
114
- shape_by_patch : numpy.ndarray of int
114
+ shape_by_patch : np.ndarray[np.integer]
115
115
  The shape of the separated nodes by patch.
116
116
 
117
117
  Returns
@@ -142,7 +142,7 @@ class MultiPatchBSplineConnectivity:
142
142
 
143
143
  Parameters
144
144
  ----------
145
- separated_ctrlPts : list of numpy.ndarray of float
145
+ separated_ctrlPts : list of np.ndarray[np.floating]
146
146
  Control points of every patch to be compared in the separated
147
147
  representation. Every array is of shape :
148
148
  (``NPh``, nb elem for dim 1, ..., nb elem for dim ``npa``)
@@ -217,13 +217,13 @@ class MultiPatchBSplineConnectivity:
217
217
 
218
218
  Parameters
219
219
  ----------
220
- unique_field : numpy.ndarray
220
+ unique_field : np.ndarray
221
221
  The unique representation. Its shape should be :
222
222
  (field, shape, ..., `self`.`nb_unique_nodes`)
223
223
 
224
224
  Returns
225
225
  -------
226
- unpacked_field : numpy.ndarray
226
+ unpacked_field : np.ndarray
227
227
  The unpacked representation. Its shape is :
228
228
  (field, shape, ..., `self`.`nb_nodes`)
229
229
  """
@@ -236,7 +236,7 @@ class MultiPatchBSplineConnectivity:
236
236
 
237
237
  Parameters
238
238
  ----------
239
- unpacked_field : numpy.ndarray
239
+ unpacked_field : np.ndarray
240
240
  The unpacked representation. Its shape should be :
241
241
  (field, shape, ..., `self`.`nb_nodes`)
242
242
  method: str
@@ -244,7 +244,7 @@ class MultiPatchBSplineConnectivity:
244
244
 
245
245
  Returns
246
246
  -------
247
- unique_nodes : numpy.ndarray
247
+ unique_nodes : np.ndarray
248
248
  The unique representation. Its shape is :
249
249
  (field, shape, ..., `self`.`nb_unique_nodes`)
250
250
  """
@@ -273,13 +273,13 @@ class MultiPatchBSplineConnectivity:
273
273
 
274
274
  Parameters
275
275
  ----------
276
- unpacked_field : numpy.ndarray
276
+ unpacked_field : np.ndarray
277
277
  The unpacked representation. Its shape is :
278
278
  (field, shape, ..., `self`.`nb_nodes`)
279
279
 
280
280
  Returns
281
281
  -------
282
- separated_field : list of numpy.ndarray
282
+ separated_field : list of np.ndarray
283
283
  The separated representation. Every array is of shape :
284
284
  (field, shape, ..., nb elem for dim 1, ..., nb elem for dim `npa`)
285
285
  """
@@ -300,13 +300,13 @@ class MultiPatchBSplineConnectivity:
300
300
 
301
301
  Parameters
302
302
  ----------
303
- separated_field : list of numpy.ndarray
303
+ separated_field : list of np.ndarray
304
304
  The separated representation. Every array is of shape :
305
305
  (field, shape, ..., nb elem for dim 1, ..., nb elem for dim `npa`)
306
306
 
307
307
  Returns
308
308
  -------
309
- unpacked_field : numpy.ndarray
309
+ unpacked_field : np.ndarray
310
310
  The unpacked representation. Its shape is :
311
311
  (field, shape, ..., `self`.`nb_nodes`)
312
312
  """
@@ -334,7 +334,7 @@ class MultiPatchBSplineConnectivity:
334
334
 
335
335
  Returns
336
336
  -------
337
- unique_field_indices : numpy.ndarray of int or list of numpy.ndarray of int
337
+ unique_field_indices : np.ndarray[np.integer] or list of np.ndarray[np.integer]
338
338
  The unique, unpacked or separated representation of a field's unique indices.
339
339
  If unique, its shape is (*`field_shape`, `self`.`nb_unique_nodes`).
340
340
  If unpacked, its shape is : (*`field_shape`, `self`.`nb_nodes`).
@@ -366,7 +366,7 @@ class MultiPatchBSplineConnectivity:
366
366
 
367
367
  Returns
368
368
  -------
369
- duplicate_nodes_mask : numpy.ndarray
369
+ duplicate_nodes_mask : np.ndarray
370
370
  Boolean mask of shape (nb_nodes,) where True indicates a node is duplicated
371
371
  across multiple patches and False indicates it appears only once.
372
372
  """
@@ -391,7 +391,7 @@ class MultiPatchBSplineConnectivity:
391
391
  Connectivity information for the border patches.
392
392
  border_splines : list[BSpline]
393
393
  Array of B-spline patches representing the borders.
394
- border_unique_to_self_unique_connectivity : numpy.ndarray of int
394
+ border_unique_to_self_unique_connectivity : np.ndarray[np.integer]
395
395
  Array mapping border unique nodes to original unique nodes.
396
396
 
397
397
  Raises
@@ -484,7 +484,7 @@ class MultiPatchBSplineConnectivity:
484
484
  Connectivity information for the border patches.
485
485
  border_splines : list[BSpline]
486
486
  Array of B-spline patches representing the borders.
487
- border_unique_to_self_unique_connectivity : numpy.ndarray of int
487
+ border_unique_to_self_unique_connectivity : np.ndarray[np.integer]
488
488
  Array mapping border unique nodes to original unique nodes.
489
489
 
490
490
  Raises
@@ -649,7 +649,7 @@ class MultiPatchBSplineConnectivity:
649
649
  ----------
650
650
  splines : list[BSpline]
651
651
  Array of B-spline patches to subset.
652
- patches_to_keep : numpy.array of int
652
+ patches_to_keep : np.ndarray[np.integer]
653
653
  Indices of patches to keep in the subset.
654
654
 
655
655
  Returns
@@ -658,7 +658,7 @@ class MultiPatchBSplineConnectivity:
658
658
  New connectivity object containing only the selected patches.
659
659
  new_splines : list[BSpline]
660
660
  Array of B-spline patches for the selected patches.
661
- new_unique_to_self_unique_connectivity : numpy.ndarray of int
661
+ new_unique_to_self_unique_connectivity : np.ndarray[np.integer]
662
662
  Array mapping new unique nodes to original unique nodes.
663
663
  """
664
664
  new_splines = splines[patches_to_keep]
@@ -3,7 +3,7 @@ import meshio as io
3
3
  from typing import Iterable
4
4
  from functools import reduce
5
5
  import os
6
- import xml
6
+ from xml.dom import minidom
7
7
 
8
8
 
9
9
  def writePVD(fileName: str, groups: dict[str, dict]):
@@ -32,7 +32,7 @@ def writePVD(fileName: str, groups: dict[str, dict]):
32
32
  None
33
33
  """
34
34
  rep, fname = os.path.split(fileName)
35
- pvd = xml.dom.minidom.Document()
35
+ pvd = minidom.Document()
36
36
  pvd_root = pvd.createElementNS("VTK", "VTKFile")
37
37
  pvd_root.setAttribute("type", "Collection")
38
38
  pvd_root.setAttribute("version", "0.1")
@@ -1,30 +1,35 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bsplyne
3
- Version: 1.0.0
4
- Summary: A package for N dimensions B-splines.
5
- Home-page: https://github.com/Dorian210/bsplyne
6
- Author: Dorian Bichet
7
- Author-email: dbichet@insa-toulouse.fr
3
+ Version: 1.0.1
4
+ Summary: N-dimensional B-spline library for numerical mechanics and geometry
5
+ Author-email: Dorian Bichet <dbichet@insa-toulouse.fr>
6
+ Project-URL: Homepage, https://github.com/Dorian210/bsplyne
7
+ Project-URL: Repository, https://github.com/Dorian210/bsplyne
8
+ Project-URL: Issues, https://github.com/Dorian210/bsplyne/issues
8
9
  Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3 :: Only
9
11
  Classifier: Operating System :: OS Independent
10
12
  Classifier: License :: OSI Approved :: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1)
13
+ Classifier: Topic :: Scientific/Engineering
14
+ Classifier: Intended Audience :: Science/Research
15
+ Requires-Python: >=3.9
11
16
  Description-Content-Type: text/markdown
12
17
  License-File: LICENSE.txt
13
- Requires-Dist: numpy
14
- Requires-Dist: numba
15
- Requires-Dist: scipy
16
- Requires-Dist: matplotlib
17
- Requires-Dist: meshio
18
- Requires-Dist: tqdm
19
- Dynamic: author
20
- Dynamic: author-email
21
- Dynamic: classifier
22
- Dynamic: description
23
- Dynamic: description-content-type
24
- Dynamic: home-page
18
+ Requires-Dist: numpy>=1.20
19
+ Requires-Dist: numba>=0.55
20
+ Requires-Dist: scipy>=1.8
21
+ Requires-Dist: matplotlib>=3.5
22
+ Requires-Dist: meshio>=5.0
23
+ Requires-Dist: tqdm>=4.60
24
+ Provides-Extra: viz
25
+ Requires-Dist: pyvista>=0.41; extra == "viz"
26
+ Provides-Extra: dev
27
+ Requires-Dist: build; extra == "dev"
28
+ Requires-Dist: twine; extra == "dev"
29
+ Provides-Extra: docs
30
+ Requires-Dist: wkhtmltopdf; extra == "docs"
31
+ Requires-Dist: pdoc>=12.0; extra == "docs"
25
32
  Dynamic: license-file
26
- Dynamic: requires-dist
27
- Dynamic: summary
28
33
 
29
34
  # bsplyne
30
35
 
@@ -0,0 +1,19 @@
1
+ LICENSE.txt
2
+ README.md
3
+ pyproject.toml
4
+ src/bsplyne/__init__.py
5
+ src/bsplyne/b_spline.py
6
+ src/bsplyne/b_spline_basis.py
7
+ src/bsplyne/geometries_in_3D.py
8
+ src/bsplyne/multi_patch_b_spline.py
9
+ src/bsplyne/my_wide_product.py
10
+ src/bsplyne/parallel_utils.py
11
+ src/bsplyne/save_utils.py
12
+ src/bsplyne.egg-info/PKG-INFO
13
+ src/bsplyne.egg-info/SOURCES.txt
14
+ src/bsplyne.egg-info/dependency_links.txt
15
+ src/bsplyne.egg-info/requires.txt
16
+ src/bsplyne.egg-info/top_level.txt
17
+ tests/test_b_spline_advanced.py
18
+ tests/test_b_spline_basis.py
19
+ tests/test_b_spline_basis_advanced.py
@@ -0,0 +1,17 @@
1
+ numpy>=1.20
2
+ numba>=0.55
3
+ scipy>=1.8
4
+ matplotlib>=3.5
5
+ meshio>=5.0
6
+ tqdm>=4.60
7
+
8
+ [dev]
9
+ build
10
+ twine
11
+
12
+ [docs]
13
+ wkhtmltopdf
14
+ pdoc>=12.0
15
+
16
+ [viz]
17
+ pyvista>=0.41
bsplyne-1.0.0/MANIFEST.in DELETED
@@ -1,3 +0,0 @@
1
- include *.jpg
2
- include *.txt
3
- recursive-include tests *.py
@@ -1,21 +0,0 @@
1
- LICENSE.txt
2
- MANIFEST.in
3
- README.md
4
- context.txt
5
- setup.py
6
- bsplyne/__init__.py
7
- bsplyne/b_spline.py
8
- bsplyne/b_spline_basis.py
9
- bsplyne/geometries_in_3D.py
10
- bsplyne/multi_patch_b_spline.py
11
- bsplyne/my_wide_product.py
12
- bsplyne/parallel_utils.py
13
- bsplyne/save_utils.py
14
- bsplyne.egg-info/PKG-INFO
15
- bsplyne.egg-info/SOURCES.txt
16
- bsplyne.egg-info/dependency_links.txt
17
- bsplyne.egg-info/requires.txt
18
- bsplyne.egg-info/top_level.txt
19
- tests/test_b_spline_advanced.py
20
- tests/test_b_spline_basis.py
21
- tests/test_b_spline_basis_advanced.py
@@ -1,6 +0,0 @@
1
- numpy
2
- numba
3
- scipy
4
- matplotlib
5
- meshio
6
- tqdm
bsplyne-1.0.0/context.txt DELETED
@@ -1,77 +0,0 @@
1
- The parametric space is called the isoparametric space.
2
-
3
- In docstrings :
4
- - the types are the same as in the definition of the function (type hints).
5
- - except for the types of the parameters in their "introductory" line, the python objects, types, variables and python code must be written between backtick (e.g. `int`).
6
- - make a clear difference between tuples, displayed with parentheses, and lists, displayed with square brackets.
7
- - don't forget to talk abaout the optional parameters values (e.g. "n_eval_per_elem : Union[int, Iterable[int]], optional [...] By default, 10.").
8
-
9
- I prefer the docstrings to be displayed in the chat, not in a separate file.
10
- Be careful with the indentation of the docstring : it should match the indentation of the function/method/class.
11
-
12
- If a docstring already exists and seems lacking in terms of content compared to the one that follows, enhance it.
13
- If it is already good enough in your opinion, tell me in plain text your opinion afterwards.
14
-
15
-
16
- Exemple of docstring :
17
-
18
- def gauss_legendre_for_integration(
19
- self,
20
- n_eval_per_elem: Union[int, Iterable[int], None]=None,
21
- bounding_box: Union[Iterable, None]=None
22
- ) -> tuple[tuple[npt.NDArray[np.floating], ...], tuple[npt.NDArray[np.floating], ...]]:
23
- """
24
- Generate sets of evaluation points and their Gauss-Legendre integration weights over each basis span.
25
-
26
- This method creates Gauss-Legendre quadrature points and their corresponding integration weights
27
- for each isoparametric dimension by calling `gauss_legendre_for_integration` on each
28
- `BSplineBasis` instance stored in the `bases` array.
29
-
30
- Parameters
31
- ----------
32
- n_eval_per_elem : Union[int, Iterable[int], None], optional
33
- Number of evaluation points per element for each isoparametric dimension.
34
- If an `int` is provided, the same number is used for all dimensions.
35
- If an `Iterable` is provided, each value corresponds to a different dimension.
36
- If `None`, uses `(p + 2)//2` points per element where `p` is the degree of each basis.
37
- This number of points ensures an exact integration of a `p`-th degree polynomial.
38
- By default, None.
39
-
40
- bounding_box : Union[Iterable[tuple[float, float]], None], optional
41
- Lower and upper bounds for each isoparametric dimension.
42
- If `None`, uses the span of each basis.
43
- Format: [(`xi_min`, `xi_max`), (`eta_min`, `eta_max`), ...].
44
- By default, None.
45
-
46
- Returns
47
- -------
48
- XI : tuple[npt.NDArray[np.floating], ...]
49
- Tuple containing arrays of Gauss-Legendre points for each isoparametric dimension.
50
- The tuple has length `NPa` (dimension of isoparametric space).
51
-
52
- dXI : tuple[npt.NDArray[np.floating], ...]
53
- Tuple containing arrays of Gauss-Legendre weights for each isoparametric dimension.
54
- The tuple has length `NPa` (dimension of isoparametric space).
55
-
56
- Notes
57
- -----
58
- - For a curve (1D), returns ((`xi` points), (`xi` weights))
59
- - For a surface (2D), returns ((`xi` points, `eta` points), (`xi` weights, `eta` weights))
60
- - For a volume (3D), returns ((`xi` points, `eta` points, `zeta` points),
61
- (`xi` weights, `eta` weights, `zeta` weights))
62
- - The points and weights follow the Gauss-Legendre quadrature rule
63
- - When `n_eval_per_elem` is `None`, uses `(p + 2)//2` points per element for exact
64
- integration of polynomials up to degree `p`
65
-
66
- Examples
67
- --------
68
- >>> degrees = [2, 2]
69
- >>> knots = [np.array([0, 0, 0, 0.5, 1, 1, 1], dtype='float'),
70
- ... np.array([0, 0, 0, 0.5, 1, 1, 1], dtype='float')]
71
- >>> spline = BSpline(degrees, knots)
72
- >>> (xi, eta), (dxi, deta) = spline.gauss_legendre_for_integration()
73
- >>> xi # xi points
74
- array([0.10566243, 0.39433757, 0.60566243, 0.89433757])
75
- >>> dxi # xi weights
76
- array([0.25, 0.25, 0.25, 0.25])
77
- """
bsplyne-1.0.0/setup.py DELETED
@@ -1,21 +0,0 @@
1
- from setuptools import setup, find_packages
2
-
3
- with open('README.md', 'r') as readme:
4
- long_description = readme.read()
5
-
6
- setup(
7
- name='bsplyne',
8
- version='1.0.0',
9
- url='https://github.com/Dorian210/bsplyne',
10
- author='Dorian Bichet',
11
- author_email='dbichet@insa-toulouse.fr',
12
- description='A package for N dimensions B-splines.',
13
- long_description=long_description,
14
- long_description_content_type='text/markdown',
15
- packages=find_packages(),
16
- install_requires=['numpy', 'numba', 'scipy', 'matplotlib', 'meshio', 'tqdm'],
17
- classifiers=['Programming Language :: Python :: 3',
18
- 'Operating System :: OS Independent',
19
- 'License :: OSI Approved :: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1)'],
20
-
21
- )
File without changes
File without changes
File without changes