多领域模拟技术:从N体问题到神经元内物质运输
1. N体问题的基于Actor的可扩展模拟
1.1 算法概述
在N体问题的模拟中,提出了一种基于Actor的可扩展模拟方法。其中,Body - cluster actor更新循环算法如下:
Algorithm 3. Body - cluster actor update loop
1: myBodiesState = initialBodiesState
2: allOtherActors = initialDataWithAddresses
3: while stopCondition == false do
4:
{myCoM, myMass} = calculateCoM(myBodiesState)
5:
for otherActor ∈ allOtherActors do
6:
if otherActor.isNeighbor then
7:
send(otherActor.address, {myCoM, myMass} ∪ allOtherActors)
8:
end if
9:
end for
10:
for neighborsCount do
11:
receivedActors = receive()
12:
for receivedActor ∈ receivedActors do
13:
if receivedActor.time > allOtherActors[receivedActor.id].time then
14:
allOtherActors[receivedActor.id] = receivedActor
15:
e
超级会员免费看
订阅专栏 解锁全文
2183

被折叠的 条评论
为什么被折叠?



