mpacts.commands.time_evolution. rotatebody

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

import mpacts.commands.time_evolution.rotatebody
#or assign it to a shorter name
import mpacts.commands.time_evolution.rotatebody as rot


class mpacts.commands.time_evolution.rotatebody.RotateBodyCommand

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

Rotates a rigidbody with a given omega around a certain axis, and sets the corresponding orientation ‘q’ and angular velocity ‘w’
Default location: ‘loop_cmds/integration_cmds’
  • Required keywords:
    • axis — The axis of rotation (will be normalized automatically)
    • pc — Particle container on which the command is applied
    • w — The angular velocity of axis of rotation.
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • particle_idx (default value = -1) — The indices of the rigid body in the container that will be rotated. If no index is given, the command will be applied on every particle.
    • pre_multiply (default value = 0) — Pre-multiplies the increment with existing orientation instead of postmultiply.
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • q (default value = None) — Array to which the orientation is written to. Defaults to ‘q’
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, axis, w, [gate, predicate, particle_idx, pre_multiply, q]
RotateBodyCommand(name, parent, **kwargs)