pyviewfactor 0.1.3__tar.gz → 0.1.5__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.
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/PKG-INFO +1 -1
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/pyviewfactor/_version.py +1 -1
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/pyviewfactor/pyviewfactor.py +32 -18
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/pyviewfactor.egg-info/PKG-INFO +1 -1
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/LICENSE.txt +0 -0
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/README.md +0 -0
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/pyviewfactor/__init__.py +0 -0
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/pyviewfactor.egg-info/SOURCES.txt +0 -0
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/pyviewfactor.egg-info/dependency_links.txt +0 -0
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/pyviewfactor.egg-info/requires.txt +0 -0
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/pyviewfactor.egg-info/top_level.txt +0 -0
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/setup.cfg +0 -0
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/setup.py +0 -0
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/test/__init__.py +0 -0
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/test/test_utils.py +0 -0
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/test/test_view_factor.py +0 -0
- {pyviewfactor-0.1.3 → pyviewfactor-0.1.5}/test/test_visibility_obstruction.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyviewfactor
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: A python library to calculate numerically exact radiation view factors between planar faces.
|
|
5
5
|
Home-page: https://gitlab.com/arep-dev/pyViewFactor/
|
|
6
6
|
Author: Mateusz BOGDAN, Edouard WALTHER, Marc ALECIAN, Mina CHAPON
|
|
@@ -533,23 +533,37 @@ def compute_viewfactor(cell_1, cell_2, epsilon=0.00001, rounding_decimal=6):
|
|
|
533
533
|
>>> isinstance(vf, float)
|
|
534
534
|
True
|
|
535
535
|
"""
|
|
536
|
-
#
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
#
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
536
|
+
# 1) Cast to PolyData & unstructured grid
|
|
537
|
+
c1_poly = cell_1
|
|
538
|
+
c2_poly = cell_2
|
|
539
|
+
ug1 = c1_poly.cast_to_unstructured_grid()
|
|
540
|
+
ug2 = c2_poly.cast_to_unstructured_grid()
|
|
541
|
+
|
|
542
|
+
# 2) Get and round the points
|
|
543
|
+
pts1 = np.round(ug1.get_cell(0).points, rounding_decimal)
|
|
544
|
+
pts2 = np.round(ug2.get_cell(0).points, rounding_decimal)
|
|
545
|
+
|
|
546
|
+
# 3) Detect shared vertices
|
|
547
|
+
# Build a set of tuples for quick compare
|
|
548
|
+
set1 = {tuple(p) for p in pts1}
|
|
549
|
+
set2 = {tuple(p) for p in pts2}
|
|
550
|
+
if set1 & set2: # non-empty intersection → shared vertex/edge
|
|
551
|
+
# compute unit centroid direction
|
|
552
|
+
cen1 = c1_poly.cell_centers().points[0]
|
|
553
|
+
cen2 = c2_poly.cell_centers().points[0]
|
|
554
|
+
dir_vec = cen2 - cen1
|
|
555
|
+
dir_vec = dir_vec / np.linalg.norm(dir_vec)
|
|
556
|
+
# translate pts2 by epsilon
|
|
557
|
+
pts2 = pts2 + epsilon * dir_vec
|
|
558
|
+
|
|
559
|
+
# 4) Recompute auxiliary arrays for the Numba core
|
|
560
|
+
# vect_intra_1, vect_intra_2, matL, constante, etc.
|
|
561
|
+
# (same logic you already have, but using the possibly shifted pts2)
|
|
562
|
+
|
|
563
|
+
# 5) Call the Numba core:
|
|
564
|
+
return compute_viewfactor_core(pts1, pts2,
|
|
565
|
+
vect_intra_1, vect_intra_2,
|
|
566
|
+
constante)
|
|
553
567
|
|
|
554
568
|
|
|
555
569
|
def compute_viewfactor_matrix(mesh, obstacle=None,
|
|
@@ -668,7 +682,7 @@ def compute_viewfactor_matrix(mesh, obstacle=None,
|
|
|
668
682
|
F_ji = F_ij * (areas[i] / areas[j])
|
|
669
683
|
else:
|
|
670
684
|
F_ji = compute_viewfactor(f_j, f_i)
|
|
671
|
-
|
|
685
|
+
return i, j, F_ij, F_ji
|
|
672
686
|
|
|
673
687
|
# Prepare all unique pairs
|
|
674
688
|
pairs = [(i, j) for i in range(n) for j in range(i + 1, n)]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyviewfactor
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: A python library to calculate numerically exact radiation view factors between planar faces.
|
|
5
5
|
Home-page: https://gitlab.com/arep-dev/pyViewFactor/
|
|
6
6
|
Author: Mateusz BOGDAN, Edouard WALTHER, Marc ALECIAN, Mina CHAPON
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|