shamrock.NeighCacheStrategy#

class shamrock.NeighCacheStrategy#

Bases: pybind11_object

Strategy used to build the neighbours cache out of the tree traversal.

>>> from shamrock import NeighCacheStrategy
>>> cfg.set_neigh_cache_strategy(NeighCacheStrategy.SingleStage)

Members:

SingleStage

Single tree traversal per particle.

Each particle walks the tree itself and writes its neighbours straight to the cache. Prefer this one when the tree ends up with giant leaves, as on a chaotic disc: there the leaf bounding boxes grow so large that the two stage search makes each particle scan far more candidates than it keeps.

TwoStage

Two stage neighbours search (see the shamrock paper). This is the default.

A first pass walks the tree once per leaf to build a leaf to leaf neighbour map, then each particle only scans the particles held by its own leaf’s neighbour leaves. This is usually the faster of the two, since the tree traversal is paid once per leaf instead of once per particle.

Methods

Attributes

SingleStage

TwoStage

name

value

Production run: Black hole disc & lense thirring effect

Production run: Black hole disc & lense thirring effect

Dusty settling SPH test

Dusty settling SPH test

Using Shamrock SPH rendering module

Using Shamrock SPH rendering module
property name#