xslope 0.1.2__tar.gz → 0.1.4__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.
- {xslope-0.1.2/xslope.egg-info → xslope-0.1.4}/PKG-INFO +1 -1
- {xslope-0.1.2 → xslope-0.1.4}/xslope/_version.py +1 -1
- {xslope-0.1.2 → xslope-0.1.4}/xslope/fileio.py +7 -1
- {xslope-0.1.2 → xslope-0.1.4}/xslope/mesh.py +21 -6
- {xslope-0.1.2 → xslope-0.1.4}/xslope/plot.py +3 -1
- {xslope-0.1.2 → xslope-0.1.4/xslope.egg-info}/PKG-INFO +1 -1
- {xslope-0.1.2 → xslope-0.1.4}/LICENSE +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/MANIFEST.in +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/NOTICE +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/README.md +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/pyproject.toml +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/setup.cfg +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope/__init__.py +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope/advanced.py +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope/fem.py +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope/global_config.py +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope/plot_fem.py +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope/plot_seep.py +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope/search.py +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope/seep.py +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope/slice.py +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope/solve.py +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope.egg-info/SOURCES.txt +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope.egg-info/dependency_links.txt +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope.egg-info/requires.txt +0 -0
- {xslope-0.1.2 → xslope-0.1.4}/xslope.egg-info/top_level.txt +0 -0
|
@@ -564,7 +564,13 @@ def load_slope_data(filepath):
|
|
|
564
564
|
# === VALIDATION ===
|
|
565
565
|
|
|
566
566
|
circular = len(circles) > 0
|
|
567
|
-
if
|
|
567
|
+
# Check if this is a seepage-only analysis (has seepage BCs but no slope stability surfaces)
|
|
568
|
+
has_seepage_bc = (len(seepage_bc.get("specified_heads", [])) > 0 or
|
|
569
|
+
len(seepage_bc.get("exit_face", [])) > 0)
|
|
570
|
+
is_seepage_only = has_seepage_bc and not circular and len(non_circ) == 0
|
|
571
|
+
|
|
572
|
+
# Only require circular/non-circular data if this is NOT a seepage-only analysis
|
|
573
|
+
if not is_seepage_only and not circular and len(non_circ) == 0:
|
|
568
574
|
raise ValueError("Input must include either circular or non-circular surface data.")
|
|
569
575
|
if not profile_lines:
|
|
570
576
|
raise ValueError("Profile lines sheet is empty or invalid.")
|
|
@@ -25,12 +25,27 @@ def _get_gmsh():
|
|
|
25
25
|
import gmsh
|
|
26
26
|
_gmsh = gmsh
|
|
27
27
|
except (ImportError, OSError) as e:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
error_msg = str(e)
|
|
29
|
+
# Check for OpenGL library issues (common in Colab/headless environments)
|
|
30
|
+
if "libGL" in error_msg or "libGLU" in error_msg:
|
|
31
|
+
help_msg = (
|
|
32
|
+
"gmsh is required for mesh generation but could not be imported due to missing OpenGL libraries. "
|
|
33
|
+
"This is common in headless environments like Google Colab.\n\n"
|
|
34
|
+
"To fix this in Google Colab, install the required system libraries first:\n"
|
|
35
|
+
" !apt-get update && apt-get install -y libgl1-mesa-glx libglu1-mesa\n"
|
|
36
|
+
"Then install gmsh:\n"
|
|
37
|
+
" !pip install gmsh\n\n"
|
|
38
|
+
"For other headless environments, install the appropriate OpenGL libraries for your system.\n"
|
|
39
|
+
f"Original error: {e}"
|
|
40
|
+
)
|
|
41
|
+
else:
|
|
42
|
+
help_msg = (
|
|
43
|
+
"gmsh is required for mesh generation but could not be imported. "
|
|
44
|
+
"If you only need limit equilibrium analysis, you can ignore this. "
|
|
45
|
+
"To use FEM features, install gmsh: pip install gmsh\n"
|
|
46
|
+
f"Original error: {e}"
|
|
47
|
+
)
|
|
48
|
+
raise ImportError(help_msg) from e
|
|
34
49
|
return _gmsh
|
|
35
50
|
|
|
36
51
|
|
|
@@ -416,6 +416,8 @@ def plot_non_circ(ax, non_circ):
|
|
|
416
416
|
Returns:
|
|
417
417
|
None
|
|
418
418
|
"""
|
|
419
|
+
if not non_circ or len(non_circ) == 0:
|
|
420
|
+
return
|
|
419
421
|
xs, ys = zip(*non_circ)
|
|
420
422
|
ax.plot(xs, ys, 'r--', label='Non-Circular Surface')
|
|
421
423
|
|
|
@@ -744,7 +746,7 @@ def plot_inputs(slope_data, title="Slope Geometry and Inputs", width=12, height=
|
|
|
744
746
|
|
|
745
747
|
if slope_data['circular']:
|
|
746
748
|
plot_circles(ax, slope_data)
|
|
747
|
-
|
|
749
|
+
elif slope_data.get('non_circ') and len(slope_data['non_circ']) > 0:
|
|
748
750
|
plot_non_circ(ax, slope_data['non_circ'])
|
|
749
751
|
|
|
750
752
|
# Handle material table display
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|