mpacts.commands.geometry. quad

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

import mpacts.commands.geometry.quad
#or assign it to a shorter name
import mpacts.commands.geometry.quad as qua

ComputeLocalDiameterCommand

class mpacts.commands.geometry.quad.ComputeLocalDiameterCommand

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

Computes the local ‘diameter’ for each quad in the particle container. For this, we compute the first intersection point in our body, perpendicular to the quad’s normal. The distance between that intersection point and the center of our quad gives the local diameter.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • diameter — Array in which to store the local diameter per primitive.
    • pc — Particle container on which the command is applied
    • x — Array with positions of the primitives’ corners
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • max_diameter (default value = 1.7976931348623157e+308) — Maximal diameter for a given primitive.
    • 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, diameter, [gate, predicate, max_diameter]
ComputeLocalDiameterCommand(name, parent, **kwargs)

ComputeQuadCentersCommand

class mpacts.commands.geometry.quad.ComputeQuadCentersCommand

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

Command for computing the center point as the Euclidean mean of the four corner points of the quad. The center point will be kept in an array ‘x’ which can be used e.g. by single-grid contact detection algorithms. Center position \vec{x}_c = \frac{1}{4} \sum_i^4 \vec{x}_i.
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]
ComputeQuadCentersCommand(name, parent, **kwargs)

ComputeQuadIndexListCommand

class mpacts.commands.geometry.quad.ComputeQuadIndexListCommand

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

Command for calculating a list of quads per node for a body. The array ‘nodeIndexList’ (type std::vector<R3::Index_t> ) which is passed as argument stores the list of triangles found for a given node.
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]
ComputeQuadIndexListCommand(name, parent, **kwargs)

ComputeQuadNormalsCommand

class mpacts.commands.geometry.quad.ComputeQuadNormalsCommand

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

Command for computing the normals of the quads which are stored in the normal array. It assumes all four nodes are located in the same plane. If an array ‘area’ is present, this command will also compute the quad area and store it in this array.
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 primitives’ 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]
ComputeQuadNormalsCommand(name, parent, **kwargs)