2 Commits

Author SHA1 Message Date
  Gaspard Jankowiak df14c33052 update manifest 6 months ago
  Gaspard Jankowiak c1974c4160 some fixes, allow negative k in recomputation 6 months ago
7 changed files with 152 additions and 138 deletions
  1. 82
    115
      Manifest.toml
  2. 4
    1
      configs_metrics/nucleus/test_variamu.yaml
  3. 18
    2
      src/CellSim.jl
  4. 5
    1
      src/CellSimCommon.jl
  5. 2
    2
      src/Cortex.jl
  6. 30
    3
      src/Nucleus.jl
  7. 11
    14
      src/Plotting.jl

+ 82
- 115
Manifest.toml View File

@@ -2,9 +2,9 @@
2 2
 
3 3
 [[ArrayInterface]]
4 4
 deps = ["LinearAlgebra", "Requires", "SparseArrays"]
5
-git-tree-sha1 = "981354dab938901c2b607a213e62d9defa50b698"
5
+git-tree-sha1 = "5f34aee5e5dbc1ce5cfb137d63f719a64d98ae82"
6 6
 uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
7
-version = "1.2.1"
7
+version = "2.8.5"
8 8
 
9 9
 [[AxisAlgorithms]]
10 10
 deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"]
@@ -15,47 +15,23 @@ version = "1.0.0"
15 15
 [[Base64]]
16 16
 uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
17 17
 
18
-[[BinDeps]]
19
-deps = ["Compat", "Libdl", "SHA", "URIParser"]
20
-git-tree-sha1 = "12093ca6cdd0ee547c39b1870e0c9c3f154d9ca9"
21
-uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
22
-version = "0.8.10"
23
-
24
-[[BinaryProvider]]
25
-deps = ["Libdl", "SHA"]
26
-git-tree-sha1 = "5b08ed6036d9d3f0ee6369410b830f8873d4024c"
27
-uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
28
-version = "0.5.8"
29
-
30
-[[Calculus]]
31
-deps = ["LinearAlgebra"]
32
-git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad"
33
-uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"
34
-version = "0.5.1"
35
-
36 18
 [[CodeTracking]]
37 19
 deps = ["InteractiveUtils", "UUIDs"]
38
-git-tree-sha1 = "0becdab7e6fbbcb7b88d8de5b72e5bb2f28239f3"
20
+git-tree-sha1 = "c8f94de86731698373f3c82a8aa40d8ab765c50c"
39 21
 uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
40
-version = "0.5.8"
41
-
42
-[[Codecs]]
43
-deps = ["Test"]
44
-git-tree-sha1 = "70885e5e038cba1c4c17a84ad6c40756e10a4fb5"
45
-uuid = "19ecbf4d-ef7c-5e4b-b54a-0a0ff23c5aed"
46
-version = "0.5.0"
22
+version = "0.5.9"
47 23
 
48 24
 [[ColorTypes]]
49 25
 deps = ["FixedPointNumbers", "Random"]
50
-git-tree-sha1 = "10050a24b09e8e41b951e9976b109871ce98d965"
26
+git-tree-sha1 = "f746d4fc892fdf683b5c22064c8e99b2f5b990e7"
51 27
 uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
52
-version = "0.8.0"
28
+version = "0.10.2"
53 29
 
54 30
 [[Colors]]
55
-deps = ["ColorTypes", "FixedPointNumbers", "InteractiveUtils", "Printf", "Reexport"]
56
-git-tree-sha1 = "c9c1845d6bf22e34738bee65c357a69f416ed5d1"
31
+deps = ["ColorTypes", "FixedPointNumbers", "InteractiveUtils", "Reexport"]
32
+git-tree-sha1 = "2fdeb981ebcf52cd800ddb6a0aa5eac34153552d"
57 33
 uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
58
-version = "0.9.6"
34
+version = "0.12.0"
59 35
 
60 36
 [[CommonSubexpressions]]
61 37
 deps = ["Test"]
@@ -63,23 +39,17 @@ git-tree-sha1 = "efdaf19ab11c7889334ca247ff4c9f7c322817b0"
63 39
 uuid = "bbf7d656-a473-5ed7-a52c-81e309532950"
64 40
 version = "0.2.0"
65 41
 
