ParticleSystemGrid

class samson.Simulation.NeighborSearch.ParticleSystemGrid(self: samson.Simulation.NeighborSearch.ParticleSystemGrid, particleSystem: samson.Modeling.DynamicalModel.ParticleSystem, cutoffDistance: samson.DataModel.Quantity.unitsSI) None

Bases: samson.Simulation.NeighborSearch.ParticleSystem

This class describes a grid-based neighbor search algorithm that can be applied to particle systems.

areNeighbors(*args, **kwargs)

Overloaded function.

  1. areNeighbors(self: samson.Simulation.NeighborSearch.ParticleSystem, i: int, j: int) -> bool

Returns whether particles with indices i and j are neighbors

  1. areNeighbors(self: samson.Simulation.NeighborSearch.ParticleSystem, structuralParticleI: samson.Modeling.StructuralModel.Particle, structuralParticleJ: samson.Modeling.StructuralModel.Particle) -> bool

Returns whether structural particles structuralParticleI and structuralParticleJ are neighbors

getMemoryFootprint(self: samson.Core.Reference.ReferenceTarget) int

Returns the memory footprint

getNeighborVector(self: samson.Simulation.NeighborSearch.ParticleSystem, i: int) std::vector<SBMStructuralModelNodeParticle*, std::allocator<SBMStructuralModelNodeParticle*> >

Returns indexer of all structural particles which are neighbors for i-th particle

getNeighbors(*args, **kwargs)

Overloaded function.

  1. getNeighbors(self: samson.Simulation.NeighborSearch.ParticleSystem, position: samson.DataModel.Type.vector3, radius: samson.DataModel.Quantity.unitsSI) -> std::vector<SBMStructuralModelNodeParticle*, std::allocator<SBMStructuralModelNodeParticle*> >

Returns vector of all structural particles that are at a distance smaller than or equal to radius from the specified position

  1. getNeighbors(self: samson.Simulation.NeighborSearch.ParticleSystem, box: samson.DataModel.Type.intervalVector3) -> std::vector<SBMStructuralModelNodeParticle*, std::allocator<SBMStructuralModelNodeParticle*> >

Returns vector of all structural particles inside the box

initializeNeighborLists(self: samson.Simulation.NeighborSearch.ParticleSystem) None

Initializes the neighbor list

updateNeighborLists(self: samson.Simulation.NeighborSearch.ParticleSystem) None

Updates the neighbor list