Browse Source

[nucleus] recompute_nucleus_each in config

Gaspard Jankowiak 11 months ago
parent
commit
0ea589ef1d
2 changed files with 4 additions and 4 deletions
  1. 2
    2
      src/CellSim.jl
  2. 2
    2
      src/Nucleus.jl

+ 2
- 2
src/CellSim.jl View File

@@ -461,8 +461,8 @@ function launch(P::CSC.Params, F::CSC.Flags, config)
461 461
             if F.centrosome
462 462
                 Nucleus.compute_centronuclear_force(potentials, coords, nucleus_coords, P, F)
463 463
             end
464
-            Nucleus.update_coords(old_nucleus_coords, nucleus_coords, potentials, P, F, temparrays, k)
465
-
464
+            recompute = (k % config["recompute_nucleus_each"] == 0)
465
+            Nucleus.update_coords(old_nucleus_coords, nucleus_coords, potentials, P, F, temparrays, recompute)
466 466
         end
467 467
 
468 468
         if F.cortex

+ 2
- 2
src/Nucleus.jl View File

@@ -453,7 +453,7 @@ end
453 453
 
454 454
 function update_coords(c::NucleusCoords, new_c::NucleusCoords,
455 455
                        potentials::CSC.InteractionPotentials,
456
-                       P::Params, F::Flags, temparrays::CSC.TempArrays6, iter::Int64)
456
+                       P::Params, F::Flags, temparrays::CSC.TempArrays6, recompute::Bool)
457 457
 
458 458
     N_W = potentials.N_W
459 459
     N_∇W = potentials.N_∇W
@@ -471,7 +471,7 @@ function update_coords(c::NucleusCoords, new_c::NucleusCoords,
471 471
     update_θ(c, new_c, N_W, N_∇W, P, F, temparrays)
472 472
     update_Y(c, new_c, N_W, N_∇W, P, F, temparrays)
473 473
 
474
-    if iter%5 == 0
474
+    if recompute
475 475
         recompute_nucleus_coords(new_c)
476 476
     end
477 477
 

Loading…
Cancel
Save