mpacts.commands.geometry. regulargrid

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

import mpacts.commands.geometry.regulargrid
#or assign it to a shorter name
import mpacts.commands.geometry.regulargrid as reg

IntArrayToRegularSparseGridCommand

class mpacts.commands.geometry.regulargrid.IntArrayToRegularSparseGridCommand

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

Command that assembles a given ‘int’ type array to a regular grid with int values, based on a given position array ‘x’ that corresponds to ‘array’.
Default location: ‘loop_cmds/pre_integration_cmds’
  • Required keywords:
    • array — Array which will be assembled to the regular grid
    • grid — Regular grid with elements of the same type as array that we will assemble the values towards
    • 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.
    • x (default value = None) — Array with positions for each value in ‘array’ that will be used to locate the proper grid cell. If not provided, the array with name ‘x’ will be searched in the particle container
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, array, grid, [gate, predicate, x]
IntArrayToRegularSparseGridCommand(name, parent, **kwargs)

RegularSparseGridToScalarArrayCommand

class mpacts.commands.geometry.regulargrid.RegularSparseGridToScalarArrayCommand

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

Command that sets the Scalar value of a given array to the value of the grid cell corresponding to its position.
Default location: ‘loop_cmds/pre_integration_cmds’
  • Required keywords:
    • array — Array in which regular grid values will be stored
    • grid — Regular grid with elements of the same type as array that we will assemble the values towards
    • 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.
    • x (default value = None) — Array with positions for each value in ‘array’ that will be used to locate the proper grid cell. If not provided, the array with name ‘x’ will be searched in the particle container
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, array, grid, [gate, predicate, x]
RegularSparseGridToScalarArrayCommand(name, parent, **kwargs)

ScalarArrayToRegularFullGridCommand

class mpacts.commands.geometry.regulargrid.ScalarArrayToRegularFullGridCommand

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

Command that assembles a given ‘Scalar’ type array to a regular full grid with Scalar values, based on a given position array ‘x’ that corresponds to ‘array’.
Default location: ‘loop_cmds/pre_integration_cmds’
  • Required keywords:
    • array — Array which will be assembled to the regular grid
    • grid — Regular grid with elements of the same type as array that we will assemble the values towards
    • 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.
    • x (default value = None) — Array with positions for each value in ‘array’ that will be used to locate the proper grid cell. If not provided, the array with name ‘x’ will be searched in the particle container
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, array, grid, [gate, predicate, x]
ScalarArrayToRegularFullGridCommand(name, parent, **kwargs)

ScalarArrayToRegularSparseGridCommand

class mpacts.commands.geometry.regulargrid.ScalarArrayToRegularSparseGridCommand

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

Command that assembles a given ‘Scalar’ type array to a regular grid with Scalar values, based on a given position array ‘x’ that corresponds to ‘array’.
Default location: ‘loop_cmds/pre_integration_cmds’
  • Required keywords:
    • array — Array which will be assembled to the regular grid
    • grid — Regular grid with elements of the same type as array that we will assemble the values towards
    • 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.
    • x (default value = None) — Array with positions for each value in ‘array’ that will be used to locate the proper grid cell. If not provided, the array with name ‘x’ will be searched in the particle container
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, array, grid, [gate, predicate, x]
ScalarArrayToRegularSparseGridCommand(name, parent, **kwargs)

VectorArrayToRegularSparseGridCommand

class mpacts.commands.geometry.regulargrid.VectorArrayToRegularSparseGridCommand

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

Command that assembles a given ‘Vector’ type array to a regular grid with Vector values, based on a given position array ‘x’ that corresponds to ‘array’.
Default location: ‘loop_cmds/pre_integration_cmds’
  • Required keywords:
    • array — Array which will be assembled to the regular grid
    • grid — Regular grid with elements of the same type as array that we will assemble the values towards
    • 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.
    • x (default value = None) — Array with positions for each value in ‘array’ that will be used to locate the proper grid cell. If not provided, the array with name ‘x’ will be searched in the particle container
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, array, grid, [gate, predicate, x]
VectorArrayToRegularSparseGridCommand(name, parent, **kwargs)