LoopStructural 1.0.4__zip → 1.0.71.dev0__zip

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. Miniconda/envs/loop/Lib/site-packages/LoopStructural/__init__.py +12 -7
  2. Miniconda/envs/loop/Lib/site-packages/LoopStructural/__pycache__/__init__.cpython-36.pyc +0 -0
  3. Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/__pycache__/{__init__.cpython-37.pyc → __init__.cpython-36.pyc} +0 -0
  4. Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/__pycache__/{_base.cpython-37.pyc → _base.cpython-36.pyc} +0 -0
  5. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__init__.py +3 -0
  6. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/__init__.cpython-36.pyc +0 -0
  7. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/base_structured_3d_support.cpython-36.pyc +0 -0
  8. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/discrete_fold_interpolator.cpython-36.pyc +0 -0
  9. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/discrete_interpolator.cpython-36.pyc +0 -0
  10. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/finite_difference_interpolator.cpython-36.pyc +0 -0
  11. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/geological_interpolator.cpython-36.pyc +0 -0
  12. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/operator.cpython-36.pyc +0 -0
  13. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/piecewiselinear_interpolator.cpython-36.pyc +0 -0
  14. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/structured_grid.cpython-36.pyc +0 -0
  15. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/structured_tetra.cpython-36.pyc +0 -0
  16. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/surfe_wrapper.cpython-36.pyc +0 -0
  17. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/base_structured_3d_support.py +101 -0
  18. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/cython/__pycache__/__init__.cpython-36.pyc +0 -0
  19. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/cython/dsi_helper.c +3899 -2455
  20. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/cython/dsi_helper.cp36-win_amd64.pyd +0 -0
  21. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/discrete_fold_interpolator.py +53 -22
  22. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/discrete_interpolator.py +61 -28
  23. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/finite_difference_interpolator.py +68 -11
  24. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/geological_interpolator.py +8 -1
  25. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/operator.py +2 -1
  26. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/piecewiselinear_interpolator.py +97 -8
  27. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/structured_grid.py +25 -69
  28. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/structured_tetra.py +86 -43
  29. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/surfe_wrapper.py +4 -3
  30. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/__pycache__/{__init__.cpython-37.pyc → __init__.cpython-36.pyc} +0 -0
  31. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/__pycache__/__init__.cpython-36.pyc +0 -0
  32. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/__pycache__/geological_model.cpython-36.pyc +0 -0
  33. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/__pycache__/geological_model_graph.cpython-36.pyc +0 -0
  34. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/__pycache__/stratigraphic_column.cpython-36.pyc +0 -0
  35. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/geological_model.py +303 -150
  36. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/geological_model_graph.py +881 -0
  37. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/stratigraphic_column.py +5 -0
  38. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__init__.py +1 -0
  39. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/__init__.cpython-36.pyc +0 -0
  40. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/fault_builder.cpython-36.pyc +0 -0
  41. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/fault_function.cpython-36.pyc +0 -0
  42. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/fault_function_feature.cpython-36.pyc +0 -0
  43. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/fault_segment.cpython-36.pyc +0 -0
  44. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/fault_builder.py +127 -0
  45. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/fault_function.py +2 -1
  46. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/fault_function_feature.py +2 -1
  47. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/fault_segment.py +30 -3
  48. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__init__.py +1 -0
  49. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/__init__.cpython-36.pyc +0 -0
  50. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/cross_product_geological_feature.cpython-36.pyc +0 -0
  51. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/geological_feature.cpython-36.pyc +0 -0
  52. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/geological_feature_builder.cpython-36.pyc +0 -0
  53. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/lambda_geological_feature.cpython-36.pyc +0 -0
  54. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/{region_feature.cpython-37.pyc → region_feature.cpython-36.pyc} +0 -0
  55. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/structural_frame.cpython-36.pyc +0 -0
  56. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/structural_frame_builder.cpython-36.pyc +0 -0
  57. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/unconformity_feature.cpython-36.pyc +0 -0
  58. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/cross_product_geological_feature.py +18 -5
  59. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/geological_feature.py +10 -44
  60. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/geological_feature_builder.py +127 -43
  61. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/lambda_geological_feature.py +31 -0
  62. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/structural_frame.py +28 -11
  63. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/structural_frame_builder.py +25 -15
  64. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/unconformity_feature.py +6 -1
  65. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/{__init__.cpython-37.pyc → __init__.cpython-36.pyc} +0 -0
  66. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/fold.cpython-36.pyc +0 -0
  67. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/fold_rotation_angle.cpython-36.pyc +0 -0
  68. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/fold_rotation_angle_feature.cpython-36.pyc +0 -0
  69. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/foldframe.cpython-36.pyc +0 -0
  70. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/svariogram.cpython-36.pyc +0 -0
  71. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/fold.py +13 -5
  72. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/fold_rotation_angle.py +5 -4
  73. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/fold_rotation_angle_feature.py +2 -1
  74. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/foldframe.py +6 -5
  75. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/svariogram.py +2 -1
  76. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__init__.py +5 -1
  77. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/__init__.cpython-36.pyc +0 -0
  78. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/bounding_box.cpython-36.pyc +0 -0
  79. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/exceptions.cpython-36.pyc +0 -0
  80. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/helper.cpython-36.pyc +0 -0
  81. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/logging.cpython-36.pyc +0 -0
  82. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/map2loop.cpython-36.pyc +0 -0
  83. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/regions.cpython-36.pyc +0 -0
  84. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/utils.cpython-36.pyc +0 -0
  85. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/bounding_box.py +21 -0
  86. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/exceptions.py +2 -1
  87. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/helper.py +5 -1
  88. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/logging.py +60 -0
  89. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/map2loop.py +47 -19
  90. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/regions.py +11 -0
  91. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/utils.py +2 -53
  92. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/{__init__.cpython-37.pyc → __init__.cpython-36.pyc} +0 -0
  93. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/map_viewer.cpython-36.pyc +0 -0
  94. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/model_plotter.cpython-36.pyc +0 -0
  95. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/model_visualisation.cpython-36.pyc +0 -0
  96. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/rotation_angle_plotter.cpython-36.pyc +0 -0
  97. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/{sphinx_scraper.cpython-37.pyc → sphinx_scraper.cpython-36.pyc} +0 -0
  98. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/stratigraphic_column.cpython-36.pyc +0 -0
  99. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/map_viewer.py +17 -2
  100. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/model_plotter.py +2 -1
  101. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/model_visualisation.py +152 -84
  102. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/rotation_angle_plotter.py +2 -1
  103. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/stratigraphic_column.py +60 -0
  104. Miniconda/envs/loop/Lib/site-packages/{LoopStructural-1.0.4-py3.7.egg-info → LoopStructural-1.0.71.dev0-py3.6.egg-info}/PKG-INFO +1 -1
  105. Miniconda/envs/loop/Lib/site-packages/{LoopStructural-1.0.4-py3.7.egg-info → LoopStructural-1.0.71.dev0-py3.6.egg-info}/SOURCES.txt +10 -5
  106. Miniconda/envs/loop/Lib/site-packages/{LoopStructural-1.0.4-py3.7.egg-info → LoopStructural-1.0.71.dev0-py3.6.egg-info}/requires.txt +1 -1
  107. Miniconda/envs/loop/Lib/site-packages/tests/__pycache__/__init__.cpython-36.pyc +0 -0
  108. Miniconda/envs/loop/Lib/site-packages/LoopStructural/__pycache__/__init__.cpython-37.pyc +0 -0
  109. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/__init__.cpython-37.pyc +0 -0
  110. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/discrete_fold_interpolator.cpython-37.pyc +0 -0
  111. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/discrete_interpolator.cpython-37.pyc +0 -0
  112. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/finite_difference_interpolator.cpython-37.pyc +0 -0
  113. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/geological_interpolator.cpython-37.pyc +0 -0
  114. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/operator.cpython-37.pyc +0 -0
  115. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/piecewiselinear_interpolator.cpython-37.pyc +0 -0
  116. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/structured_grid.cpython-37.pyc +0 -0
  117. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/structured_tetra.cpython-37.pyc +0 -0
  118. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/surfe_wrapper.cpython-37.pyc +0 -0
  119. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/cython/__pycache__/__init__.cpython-37.pyc +0 -0
  120. Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/cython/dsi_helper.cp37-win_amd64.pyd +0 -0
  121. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/__pycache__/__init__.cpython-37.pyc +0 -0
  122. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/__pycache__/geological_model.cpython-37.pyc +0 -0
  123. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/__init__.cpython-37.pyc +0 -0
  124. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/fault_function.cpython-37.pyc +0 -0
  125. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/fault_function_feature.cpython-37.pyc +0 -0
  126. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/fault_segment.cpython-37.pyc +0 -0
  127. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/__init__.cpython-37.pyc +0 -0
  128. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/cross_product_geological_feature.cpython-37.pyc +0 -0
  129. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/geological_feature.cpython-37.pyc +0 -0
  130. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/geological_feature_builder.cpython-37.pyc +0 -0
  131. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/structural_frame.cpython-37.pyc +0 -0
  132. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/structural_frame_builder.cpython-37.pyc +0 -0
  133. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/unconformity_feature.cpython-37.pyc +0 -0
  134. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/fold.cpython-37.pyc +0 -0
  135. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/fold_rotation_angle.cpython-37.pyc +0 -0
  136. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/fold_rotation_angle_feature.cpython-37.pyc +0 -0
  137. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/foldframe.cpython-37.pyc +0 -0
  138. Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/svariogram.cpython-37.pyc +0 -0
  139. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/__init__.cpython-37.pyc +0 -0
  140. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/exceptions.cpython-37.pyc +0 -0
  141. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/helper.cpython-37.pyc +0 -0
  142. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/map2loop.cpython-37.pyc +0 -0
  143. Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/utils.cpython-37.pyc +0 -0
  144. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/map_viewer.cpython-37.pyc +0 -0
  145. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/model_plotter.cpython-37.pyc +0 -0
  146. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/model_visualisation.cpython-37.pyc +0 -0
  147. Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/rotation_angle_plotter.cpython-37.pyc +0 -0
  148. Miniconda/envs/loop/Lib/site-packages/tests/__pycache__/__init__.cpython-37.pyc +0 -0
  149. Miniconda/envs/loop/Lib/site-packages/tests/__pycache__/test_faults.cpython-37.pyc +0 -0
  150. Miniconda/envs/loop/Lib/site-packages/tests/__pycache__/test_fold.cpython-37.pyc +0 -0
  151. Miniconda/envs/loop/Lib/site-packages/tests/__pycache__/test_interpolator.cpython-37.pyc +0 -0
  152. Miniconda/envs/loop/Lib/site-packages/tests/__pycache__/test_refolded.cpython-37.pyc +0 -0
  153. Miniconda/envs/loop/Lib/site-packages/tests/test_faults.py +0 -17
  154. Miniconda/envs/loop/Lib/site-packages/tests/test_fold.py +0 -57
  155. Miniconda/envs/loop/Lib/site-packages/tests/test_interpolator.py +0 -88
  156. Miniconda/envs/loop/Lib/site-packages/tests/test_refolded.py +0 -22
  157. /Miniconda/envs/loop/Lib/site-packages/{LoopStructural-1.0.4-py3.7.egg-info → LoopStructural-1.0.71.dev0-py3.6.egg-info}/dependency_links.txt +0 -0
  158. /Miniconda/envs/loop/Lib/site-packages/{LoopStructural-1.0.4-py3.7.egg-info → LoopStructural-1.0.71.dev0-py3.6.egg-info}/top_level.txt +0 -0
