Neighbour finders

NeighbourFinder

FixedNumberFinder

Define as neighbours of a particle the N particles that are closest to it.

CutoffFinder

Define as neighbours of a particle all those particles that are closer than the given cutoff and, optionally, satisfy further conditions set by a custom function.

SANNFinder

class baggianalysis.core.NeighbourFinder(self: baggianalysis.core.NeighbourFinder)None

Bases: pybind11_builtins.pybind11_object

set_neighbours(self: baggianalysis.core.NeighbourFinder, arg0: List[baggianalysis.core.Particle], arg1: glm::tvec3<scalar, P>)None
class baggianalysis.core.FixedNumberFinder(self: baggianalysis.core.FixedNumberFinder, N: int, cutoff: float = 1.5)None

Bases: baggianalysis.core.NeighbourFinder

Define as neighbours of a particle the N particles that are closest to it. By default, a cutoff of 1.5 is used to look for neighbours. If not enough neighbours are found, the cutoff is increased.

The constructor takes two mandatory arguments.

Parameters
  • N (int) – The number of neighbours N that each particle will have at the end of the finding procedure.

  • cutoff (float) – The smallest cutoff that will be used to look for neighbours.

class baggianalysis.core.CutoffFinder(*args, **kwargs)

Bases: baggianalysis.core.NeighbourFinder

Define as neighbours of a particle all those particles that are closer than the given cutoff and, optionally, satisfy further conditions set by a custom function.

Overloaded function.

  1. __init__(self: baggianalysis.core.CutoffFinder, cutoff: float) -> None

The default constructor takes a single parameter setting the cutoff.

Parameters

cutoff (double) – The cutoff used to define neighbours.

  1. __init__(self: baggianalysis.core.CutoffFinder, cutoff: float, neighbour_function: Callable[[baggianalysis.core.Particle, baggianalysis.core.Particle, glm::tvec3<scalar, P>], bool]) -> None

This constructor takes two parameters: the cutoff and a callable that can be used to enforce further conditions.

Parameters
  • cutoff (double) – The cutoff used to define neighbours.

  • mapper (callable) – A callable that takes two particles and a vector that is the distance between the two particles, and returns a boolean, which should be True if the two particles are neighbours, False otherwise.

class baggianalysis.core.SANNFinder(self: baggianalysis.core.SANNFinder, arg0: float, arg1: ba::SANNFinder::SymmetryPolicy)None

Bases: baggianalysis.core.NeighbourFinder

NO_ACTION = SymmetryPolicy.NO_ACTION
SYMMETRISE_BY_ADDING = SymmetryPolicy.SYMMETRISE_BY_ADDING
SYMMETRISE_BY_REMOVING = SymmetryPolicy.SYMMETRISE_BY_REMOVING
class SymmetryPolicy(self: baggianalysis.core.SANNFinder.SymmetryPolicy, arg0: int)None

Bases: pybind11_builtins.pybind11_object

Members:

NO_ACTION

SYMMETRISE_BY_ADDING

SYMMETRISE_BY_REMOVING

NO_ACTION = SymmetryPolicy.NO_ACTION
SYMMETRISE_BY_ADDING = SymmetryPolicy.SYMMETRISE_BY_ADDING
SYMMETRISE_BY_REMOVING = SymmetryPolicy.SYMMETRISE_BY_REMOVING
property name

handle) -> str

Type

(self