-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: abutting fault polarity was being calculated inconsistently.
Have changed to use the estimated down_throw direction, if different <90 then use positive, otherwise use negative
- Loading branch information
Lachlan Grose
committed
Oct 13, 2021
1 parent
6723790
commit c77681f
Showing
4 changed files
with
47 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
import numpy as np | ||
class BaseRegion: | ||
def __init__(self): | ||
self.type="BaseRegion" | ||
|
||
class RegionEverywhere: | ||
class RegionEverywhere(BaseRegion): | ||
def __init__(self): | ||
super().__init__() | ||
self.type = "RegionEverywhere" | ||
def __call__(self,xyz): | ||
return np.ones(xyz.shape[0],dtype='bool') | ||
|
||
class RegionFunction: | ||
class RegionFunction(BaseRegion): | ||
def __init__(self,function): | ||
super().__init__() | ||
self.function = function | ||
def __call__(self,xyz): | ||
return self.function(xyz) | ||
return self.function(xyz) | ||
|
||
class PositiveRegion: | ||
def __init__(self,feature): | ||
self.feature = feature | ||
def __call__(self,xyz): | ||
return np.logical_or(self.feature.evaluate_value(xyz) > 0, | ||
np.isnan(self.feature.evaluate_value(xyz))) | ||
|
||
class NegativeRegion: | ||
def __init__(self,feature): | ||
self.feature = feature | ||
def __call__(self,xyz): | ||
return np.logical_or(self.feature.evaluate_value(xyz) < 0, | ||
np.isnan(self.feature.evaluate_value(xyz))) | ||
|