Add some recent stuff

This commit is contained in:
2023-09-04 16:46:22 +02:00
parent 0aa9986ada
commit d68f8b9cd9
32 changed files with 2665 additions and 3949 deletions
+72 -45
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -248,7 +248,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
"version": "3.10.11"
}
},
"nbformat": 4,
+2389
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
+31
View File
@@ -0,0 +1,31 @@
import time
def collatz(x):
seq = [x]
while x != 1:
if x % 2 == 0:
x //= 2
else:
x = 3 * x + 1
seq.append(x)
return seq
if __name__ == "__main__":
best = None
try:
i = 1
start = time.time()
while True:
pair = (i, collatz(i))
if (not best or len(pair[1]) > len(best[1])) and not any(c >= 2**31 for c in pair[1]):
best = pair
if i % 10000 == 0:
now = time.time()
print(f"{i:>10} best: {best[0]:>10} {len(best[1]):>5} {(now - start) * 1000 / i:5.2}ns/seq")
i += 1
except KeyboardInterrupt:
pass
print(best)
+96
View File
@@ -0,0 +1,96 @@
{
"#Testing": {
"description": "Cellular Potts Model with dynamic ECM"
},
"Application": "Cells",
"Geometry": {
"blocksize": [80, 40, 20],
"blockcount": [1, 2, 4]
},
"Settings": {
"timesteps": 100,
"randomseed": 42
},
"Filling": {
"cells": [
{
"shape": "cube",
"box": [
[21, 35, 10],
[25, 39, 15]
],
"celltype": 0
},
{
"shape": "cube",
"box": [
[15, 15, 14],
[22, 22, 20]
],
"celltype": 0
}
]
},
"CellsInSilico": {
"adhesion": {
"matrix": [
[0, 0, 0, 0],
[0, 20, 5, 5],
[0, 5, 10, 5],
[0, 5, 5, 5]
]
},
"potential": {
"direction": [1, 1, 0],
"coupling": [0, 150, 100, 50]
},
"temperature": 15,
"volume": {
"default": {
"storage": "const",
"value": 300
},
"lambda": {
"storage": "const",
"value": 10
}
},
"surface": {
"default": {
"storage": "const",
"value": 400
},
"lambda": {
"storage": "const",
"value": 10
}
},
"cleaner": {
"killdistance": 100
},
"checkerboard": "00",
"energyfunctions": ["Volume00", "Surface00", "Adhesion00", "Potential00"],
"centerofmass": {
"steps": 10
},
"dynamicecm": {
"enabled": true,
"deltat": 0.1
}
},
"Writers": {
"ParallelVTK_Cells": {
"writer": "ParallelVtkImage",
"outputtype": "UInt32",
"field": "cells",
"steps": 5
},
"ParallelVTK_Displacement": {
"writer": "ParallelVtkImage",
"outputtype": "Float32",
"field": "dynamicecm_displacement",
"steps": 1
}
},
"WriteActions": ["ParallelVTK_Cells", "ParallelVTK_Displacement"]
}
+75
View File
@@ -0,0 +1,75 @@
{
"#Testing": {
"description": "Cellular Potts Model with dynamic ECM"
},
"Application": "Cells",
"Geometry": {
"blocksize": [15, 15, 15],
"blockcount": [1, 1, 1]
},
"Settings": {
"timesteps": 100,
"randomseed": 42
},
"Filling": {
"cells": [
]
},
"CellsInSilico": {
"adhesion": {
"matrix": [
[0, 0, 0, 0],
[0, 20, 5, 5],
[0, 5, 10, 5],
[0, 5, 5, 5]
]
},
"temperature": 15,
"volume": {
"default": {
"storage": "const",
"value": 300
},
"lambda": {
"storage": "const",
"value": 10
}
},
"potential": {
"direction": [1, 1, 0],
"coupling": [0, 150, 100, 50]
},
"surface": {
"default": {
"storage": "const",
"value": 400
},
"lambda": {
"storage": "const",
"value": 10
}
},
"cleaner": {
"killdistance": 100
},
"checkerboard": "00",
"energyfunctions": ["Volume00", "Surface00", "Adhesion00", "Potential00"],
"centerofmass": {
"steps": 10
},
"dynamicecm": {
"enabled": true,
"deltat": 0.1,
"eta": 0.5
}
},
"Writers": {
"ParallelVTK_Displacement": {
"writer": "ParallelVtkImage",
"outputtype": "Float32",
"field": "dynamicecm_displacement",
"steps": 1
}
},
"WriteActions": ["ParallelVTK_Displacement"]
}
Binary file not shown.