LoopStructural 1.6.10__tar.gz → 1.6.12__tar.gz

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.

Potentially problematic release.


This version of LoopStructural might be problematic. Click here for more details.

Files changed (143) hide show
  1. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datatypes/_bounding_box.py +1 -3
  2. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datatypes/_point.py +2 -2
  3. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datatypes/_surface.py +0 -1
  4. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_finite_difference_interpolator.py +18 -3
  5. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_3d_base_structured.py +3 -3
  6. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_3d_structured_tetra.py +3 -3
  7. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_3d_unstructured_tetra.py +3 -3
  8. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_face_table.py +3 -3
  9. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/core/geological_model.py +7 -8
  10. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fault/_fault_function.py +16 -24
  11. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fault/_fault_segment.py +11 -5
  12. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/input/process_data.py +6 -6
  13. loopstructural-1.6.12/LoopStructural/version.py +1 -0
  14. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural.egg-info/PKG-INFO +1 -1
  15. {loopstructural-1.6.10 → loopstructural-1.6.12}/PKG-INFO +1 -1
  16. loopstructural-1.6.10/LoopStructural/version.py +0 -1
  17. {loopstructural-1.6.10 → loopstructural-1.6.12}/LICENSE +0 -0
  18. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/__init__.py +0 -0
  19. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/__init__.py +0 -0
  20. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/_base.py +0 -0
  21. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/_example_models.py +0 -0
  22. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/claudius.csv +0 -0
  23. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/claudiusbb.txt +0 -0
  24. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/duplex.csv +0 -0
  25. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/duplexbb.txt +0 -0
  26. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/fault_trace/fault_trace.cpg +0 -0
  27. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/fault_trace/fault_trace.dbf +0 -0
  28. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/fault_trace/fault_trace.prj +0 -0
  29. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/fault_trace/fault_trace.shp +0 -0
  30. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/fault_trace/fault_trace.shx +0 -0
  31. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/geological_map_data/bbox.csv +0 -0
  32. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/geological_map_data/contacts.csv +0 -0
  33. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/geological_map_data/fault_displacement.csv +0 -0
  34. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/geological_map_data/fault_edges.txt +0 -0
  35. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/geological_map_data/fault_locations.csv +0 -0
  36. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/geological_map_data/fault_orientations.csv +0 -0
  37. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/geological_map_data/stratigraphic_order.csv +0 -0
  38. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/geological_map_data/stratigraphic_orientations.csv +0 -0
  39. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/geological_map_data/stratigraphic_thickness.csv +0 -0
  40. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/intrusion.csv +0 -0
  41. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/intrusionbb.txt +0 -0
  42. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/onefoldbb.txt +0 -0
  43. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/onefolddata.csv +0 -0
  44. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/refolded_bb.txt +0 -0
  45. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/refolded_fold.csv +0 -0
  46. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datasets/data/tabular_intrusion.csv +0 -0
  47. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datatypes/__init__.py +0 -0
  48. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/datatypes/_structured_grid.py +0 -0
  49. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/export/exporters.py +0 -0
  50. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/export/file_formats.py +0 -0
  51. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/export/geoh5.py +0 -0
  52. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/export/gocad.py +0 -0
  53. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/export/omf_wrapper.py +0 -0
  54. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/__init__.py +0 -0
  55. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_api.py +0 -0
  56. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_builders.py +0 -0
  57. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_cython/__init__.py +0 -0
  58. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_discrete_fold_interpolator.py +0 -0
  59. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_discrete_interpolator.py +0 -0
  60. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_geological_interpolator.py +0 -0
  61. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_interpolator_builder.py +0 -0
  62. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_interpolator_factory.py +0 -0
  63. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_operator.py +0 -0
  64. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_p1interpolator.py +0 -0
  65. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_p2interpolator.py +0 -0
  66. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/_surfe_wrapper.py +0 -0
  67. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_2d_base_unstructured.py +0 -0
  68. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_2d_p1_unstructured.py +0 -0
  69. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_2d_p2_unstructured.py +0 -0
  70. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_2d_structured_grid.py +0 -0
  71. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_2d_structured_tetra.py +0 -0
  72. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_3d_p2_tetra.py +0 -0
  73. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_3d_structured_grid.py +0 -0
  74. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/__init__.py +0 -0
  75. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_aabb.py +0 -0
  76. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_base_support.py +0 -0
  77. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/interpolators/supports/_support_factory.py +0 -0
  78. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/__init__.py +0 -0
  79. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/core/__init__.py +0 -0
  80. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/__init__.py +0 -0
  81. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/_analytical_feature.py +0 -0
  82. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/_base_geological_feature.py +0 -0
  83. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/_cross_product_geological_feature.py +0 -0
  84. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/_geological_feature.py +0 -0
  85. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/_lambda_geological_feature.py +0 -0
  86. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/_projected_vector_feature.py +0 -0
  87. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/_region.py +0 -0
  88. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/_structural_frame.py +0 -0
  89. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/_unconformity_feature.py +0 -0
  90. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/builders/__init__.py +0 -0
  91. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/builders/_base_builder.py +0 -0
  92. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/builders/_fault_builder.py +0 -0
  93. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/builders/_folded_feature_builder.py +0 -0
  94. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/builders/_geological_feature_builder.py +0 -0
  95. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/builders/_structural_frame_builder.py +0 -0
  96. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fault/__init__.py +0 -0
  97. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fault/_fault_function_feature.py +0 -0
  98. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fold/__init__.py +0 -0
  99. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fold/_fold.py +0 -0
  100. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fold/_fold_rotation_angle_feature.py +0 -0
  101. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fold/_foldframe.py +0 -0
  102. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fold/_svariogram.py +0 -0
  103. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fold/fold_function/__init__.py +0 -0
  104. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fold/fold_function/_base_fold_rotation_angle.py +0 -0
  105. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fold/fold_function/_fourier_series_fold_rotation_angle.py +0 -0
  106. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fold/fold_function/_lambda_fold_rotation_angle.py +0 -0
  107. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/features/fold/fold_function/_trigo_fold_rotation_angle.py +0 -0
  108. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/input/__init__.py +0 -0
  109. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/input/fault_network.py +0 -0
  110. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/input/map2loop_processor.py +0 -0
  111. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/input/project_file.py +0 -0
  112. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/intrusions/__init__.py +0 -0
  113. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/intrusions/geom_conceptual_models.py +0 -0
  114. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/intrusions/geometric_scaling_functions.py +0 -0
  115. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/intrusions/intrusion_builder.py +0 -0
  116. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/intrusions/intrusion_feature.py +0 -0
  117. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/intrusions/intrusion_frame_builder.py +0 -0
  118. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/modelling/intrusions/intrusion_support_functions.py +0 -0
  119. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/__init__.py +0 -0
  120. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/_surface.py +0 -0
  121. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/_transformation.py +0 -0
  122. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/colours.py +0 -0
  123. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/config.py +0 -0
  124. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/dtm_creator.py +0 -0
  125. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/exceptions.py +0 -0
  126. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/features.py +0 -0
  127. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/helper.py +0 -0
  128. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/json_encoder.py +0 -0
  129. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/linalg.py +0 -0
  130. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/logging.py +0 -0
  131. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/maths.py +0 -0
  132. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/regions.py +0 -0
  133. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/typing.py +0 -0
  134. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/utils/utils.py +0 -0
  135. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural/visualisation/__init__.py +0 -0
  136. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural.egg-info/SOURCES.txt +0 -0
  137. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural.egg-info/dependency_links.txt +0 -0
  138. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural.egg-info/requires.txt +0 -0
  139. {loopstructural-1.6.10 → loopstructural-1.6.12}/LoopStructural.egg-info/top_level.txt +0 -0
  140. {loopstructural-1.6.10 → loopstructural-1.6.12}/README.md +0 -0
  141. {loopstructural-1.6.10 → loopstructural-1.6.12}/pyproject.toml +0 -0
  142. {loopstructural-1.6.10 → loopstructural-1.6.12}/setup.cfg +0 -0
  143. {loopstructural-1.6.10 → loopstructural-1.6.12}/setup.py +0 -0
