forked from MengmengQu/CGpaper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReadMe.txt
87 lines (67 loc) · 4.4 KB
/
ReadMe.txt
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
======================================================================================
ReadMe.txt for the package
This MATLAB package is provided as a supplementary material for
An optimal scheme for numerical evaluation of Eshelby tensors and its
implementation in a MATLAB package for simulating the motion of viscous
ellipsoids in slow flows
Mengmeng Qu, Dazhi Jiang, Lucy X. Lu
Please let us know about any bug or error:
May 2016
=======================================================================================
LICENSE
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
*The above copyright notice, this permission notice and the following
disclaimer shall be included in all copies or substantial portions of
the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=========================================================================================
NOTES
1) The MATLAB functions are wrriten in MATLAB version R2015a;
2) Before executing these functions, one needs to add all folders and subfolders to
current path in MATLAB;
3) "partTGL.mexw64" and "partTLeb.mexw64" in "Routines" are two MEX(MATLAB Executable)
files, written in C language and then compiled using the MATLAB's built-in mex
function and the Microsoft Visual C++ 2015 compiler on Win64 platform using MATLAB
version R2016a.
So if your default C/C++ compiler in MATLAB and/or the platform and/or the MATLAB
version are different from above, the compiled files (i.e.,"partTGL.mexw64" and
"partTLeb.mexw64") may not run properly. You need to re-compile the C codes:
Step 1. Open MATLAB, and type the following command in MATLAB command window,
>> mex -setup
mex will locate the installed compilers and choose a default compiler.
If you do not have an avialable compiler installed on your machine, you can
visit the Mathworks website and check the supported compilers for your MATLAB
(google "supported compilers for MATLAB version####"). Install a compiler, and
then re-do Step 1.
Step 2. Set the sudfolder "C codes" in "Routines" as the current folder in the MATLAB
toolbar. You will see the two C codes (partTGL.c, partTLeb.c) in the MATLAB
current folder.
Step 3. Compile the two C codes by running the following command in the command window,
>> mex partTGL.c
>> mex partTLeb.c
The c-mex invokes the selected compiler to compile, link, and generate the
binaries, "partTGL.mex###" and "partTLeb.mex###".
Step 4. Copy the new mex files, "partTGL.mex###" and "partTLeb.mex###", to the folder "Routines",
and delete the previous "partTGL.mexw64" and "partTLeb.mexw64".
Step 5. Add all folders and subfolders to current path in MATLAB, and have fun! :)
4) You can run the two functions ("DEFval.m", "RGDval.m") in the folder "Validations",
and obtain the Figs.7&8 in the paper.
5) You can run SGLRGD and SLGDEF without changing inputs, and obtain the Figs.9&10 in the paper.
6) The initial uniformly-distributed orientations and shapes of ellipsoids, used for running
the two multiple inclusion functions (MLTRGD and MLTDEF), were generated following the method
of Jiang(2007a) (“RandAANG.m” in “Routines”). If one wants to use some special inputs of shapes
and orientations of ellipsoids, one can simply delete the “RandAANG” line in MLTRGD or MLTDEF,
and use the new inputs.