4
4
5
5
import gempy as gp
6
6
from gempy .API .io_API import read_surface_points
7
-
7
+ import gempy_viewer as gpv
8
8
9
9
dotenv .load_dotenv ()
10
10
11
+
11
12
def test_2025_1 ():
12
-
13
+ range_ = 0.6
14
+ orientation_loc = - 286
15
+
13
16
path_to_data = os .getenv ("TEST_DATA" )
14
-
17
+
15
18
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" ),
18
21
"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" ),
20
23
"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" ),
22
25
}
23
26
24
27
color_generator = gp .data .ColorsGenerator ()
@@ -36,10 +39,10 @@ def test_2025_1():
36
39
group = gp .data .StructuralGroup (
37
40
name = "Series1" ,
38
41
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 ,
41
44
)
42
- structural_frame = gp .core . data .StructuralFrame (
45
+ structural_frame = gp .data .StructuralFrame (
43
46
structural_groups = [group ], color_gen = color_generator
44
47
)
45
48
@@ -49,25 +52,58 @@ def test_2025_1():
49
52
ymax = 5657860
50
53
zmin = - 780
51
54
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
+
52
64
geo_model = gp .create_geomodel (
53
65
project_name = "test" ,
54
66
extent = [xmin , xmax , ymin , ymax , zmin , zmax ],
55
- refinement = 4 ,
67
+ refinement = 5 ,
56
68
structural_frame = structural_frame ,
57
69
)
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
+
58
84
gp .add_orientations (
59
85
geo_model = geo_model ,
60
86
x = [525825 ],
61
87
y = [5651315 ],
62
- z = [- 686 ],
88
+ z = [orientation_loc ], # * Moving the orientation further
63
89
pole_vector = [[0 , 0 , 1 ]],
64
90
elements_names = ["a" ]
65
91
)
66
92
solution = gp .compute_model (
67
93
geo_model ,
68
94
engine_config = gp .data .GemPyEngineConfig (
69
- backend = gp .data .AvailableBackends .PYTORCH ,
70
- use_gpu = True ,
95
+ backend = gp .data .AvailableBackends .PYTORCH
71
96
),
72
97
)
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