@@ -326,9 +326,7 @@ class BoundingBox:
326
326
  if iy == -1:
327
327
  return self.origin[ix]
328
328
 
329
- return self.bb[
330
- ix,
331
- ]
329
+ return self.bb[ix,]
332
330
 
333
331
  def __getitem__(self, name):
334
332
  if isinstance(name, str):
@@ -147,8 +147,8 @@ class VectorPoints:
147
147
  else:
148
148
  norm = np.linalg.norm(vectors, axis=1)
149
149
  vectors[norm > 0, :] /= norm[norm > 0][:, None]
150
- norm = norm[norm > 0] / norm[norm > 0].max()
151
- vectors *= norm[:, None]
150
+ norm[norm > 0] = norm[norm > 0] / norm[norm > 0].max()
151
+ vectors[norm > 0, :] *= norm[norm > 0, None]
152
152
  if scale_function is not None:
153
153
  # vectors /= np.linalg.norm(vectors, axis=1)[:, None]
154
154
  vectors *= scale_function(self.locations)[:, None]
@@ -12,7 +12,6 @@ class Surface:
12
12
  vertices: np.ndarray = field(default_factory=lambda: np.array([[0, 0, 0]]))
13
13
  triangles: np.ndarray = field(default_factory=lambda: np.array([[0, 0, 0]]))