@@ -0,0 +1,5 @@
1
+ class StratigraphicColumn:
2
+ def __init__(self):
3
+ pass
4
+ def add_series(self,feature,name,maximum,minimum,colour):
5
+ pass
@@ -1,3 +1,4 @@
1
1
  from .fault_function import Composite, CubicFunction, Ones, Zeros
2
2
  from .fault_function_feature import FaultDisplacementFeature
3
3
  from .fault_segment import FaultSegment
4
+ from .fault_builder import FaultBuilder
@@ -0,0 +1,127 @@
1
+ from ..features.structural_frame_builder import StructuralFrameBuilder
2
+
3
+ import numpy as np
4
+ class FaultBuilder(StructuralFrameBuilder):
5
+ def __init__(self,interpolator=None,interpolators=None,**kwargs):
6
+ """A specialised structural frame builder for building a fault
7
+
8
+ Parameters
9
+ ----------
10
+ interpolator : GeologicalInterpolator, optional
11
+ the interpolator to use for building the fault frame, by default None
12
+ interpolators : [GeologicalInterpolator, GeologicalInterpolator, GeologicalInterpolator], optional
13
+ a list of interpolators to use for building the fault frame, by default None
14
+ """
15
+
16
+ StructuralFrameBuilder.__init__(self,interpolator,interpolators,**kwargs)
17
+ self.origin = np.array([np.nan,np.nan,np.nan])
18
+ self.maximum = np.array([np.nan,np.nan,np.nan])
19
+
20
+ def update_geometry(self,points):
21
+ self.origin = np.nanmin(np.array([np.min(points,axis=0),self.origin]),axis=0)
22
+ self.maximum = np.nanmax(np.array([np.max(points,axis=0),self.maximum]),axis=0)
23
+
24
+ def create_data_from_geometry(self,
25
+ data,
26
+ fault_center,
27
+ normal_vector,
28
+ slip_vector,
29
+ influence_distance = None,
30
+ horizontal_radius = None,
31
+ vertical_radius = None):
32
+ """Generate the required data for building a fault frame for a fault with the
33
+ specified parameters
34
+
35
+ Parameters
36
+ ----------
37
+ data : DataFrame,
38
+ model data
39
+ fault_center : np.array(3)
40
+ x,y,z coordinates of the fault center
41
+ normal_vector : np.array(3)
42
+ x,y,z components of normal vector to fault, single observation usually
43
+ average direction
44
+ slip_vector : np.array(3)
45
+ x,y,z components of slip vector for the fault, single observation usually
46
+ average direction
47
+ influence_distance : double
48
+ distance away from fault for the fault volume
49
+ horizontal_radius : double
50
+ fault extent
51
+ vertical_radius : double
52
+ fault volume radius in the slip direction
53
+ """
54
+ normal_vector/=np.linalg.norm(normal_vector)
55
+ slip_vector/=np.linalg.norm(slip_vector)
56
+ strike_vector = np.cross(normal_vector,slip_vector)
57
+ fault_edges = np.zeros((2,3))
58
+ fault_tips = np.zeros((2,3))
59
+ fault_depth = np.zeros((2,3))
60
+ if fault_center is not None:
61
+ if influence_distance is not None:
62
+ fault_edges[0,:] = fault_center[:3]+normal_vector*influence_distance
63
+ fault_edges[1,:] = fault_center[:3]-normal_vector*influence_distance
64
+ self.update_geometry(fault_edges)
65
+ data.loc[len(data),['X','Y','Z','feature_name','val','coord']] = \
66
+ [fault_edges[0,0],fault_edges[0,1],fault_edges[0,2],self.name,1,0]
67
+ data.loc[len(data),['X','Y','Z','feature_name','val','coord']] = \
68
+ [fault_edges[1,0],fault_edges[1,1],fault_edges[1,2],self.name,-1,0]
69
+ if horizontal_radius is not None:
70
+ fault_tips[0,:] = fault_center[:3]+strike_vector*horizontal_radius
71
+ fault_tips[1,:] = fault_center[:3]-strike_vector*horizontal_radius
72
+ self.update_geometry(fault_tips)
73
+ data.loc[len(data),['X','Y','Z','feature_name','val','coord']] = \
74
+ [fault_tips[0,0],fault_tips[0,1],fault_tips[0,2],self.name,1,2]
75
+ data.loc[len(data),['X','Y','Z','feature_name','val','coord']] = \
76
+ [fault_tips[1,0],fault_tips[1,1],fault_tips[1,2],self.name,-1,2]
77
+ if vertical_radius is not None:
78
+ fault_depth[0,:] = fault_center[:3]+slip_vector*vertical_radius
79
+ fault_depth[1,:] = fault_center[:3]-slip_vector*vertical_radius
80
+ # data.loc[len(data),['X','Y','Z','feature_name','val','coord']] = \
81
+ # [fault_depth[0,0],fault_depth[0,1],fault_depth[0,2],self.name,1,1]
82
+ # data.loc[len(data),['X','Y','Z','feature_name','val','coord']] = \
83
+ # [fault_depth[1,0],fault_depth[1,1],fault_depth[1,2],self.name,-1,1]
84
+ self.update_geometry(fault_depth)
85
+ #TODO need to add data here
86
+ data.loc[len(data),['X','Y','Z','feature_name','nx','ny','nz','coord']] =\
87
+ [fault_center[0],fault_center[1],fault_center[2],self.name,slip_vector[0],slip_vector[1],slip_vector[2],1]
88
+ # add strike vector to constraint fault extent
89
+ data.loc[len(data),['X','Y','Z','feature_name','gx','gy','gz','coord']] = [fault_center[0],fault_center[1],fault_center[2],\
90
+ self.name, strike_vector[0], strike_vector[1], strike_vector[2], 2]
91
+ self.add_data_from_data_frame(data)
92
+ def set_mesh_geometry(self,buffer):
93
+ """set the mesh geometry
94
+
95
+ Parameters
96
+ ----------
97
+ buffer : double
98
+ percentage of length to add to edges
99
+ """
100
+ length = self.maximum-self.origin
101
+ # origin = self.builders[0].interpolator.support.origin
102
+ # maximum = self.builders[0].interpolator.support.maximum#set_interpolation_geometry
103
+ # if origin[2]>self.origin[2]:
104
+ # origin[2]=self.origin[2]
105
+ # if maximum[2]<self.maximum[2]:
106
+ # maximum[2]=self.maximum[2]
107
+ # self.builders[0].set_interpolation_geometry(origin,maximum)
108
+ # for builder in self.builders:
109
+ # all three coordinates share the same support
110
+ self.builders[0].set_interpolation_geometry(self.origin-length*buffer,self.maximum+length*buffer)
111
+
112
+ def add_splay(self,splayregion,splay):
113
+ # for i in range(3):
114
+ # # work out the values of the nodes where we want hard
115
+ # # constraints
116
+ # idc = np.arange(0, interpolator.support.n_nodes)[
117
+ # kwargs['splayregion'](interpolator.support.nodes)]
118
+ # val = kwargs['splay'][i].evaluate_value(
119
+ # interpolator.support.nodes[
120
+ # kwargs['splayregion'](interpolator.support.nodes), :])
121
+ # mask = ~np.isnan(val)
122
+ # fault_frame_builder[i].interpolator.add_equality_constraints(
123
+ # idc[mask], val[mask])
124
+ pass
125
+ def update(self):
126
+ for i in range(3):
127
+ self.builders[i].update()
@@ -2,7 +2,8 @@ import logging
2
2
 
