Skip to content

Commit 1b6d563

Browse files
committed
update documentation
1 parent a28b488 commit 1b6d563

File tree

1 file changed

+36
-25
lines changed

1 file changed

+36
-25
lines changed

mogi/mogi.m

+36-25
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
function [ur,uz,dt,er,et,dg] = mogi(varargin)
2-
%MOGI Mogi's model (point source in elastic half-space).
3-
% [Ur,Uz,Dt,Er,Et] = MOGI(R,F,V,nu) or MOGI(R,F,A,P,E,nu) computes radial
4-
% and vertical displacements Ur and Uz, ground tilt Dt, radial and
5-
% tangential strain Er and Et on surface, at a radial distance R
6-
% from the top of the source due to a hydrostatic pressure inside a
7-
% sphere of radius A at depth F, in a homogeneous, semi-infinite elastic
8-
% body and approximation for A << F (center of dilatation). Formula by
9-
% Anderson [1936] and Mogi [1958].
1+
function [ur,uz,dt,er,et] = mogi(varargin)
2+
%MOGI Mogi's model (point source of dilatation in elastic half-space).
3+
% [Ur,Uz,Dt,Er,Et] = MOGI(R,F,A,P,E,nu) computes at the surface radial
4+
% and vertical displacements Ur and Uz, ground tilt Dt, radial and
5+
% tangential strain Er and Et at the surface, at a radial distance R from
6+
% the top of the source due to a hydrostatic pressure inside a sphere of
7+
% radius A at depth F, in a homogeneous, semi-infinite elastic body and
8+
% approximation for A << F (center of dilatation). Formula by Anderson
9+
% [1936] and Mogi [1958].
1010
%
11-
% MOGI(R,F,V) and MOGI(R,F,A,µ,P) are also allowed for compatibility
11+
% MOGI(R,F,V,nu) is the point approximation of Mogi's model, with volume
12+
% variation V as source of dilatation potency, a solution which does not
13+
% depend on A, P neither E input parameters.
14+
%
15+
% MOGI(R,F,A,µ,P) and MOGI(R,F,V) are also allowed for compatibility
1216
% (Mogi's original equation considers an isotropic material with Lamé's
1317
% constants equal, i.e., lambda = µ, Poisson's ratio = 0.25).
1418
%
15-
% Input variables are:
19+
% Input parameters:
1620
% F: depth of the center of the sphere from the surface,
1721
% V: volumetric change of the sphere,
1822
% A: radius of the sphere,
@@ -21,6 +25,13 @@
2125
% nu: Poisson's ratio,
2226
% µ: rigidity (Lamé's constant in case of isotropic material).
2327
%
28+
% Output parameters:
29+
% Ur: radial displacement (same unit as R, F and A)
30+
% Uz: tangential displacement (same unit as R, F and A)
31+
% Dt: ground tilt (in rad)
32+
% Er: radial strain
33+
% Et: tangential strain
34+
%
2435
% Notes:
2536
% - Equations are all vectorized, so variables R,F,V,A,µ and P can
2637
% be vectors or N-D matrix of the same size and any of them can
@@ -41,7 +52,7 @@
4152
% Author: François Beauducel <[email protected]>
4253
% Institut de Physique du Globe de Paris
4354
% Created: 1997
44-
% Updated: 2012-04-05
55+
% Updated: 2019-09-15
4556
%
4657
% References:
4758
% Anderson, E.M., Dynamics of the formation of cone-sheets, ring-dikes,
@@ -53,7 +64,7 @@
5364
% Acknowledgments: R. Grandin, B. Taisne
5465

5566

56-
% Copyright (c) 1997-2011, François Beauducel, covered by BSD License.
67+
% Copyright (c) 1997-2019, François Beauducel, covered by BSD License.
5768
% All rights reserved.
5869
%
5970
% Redistribution and use in source and binary forms, with or without
@@ -78,22 +89,22 @@
7889
% ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
7990
% POSSIBILITY OF SUCH DAMAGE.
8091

81-
if nargin < 3 || nargin > 6
82-
error('Wrong number of argument.')
83-
end
92+
%if nargin < 3 || nargin > 6
93+
% error('Wrong number of argument.')
94+
%end
8495

85-
for i = 1:nargin
86-
if ~isnumeric(varargin{i})
87-
error('All input arguments must be numeric.')
88-
end
89-
end
96+
%for i = 1:nargin
97+
% if ~isnumeric(varargin{i})
98+
% error('All input arguments must be numeric.')
99+
% end
100+
% end
90101

91102
% to check if input arguments have compatible sizes, constructs a complex
92103
% vector of sizes, then uses UNIQUE on variables that are not scalar
93-
sz = complex(cellfun('size',varargin,1),cellfun('size',varargin,2));
94-
if length(unique(sz(sz~=complex(1,1)))) > 1
95-
error('All inputs must be scalar or matrix of the same size.')
96-
end
104+
% sz = complex(cellfun('size',varargin,1),cellfun('size',varargin,2));
105+
% if length(unique(sz(sz~=complex(1,1)))) > 1
106+
% error('All inputs must be scalar or matrix of the same size.')
107+
% end
97108

98109
r = varargin{1};
99110
f = varargin{2};

0 commit comments

Comments
 (0)