Skip to content

Commit 65b91cd

Browse files
committed
fix: add abutting relationships to model
1 parent d231204 commit 65b91cd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

loopstructural/main/model_manager.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from collections import defaultdict
22
from collections.abc import Callable
3-
from re import A
4-
from tracemalloc import start
3+
54
from typing import Callable
65
import geopandas as gpd
76
import pandas as pd
@@ -221,7 +220,14 @@ def update_fault_features(self):
221220
# need to have a way of specifying the displacement from the trace
222221
# or maybe the model should calculate it
223222
self.model.create_and_add_fault(fault_name, displacement=10, fault_data=data)
223+
for f in self.fault_topology.faults:
224+
for f2 in self.fault_topology.faults:
225+
if f != f2:
226+
relationship = self.fault_topology.get_fault_relationship(f, f2)
227+
if relationship == FaultRelationshipType.ABUTTING:
228+
self.model[f].add_abutting_fault(self.model[f2])
224229

230+
225231
@property
226232
def valid(self):
227233
valid = True

0 commit comments

Comments
 (0)