File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
test/test_private/test_terranigma Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1212def test_2025_3 ():
1313
1414 path_to_data = os .getenv ("TEST_DATA" )
15- path_to_data = r"C:/Users/Benjamink/OneDrive - Mira Geoscience Limited/Documents/projects/implicit modelling/Nutrien/demo_terranigma/from_miguel"
15+ # path_to_data = r"C:/Users/Benjamink/OneDrive - Mira Geoscience Limited/Documents/projects/implicit modelling/Nutrien/demo_terranigma/from_miguel"
1616
1717 data = {
1818 "a" : read_surface_points (f"{ path_to_data } /a.dat" ),
@@ -96,6 +96,14 @@ def test_2025_3():
9696 elapsed = toc - tic
9797 print (f"Octree interpolation runtime: { int (elapsed / 60 )} minutes { int (elapsed % 60 )} seconds." )
9898
99+ octrees_outputs = solution .octrees_output
100+ n_cells = 0
101+ for octree_output in octrees_outputs :
102+ n_cells += octree_output .outputs_centers [0 ].exported_fields .scalar_field .size ().numel ()
103+ if len (octree_output .outputs_corners )> 0 :
104+ n_cells += octree_output .outputs_corners [0 ].exported_fields .scalar_field .size ().numel ()
105+ print (f"Number of cells evaluated: { n_cells } " )
106+
99107 # Time extra interpolation on regular grid centers. I was expecting/hoping that this second step
100108 # would just be an evaluation of the continuous scalar field solution from first step.
101109
@@ -110,4 +118,5 @@ def test_2025_3():
110118 )
111119 toc = time .perf_counter ()
112120 elapsed = toc - tic
113- print (f"Evaluate model on regular grid centers: { int (elapsed / 60 )} minutes { int (elapsed % 60 )} seconds" )
121+ print (f"Evaluate model on regular grid centers: { int (elapsed / 60 )} minutes { int (elapsed % 60 )} seconds" )
122+ print (f"Number of cells evaluated: { centers .shape [0 ]} " )
You can’t perform that action at this time.
0 commit comments