3
3
  import numpy as np
4
4
 
5
- logger = logging.getLogger(__name__)
5
+ from LoopStructural.utils import getLogger
6
+ logger = getLogger(__name__)
6
7
 
7
8
 
8
9
  class CubicFunction:
@@ -1,6 +1,7 @@
1
1
  import logging
2
2
 
3
- logger = logging.getLogger(__name__)
3
+ from LoopStructural.utils import getLogger
4
+ logger = getLogger(__name__)
4
5
 
5
6
 
6
7
  class FaultDisplacementFeature:
@@ -2,7 +2,8 @@ import logging
2
2
 
3
3
  from LoopStructural.modelling.fault.fault_function_feature import FaultDisplacementFeature
4
4
  from LoopStructural.modelling.fault.fault_function import BaseFault
5
- logger = logging.getLogger(__name__)
5
+ from LoopStructural.utils import getLogger
6
+ logger = getLogger(__name__)
6
7
  from concurrent.futures import ThreadPoolExecutor
7
8
  import numpy as np
8
9
 
@@ -45,7 +46,8 @@ class FaultSegment:
45
46
  if self.faultframe is not None:
46
47
  self.displacementfeature = FaultDisplacementFeature(
47
48
  self.faultframe, self.faultfunction, name = self.name)
48
-
49
+ self.builder = None
50
+
49
51
  def __getitem__(self, item):
