Object binding¶
-
class
ObjectBindingInteraction
: public mirheo::Interaction¶ Compute binding interaction used to attach two ParticleVector together.
The interaction has the form of that of a linear spring with constant kBound.
Public Functions
-
ObjectBindingInteraction
(const MirState *state, std::string name, real kBound, std::vector<int2> pairs)¶ Construct an ObjectBindingInteraction interaction.
- Parameters
state
: The global state of the system.name
: The name of the interaction.kBound
: The force coefficient (spring constant).pairs
: The list of pairs of particles that will interact with each other. A pair contains the global ids of the first ParticleVector (first entry) and the second ParticleVector (second entry).
-
void
local
(ParticleVector *pv1, ParticleVector *pv2, CellList *cl1, CellList *cl2, cudaStream_t stream)¶ Compute interactions between bulk particles.
The result of the interaction is
added to the corresponding channel of the ParticleVector. The order of pv1 and pv2 may change the performance of the interactions.- Parameters
pv1
: first interacting ParticleVectorpv2
: second interacting ParticleVector. If it is the same as the pv1, self interactions will be computed.cl1
: cell-list built for the appropriate cut-off radius for pv1cl2
: cell-list built for the appropriate cut-off radius for pv2stream
: Execution stream
-
void
halo
(ParticleVector *pv1, ParticleVector *pv2, CellList *cl1, CellList *cl2, cudaStream_t stream)¶ Compute interactions between bulk particles and halo particles.
The result of the interaction is
added to the corresponding channel of the ParticleVector. In general, the following interactions will be computed: pv1->halo() <> pv2->local() and pv2->halo() <> pv1->local().- Parameters
pv1
: first interacting ParticleVectorpv2
: second interacting ParticleVector. If it is the same as the pv1, self interactions will be computed.cl1
: cell-list built for the appropriate cut-off radius for pv1cl2
: cell-list built for the appropriate cut-off radius for pv2stream
: Execution stream
-