66
-[[Compat]]
67
-deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
68
-git-tree-sha1 = "ed2c4abadf84c53d9e58510b5fc48912c2336fbb"
69
-uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
70
-version = "2.2.0"
42
+[[CompilerSupportLibraries_jll]]
43
+deps = ["Libdl", "Pkg"]
44
+git-tree-sha1 = "7c4f882c41faa72118841185afc58a2eb00ef612"
45
+uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
46
+version = "0.3.3+0"
71 47
 
72 48
 [[Conda]]
73 49
 deps = ["JSON", "VersionParsing"]
74
-git-tree-sha1 = "9a11d428dcdc425072af4aea19ab1e8c3e01c032"
50
+git-tree-sha1 = "7a58bb32ce5d85f8bf7559aa7c2842f9aecf52fc"
75 51
 uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d"
76
-version = "1.3.0"
77
-
78
-[[DataStructures]]
79
-deps = ["InteractiveUtils", "OrderedCollections"]
80
-git-tree-sha1 = "a1b652fb77ae8ca7ea328fa7ba5aa151036e5c10"
81
-uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
82
-version = "0.17.6"
52
+version = "1.4.1"
83 53
 
84 54
 [[Dates]]
85 55
 deps = ["Printf"]
@@ -89,23 +59,17 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
89 59
 deps = ["Mmap"]
90 60
 uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"
91 61
 
92
-[[DiffEqDiffTools]]
93
-deps = ["ArrayInterface", "LinearAlgebra", "Requires", "SparseArrays", "StaticArrays"]
94
-git-tree-sha1 = "81edfb3a8b55154772bb6080b5db40868e1778ed"
95
-uuid = "01453d9d-ee7c-5054-8395-0335cb756afa"
96
-version = "1.4.0"
97
-
98 62
 [[DiffResults]]
99
-deps = ["Compat", "StaticArrays"]
100
-git-tree-sha1 = "34a4a1e8be7bc99bc9c611b895b5baf37a80584c"
63
+deps = ["StaticArrays"]
64
+git-tree-sha1 = "da24935df8e0c6cf28de340b958f6aac88eaa0cc"
101 65
 uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
102
-version = "0.0.4"
66
+version = "1.0.2"
103 67
 
104 68
 [[DiffRules]]
105 69
 deps = ["NaNMath", "Random", "SpecialFunctions"]
106
-git-tree-sha1 = "f734b5f6bc9c909027ef99f6d91d5d9e4b111eed"
70
+git-tree-sha1 = "eb0c34204c8410888844ada5359ac8b96292cfd1"
107 71
 uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
108
-version = "0.1.0"
72
+version = "1.0.1"
109 73
 
110 74
 [[Distances]]
111 75
 deps = ["LinearAlgebra", "Statistics"]
@@ -128,16 +92,22 @@ version = "0.1.0"
128 92
 [[FileWatching]]
129 93
 uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
130 94
 
95
+[[FiniteDiff]]
96
+deps = ["ArrayInterface", "LinearAlgebra", "Requires", "SparseArrays", "StaticArrays"]
97
+git-tree-sha1 = "f60e5d6944975f7140bde67278e10b6b01fb4f29"
98
+uuid = "6a86dc24-6348-571c-b903-95158fe2bd41"
99
+version = "2.3.0"
100
+
131 101
 [[FixedPointNumbers]]
132
-git-tree-sha1 = "d14a6fa5890ea3a7e5dcab6811114f132fec2b4b"
102
+git-tree-sha1 = "3ba9ea634d4c8b289d590403b4a06f8e227a6238"
133 103
 uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
134
-version = "0.6.1"
104
+version = "0.8.0"
135 105
 
136 106
 [[ForwardDiff]]
137 107
 deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "NaNMath", "Random", "SpecialFunctions", "StaticArrays"]
138
-git-tree-sha1 = "da46ac97b17793eba44ff366dc6cb70f1238a738"
108
+git-tree-sha1 = "869540e4367122fbffaace383a5bdc34d6e5e5ac"
139 109
 uuid = "f6369f11-7733-5829-9624-2563aa707210"
140
-version = "0.10.7"
110
+version = "0.10.10"
141 111
 
142 112
 [[InteractiveUtils]]
143 113
 deps = ["Markdown"]
@@ -145,9 +115,9 @@ uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
145 115
 