50
52
  """
51
53
 
@@ -58,7 +60,7 @@ class FaultSegment:
58
60
 
59
61
  """
60
62
  return self.faultframe[item]
61
-
63
+
62
64
  def set_model(self, model):
63
65
  """
64
66
  Link a geological model to the feature
@@ -138,6 +140,10 @@ class FaultSegment:
138
140
 
139
141
  return self.faultframe.features[0].evaluate_value(locations) > 0
140
142
 
143
+ def inside_volume(self,locations):
144
+ v = self.faultframe.evaluate_value(locations)
145
+ return np.all(np.logical_and(v > -1,v<1),axis=1)
146
+
141
147
  def evaluate_value(self, locations):
142
148
  """
143
149
  Return the value of the fault surface scalar field
@@ -192,6 +198,27 @@ class FaultSegment:
192
198
  # need to scale with fault displacement
193
199
  return self.faultframe[1].evaluate_gradient(locations[mask, :])
194
200
 
201
+ def evaluate_displacement(self, points):
202
+ newp = np.copy(points).astype(float)
203
+ # evaluate fault function for all points then define mask for only points affected by fault
204
+ with ThreadPoolExecutor(max_workers=8) as executor:
205
+ # all of these operations should be independent so just run as different threads
206
+ gx_future = executor.submit(self.faultframe.features[0].evaluate_value, newp)
207
+ gy_future = executor.submit(self.faultframe.features[1].evaluate_value, newp)
208
+ gz_future = executor.submit(self.faultframe.features[2].evaluate_value, newp)
209
+ gx = gx_future.result()
210
+ gy = gy_future.result()
211
+ gz = gz_future.result()
212
+ d = np.zeros(gx.shape)
213
+ mask = np.logical_and(~np.isnan(gx),~np.isnan(gy))
214
+ mask = np.logical_and(mask,~np.isnan(gz))
215
+ d[~mask] = 0
216
+ gx_mask = np.zeros_like(mask,dtype=bool)
217
+ gx_mask[mask] = gx[mask] > 0
218
+ d[gx_mask] = 1.
219
+ if self.faultfunction is not None:
220
+ d[mask] = self.faultfunction(gx[mask], gy[mask], gz[mask])
221
+ return d
195
222
  def apply_to_points(self, points):
