Skip to content

Commit 8508d10

Browse files
authored
Merge pull request #52 from Loop3D/dev
Dev
2 parents 01a61fe + d740b2b commit 8508d10

36 files changed

+24320
-311
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,4 @@ examples/*/*.png
129129
docs/source/test/*
130130
examples/*.png
131131
dev/scalar_field
132-
dev/unconf
132+
dev/unconf

LoopStructural/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
ch.setFormatter(formatter)
3030
ch.setLevel(logging.WARNING)
3131
loggers = {}
32-
__version__ = '1.0.5'
32+
__version__ = '1.0.6-dev'
3333
from .modelling.core.geological_model import GeologicalModel
3434
from .visualisation.model_visualisation import LavaVuModelViewer
3535
from .visualisation.map_viewer import MapView

LoopStructural/interpolators/base_structured_3d_support.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ def maximum(self,maximum):
6767
"""
6868
update the number of steps to fit new boundary
6969
"""
70-
maximum = np.array(maximum)
70+
maximum = np.array(maximum,dtype=float)
7171
length = maximum-self.origin
7272
length /= self.step_vector
73-
self.nsteps = np.ceil(length).astype(int)
73+
self._nsteps = np.ceil(length).astype(int)
7474
@property
7575
def n_nodes(self):
7676
return np.product(self.nsteps)

LoopStructural/interpolators/discrete_interpolator.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,9 @@ def add_constraints_to_least_squares(self, A, B, idc, name='undefined'):
156156
A = np.array(A)
157157
B = np.array(B)
158158
idc = np.array(idc)
159-
160159
nr = A.shape[0]
160+
#logger.debug('Adding constraints to interpolator: {} {} {}'.format(A.shape[0]))
161+
# print(A.shape,B.shape,idc.shape)
161162
if A.shape != idc.shape:
162163
return
163164

@@ -491,6 +492,8 @@ def _solve(self, solver='cg', **kwargs):
491492
True if the interpolation is run
492493
493494
"""
495+
logger.info("Solving interpolation for {}".format(self.propertyname))
496+
494497
self.c = np.zeros(self.support.n_nodes)
495498
self.c[:] = np.nan
496499
damp = True
@@ -531,7 +534,7 @@ def _solve(self, solver='cg', **kwargs):
531534
logger.warning("Solver not run, no scalar field")
532535
# if solution is all 0, probably didn't work
533536
if np.all(self.c[self.region] == 0):
534-
logger.warning("No solution, scalar field 0. Add more data.")
537+
logger.warning("No solution, {} scalar field 0. Add more data.".format(self.propertyname))
535538

536539
def update(self):
537540
"""

LoopStructural/interpolators/finite_difference_interpolator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def _setup_interpolator(self, **kwargs):
7575
-------
7676
7777
"""
78-
7978
for key in kwargs:
8079
self.up_to_date = False
8180
if 'regularisation' in kwargs:

LoopStructural/modelling/core/geological_model.py

Lines changed: 125 additions & 98 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)