Skip to content

Commit

Permalink
Merge branch 'ls-v1.6' of github.com:Loop3D/LoopStructural into ls-v1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlangrose committed May 27, 2024
2 parents 08877bf + 827509e commit 1a7c39f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions LoopStructural/datatypes/_bounding_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,15 @@ def cell_centers(self, order: str = "F") -> np.ndarray:
np.ndarray
array of cell centers
"""
x = np.linspace(self.origin[0], self.maximum[0], self.nsteps[0]-1)
y = np.linspace(self.origin[1], self.maximum[1], self.nsteps[1]-1)
z = np.linspace(self.origin[2], self.maximum[2], self.nsteps[2]-1)
x = np.linspace(self.origin[0], self.maximum[0], self.nsteps[0] - 1)
y = np.linspace(self.origin[1], self.maximum[1], self.nsteps[1] - 1)
z = np.linspace(self.origin[2], self.maximum[2], self.nsteps[2] - 1)
xx, yy, zz = np.meshgrid(x, y, z, indexing="ij")
locs = np.array(
[xx.flatten(order=order), yy.flatten(order=order), zz.flatten(order=order)]
).T
return locs + 0.5 * self.step_vector

def to_dict(self) -> dict:
"""Export the defining characteristics of the bounding
box to a dictionary for json serialisation
Expand Down
2 changes: 1 addition & 1 deletion LoopStructural/modelling/core/geological_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1806,6 +1806,6 @@ def get_stratigraphic_surfaces(self, units: List[str] = [], bottoms: bool = True

def get_block_model(self):
grid = self.bounding_box.vtk

grid.cell_data['id'] = self.evaluate_model(self.bounding_box.cell_centers(), scale=False)
return grid, self.stratigraphic_ids()
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
# from LoopStructural.visualisation.sphinx_scraper import Scraper as LoopScraper
from sphinx_gallery.sorting import ExampleTitleSortKey
import pyvista

pyvista.BUILDING_GALLERY = True

sphinx_gallery_conf = {
Expand Down

0 comments on commit 1a7c39f

Please sign in to comment.