Skip to content

Commit 14bd890

Browse files
committed
[TEST] Best configuration without big changes
1 parent c4de30f commit 14bd890

File tree

1 file changed

+51
-15
lines changed

1 file changed

+51
-15
lines changed

test/test_private/test_terranigma/test_2025_I.py

Lines changed: 51 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@
44

55
import gempy as gp
66
from gempy.API.io_API import read_surface_points
7-
7+
import gempy_viewer as gpv
88

99
dotenv.load_dotenv()
1010

11+
1112
def test_2025_1():
12-
13+
range_ = 0.6
14+
orientation_loc = -286
15+
1316
path_to_data = os.getenv("TEST_DATA")
14-
17+
1518
data = {
16-
"a" : read_surface_points(f"{path_to_data}/a.dat"),
17-
"b" : read_surface_points(f"{path_to_data}/b.dat"),
19+
"a": read_surface_points(f"{path_to_data}/a.dat"),
20+
"b": read_surface_points(f"{path_to_data}/b.dat"),
1821
"c": read_surface_points(f"{path_to_data}/c.dat"),
19-
"d" : read_surface_points(f"{path_to_data}/d.dat"),
22+
"d": read_surface_points(f"{path_to_data}/d.dat"),
2023
"e": read_surface_points(f"{path_to_data}/e.dat"),
21-
"f" : read_surface_points(f"{path_to_data}/f.dat"),
24+
"f": read_surface_points(f"{path_to_data}/f.dat"),
2225
}
2326

2427
color_generator = gp.data.ColorsGenerator()
@@ -36,10 +39,10 @@ def test_2025_1():
3639
group = gp.data.StructuralGroup(
3740
name="Series1",
3841
elements=elements,
39-
structural_relation=gp.core.data.StackRelationType.ERODE,
40-
fault_relations=gp.core.data.FaultsRelationSpecialCase.OFFSET_FORMATIONS,
42+
structural_relation=gp.data.StackRelationType.ERODE,
43+
fault_relations=gp.data.FaultsRelationSpecialCase.OFFSET_FORMATIONS,
4144
)
42-
structural_frame = gp.core.data.StructuralFrame(
45+
structural_frame = gp.data.StructuralFrame(
4346
structural_groups=[group], color_gen=color_generator
4447
)
4548

@@ -49,25 +52,58 @@ def test_2025_1():
4952
ymax = 5657860
5053
zmin = -780
5154
zmax = -636
55+
56+
# * Add 20% to extent
57+
xmin -= 0.2 * (xmax - xmin)
58+
xmax += 0.2 * (xmax - xmin)
59+
ymin -= 0.2 * (ymax - ymin)
60+
ymax += 0.2 * (ymax - ymin)
61+
zmin -= 0.2 * (zmax - zmin)
62+
zmax += 0.2 * (zmax - zmin)
63+
5264
geo_model = gp.create_geomodel(
5365
project_name="test",
5466
extent=[xmin, xmax, ymin, ymax, zmin, zmax],
55-
refinement=4,
67+
refinement=5,
5668
structural_frame=structural_frame,
5769
)
70+
71+
if False:
72+
gpv.plot_3d(
73+
model=geo_model,
74+
ve=10,
75+
kwargs_pyvista_bounds={
76+
'show_xlabels': False,
77+
'show_ylabels': False,
78+
}
79+
)
80+
81+
geo_model.interpolation_options.evaluation_options.number_octree_levels_surface = 4
82+
geo_model.interpolation_options.kernel_options.range = range_
83+
5884
gp.add_orientations(
5985
geo_model=geo_model,
6086
x=[525825],
6187
y=[5651315],
62-
z=[-686],
88+
z=[orientation_loc], # * Moving the orientation further
6389
pole_vector=[[0, 0, 1]],
6490
elements_names=["a"]
6591
)
6692
solution = gp.compute_model(
6793
geo_model,
6894
engine_config=gp.data.GemPyEngineConfig(
69-
backend=gp.data.AvailableBackends.PYTORCH,
70-
use_gpu=True,
95+
backend=gp.data.AvailableBackends.PYTORCH
7196
),
7297
)
73-
98+
99+
gpv.plot_3d(
100+
model=geo_model,
101+
ve=10,
102+
show_lith=False,
103+
image=False,
104+
kwargs_pyvista_bounds={
105+
'show_xlabels': False,
106+
'show_ylabels': False,
107+
'show_zlabels': False,
108+
}
109+
)

0 commit comments

Comments
 (0)