forked from IPGP/deformation-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pcdmdesc.m
63 lines (57 loc) · 1.35 KB
/
pcdmdesc.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
function s = pcdmdesc(a,b,tol)
%PCDMDESC pCDM source description
% PCDMDESC(A,B) returns a string describing the point Compound Dislocation
% Model source shape and orientation from the parameters:
% A: horizontal over total volume variation ratio A = dVZ/(dVX+dVY+dVZ)
% B: vertical volume variation ratio B = dVY/(dVX+dVY)
%
% PCDMDESC(A,B,TOL) will use tolerancy TOL (TOL > 0 and < 1) to fit the
% features instead of default 10% (TOL = 0.1).
%
% Examples:
% A = 0, B = 0.5 : vertical pipe
% A = 0, B = 0 or 1 : vertical dyke
% A = 1/3, B = 0.5 : isotrop source
% A = 1, any B : horizontal sill
% A > 0, B > 0 : ellipsoid
%
%
% Author: F. Beauducel / WEBOBS
% Created: 2019-02-21 in Yogyakarta (Indonesia)
% Updated: 2019-06-06
if nargin < 2 || any([a,b] < 0 | [a,b] > 1)
error('A and B must be scalars between 0 and 1');
end
if nargin < 3
tol = 0.1;
end
if tol < 0 || tol > 0.5
error('TOL must be scalar between 0 and 0.5');
end
s = 'ellipsoid';
if a < tol
s = 'vertical ellipsoid';
if b < tol
s = 'vertical EW dyke';
end
if b > (1 - tol)
s = 'vertical NS dyke';
end
if abs(b - 1/2) < tol
s = 'vertical pipe';
end
end
if abs(b - 1/2) < tol
if abs(a - 1/3) < tol
s = 'isotropic';
end
if a > (1/3 + tol)
s = 'oblate ellipsoid';
end
if a > tol && a < (1/3 - tol)
s = 'prolate ellipsoid';
end
end
if a > (1 - tol)
s = 'sill';
end