mpacts.commands.onparticles. setactive

In order to be able to use this module import it like this:

import mpacts.commands.onparticles.setactive
#or assign it to a shorter name
import mpacts.commands.onparticles.setactive as set

SetActiveParticles

class mpacts.commands.onparticles.setactive.SetActiveParticles

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

A command that will make sure that particles that do not conform to a predicate do not take part in the simulation. This is done by setting them inactive, causing the loop of all supporting loopfunctor commands to loop only over active particles
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — The particle container to which this command will be applied
    • predicate — Predicate deciding whether a particle is active or not active (true is active).
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
object __init__(tuple args, dict kwds) :
args: name, parent kwds: predicate, pc, [gate]
SetActiveParticles(name, parent, **kwargs)

SetActiveParticlesBasedOnParent

class mpacts.commands.onparticles.setactive.SetActiveParticlesBasedOnParent

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Will set the particles of this manager active or not depending on whether the parent particle is active or not.Requires a parent node that needs to be an arraymanager. Furthermore the pc on which this command is applied needs an parentIndex array
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — The particle container to which this command will be applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate]
SetActiveParticlesBasedOnParent(name, parent, **kwargs)