196
223
  """
197
224
  Unfault the array of points
@@ -1,5 +1,6 @@
1
1
  # from .faulted_geological_feature import FaultedGeologicalFeature
2
2
  from .geological_feature import GeologicalFeature
3
+ from .lambda_geological_feature import LambdaGeologicalFeature
3
4
  from .geological_feature_builder import GeologicalFeatureInterpolator
4
5
  from .region_feature import RegionFeature
5
6
  from .structural_frame import StructuralFrame
@@ -7,7 +7,8 @@ import numpy as np
7
7
  from LoopStructural.modelling.features.geological_feature import \
8
8
  GeologicalFeature
9
9
 
10
- logger = logging.getLogger(__name__)
10
+ from LoopStructural.utils import getLogger
11
+ logger = getLogger(__name__)
11
12
 
12
13
 
13
14
  class CrossProductGeologicalFeature(GeologicalFeature):
@@ -34,7 +35,7 @@ class CrossProductGeologicalFeature(GeologicalFeature):
34
35
  super().__init__(name, None)
35
36
  self.geological_feature_a = geological_feature_a
36
37
  self.geological_feature_b = geological_feature_b
37
-
38
+ self.value_feature = None
38
39
  def evaluate_gradient(self, locations):
39
40
  """
40
41
  Calculate the gradient of the geological feature by using numpy to
