Skip to content
Projects

Deposit accumulation

The equations of patchwork.mesh.accumulate, declared on the code that implements them and checked by the tests.

Accumulation

classsource

Add the halos of node field name and move every node's charge to its owner copy.

halos
qp+=∑neighbouring blocks bqphalo(b)(within a patch; dropped at its edges)q_p \mathrel{+}= \sum_{\text{neighbouring blocks } b} q_p^{\mathrm{halo}(b)} \quad \text{(within a patch; dropped at its edges)}
owner
qpowner=∑copies c of node pqpc,qpc=0  (c≠owner)q_p^{\mathrm{owner}} = \sum_{\text{copies } c \text{ of node } p} q_p^{c}, \qquad q_p^{c} = 0 \ \ (c \ne \mathrm{owner})
Assumes
  • the owner copy is in the finest patch that holds the node (the last of that level in patches), the upper copy on a periodic seam
  • the sum over all copies is kept; the result equals CompositeNodes.deposit to round-off
  • node-centered fields only