diff --git a/LoopStructural/modelling/core/geological_model.py b/LoopStructural/modelling/core/geological_model.py index b9d4450e..74a9458f 100644 --- a/LoopStructural/modelling/core/geological_model.py +++ b/LoopStructural/modelling/core/geological_model.py @@ -5,6 +5,7 @@ import json import pathlib +import warnings import numpy as np import pandas as pd @@ -830,13 +831,15 @@ def set_stratigraphic_column(self, stratigraphic_column, cmap="tab20"): } """ + warnings.warn( + "set_stratigraphic_column is deprecated, use model.stratigraphic_column.add_units instead", + DeprecationWarning, + stacklevel=2, + ) self.stratigraphic_column.clear(basement=False) # if the colour for a unit hasn't been specified we can just sample from # a colour map e.g. tab20 logger.info("Adding stratigraphic column to model") - raise DeprecationWarning( - "set_stratigraphic_column is deprecated, use model.stratigraphic_column.add_units instead" - ) for i, g in enumerate(stratigraphic_column.keys()): if g == 'faults': logger.info('Not adding faults to stratigraphic column') diff --git a/LoopStructural/modelling/features/_geological_feature.py b/LoopStructural/modelling/features/_geological_feature.py index 7c47ac0c..4660591b 100644 --- a/LoopStructural/modelling/features/_geological_feature.py +++ b/LoopStructural/modelling/features/_geological_feature.py @@ -202,6 +202,7 @@ def evaluate_gradient( tetrahedron = regular_tetraherdron_for_points(pos, element_scale_parameter) while not resolved: + resolved = True for f in self.faults: v = ( f[0] @@ -215,8 +216,7 @@ def evaluate_gradient( ) element_scale_parameter *= 0.5 tetrahedron = regular_tetraherdron_for_points(pos, element_scale_parameter) - - resolved = True + resolved = False tetrahedron_faulted = self._apply_faults(np.array(tetrahedron.reshape(-1, 3))).reshape( tetrahedron.shape