@@ -49,8 +50,11 @@ class CrossProductGeologicalFeature(GeologicalFeature):
49
50
  -------
50
51
 
51
52
  """
52
- return np.cross(self.geological_feature_a.evaluate_gradient(locations),
53
- self.geological_feature_b.evaluate_gradient(locations),
53
+ v1 = self.geological_feature_a.evaluate_gradient(locations)
54
+ # v1 /= np.linalg.norm(v1,axis=1)[:,None]
55
+ v2 = self.geological_feature_b.evaluate_gradient(locations)
56
+ # v2 /= np.linalg.norm(v2,axis=1)[:,None]
57
+ return np.cross(v1,v2,
54
58
  axisa=1,
55
59
  axisb=1)
56
60
 
@@ -65,13 +69,22 @@ class CrossProductGeologicalFeature(GeologicalFeature):
65
69
  -------
66
70
 
67
71
  """
68
- return np.zeros(evaluation_points.shape[0])
72
+ values = np.zeros(evaluation_points.shape[0])
73
+ if self.value_feature is not None:
74
+ values[:] = self.value_feature.evaluate_value(evaluation_points)
75
+ return values
69
76
 
70
77
  def mean(self):
78
+ if self.value_feature:
79
+ return self.value_feature.mean()
71
80
  return 0.
