Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
manual_beta
testStraightExp.m
Go to the documentation of this file.
1
close
all
2
clear all
3
clc
4
5
a
=rand(2,1)
6
b
=rand(2,1);
7
t
=(
b
-
a
)/norm(
b
-
a
);
8
9
N
=50;
10
Ax
=ones(
N
,
N
)*
a
(1);
11
Ay
=ones(
N
,
N
)*
a
(2);
12
Bx
=ones(
N
,
N
)*
b
(1);
13
By
=ones(
N
,
N
)*
b
(2);
14
Tx
=ones(
N
,
N
)*
t
(1);
15
Ty
=ones(
N
,
N
)*
t
(2);
16
17
x
=[0:
N
-1]/(
N
-1);
18
y
=[0:
N
-1]/(
N
-1);
19
[X,
Y
]=meshgrid(
x
,
y
);
20
21
num
=(
Bx
-X).*
Tx
+(
By
-
Y
).*
Ty
+sqrt((
Bx
-X).^2+(
By
-
Y
).^2);
22
den
=(
Ax
-X).*
Tx
+(
Ay
-
Y
).*
Ty
+sqrt((
Ax
-X).^2+(
Ay
-
Y
).^2);
23
f
=log(
num
./
den
);
24
25
figure
(1)
26
clf
27
hold on
28
pcolor(X,
Y
,
f
)
29
plot
([
a
(1)
b
(1)],[
a
(2)
b
(2)],
'k'
)
30
axis
equal
31
32
num1=-(
Ax
-X).*
Tx
-(
Ay
-
Y
).*
Ty
+sqrt((
Ax
-X).^2+(
Ay
-
Y
).^2);
33
den1
=-(
Bx
-X).*
Tx
-(
By
-
Y
).*
Ty
+sqrt((
Bx
-X).^2+(
By
-
Y
).^2);
34
f1
=log(num1./
den1
);
35
36
figure
(2)
37
clf
38
hold on
39
pcolor(X,
Y
,
f1
)
40
plot
([
a
(1)
b
(1)],[
a
(2)
b
(2)],
'k'
)
41
axis
equal
42
43
%
figure
(3)
44
% clf
45
% hold on
46
% surf(X,
Y
,
f
-
f1
)
47
%
plot
([
a
(1)
b
(1)],[
a
(2)
b
(2)],
'k'
)
48
%
axis
equal
t
final point of the source segment t
Definition
infiniteDisplacement.m:6
f
function int_R syms a b c u real f
Definition
int_R.m:4
a
a
Definition
int_R.m:14
b
b
Definition
int_R.m:16
x
x
Definition
int_R.m:12
close
void close(const M &a, const M &b, double tol, const char *msg)
Definition
testEllipsoidalInclusion.cpp:36
Bx
Bx
Definition
testStraightExp.m:12
den
den
Definition
testStraightExp.m:22
den1
den1
Definition
testStraightExp.m:33
y
y
Definition
testStraightExp.m:18
Ty
Ty
Definition
testStraightExp.m:15
Y
Y
Definition
testStraightExp.m:28
Ay
Ay
Definition
testStraightExp.m:11
Ax
Ax
Definition
testStraightExp.m:10
N
N
Definition
testStraightExp.m:9
f1
f1
Definition
testStraightExp.m:34
num
num
Definition
testStraightExp.m:21
Tx
Tx
Definition
testStraightExp.m:14
By
By
Definition
testStraightExp.m:13
figure
figure(1) clf hold on pcolor(X
plot
f plot([a(1) b(1)],[a(2) b(2)], 'k') axis equal num1
axis
int axis
Definition
triangle.cpp:9283
Generated by
1.15.0