14
14
  colour: Optional[Union[str, np.ndarray]] = field(default_factory=lambda: None)
15
-
16
15
  normals: Optional[np.ndarray] = None
17
16
  name: str = 'surface'
18
17
  values: Optional[np.ndarray] = None
@@ -272,7 +272,12 @@ class FiniteDifferenceInterpolator(DiscreteInterpolator):
272
272
  idc[inside, :] = gi[node_idx[inside, :]]
273
273
  inside = np.logical_and(~np.any(idc == -1, axis=1), inside)
274
274
 
275
- (vertices, T, elements, inside_,) = self.support.get_element_gradient_for_location(
275
+ (
276
+ vertices,
277
+ T,
278
+ elements,
279
+ inside_,
280
+ ) = self.support.get_element_gradient_for_location(
276
281
  points[inside, : self.support.dimension]
277
282
  )
278
283
  # normalise constraint vector and scale element matrix by this
@@ -335,7 +340,12 @@ class FiniteDifferenceInterpolator(DiscreteInterpolator):
335
340
  # calculate unit vector for node gradients
336
341
  # this means we are only constraining direction of grad not the
337
342
  # magnitude
338
- (vertices, T, elements, inside_,) = self.support.get_element_gradient_for_location(
343
+ (
344
+ vertices,
345
+ T,
346
+ elements,
347
+ inside_,
348
+ ) = self.support.get_element_gradient_for_location(
339
349
  points[inside, : self.support.dimension]
340
350
  )
341
351
  # T*=np.product(self.support.step_vector)
@@ -422,7 +432,12 @@ class FiniteDifferenceInterpolator(DiscreteInterpolator):
422
432
  vectors[norm > 0, :] /= norm[norm > 0, None]
423
433
 
424
434
  # normalise element vector to unit vector for dot product
425
- (vertices, T, elements, inside_,) = self.support.get_element_gradient_for_location(
435
+ (
436
+ vertices,
437
+ T,
438
+ elements,
439
+ inside_,
440
+ ) = self.support.get_element_gradient_for_location(
426
441
  points[inside, : self.support.dimension]
427
442
  )
428
443
  T[norm > 0, :, :] /= norm[norm > 0, None, None]
@@ -162,9 +162,9 @@ class BaseStructuredSupport(BaseSupport):
162
162
  length = self.maximum - origin
163
163
  length /= self.step_vector
164
164
  self._nsteps = np.ceil(length).astype(np.int64)
165
- self._nsteps[
166
- self._nsteps == 0
167
- ] = 3 # need to have a minimum of 3 elements to apply the finite difference mask
165
+ self._nsteps[self._nsteps == 0] = (
166
+ 3 # need to have a minimum of 3 elements to apply the finite difference mask
167
+ )
168
168
  if np.any(~(self._nsteps > 0)):
169
169
  logger.error(
170
170
  f"Cannot resize the interpolation support. The proposed number of steps is {self._nsteps}, these must be all > 0"
@@ -166,9 +166,9 @@ class TetMesh(BaseStructuredSupport):
166
166
  shared_face_index[:] = -1
167
167
  shared_face_index[row.reshape(-1, 3)[:, 0], :] = col.reshape(-1, 3)
168
168
 
169
- self.shared_elements[
170
- np.arange(self.shared_element_relationships.shape[0]), :
171
- ] = shared_face_index
169
+ self.shared_elements[np.arange(self.shared_element_relationships.shape[0]), :] = (
170
+ shared_face_index
171
+ )
172
172
  # resize
173
173
  self.shared_elements = self.shared_elements[: len(self.shared_element_relationships), :]
174
174
 
@@ -173,9 +173,9 @@ class UnStructuredTetMesh(BaseSupport):
173
173
  shared_face_index[:] = -1
174
174
  shared_face_index[row.reshape(-1, 3)[:, 0], :] = col.reshape(-1, 3)
175
175
 
176
- self.shared_elements[
177
- np.arange(self.shared_element_relationships.shape[0]), :
178
- ] = shared_face_index
176
+ self.shared_elements[np.arange(self.shared_element_relationships.shape[0]), :] = (
177
+ shared_face_index
178
+ )
179
179
  # resize
180
180
  self.shared_elements = self.shared_elements[: len(self.shared_element_relationships), :]
181
181
  # flag = np.zeros(self.elements.shape[0])
@@ -63,8 +63,8 @@ def _init_face_table(grid):
63
63
  shared_face_index = np.zeros((shared_faces.shape[0], grid.dimension), dtype=int)
64
64
  shared_face_index[:] = -1
65
65
  shared_face_index[row.reshape(-1, grid.dimension)[:, 0], :] = col.reshape(-1, grid.dimension)
66
- grid._shared_elements[
67
- np.arange(grid.shared_element_relationships.shape[0]), :
68
- ] = shared_face_index
66
+ grid._shared_elements[np.arange(grid.shared_element_relationships.shape[0]), :] = (
67
+ shared_face_index
68
+ )
69
69
  # resize
70
70
  grid._shared_elements = grid.shared_elements[: len(grid.shared_element_relationships), :]
@@ -598,12 +598,10 @@ class GeologicalModel:
598
598
  * self._data.loc[mask, "polarity"].to_numpy()[:, None]
599
599
  )
600
600
  self._data.drop(["strike", "dip"], axis=1, inplace=True)
601
- self._data[
602
- ['X', 'Y', 'Z', 'val', 'nx', 'ny', 'nz', 'gx', 'gy', 'gz', 'tx', 'ty', 'tz']
603
- ] = self._data[
604
- ['X', 'Y', 'Z', 'val', 'nx', 'ny', 'nz', 'gx', 'gy', 'gz', 'tx', 'ty', 'tz']
605
- ].astype(
606
- float
601
+ self._data[['X', 'Y', 'Z', 'val', 'nx', 'ny', 'nz', 'gx', 'gy', 'gz', 'tx', 'ty', 'tz']] = (
602
+ self._data[
603
+ ['X', 'Y', 'Z', 'val', 'nx', 'ny', 'nz', 'gx', 'gy', 'gz', 'tx', 'ty', 'tz']
604
+ ].astype(float)
607
605
  )
608
606
 
609
607
  def set_model_data(self, data):
@@ -1382,7 +1380,6 @@ class GeologicalModel:
1382
1380
  major_axis = major_axis / self.scale_factor
1383
1381
  if intermediate_axis:
1384
1382
  intermediate_axis = intermediate_axis / self.scale_factor
1385
- print(fault_dip, fault_normal_vector)
1386
1383
  fault_frame_builder.create_data_from_geometry(
1387
1384
  fault_frame_data=fault_frame_data,
1388
1385
  fault_center=fault_center,
@@ -1806,7 +1803,9 @@ class GeologicalModel:
1806
1803
  values.to_list(),
1807
1804
  self.bounding_box,
1808
1805
  name=names.loc[values.index].to_list(),
1809
- colours=unit_table.loc[unit_table['feature_name'] == u, 'colour'].tolist(),
1806
+ colours=unit_table.loc[unit_table['feature_name'] == u, 'colour'].tolist()[
1807
+ 1:
1808
+ ], # we don't isosurface basement, no value
1810
1809
  )
1811
1810
  )
1812
1811
 
@@ -9,6 +9,10 @@ from ....utils import getLogger
9
9
  logger = getLogger(__name__)
10
10
 
11
11
 
12
+ def smooth_peak(x):
13
+ return 0.25 * x**6 + 0.5 * x**4 - 1.75 * x**2 + 1
14
+
15
+
12
16
  class FaultProfileFunction(metaclass=ABCMeta):
13
17
  def __init__(self):
14
18
  self.lim = [-1, 1]
@@ -412,14 +416,7 @@ class BaseFault(object):
412
416
  # gyf.add_min(-1)
413
417
  # gyf.add_max(1)
414
418
  gyf = Ones()
415
- gzf = CubicFunction()
416
- gzf.add_cstr(-1, 0)
417
- gzf.add_cstr(1, 0)
418
- gzf.add_cstr(-0.2, 1)
419
- gzf.add_cstr(0.2, 1)
420
- gzf.add_grad(0, 0)
421
- gzf.add_min(-1)
422
- gzf.add_max(1)
419
+ gzf = smooth_peak
423
420
  gxf = Composite(hw, fw)
424
421
  fault_displacement = FaultDisplacement(gx=gxf, gy=gyf, gz=gzf)
425
422
 
@@ -441,22 +438,17 @@ class BaseFault3D(object):
441
438
  fw.add_cstr(-1, 0)
442
439
  fw.add_grad(-1, 0)
443
440
  fw.add_min(-1)
444
- gyf = CubicFunction()
445
- gyf.add_cstr(-1, 0)
446
- gyf.add_cstr(1, 0)
447
- gyf.add_cstr(-0.2, 1)
448
- gyf.add_cstr(0.2, 1)
449
- gyf.add_grad(0, 0)
450
- gyf.add_min(-1)
451
- gyf.add_max(1)
441
+
442
+ gyf = smooth_peak
443
+ # CubicFunction()
444
+ # gyf.add_cstr(-1, 0)
445
+ # gyf.add_cstr(1, 0)
446
+ # gyf.add_cstr(-0.2, 1)
447
+ # gyf.add_cstr(0.2, 1)
448
+ # gyf.add_grad(0, 0)
449
+ # gyf.add_min(-1)
450
+ # gyf.add_max(1)
452
451
  # gyf = Ones()
453
- gzf = CubicFunction()
454
- gzf.add_cstr(-1, 0)
455
- gzf.add_cstr(1, 0)
456
- gzf.add_cstr(-0.2, 1)
457
- gzf.add_cstr(0.2, 1)
458
- gzf.add_grad(0, 0)
459
- gzf.add_min(-1)
460
- gzf.add_max(1)
452
+ gzf = smooth_peak
461
453
  gxf = Composite(hw, fw)
462
454
  fault_displacement = FaultDisplacement(gx=gxf, gy=gyf, gz=gzf)
@@ -125,11 +125,17 @@ class FaultSegment(StructuralFrame):
125
125
  try:
126
126
  import pyvista as pv
127
127
 
128
- fault_ellipsoid = pv.PolyData(
129
- self.model.rescale(self.fault_centre[None, :], inplace=False)
130
- )
131
- fault_ellipsoid["norm"] = self.builder.fault_normal_vector[None, :]
132
-
128
+ if self.model is None:
129
+ pts = self.fault_centre[None, :]
130
+ else:
131
+ pts = self.model.rescale(self.fault_centre[None, :], inplace=False)
132
+ # pts = self.fault_centre[None, :]
133
+ fault_ellipsoid = pv.PolyData(pts)
134
+ # fault_ellipsoid = pv.PolyData(
135
+ # self.model.rescale(self.fault_centre[None, :], inplace=False)
136
+ # )
137
+ fault_ellipsoid["norm"] = self.fault_normal_vector[None, :]
138
+ fault_ellipsoid['norm'] /= np.linalg.norm(fault_ellipsoid['norm'], axis=1)[:, None]
133
139
  geom = pv.ParametricEllipsoid(
134
140
  self.fault_minor_axis,
135
141
  self.fault_major_axis,
@@ -299,9 +299,9 @@ class ProcessInputData:
299
299
  pts = self.fault_locations.loc[
300
300
  self.fault_locations["feature_name"] == fname, ["X", "Y", "Z"]
301
301
  ]
302
- fault_properties.loc[
303
- fname, ["centreEasting", "centreNorthing", "centreAltitude"]
304
- ] = np.nanmean(pts, axis=0)
302
+ fault_properties.loc[fname, ["centreEasting", "centreNorthing", "centreAltitude"]] = (
303
+ np.nanmean(pts, axis=0)
304
+ )
305
305
  if (
306
306
  "avgNormalEasting" not in fault_properties.columns
307
307
  or "avgNormalNorthing" not in fault_properties.columns
@@ -449,9 +449,9 @@ class ProcessInputData:
449
449
  for _name, sg in self.stratigraphic_order:
450
450
  value = 0.0 # reset for each supergroup
451
451
  if sg[0] not in self.thicknesses or self.thicknesses[sg[0]] <= 0:
452
- self.thicknesses[
453
- sg[0]
454
- ] = np.inf # make the top unit infinite as it should extend to the top of the model
452
+ self.thicknesses[sg[0]] = (
453
+ np.inf
454
+ ) # make the top unit infinite as it should extend to the top of the model
455
455
  for g in reversed(
456
456
  sg[:-1]
457
457
  ): # don't add the last unit as we never see the base of this unit.
@@ -0,0 +1 @@
1
+ __version__ = "1.6.12"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: LoopStructural
3
- Version: 1.6.10
3
+ Version: 1.6.12
4
4
  Summary: 3D geological modelling
5
5
  Author-email: Lachlan Grose <lachlan.grose@monash.edu>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: LoopStructural
3
- Version: 1.6.10
3
+ Version: 1.6.12
4
4
  Summary: 3D geological modelling
5
5
  Author-email: Lachlan Grose <lachlan.grose@monash.edu>
6
6
  License: MIT
@@ -1 +0,0 @@
1
- __version__ = "1.6.10"
File without changes