|
2 | 2 |
|
3 | 3 | import gempy as gp
|
4 | 4 | import gempy_viewer as gpv
|
5 |
| -import subsurface.core.structs.unstructured_elements.triangular_surface |
| 5 | + |
| 6 | +from gempy import optional_dependencies |
6 | 7 | from gempy.core.data.enumerators import ExampleModel
|
7 | 8 |
|
8 | 9 | import numpy as np
|
|
14 | 15 | reason="This test needs higher requirements."
|
15 | 16 | )
|
16 | 17 |
|
17 |
| -ss = pytest.importorskip("subsurface", reason="Subsurface is not installed") |
18 | 18 | pd = pytest.importorskip("pandas", reason="Pandas is not installed")
|
19 | 19 |
|
20 | 20 |
|
@@ -51,16 +51,19 @@ def test_gempy_to_subsurface():
|
51 | 51 |
|
52 | 52 | def test_gempy_to_subsurface_II():
|
53 | 53 | model: gp.data.GeoModel = gp.generate_example_model(ExampleModel.ANTICLINE, compute_model=True)
|
54 |
| - from gempy_engine.core.data.raw_arrays_solution import RawArraysSolution |
| 54 | + subsurface = optional_dependencies.require_subsurface() |
| 55 | + ss = subsurface |
| 56 | + |
55 | 57 | meshes: ss.UnstructuredData = model.solutions.raw_arrays.meshes_to_subsurface()
|
56 |
| - |
57 | 58 | trisurf = subsurface.core.structs.unstructured_elements.triangular_surface.TriSurf(meshes)
|
58 | 59 | pyvista_mesh = ss.visualization.to_pyvista_mesh(trisurf)
|
59 | 60 | ss.visualization.pv_plot([pyvista_mesh], image_2d=True)
|
60 | 61 |
|
61 | 62 |
|
62 | 63 | def test_gempy_to_subsurface_III():
|
63 | 64 | model = gp.generate_example_model(ExampleModel.ANTICLINE, compute_model=True)
|
| 65 | + subsurface = optional_dependencies.require_subsurface() |
| 66 | + ss = subsurface |
64 | 67 | meshes: ss.UnstructuredData = model.solutions.meshes_to_unstruct()
|
65 | 68 |
|
66 | 69 | trisurf = subsurface.core.structs.unstructured_elements.triangular_surface.TriSurf(meshes)
|
|
0 commit comments