LoopStructural 1.0.9__cp39-cp39-win_amd64.whl
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.
- LoopStructural/__init__.py +36 -0
- LoopStructural/analysis/__init__.py +2 -0
- LoopStructural/analysis/_fault_displacement.py +67 -0
- LoopStructural/analysis/_fault_intersection.py +36 -0
- LoopStructural/analysis/_plane_fit.py +43 -0
- LoopStructural/datasets/__init__.py +12 -0
- LoopStructural/datasets/_base.py +65 -0
- LoopStructural/datasets/data/claudius.csv +21049 -0
- LoopStructural/datasets/data/claudiusbb.txt +2 -0
- LoopStructural/datasets/data/duplex.csv +126 -0
- LoopStructural/datasets/data/duplexbb.txt +2 -0
- LoopStructural/datasets/data/intrusion.csv +1017 -0
- LoopStructural/datasets/data/intrusionbb.txt +2 -0
- LoopStructural/datasets/data/onefoldbb.txt +2 -0
- LoopStructural/datasets/data/onefolddata.csv +2226 -0
- LoopStructural/datasets/data/refolded_bb.txt +2 -0
- LoopStructural/datasets/data/refolded_fold.csv +2126 -0
- LoopStructural/interpolators/__init__.py +34 -0
- LoopStructural/interpolators/base_structured_3d_support.py +101 -0
- LoopStructural/interpolators/cython/__init__.py +0 -0
- LoopStructural/interpolators/cython/dsi_helper.c +31046 -0
- LoopStructural/interpolators/cython/dsi_helper.cp39-win_amd64.pyd +0 -0
- LoopStructural/interpolators/discrete_fold_interpolator.py +202 -0
- LoopStructural/interpolators/discrete_interpolator.py +584 -0
- LoopStructural/interpolators/finite_difference_interpolator.py +399 -0
- LoopStructural/interpolators/geological_interpolator.py +197 -0
- LoopStructural/interpolators/operator.py +61 -0
- LoopStructural/interpolators/piecewiselinear_interpolator.py +437 -0
- LoopStructural/interpolators/structured_grid.py +421 -0
- LoopStructural/interpolators/structured_tetra.py +681 -0
- LoopStructural/interpolators/surfe_wrapper.py +118 -0
- LoopStructural/modelling/__init__.py +46 -0
- LoopStructural/modelling/core/__init__.py +0 -0
- LoopStructural/modelling/core/geological_model.py +1513 -0
- LoopStructural/modelling/core/geological_model_graph.py +880 -0
- LoopStructural/modelling/core/stratigraphic_column.py +5 -0
- LoopStructural/modelling/fault/__init__.py +4 -0
- LoopStructural/modelling/fault/fault_builder.py +143 -0
- LoopStructural/modelling/fault/fault_function.py +188 -0
- LoopStructural/modelling/fault/fault_function_feature.py +76 -0
- LoopStructural/modelling/fault/fault_segment.py +298 -0
- LoopStructural/modelling/features/__init__.py +8 -0
- LoopStructural/modelling/features/cross_product_geological_feature.py +90 -0
- LoopStructural/modelling/features/geological_feature.py +252 -0
- LoopStructural/modelling/features/geological_feature_builder.py +414 -0
- LoopStructural/modelling/features/lambda_geological_feature.py +36 -0
- LoopStructural/modelling/features/region_feature.py +34 -0
- LoopStructural/modelling/features/structural_frame.py +133 -0
- LoopStructural/modelling/features/structural_frame_builder.py +206 -0
- LoopStructural/modelling/features/unconformity_feature.py +74 -0
- LoopStructural/modelling/fold/__init__.py +8 -0
- LoopStructural/modelling/fold/fold.py +143 -0
- LoopStructural/modelling/fold/fold_rotation_angle.py +133 -0
- LoopStructural/modelling/fold/fold_rotation_angle_feature.py +58 -0
- LoopStructural/modelling/fold/foldframe.py +193 -0
- LoopStructural/modelling/fold/svariogram.py +180 -0
- LoopStructural/utils/__init__.py +18 -0
- LoopStructural/utils/bounding_box.py +21 -0
- LoopStructural/utils/exceptions.py +10 -0
- LoopStructural/utils/helper.py +382 -0
- LoopStructural/utils/logging.py +60 -0
- LoopStructural/utils/map2loop.py +353 -0
- LoopStructural/utils/regions.py +11 -0
- LoopStructural/utils/utils.py +69 -0
- LoopStructural/visualisation/__init__.py +31 -0
- LoopStructural/visualisation/map_viewer.py +322 -0
- LoopStructural/visualisation/model_plotter.py +17 -0
- LoopStructural/visualisation/model_visualisation.py +1113 -0
- LoopStructural/visualisation/rotation_angle_plotter.py +83 -0
- LoopStructural/visualisation/sphinx_scraper.py +34 -0
- LoopStructural/visualisation/stratigraphic_column.py +60 -0
- LoopStructural-1.0.9.dist-info/LICENSE +21 -0
- LoopStructural-1.0.9.dist-info/METADATA +19 -0
- LoopStructural-1.0.9.dist-info/RECORD +77 -0
- LoopStructural-1.0.9.dist-info/WHEEL +5 -0
- LoopStructural-1.0.9.dist-info/top_level.txt +2 -0
- tests/__init__.py +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Interpolators and interpolation supports
|
|
3
|
+
|
|
4
|
+
Interpolation Submodules
|
|
5
|
+
========================
|
|
6
|
+
.. autosummary::
|
|
7
|
+
:toctree: _autosummary
|
|
8
|
+
|
|
9
|
+
geological_interpolator
|
|
10
|
+
discrete_interpolator
|
|
11
|
+
piecewiselinear_interpolator
|
|
12
|
+
discrete_fold_interpolator
|
|
13
|
+
finite_difference_interpolator
|
|
14
|
+
surfe_wrapper
|
|
15
|
+
|
|
16
|
+
Interpolation Support Submodules
|
|
17
|
+
================================
|
|
18
|
+
|
|
19
|
+
.. autosummary::
|
|
20
|
+
:toctree: _autosummary
|
|
21
|
+
|
|
22
|
+
structured_tetra
|
|
23
|
+
structured_grid
|
|
24
|
+
operator
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
from LoopStructural.interpolators.discrete_fold_interpolator import DiscreteFoldInterpolator
|
|
28
|
+
from LoopStructural.interpolators.finite_difference_interpolator import \
|
|
29
|
+
FiniteDifferenceInterpolator
|
|
30
|
+
from LoopStructural.interpolators.piecewiselinear_interpolator import \
|
|
31
|
+
PiecewiseLinearInterpolator
|
|
32
|
+
from LoopStructural.interpolators.structured_tetra import TetMesh
|
|
33
|
+
from LoopStructural.interpolators.structured_grid import StructuredGrid
|
|
34
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
class BaseStructuredSupport:
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
def __init__(self,
|
|
7
|
+
origin=np.zeros(3),
|
|
8
|
+
nsteps=np.array([10, 10, 10]),
|
|
9
|
+
step_vector=np.ones(3),
|
|
10
|
+
):
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
Parameters
|
|
14
|
+
----------
|
|
15
|
+
origin - 3d list or numpy array
|
|
16
|
+
nsteps - 3d list or numpy array of ints
|
|
17
|
+
step_vector - 3d list or numpy array of int
|
|
18
|
+
"""
|
|
19
|
+
# the geometry in the mesh can be calculated from the
|
|
20
|
+
# nsteps, step vector and origin
|
|
21
|
+
# we use property decorators to update these when different parts of
|
|
22
|
+
# the geometry need to change
|
|
23
|
+
# inisialise the private attributes
|
|
24
|
+
self._nsteps = nsteps
|
|
25
|
+
self._step_vector = step_vector
|
|
26
|
+
self._origin = np.array(origin)
|
|
27
|
+
self.supporttype='Base'
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def nsteps(self):
|
|
31
|
+
return self._nsteps
|
|
32
|
+
@nsteps.setter
|
|
33
|
+
def nsteps(self,nsteps):
|
|
34
|
+
#if nsteps changes we need to change the step vector
|
|
35
|
+
change_factor = nsteps/self.nsteps
|
|
36
|
+
self._step_vector/=change_factor
|
|
37
|
+
self._nsteps = nsteps
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@property
|
|
41
|
+
def step_vector(self):
|
|
42
|
+
return self._step_vector
|
|
43
|
+
|
|
44
|
+
@step_vector.setter
|
|
45
|
+
def step_vector(self,step_vector):
|
|
46
|
+
change_factor = step_vector/self.step_vector
|
|
47
|
+
newsteps = self._nsteps/change_factor
|
|
48
|
+
self._nsteps =np.ceil(newsteps).astype(int)
|
|
49
|
+
self._step_vector = step_vector
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def origin(self):
|
|
53
|
+
return self._origin
|
|
54
|
+
@origin.setter
|
|
55
|
+
def origin(self,origin):
|
|
56
|
+
origin = np.array(origin)
|
|
57
|
+
length = self.maximum-origin
|
|
58
|
+
length /= self.step_vector
|
|
59
|
+
self._nsteps = np.ceil(length).astype(int)
|
|
60
|
+
self._origin = origin
|
|
61
|
+
@property
|
|
62
|
+
def maximum(self):
|
|
63
|
+
return self.origin+self.nsteps*self.step_vector
|
|
64
|
+
@maximum.setter
|
|
65
|
+
def maximum(self,maximum):
|
|
66
|
+
"""
|
|
67
|
+
update the number of steps to fit new boundary
|
|
68
|
+
"""
|
|
69
|
+
maximum = np.array(maximum,dtype=float)
|
|
70
|
+
length = maximum-self.origin
|
|
71
|
+
length /= self.step_vector
|
|
72
|
+
self._nsteps = np.ceil(length).astype(int)
|
|
73
|
+
@property
|
|
74
|
+
def n_nodes(self):
|
|
75
|
+
return np.product(self.nsteps)
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def nsteps_cells(self):
|
|
79
|
+
return self.nsteps -1
|
|
80
|
+
@property
|
|
81
|
+
def n_elements(self):
|
|
82
|
+
return np.product(self.nsteps_cells)
|
|
83
|
+
def __str__(self):
|
|
84
|
+
return 'LoopStructural interpolation support: {} \n'\
|
|
85
|
+
'Origin: {} {} {} \n'\
|
|
86
|
+
'Maximum: {} {} {} \n'\
|
|
87
|
+
'Step Vector: {} {} {} \n'\
|
|
88
|
+
'Number of Steps: {} {} {} \n'\
|
|
89
|
+
'Degrees of freedon {}'.format(self.supporttype,self.origin[0],self.origin[1],self.origin[2],\
|
|
90
|
+
self.maximum[0],self.maximum[1],self.maximum[2],\
|
|
91
|
+
self.step_vector[0],self.step_vector[1],self.step_vector[2],\
|
|
92
|
+
self.nsteps[0],self.nsteps[1],self.nsteps[2],self.n_nodes)
|
|
93
|
+
@property
|
|
94
|
+
def nodes(self):
|
|
95
|
+
max = self.origin + self.nsteps_cells * self.step_vector
|
|
96
|
+
x = np.linspace(self.origin[0], max[0], self.nsteps[0])
|
|
97
|
+
y = np.linspace(self.origin[1], max[1], self.nsteps[1])
|
|
98
|
+
z = np.linspace(self.origin[2], max[2], self.nsteps[2])
|
|
99
|
+
xx, yy, zz = np.meshgrid(x, y, z, indexing='ij')
|
|
100
|
+
return np.array([xx.flatten(order='F'), yy.flatten(order='F'),
|
|
101
|
+
zz.flatten(order='F')]).T
|
|
File without changes
|