File tree Expand file tree Collapse file tree 3 files changed +47
-1
lines changed
LoopStructural/modelling/features Expand file tree Collapse file tree 3 files changed +47
-1
lines changed Original file line number Diff line number Diff line change @@ -134,9 +134,15 @@ def create_data_from_geometry(
134134 logger .warning (f"Fault major axis using map length: { major_axis } " )
135135
136136 if minor_axis is None :
137+ logger .info (
138+ f"Fault minor axis not set, using half major axis: { major_axis / 2 } "
139+ )
137140 minor_axis = major_axis / 2.0
138141 if intermediate_axis is None :
139142 intermediate_axis = major_axis
143+ logger .info (
144+ f"Fault intermediate axis not set, using major axis: { intermediate_axis } "
145+ )
140146 self .fault_minor_axis = minor_axis
141147 self .fault_major_axis = major_axis
142148 self .fault_intermediate_axis = intermediate_axis
Original file line number Diff line number Diff line change @@ -186,3 +186,41 @@ class BaseFault(object):
186186 gzf .add_max (1 )
187187 gxf = Composite (hw , fw )
188188 fault_displacement = FaultDisplacement (gx = gxf , gy = gyf , gz = gzf )
189+
190+
191+ class BaseFault3D (object ):
192+ """ """
193+
194+ hw = CubicFunction ()
195+ hw .add_cstr (0 , 1 )
196+ hw .add_grad (0 , 0 )
197+ hw .add_cstr (1 , 0 )
198+ # hw.add_cstr(1,1)
199+
200+ hw .add_grad (1 , 0 )
201+ hw .add_max (1 )
202+ fw = CubicFunction ()
203+ fw .add_cstr (0 , - 1 )
204+ fw .add_grad (0 , 0 )
205+ fw .add_cstr (- 1 , 0 )
206+ fw .add_grad (- 1 , 0 )
207+ fw .add_min (- 1 )
208+ gyf = CubicFunction ()
209+ gyf .add_cstr (- 1 , 0 )
210+ gyf .add_cstr (1 , 0 )
211+ gyf .add_cstr (- 0.2 , 1 )
212+ gyf .add_cstr (0.2 , 1 )
213+ gyf .add_grad (0 , 0 )
214+ gyf .add_min (- 1 )
215+ gyf .add_max (1 )
216+ # gyf = Ones()
217+ gzf = CubicFunction ()
218+ gzf .add_cstr (- 1 , 0 )
219+ gzf .add_cstr (1 , 0 )
220+ gzf .add_cstr (- 0.2 , 1 )
221+ gzf .add_cstr (0.2 , 1 )
222+ gzf .add_grad (0 , 0 )
223+ gzf .add_min (- 1 )
224+ gzf .add_max (1 )
225+ gxf = Composite (hw , fw )
226+ fault_displacement = FaultDisplacement (gx = gxf , gy = gyf , gz = gzf )
Original file line number Diff line number Diff line change 22 FaultDisplacementFeature ,
33)
44from ....modelling .features import FeatureType
5- from ....modelling .features .fault ._fault_function import BaseFault
5+ from ....modelling .features .fault ._fault_function import BaseFault , BaseFault3D
66from ....utils import getLogger , NegativeRegion , PositiveRegion
77from ....modelling .features import StructuralFrame
88
@@ -57,6 +57,8 @@ def faultfunction(self, value):
5757 self ._faultfunction = value
5858 elif isinstance (value , str ) and value == "BaseFault" :
5959 self ._faultfunction = BaseFault .fault_displacement
60+ elif isinstance (value , str ) and value == "BaseFault3D" :
61+ self ._faultfunction = BaseFault3D .fault_displacement
6062 else :
6163 raise ValueError ("Fault function must be a function or BaseFault" )
6264
You can’t perform that action at this time.
0 commit comments