mpacts.commands.geometry. cylinder

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

import mpacts.commands.geometry.cylinder
#or assign it to a shorter name
import mpacts.commands.geometry.cylinder as cyl

ComputeCylinderCenter

class mpacts.commands.geometry.cylinder.ComputeCylinderCenter

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

Command for computing the center point as the Euclidean mean of the two endpoints of the cylinder. The center point will be kept in an array ‘x’ which can be used e.g. by single-grid contact detection algorithms.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
    • x — Array with positions of the Ngon corners
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, x, [gate, predicate]
ComputeCylinderCenter(name, parent, **kwargs)

ComputeCylinderIndexListCommand

class mpacts.commands.geometry.cylinder.ComputeCylinderIndexListCommand

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

Command for calculating a list of cylinders/edges per node for a body. The array nodeIndexList (type std::vector<R3::Index_t> ) which is passed as argument stores the list of cylinders/edges connected to a given node.

Attention

The command shall be applied on particle container containing segments.

Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • nodeIndexList — Array of std::vector<R3::Index_t> containing list of primitives connected to each node
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, nodeIndexList, [gate, predicate]
ComputeCylinderIndexListCommand(name, parent, **kwargs)

ComputeDeformableCylinderAxisAndLengthCommand

class mpacts.commands.geometry.cylinder.ComputeDeformableCylinderAxisAndLengthCommand

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

Command for computing the axis \hat{t} and length \ell of the cylinder along the axis. The length is stored in the array l and the axis in array t.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate]
ComputeDeformableCylinderAxisAndLengthCommand(name, parent, **kwargs)

ComputeEnclosedAreaCommand

class mpacts.commands.geometry.cylinder.ComputeEnclosedAreaCommand

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

Command for computing the total area that is enclosed by a set of line segments. Used for area conservation in 2D simulations.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • nodes — Array Manager containing the nodes of the deformable body.
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, nodes, [gate, predicate]
ComputeEnclosedAreaCommand(name, parent, **kwargs)

ComputeHingeOutwardNormalsCommand

class mpacts.commands.geometry.cylinder.ComputeHingeOutwardNormalsCommand

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

Computes the outward normal (defined by the order of the vertices in the hinge cylindervector) of a hinge of a node and two cylinders.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • cylinders — Array Manager containing the nodes of the deformable body.
    • nodeIndexList — Array with std::vector<R3::Index_t> containing the indices of cylinders/edges connected to each node.
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • default_axis (default value = 0 1 0) — if the cylinders/edges align in a line (hence have no well-defined axis), this is taken as the hinge axis. Will be normalized!
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, cylinders, nodeIndexList, [gate, predicate, default_axis]
ComputeHingeOutwardNormalsCommand(name, parent, **kwargs)

ComputeSegmentAxisCommand

class mpacts.commands.geometry.cylinder.ComputeSegmentAxisCommand

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

Command to compute a direction ‘axis’ for a cylinder/segment/capsule particle container that is stored as an array.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • axis — Array in which the computed axis will be stored
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • normalize (default value = 1) — If ‘True’, the computed axis will be normalized by this command.
    • 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, axis, [gate, predicate, normalize]
ComputeSegmentAxisCommand(name, parent, **kwargs)

ComputeSegmentLengthCommand

class mpacts.commands.geometry.cylinder.ComputeSegmentLengthCommand

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

Command for computing the total length of a segment. TODO: this should be merged with ComputeDeformableCylinderAxisAndLengthCommand to a generic and clean version that can do both almost identical functionalities!
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • nodes — Array Manager containing the nodes of the deformable segments.
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, nodes, [gate, predicate]
ComputeSegmentLengthCommand(name, parent, **kwargs)

EnclosedAreaConservationForceCommand

class mpacts.commands.geometry.cylinder.EnclosedAreaConservationForceCommand

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

Command for generating a force to try to maintain total area that is enclosed by a set of line segments.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • kd — Area conservation stiffness.
    • nodes — Array Manager containing the nodes of the deformable body.
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • dual_kd (default value = 0) — Parameter that defines difference in area conservation stiffness for A/A0<1 and A/A0>1 (1=on, 0=off)
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • kd_pos (default value = 0) — Area conservation stiffness for A/A0 > 1
    • lower_bound_only (default value = 0) — Parameter that defines lower bound area conservation only (1=on, 0=off)
    • 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, nodes, kd, [gate, predicate, lower_bound_only, dual_kd, kd_pos]
EnclosedAreaConservationForceCommand(name, parent, **kwargs)

EnclosedAreaConservationForceNormCommand

class mpacts.commands.geometry.cylinder.EnclosedAreaConservationForceNormCommand

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

Command for generating a force to try to maintain total area that is enclosed by a set of line segments.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • kd — Area conservation stiffness.
    • nodes — Array Manager containing the nodes of the deformable body.
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • dual_kd (default value = 0) — Parameter that defines difference in area conservation stiffness for A/A0<1 and A/A0>1 (1=on, 0=off)
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • kd_pos (default value = 0) — Area conservation stiffness for A/A0 > 1
    • lower_bound_only (default value = 0) — Parameter that defines lower bound area conservation only (1=on, 0=off)
    • 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, nodes, kd, [gate, predicate, lower_bound_only, dual_kd, kd_pos]
EnclosedAreaConservationForceNormCommand(name, parent, **kwargs)