72
81
 
73
82
  def min(self):
83
+ if self.value_feature:
84
+ return self.value_feature.min()
74
85
  return 0.
75
86
 
76
87
  def max(self):
88
+ if self.value_feature:
89
+ return self.value_feature.max()
77
90
  return 0.
@@ -5,7 +5,8 @@ import logging
5
5
 
6
6
  import numpy as np
7
7
 
8
- logger = logging.getLogger(__name__)
8
+ from LoopStructural.utils import getLogger
9
+ logger = getLogger(__name__)
9
10
 
10
11
 
11
12
  class GeologicalFeature:
@@ -47,7 +48,6 @@ class GeologicalFeature:
47
48
  self.name = name
48
49
  self.interpolator = interpolator
49
50
  self.ndim = 1
50
- self.data = data
51
51
  self.builder = builder
52
52
  self.region = region
53
53
  self.regions = []
@@ -104,20 +104,6 @@ class GeologicalFeature:
104
104
  """
105
105
  self.regions.append(region)
106
106
 
107
- def set_builder(self, builder):
108
- """
109
-
110
- Parameters
111
- ----------
112
- builder : GeologicalFeatureInterpolator
113
- the builder associated with this feature
114
-
115
- Returns
116
- -------
117
-
118
- """
119
- self.builder = builder
120
-
121
107
  def evaluate_value(self, evaluation_points):
122
108
  """
123
109
  Evaluate the scalar field value of the geological feature at the locations
@@ -134,7 +120,10 @@ class GeologicalFeature:
134
120
  numpy array containing evaluated values
135
121
 
136
122
  """
137
-
123
+ #TODO need to add a generic type checker for all methods
124
+ #if evaluation_points is not a numpy array try and convert
125
+ #otherwise error
126
+ self.builder.up_to_date()
138
127
  # check if the points are within the display region
139
128
  v = np.zeros(evaluation_points.shape[0])
140
129
  v[:] = np.nan
@@ -162,6 +151,7 @@ class GeologicalFeature:
162
151
  -------
163
152
 
164
153
  """
154
+ self.builder.up_to_date()
165
155
  v = np.zeros(evaluation_points.shape)
166
156
  v[:] = np.nan
167
157
  mask = np.zeros(evaluation_points.shape[0]).astype(bool)
@@ -186,6 +176,7 @@ class GeologicalFeature:
186
176
  misfit : np.array(N,dtype=double)
187
177
  dot product between interpolated gradient and constraints
188
178
  """
179
+ self.builder.up_to_date()
189
180
  grad = self.interpolator.get_gradient_constraints()
190
181
  norm = self.interpolator.get_norm_constraints()
191
182
 
@@ -210,6 +201,8 @@ class GeologicalFeature:
210
201
  misfit : np.array(N,dtype=double)
211
202
  difference between interpolated scalar field and value constraints
212
203
  """
204
+ self.builder.up_to_date()
205
+
213
206
  locations = self.interpolator.get_value_constraints()
214
207
  diff = np.abs(locations[:, 3] - self.evaluate_value(locations[:, :3]))
215
208
  diff/=(self.max()-self.min())
@@ -256,31 +249,4 @@ class GeologicalFeature:
256
249
  return np.nanmax(
257
250
  self.evaluate_value(self.model.regular_grid((10, 10, 10))))
258
251
 
259
- def update(self):
260
- """
261
- Calculate average of the support values
262
-
263
- Returns
264
- -------
265
-
266
- """
267
- # re-run the interpolator and update the support.
268
- # this is a bit clumsy and not abstract, i think
269
- # if evaluating the property doesn't require the dictionary on
270
- # the nodes and actually just uses the interpolator values this
271
- # would be
272
- # much better.
273
- self.interpolator.up_to_date = False
274
- self.interpolator.update()
275
-
276
- def get_interpolator(self):
277
- """
278
- Get the interpolator used to build this feature
279
-
280
- Returns
281
- -------
282
- interpolator : GeologicalInterpolator
283
- """
284
- return self.interpolator
285
-
286
252