146 116
 [[Interpolations]]
147 117
 deps = ["AxisAlgorithms", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"]
148
-git-tree-sha1 = "f5bf159a7705e2a705b0effa1be0c3d18e288fe1"
118
+git-tree-sha1 = "3af735234d9b1ff9ff1af89875735cd9549c0c5f"
149 119
 uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
150
-version = "0.12.5"
120
+version = "0.12.9"
151 121
 
152 122
 [[JSON]]
153 123
 deps = ["Dates", "Mmap", "Parsers", "Unicode"]
@@ -165,15 +135,14 @@ version = "0.1.0"
165 135
 
166 136
 [[JuliaInterpreter]]
167 137
 deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"]
168
-git-tree-sha1 = "5bb6a8b09d881c1cbe39bd8135667ed5978168e9"
138
+git-tree-sha1 = "2eadbbde5534346cbb837c3a75b377cba477a06d"
169 139
 uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"
170
-version = "0.7.4"
140
+version = "0.7.13"
171 141
 
172 142
 [[LaTeXStrings]]
173
-deps = ["Compat"]
174
-git-tree-sha1 = "7ab9b8788cfab2bdde22adf9004bda7ad9954b6c"
143
+git-tree-sha1 = "de44b395389b84fd681394d4e8d39ef14e3a2ea8"
175 144
 uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
176
-version = "1.0.3"
145
+version = "1.1.0"
177 146
 
178 147
 [[LibGit2]]
179 148
 uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
@@ -196,15 +165,15 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
196 165
 
197 166
 [[LoweredCodeUtils]]
198 167
 deps = ["JuliaInterpreter"]
199
-git-tree-sha1 = "b416a30717e9109fffd4d9869f2f962b5dca3162"
168
+git-tree-sha1 = "1c41621653250b2824b6e664ac5bd805558aeff9"
200 169
 uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b"
201
-version = "0.4.2"
170
+version = "0.4.3"
202 171
 
203 172
 [[MacroTools]]
204
-deps = ["Compat", "DataStructures", "Test"]
205
-git-tree-sha1 = "82921f0e3bde6aebb8e524efc20f4042373c0c06"
173
+deps = ["Markdown", "Random"]
174
+git-tree-sha1 = "f7d2e3f654af75f01ec49be82c231c382214223a"
206 175
 uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
207
-version = "0.5.2"
176
+version = "0.5.5"
208 177
 
209 178
 [[Markdown]]
210 179
 deps = ["Base64"]
@@ -214,16 +183,16 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
214 183
 uuid = "a63ad114-7e13-5084-954f-fe012c677804"
215 184
 
216 185
 [[NLSolversBase]]
217
-deps = ["Calculus", "DiffEqDiffTools", "DiffResults", "Distributed", "ForwardDiff"]
218
-git-tree-sha1 = "f1b8ed89fa332f410cfc7c937682eb4d0b361521"
186
+deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"]
187
+git-tree-sha1 = "7c4e66c47848562003250f28b579c584e55becc0"
219 188
 uuid = "d41bc354-129a-5804-8e4c-c37616107c6c"
220
-version = "7.5.0"
189
+version = "7.6.1"
221 190
 
222 191
 [[NLsolve]]
223
-deps = ["DiffEqDiffTools", "Distances", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"]
224
-git-tree-sha1 = "be25a8486c7be4b075165315e201fa5d199073f1"
192
+deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"]
193
+git-tree-sha1 = "cce0463af83a0f36c7bfa5820e373ac090cc46ad"
225 194
 uuid = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
226
-version = "4.2.0"
195
+version = "4.3.0"
227 196
 
228 197
 [[NaNMath]]
229 198
 git-tree-sha1 = "928b8ca9b2791081dc71a51c55347c27c618760f"
@@ -231,9 +200,15 @@ uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
231 200
 version = "0.3.3"
232 201
 
233 202
 [[OffsetArrays]]
234
-git-tree-sha1 = "1af2f79c7eaac3e019a0de41ef63335ff26a0a57"
203
+git-tree-sha1 = "930db8ef90483570107f2396b1ffc6680f08e8b7"
235 204
 uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
236
-version = "0.11.1"
205
+version = "1.0.4"
206
+
207
+[[OpenSpecFun_jll]]
208
+deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"]
209
+git-tree-sha1 = "d51c416559217d974a1113522d5919235ae67a87"
210
+uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
211
+version = "0.5.3+3"
237 212
 
238 213
 [[OrderedCollections]]
239 214
 deps = ["Random", "Serialization", "Test"]
@@ -249,12 +224,12 @@ version = "0.12.0"
249 224
 
250 225
 [[Parsers]]
251 226
 deps = ["Dates", "Test"]
252
-git-tree-sha1 = "0139ba59ce9bc680e2925aec5b7db79065d60556"
227
+git-tree-sha1 = "f8f5d2d4b4b07342e5811d2b6428e45524e241df"
253 228
 uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
254
-version = "0.3.10"
229
+version = "1.0.2"
255 230
 
256 231
 [[Pkg]]
257
-deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
232
+deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Test", "UUIDs"]
258 233
 uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
259 234
 
260 235
 [[Printf]]
@@ -262,16 +237,16 @@ deps = ["Unicode"]
262 237
 uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
263 238
 
264 239
 [[PyCall]]
265
-deps = ["Conda", "Dates", "Libdl", "LinearAlgebra", "MacroTools", "Pkg", "Serialization", "Statistics", "Test", "VersionParsing"]
266
-git-tree-sha1 = "6e5bac1b1faf3575731a6a5b76f638f2389561d3"
240
+deps = ["Conda", "Dates", "Libdl", "LinearAlgebra", "MacroTools", "Serialization", "VersionParsing"]
241
+git-tree-sha1 = "3a3fdb9000d35958c9ba2323ca7c4958901f115d"
267 242
 uuid = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
268
-version = "1.91.2"
243
+version = "1.91.4"
269 244
 
270 245
 [[PyPlot]]
271 246
 deps = ["Colors", "LaTeXStrings", "PyCall", "Sockets", "Test", "VersionParsing"]
272
-git-tree-sha1 = "ccecc72cf5b41a5de686bd76999040050a8a3472"
247
+git-tree-sha1 = "67dde2482fe1a72ef62ed93f8c239f947638e5a2"
273 248
 uuid = "d330b81b-6aea-500a-939a-2ce795aea3ee"
274
-version = "2.8.2"
249
+version = "2.9.0"
275 250
 
276 251
 [[REPL]]
277 252
 deps = ["InteractiveUtils", "Markdown", "Sockets"]
@@ -282,10 +257,9 @@ deps = ["Serialization"]
282 257
 uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
283 258
 
284 259
 [[Ratios]]
285
-deps = ["Compat"]
286
-git-tree-sha1 = "cdbbe0f350581296f3a2e3e7a91b214121934407"
260
+git-tree-sha1 = "37d210f612d70f3f7d57d488cb3b6eff56ad4e41"
287 261
 uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439"
288
-version = "0.3.1"
262
+version = "0.4.0"
289 263
 
290 264
 [[Reexport]]
291 265
 deps = ["Pkg"]
@@ -294,16 +268,16 @@ uuid = "189a3867-3050-52da-a836-e630ba90ab69"
294 268
 version = "0.2.0"
295 269
 
296 270
 [[Requires]]
297
-deps = ["Test"]
298
-git-tree-sha1 = "f6fbf4ba64d295e146e49e021207993b6b48c7d1"
271
+deps = ["UUIDs"]
272
+git-tree-sha1 = "d37400976e98018ee840e0ca4f9d20baa231dc6b"
299 273
 uuid = "ae029012-a4dd-5104-9daa-d747884805df"
300
-version = "0.5.2"
274
+version = "1.0.1"
301 275
 
302 276
 [[Revise]]
303 277
 deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "UUIDs", "Unicode"]
304
-git-tree-sha1 = "dd15b92fac79835f8d87d03522ad861ff40c7459"
278
+git-tree-sha1 = "fceff536216ee787aee07247172dd7b372c39714"
305 279
 uuid = "295af30f-e4ad-537b-8983-00126c2a3abe"
306
-version = "2.3.1"
280
+version = "2.6.1"
307 281
 
308 282
 [[SHA]]
309 283
 uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
@@ -323,10 +297,10 @@ deps = ["LinearAlgebra", "Random"]
323 297
 uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
324 298
 
325 299
 [[SpecialFunctions]]
326
-deps = ["BinDeps", "BinaryProvider", "Libdl"]
327
-git-tree-sha1 = "3bdd374b6fd78faf0119b8c5d538788dbf910c6e"
300
+deps = ["OpenSpecFun_jll"]
301
+git-tree-sha1 = "e19b98acb182567bcb7b75bb5d9eedf3a3b5ec6c"
328 302
 uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
329
-version = "0.8.0"
303
+version = "0.10.0"
330 304
 
331 305
 [[StaticArrays]]
332 306
 deps = ["LinearAlgebra", "Random", "Statistics"]
@@ -342,12 +316,6 @@ uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
342 316
 deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
343 317
 uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
344 318
 
345
-[[URIParser]]
346
-deps = ["Test", "Unicode"]
347
-git-tree-sha1 = "6ddf8244220dfda2f17539fa8c9de20d6c575b69"
348
-uuid = "30578b45-9adc-5946-b283-645ec420af67"
349
-version = "0.4.0"
350
-
351 319
 [[UUIDs]]
352 320
 deps = ["Random", "SHA"]
353 321
 uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
@@ -356,10 +324,9 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
356 324
 uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
357 325
 
358 326
 [[VersionParsing]]
359
-deps = ["Compat"]
360
-git-tree-sha1 = "c9d5aa108588b978bd859554660c8a5c4f2f7669"
327
+git-tree-sha1 = "80229be1f670524750d905f8fc8148e5a8c4537f"
361 328
 uuid = "81def892-9a0e-5fdd-b105-ffc91e053289"
362
-version = "1.1.3"
329
+version = "1.2.0"
363 330
 
364 331
 [[Visibility]]
365 332
 deps = ["DelimitedFiles", "LinearAlgebra", "SparseArrays", "Test"]
@@ -370,13 +337,13 @@ uuid = "15fb1782-248e-11e9-27b0-fbe0d4c2d03f"
370 337
 version = "0.1.0"
371 338
 
372 339
 [[WoodburyMatrices]]
373
-deps = ["LinearAlgebra", "Random", "SparseArrays", "Test"]
374
-git-tree-sha1 = "21772c33b447757ec7d3e61fcdfb9ea5c47eedcf"
340
+deps = ["LinearAlgebra", "SparseArrays"]
341
+git-tree-sha1 = "28ffe06d28b1ba8fdb2f36ec7bb079fac81bac0d"
375 342
 uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6"
376
-version = "0.4.1"
343
+version = "0.5.2"
377 344
 
378 345
 [[YAML]]
379
-deps = ["Codecs", "Compat"]
380
-git-tree-sha1 = "3bde77cee95cce0c0b9b18813d85e18e8ed4f415"
346
+deps = ["Base64", "Dates", "Printf"]
347
+git-tree-sha1 = "c5e2eaa5ce818c5277388377d592eb4c81f27c00"
381 348
 uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
382
-version = "0.3.2"
349
+version = "0.4.0"

+ 4
- 1
configs_metrics/nucleus/test_variamu.yaml View File

@@ -73,12 +73,15 @@ flags:
73 73
     debug:                false
74 74
     force_cortex_area:    true
75 75
     write_metrics:        true
76
+    explicit_mt_force:    false
76 77
 
77 78
 config:
78 79
     output_prefix: test_variamu60
79 80
 
80 81
     plot_period: 20
81 82
 
83
+    recompute_nucleus_each: 5
84
+
82 85
     metrics:
83 86
         start_iteration: 1
84 87
         periods: 2
@@ -94,4 +97,4 @@ config:
94 97
 
95 98
         # shift_nucleus: 0.25 # 3/4 of a period = 3/4 * 2π / f.ω0
96 99
 
97
-   
100
+   

+ 18
- 2
src/CellSim.jl View File

@@ -25,6 +25,10 @@ import NLsolve
25 25
 import YAML
26 26
 import Dates
27 27
 
28
+# we need python's YAML to dump config files
29
+import PyCall
30
+const pyyaml = PyCall.pyimport("yaml")
31
+
28 32
 import DelimitedFiles: readdlm, writedlm
29 33
 
30 34
 import SparseArrays
@@ -223,7 +227,10 @@ function launch(P::CSC.Params, F::CSC.Flags, config)
223 227
     mkpath("runs")
224 228
     mkpath("dumps")
225 229
     mkpath("$(config["output_prefix"])")
226
-    run(`cp $(config["config_filename"]) $(config["output_prefix"])Run_$(config["date_string"]).yaml`)
230
+    config_dict = Dict([("params", CSC.to_dict(P)), ("flags", CSC.to_dict(F)), ("config", config)])
231
+    output_config_file = open(config["output_prefix"] * "Run_" * config["date_string"] * ".yaml", "w")
232
+    pyyaml.dump(config_dict, output_config_file, allow_unicode=true)
233
+    close(output_config_file)
227 234
     println("Parameters:")
228 235
     for s in fieldnames(typeof(P))
229 236
         println(string("    ", s, ": ", getfield(P, s)))
@@ -367,6 +374,7 @@ function launch(P::CSC.Params, F::CSC.Flags, config)
367 374
 
368 375
 
369 376
     stepping = F.DEBUG
377
+    breakpoint = -1
370 378
     if !stepping
371 379
         input_task = @async read(stdin, Char)
372 380
     end
@@ -383,12 +391,20 @@ function launch(P::CSC.Params, F::CSC.Flags, config)
383 391
             break
384 392
         end
385 393
 
394
+        if k == breakpoint
395
+            stepping = true
396
+        end
397
+
386 398
         if stepping
387
-            println("debug: 'q' to quit, 'c' to run continuously, any other key to step, 'b' to run step by step")
399
+            println("debug: 'q' to quit, 'c' to run continuously, 'C' to continue to ITER, any other key to step, 'b' to run step by step")
388 400
             key = read(stdin, 1)[1]
389 401
             if key == 0x63 # c
390 402
                 stepping = false
391 403
                 input_task = @async read(stdin, Char)
404
+            elseif key == 0x43 # C
405
+                stepping = false
406
+                breakpoint = parse(Int, readline())
407
+                input_task = @async read(stdin, Char)
392 408
             elseif key == 0x71 # q
393 409
                 break
394 410
             end

+ 5
- 1
src/CellSimCommon.jl View File

@@ -124,6 +124,10 @@ mutable struct Flags
124 124
     DEBUG::Bool
125 125
 end
126 126
 
127
+function to_dict(s::Union{Params,Flags})
128
+    return Dict([(String(field), getfield(s, field)) for field in fieldnames(typeof(s))])
129
+end
130
+
127 131
 struct InteractionPotentials
128 132
     N_W::Vector{Float64}
129 133
     N_∇W::Matrix{Float64}
@@ -291,7 +295,7 @@ end
291 295
 """
292 296
 function pointwise_dot_prod(v)
293 297
     N = size(v, 1)
294
-    return [v[:, 1].*SA.sparse(SA.I, N, N) v[:,2].*SA.sparse(SA.I, N, N)]
298
+    return [v[:, 1].*SA.sparse(1.0*SA.I, N, N) v[:,2].*SA.sparse(1.0*SA.I, N, N)]
295 299
 end
296 300
 
297 301
 """

+ 2
- 2
src/Cortex.jl View File

@@ -204,7 +204,7 @@ function init_FD_matrices(P::Params)
204 204
     N = P.N
205 205
     Δσ = P.Δσ
206 206
 
207
-    global M_perp = SA.blockdiag(-SA.sparse(SA.I, N, N), SA.sparse(SA.I, N, N))
207
+    global M_perp = SA.blockdiag(-SA.sparse(1.0*SA.I, N, N), SA.sparse(1.0*SA.I, N, N))
208 208
     global M_cs_plus = SA.spdiagm(-N+1 => [1; zeros(N-1); 1],
209 209
                                    1 => [ones(N-1); 0; ones(N-1)])
210 210
     global M_cs_minus = SA.spdiagm(N-1 => [1; zeros(N-1); 1],
@@ -716,7 +716,7 @@ function compute_residuals_J(x::Vector{Float64},
716 716
                                 differentials, dst_Df, true)
717 717
     end
718 718
 
719
-    dst_Df[:] = SA.sparse(SA.I, 2P.N, 2P.N) .- P.δt*dst_Df
719
+    dst_Df[:] = SA.sparse(1.0*SA.I, 2P.N, 2P.N) .- P.δt*dst_Df
720 720
 end
721 721
 
722 722
 function wrap_residuals(coords::PointCoords, coords_s::PointCoordsShifted,

+ 30
- 3
src/Nucleus.jl View File

@@ -72,7 +72,18 @@ function g_p(x::Vector{Float64}, α::Float64)
72 72
     return -(2α*min.(α*x.-1, 0.0).*log.(α*x) .+ min.(α*x.-1, 0.0).^2 ./x)
73 73
 end
74 74
 
75
-function compute_curvature(c::NucleusCoords)
75
+function compute_curvature_3(c::NucleusCoords, sign_k::Vector{Float64})
76
+    # http://cral-labo.univ-lyon1.fr/labo/fc/Ateliers_archives/ateliers_2005-06/cercle_3pts.pdf
77
+    xc = (0.5*(c.Y[c.circ_idx.p1,1].^2 - c.Y[:,1].^2 + c.Y[c.circ_idx.p1,2].^2 - c.Y[:,2].^2) ./ (c.Y[c.circ_idx.p1,2]-c.Y[:,2])
78
+          - 0.5*(c.Y[:,1].^2 - c.Y[c.circ_idx.m1,1].^2 + c.Y[:,2].^2 - c.Y[c.circ_idx.m1,2].^2) ./ (c.Y[:,2]-c.Y[c.circ_idx.m1,2])) ./ ((c.Y[:,1] - c.Y[c.circ_idx.m1,1])./(c.Y[:,2] - c.Y[c.circ_idx.m1,2]) - (c.Y[c.circ_idx.p1,1] - c.Y[:,1])./(c.Y[c.circ_idx.p1,2] - c.Y[:,2]))
79
+
80
+    yc = -(c.Y[:,1] - c.Y[c.circ_idx.m1,1])./(c.Y[:,2] - c.Y[c.circ_idx.m1,2]) .* xc + 0.5*(c.Y[:,1].^2 - c.Y[c.circ_idx.m1,1].^2 + c.Y[:,2].^2 - c.Y[c.circ_idx.m1,2].^2) ./ (c.Y[:,2]-c.Y[c.circ_idx.m1,2])
81
+    radius = sqrt.((xc - c.Y[:,1]).^2 + (yc - c.Y[:,2]).^2)
82
+    c.k[:] = sign_k ./radius
83
+    c.k[:] = 0.5*(c.k + c.k[c.circ_idx.m1])
84
+end
85
+
86
+function compute_curvature_4(c::NucleusCoords, sign_k::Vector{Float64})
76 87
     A = zeros(3,3)
77 88
     b = zeros(3)
78 89
 
@@ -123,7 +134,7 @@ function compute_curvature(c::NucleusCoords)
123 134
         b[3] = -0.25*(A[1,1] + A[2,2])
124 135
 
125 136
         x = A\b
126
-        c.k[i] = 1/sqrt(x[1]^2 + x[2]^2 - x[3])
137
+        c.k[i] = sign_k[i]./sqrt(x[1]^2 + x[2]^2 - x[3])
127 138
     end
128 139
 end
129 140
 
@@ -136,7 +147,9 @@ function recompute_nucleus_coords(c::NucleusCoords)
136 147
     delta_θ = rem.(c.θ - c.θ[c.circ_idx.m1], 2π, RoundNearest)
137 148
     c.θ[:] = cumsum([c.θ[1]; delta_θ[1:end-1]])
138 149
 
139
-    compute_curvature(c)
150
+    sign_k = [sign(c.θ[1] + 2π - c.θ[end]); sign.(delta_θ)]
151
+
152
+    compute_curvature_4(c, sign_k)
140 153
     c.η[:] = log.(c.r)
141 154
     c.L = sum(c.r)
142 155
 end
@@ -494,10 +507,24 @@ function update_coords(c::NucleusCoords, new_c::NucleusCoords,
494 507
     update_θ(c, new_c, N_W, N_∇W, P, F, temparrays)
495 508
     update_Y(c, new_c, N_W, N_∇W, P, F, temparrays)
496 509
 
510
+    if F.DEBUG & recompute
511
+        println("PRE recompute alpha, beta, r, q, K, θ")
512
+        # display([c.α c.β c.r c.q c.k c.θ])
513
+        display([sum(new_c.α)/P.Nnuc sum(new_c.β)/P.Nnuc sum(new_c.r)/P.Nnuc sum(new_c.q)/P.Nnuc sum(new_c.k)/P.Nnuc sum(new_c.θ)/P.Nnuc])
514
+        println()
515
+        print("kpre = ")
516
+        println(new_c.k)
517
+    end
518
+
497 519
     if recompute
498 520
         recompute_nucleus_coords(new_c)
499 521
     end
500 522
 
523
+    if F.DEBUG & recompute
524
+        print("kpost = ")
525
+        println(new_c.k)
526
+    end
527
+
501 528
     if F.DEBUG
502 529
         println("POST alpha, beta, r, q, K, θ")
503 530
         # display([new_c.α new_c.β new_c.r new_c.q new_c.k new_c.θ])

+ 11
- 14
src/Plotting.jl View File

@@ -22,7 +22,7 @@ function init_plot(coords::Cortex.PointCoords, P::CellSimCommon.Params, F::CellS
22 22
 
23 23
     x = coords.x
24 24
 
25
-    fig = PyPlot.figure(figsize=(12.8, 10))
25
+    fig = PyPlot.figure(figsize=(12.8, 10), dpi=50)
26 26
 
27 27
     PyPlot.show()
28 28
     # figManager = PyPlot.get_current_fig_manager()
@@ -36,7 +36,7 @@ function init_plot(coords::Cortex.PointCoords, P::CellSimCommon.Params, F::CellS
36 36
     ax.plot(x[:,1], x[:,2], ".-", zorder=20)[1]
37 37
 
38 38
     # Cortex fillin
39
-    ax.fill(x[:,1], x[:,2], color="#f713e0", zorder=10)[1]
39
+    ax.fill(x[:,1], x[:,2], color="#f713e033", zorder=10)[1]
40 40
 
41 41
     if F.nucleus
42 42
         # Nucleus
@@ -54,7 +54,9 @@ function init_plot(coords::Cortex.PointCoords, P::CellSimCommon.Params, F::CellS
54 54
     end
55 55
 
56 56
     # Drag force
57
-    # ax.scatter(x[:,1], x[:,2], color="black", zorder=30)
57
+    if F.plot_drag
58
+        ax.scatter(x[:,1], x[:,2], color="black", zorder=30)
59
+    end
58 60
 
59 61
     # Initial condition
60 62
     # ax.plot(x[:,1], x[:,2], color="black", lw=0.5, zorder=1)[1]
@@ -182,8 +184,11 @@ function update_plot(coords::Cortex.PointCoords, nucleus_coords::Union{Nucleus.N
182 184
     end
183 185
 
184 186
     # Drag force
185
-    # scatters[idx_s].set_offsets(x)
186
-    # idx_s += 1
187
+    if F.plot_drag
188
+        scatters[idx_s].set_sizes(10CellSimCommon.@entry_norm(plotables.drag_force))
189
+        scatters[idx_s].set_offsets(x)
190
+        idx_s += 1
191
+    end
187 192
 
188 193
     # Initial condition
189 194
     # idx_l += 1
@@ -230,7 +235,7 @@ function update_plot(coords::Cortex.PointCoords, nucleus_coords::Union{Nucleus.N
230 235
 
231 236
 
232 237
     if F.follow_cam
233
-        if F.follow_nucleus
238
+        if F.nucleus && F.follow_nucleus
234 239
             follow_x = nucleus_coords.Y
235 240
         else
236 241
             follow_x = coords.x
@@ -246,14 +251,6 @@ function update_plot(coords::Cortex.PointCoords, nucleus_coords::Union{Nucleus.N
246 251
         ax.set_ylim((y_mid-0.7*y_span, y_mid+0.7*y_span))
247 252
     end
248 253
 
249
-    # if F.plot_drag
250
-        # scatters[1].set_sizes(10CellSimCommon.@entry_norm(plotables.drag_force))
251
-    # else
252
-        # scatters[1].set_sizes(0CellSimCommon.@entry_norm(plotables.drag_force))
253
-    # end
254
-    # scatters[1].set_facecolor(JankoUtils.scale_cm(plotables.mass_source, PyPlot.get_cmap("RdYlGn");
255
-                                               # range_min=-P.c, range_max=P.c))
256
-
257 254
     PyPlot.draw()
258 255
     sleep(0.001)
259 256
 end

Loading…
Cancel
Save