mpacts.commands.onarrays. linearcombination

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

import mpacts.commands.onarrays.linearcombination
#or assign it to a shorter name
import mpacts.commands.onarrays.linearcombination as lin

DividePointByCountCommand

class mpacts.commands.onarrays.linearcombination.DividePointByCountCommand

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

Divide a ‘Point’ array with an Index ‘count’ array.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • array — Array for which the sum is to be computed.
    • count_array — Array with Index values by which ‘array’ will be divided. (e.g. number_of_effective_contacts)
    • 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, array, count_array, [gate, predicate]
DividePointByCountCommand(name, parent, **kwargs)

DivideScalarByCountCommand

class mpacts.commands.onarrays.linearcombination.DivideScalarByCountCommand

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

Divide a ‘Scalar’ array with an Index ‘count’ array.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • array — Array for which the sum is to be computed.
    • count_array — Array with Index values by which ‘array’ will be divided. (e.g. number_of_effective_contacts)
    • 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, array, count_array, [gate, predicate]
DivideScalarByCountCommand(name, parent, **kwargs)

DivideTensorByCountCommand

class mpacts.commands.onarrays.linearcombination.DivideTensorByCountCommand

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

Divide a ‘SymmetricMatrix’ array with an Index ‘count’ array.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • array — Array for which the sum is to be computed.
    • count_array — Array with Index values by which ‘array’ will be divided. (e.g. number_of_effective_contacts)
    • 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, array, count_array, [gate, predicate]
DivideTensorByCountCommand(name, parent, **kwargs)

DivideVectorByCountCommand

class mpacts.commands.onarrays.linearcombination.DivideVectorByCountCommand

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

Divide a ‘Vector’ array with an Index ‘count’ array.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • array — Array for which the sum is to be computed.
    • count_array — Array with Index values by which ‘array’ will be divided. (e.g. number_of_effective_contacts)
    • 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, array, count_array, [gate, predicate]
DivideVectorByCountCommand(name, parent, **kwargs)

LinearCombinationCommand

class mpacts.commands.onarrays.linearcombination.LinearCombinationCommand

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

Command which sets the ‘result’ array with the linear combination of two other arrays.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • a — Parameter with which array1 will be multiplied.
    • array1 — First array to be combined with another array (of the same type).
    • array2 — Second array to be combined with another array (of the same type).
    • b — Parameter with which array2 will be multiplied.
    • pc — particle container of arrays.
    • result — Array into which result is stored.
  • 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 deciding whether the command should be executed for a given particle
object __init__(tuple args, dict kwds) :
args: name, parent kwds: result, array1, array2, pc, a, b, [gate, predicate]
LinearCombinationCommand(name, parent, **kwargs)