Top

pyjet module

Fluid simulation engine for computer graphics applications

Module variables

var ALL

var DEBUG

var DIRECTION_ALL

var DIRECTION_BACK

var DIRECTION_DOWN

var DIRECTION_FRONT

var DIRECTION_LEFT

var DIRECTION_NONE

var DIRECTION_RIGHT

var DIRECTION_UP

var ERROR

var INFO

var OFF

var WARN

Classes

class AdvectionSolver2

Abstract based class for 2-D grid-based advection solver.

The implementation of this abstract base class should solve 2-D advection equation for scalar and vector fields.

Ancestors (in MRO)

class AdvectionSolver3

Abstract based class for 3-D grid-based advection solver.

The implementation of this abstract base class should solve 3-D advection equation for scalar and vector fields.

Ancestors (in MRO)

class Animation

Abstract base class for animation-related class.

This class represents the animation logic in very abstract level. Generally animation is a function of time and/or its previous state. This base class provides a virtual function update() which can be overriden by its sub-classes to implement their own state update logic.

Ancestors (in MRO)

  • Animation
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

Methods

def __init__(

...)

init(self: pyjet.Animation) -> None

def update(

...)

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class AnisotropicPointsToImplicit2

2-D points-to-implicit converter using Anisotropic kernels.

\see Yu, Jihun, and Greg Turk. "Reconstructing surfaces of particle-based fluids using anisotropic kernels." ACM Transactions on Graphics (TOG) 32.1 (2013): 5.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.AnisotropicPointsToImplicit2, kernelRadius: float=1.0, cutOffDensity: float=0.5, positionSmoothingFactor: float=0.5, minNumNeighbors: int=8L, isOutputSdf: bool=True) -> None

Constructs the converter with given kernel radius and cut-off density.

Parameters

  • kernelRadius : Smoothing kernel radius.
  • cutOffDensity : Iso-contour value.
  • positionSmoothingFactor : Position smoothing factor.
  • minNumNeighbors : Minimum number of neighbors to enable anisotropic kernel.
  • isOutputSdf : True if the output should be signed-distance field.

def convert(

...)

Inheritance: PointsToImplicit2.convert

convert(self: pyjet.PointsToImplicit2, points: list, output: pyjet.ScalarGrid2) -> None

Converts the given points to implicit surface scalar field.

Parameters

  • points : List of 2D vectors.
  • output : Scalar grid output.

class AnisotropicPointsToImplicit3

3-D points-to-implicit converter using Anisotropic kernels.

\see Yu, Jihun, and Greg Turk. "Reconstructing surfaces of particle-based fluids using anisotropic kernels." ACM Transactions on Graphics (TOG) 32.1 (2013): 5.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.AnisotropicPointsToImplicit3, kernelRadius: float=1.0, cutOffDensity: float=0.5, positionSmoothingFactor: float=0.5, minNumNeighbors: int=25L, isOutputSdf: bool=True) -> None

Constructs the converter with given kernel radius and cut-off density.

Parameters

  • kernelRadius : Smoothing kernel radius.
  • cutOffDensity : Iso-contour value.
  • positionSmoothingFactor : Position smoothing factor.
  • minNumNeighbors : Minimum number of neighbors to enable anisotropic kernel.
  • isOutputSdf : True if the output should be signed-distance field.

def convert(

...)

Inheritance: PointsToImplicit3.convert

convert(self: pyjet.PointsToImplicit3, points: list, output: pyjet.ScalarGrid3) -> None

Converts the given points to implicit surface scalar field.

Parameters

  • points : List of 3D vectors.
  • output : Scalar grid output.

class ApicSolver2

2-D Affine Particle-in-Cell (APIC) implementation

This class implements 2-D Affine Particle-in-Cell (APIC) solver from the SIGGRAPH paper, Jiang 2015.

See: Jiang, Chenfanfu, et al. "The affine particle-in-cell method." ACM Transactions on Graphics (TOG) 34.4 (2015): 51.

Ancestors (in MRO)

Instance variables

var advectionSolver

Inheritance: PicSolver2.advectionSolver

The advection solver.

var closedDomainBoundaryFlag

Inheritance: PicSolver2.closedDomainBoundaryFlag

The closed domain boundary flag.

This flag is an integer which is bitwise-combination of DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_UP, and DIRECTION_BACK.

var collider

Inheritance: PicSolver2.collider

The collider.

var currentFrame

Inheritance: PicSolver2.currentFrame

var currentTimeInSeconds

Inheritance: PicSolver2.currentTimeInSeconds

var diffusionSolver

Inheritance: PicSolver2.diffusionSolver

The diffusion solver instance.

var emitter

Inheritance: PicSolver2.emitter

The emitter.

var gravity

Inheritance: PicSolver2.gravity

The gravity vector of the system.

var gridOrigin

Inheritance: PicSolver2.gridOrigin

The origin of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.origin., but provides a shortcut.

var gridSpacing

Inheritance: PicSolver2.gridSpacing

The grid spacing of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.gridSpacing., but provides a shortcut.

var isUsingFixedSubTimeSteps

Inheritance: PicSolver2.isUsingFixedSubTimeSteps

var maxCfl

Inheritance: PicSolver2.maxCfl

The max allowed CFL number.

var numberOfFixedSubTimeSteps

Inheritance: PicSolver2.numberOfFixedSubTimeSteps

var particleEmitter

Inheritance: PicSolver2.particleEmitter

Particle emitter property.

var particleSystemData

Inheritance: PicSolver2.particleSystemData

Returns particleSystemData.

var pressureSolver

Inheritance: PicSolver2.pressureSolver

The pressure solver instance.

var resolution

Inheritance: PicSolver2.resolution

The resolution of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.resolution, but provides a shortcut.

var velocity

Inheritance: PicSolver2.velocity

The velocity field.

This property returns the velocity field from the grid system data. It is just a shortcut to the most commonly accessed data chunk.

var viscosityCoefficient

Inheritance: PicSolver2.viscosityCoefficient

The viscosity coefficient.

Methods

def __init__(

...)

Inheritance: PicSolver2.__init__

init(self: pyjet.ApicSolver2, args, *kwargs) -> None

Constructs ApicSolver2

This method constructs ApicSolver2 with resolution, gridSpacing, and gridOrigin.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def advanceSingleFrame(

...)

Inheritance: PicSolver2.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def cfl(

...)

Inheritance: PicSolver2.cfl

cfl(self: pyjet.GridFluidSolver2, timeIntervalInSeconds: float) -> float

Returns the CFL number from the current velocity field for given time interval.

Parameters

  • timeIntervalInSeconds : The time interval in seconds.

def resizeGrid(

...)

Inheritance: PicSolver2.resizeGrid

resizeGrid(self: pyjet.GridFluidSolver2, args, *kwargs) -> None

Resizes grid system data.

This function resizes grid system data. You can also resize the grid by calling resize function directly from GridFluidSolver2::gridSystemData(), but this function provides a shortcut for the same operation.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def update(

...)

Inheritance: PicSolver2.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class ApicSolver3

3-D Affine Particle-in-Cell (APIC) implementation

This class implements 3-D Affine Particle-in-Cell (APIC) solver from the SIGGRAPH paper, Jiang 2015.

See: Jiang, Chenfanfu, et al. "The affine particle-in-cell method." ACM Transactions on Graphics (TOG) 34.4 (2015): 51.

Ancestors (in MRO)

Instance variables

var advectionSolver

Inheritance: PicSolver3.advectionSolver

The advection solver.

var closedDomainBoundaryFlag

Inheritance: PicSolver3.closedDomainBoundaryFlag

The closed domain boundary flag.

This flag is an integer which is bitwise-combination of DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_UP, DIRECTION_BACK, and DIRECTION_FRONT. Default is DIRECTION_ALL.

var collider

Inheritance: PicSolver3.collider

The collider.

var currentFrame

Inheritance: PicSolver3.currentFrame

var currentTimeInSeconds

Inheritance: PicSolver3.currentTimeInSeconds

var diffusionSolver

Inheritance: PicSolver3.diffusionSolver

The diffusion solver instance.

var emitter

Inheritance: PicSolver3.emitter

The emitter.

var gravity

Inheritance: PicSolver3.gravity

The gravity vector of the system.

var gridOrigin

Inheritance: PicSolver3.gridOrigin

The origin of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.origin., but provides a shortcut.

var gridSpacing

Inheritance: PicSolver3.gridSpacing

The grid spacing of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.gridSpacing., but provides a shortcut.

var isUsingFixedSubTimeSteps

Inheritance: PicSolver3.isUsingFixedSubTimeSteps

var maxCfl

Inheritance: PicSolver3.maxCfl

The max allowed CFL number.

var numberOfFixedSubTimeSteps

Inheritance: PicSolver3.numberOfFixedSubTimeSteps

var particleEmitter

Inheritance: PicSolver3.particleEmitter

Particle emitter property.

var particleSystemData

Inheritance: PicSolver3.particleSystemData

Returns particleSystemData.

var pressureSolver

Inheritance: PicSolver3.pressureSolver

The pressure solver instance.

var resolution

Inheritance: PicSolver3.resolution

The resolution of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.resolution, but provides a shortcut.

var velocity

Inheritance: PicSolver3.velocity

The velocity field.

This property returns the velocity field from the grid system data. It is just a shortcut to the most commonly accessed data chunk.

var viscosityCoefficient

Inheritance: PicSolver3.viscosityCoefficient

The viscosity coefficient.

Methods

def __init__(

...)

Inheritance: PicSolver3.__init__

init(self: pyjet.ApicSolver3, args, *kwargs) -> None

Constructs ApicSolver3

This method constructs ApicSolver3 with resolution, gridSpacing, and gridOrigin.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def advanceSingleFrame(

...)

Inheritance: PicSolver3.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def cfl(

...)

Inheritance: PicSolver3.cfl

cfl(self: pyjet.GridFluidSolver3, timeIntervalInSeconds: float) -> float

Returns the CFL number from the current velocity field for given time interval.

Parameters

  • timeIntervalInSeconds : The time interval in seconds.

def resizeGrid(

...)

Inheritance: PicSolver3.resizeGrid

resizeGrid(self: pyjet.GridFluidSolver3, args, *kwargs) -> None

Resizes grid system data.

This function resizes grid system data. You can also resize the grid by calling resize function directly from GridFluidSolver2::gridSystemData(), but this function provides a shortcut for the same operation.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def update(

...)

Inheritance: PicSolver3.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class ArrayAccessor1D

Ancestors (in MRO)

class ArrayAccessor1F

Ancestors (in MRO)

class ArrayAccessor1Vector2D

Ancestors (in MRO)

class ArrayAccessor1Vector2F

Ancestors (in MRO)

class ArrayAccessor1Vector3D

Ancestors (in MRO)

class ArrayAccessor1Vector3F

Ancestors (in MRO)

class ArrayAccessor1Vector4D

Ancestors (in MRO)

class ArrayAccessor1Vector4F

Ancestors (in MRO)

class ArrayAccessor2D

Ancestors (in MRO)

class ArrayAccessor2F

Ancestors (in MRO)

class ArrayAccessor3D

Ancestors (in MRO)

class ArrayAccessor3F

Ancestors (in MRO)

class BoundingBox2D

2-D axis-aligned bounding box class (64-bit float).

Ancestors (in MRO)

  • BoundingBox2D
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var height

Height of the box.

var lowerCorner

Lower corner of the bounding box.

var upperCorner

Upper corner of the bounding box.

var width

Width of the box.

Methods

def __init__(

...)

init(self: pyjet.BoundingBox2D, *args) -> None

Constructs BoundingBox2D

This method constructs 2-D bounding box with lower and upper corners with 64-bit precision.

Parameters

  • *args : Lower and upper corner of the bounding box. If empty, empty box will be created. Must be size of 0 or 2.

def clamp(

...)

clamp(self: pyjet.BoundingBox2D, point: pyjet.Vector2D) -> pyjet.Vector2D

Returns the clamped point.

Parameters

  • point : Point to clamp.

def closestIntersection(

...)

closestIntersection(self: pyjet.BoundingBox2D, ray: pyjet.Ray2D) -> pyjet.BoundingBoxRayIntersection2D

Returns closest intersection for given ray.

Returns intersection.isIntersecting = true if the input ray is intersecting with this box. If interesects, intersection.tNear is assigned with distant to the closest intersecting point, and intersection.tFar with furthest.

Parameters

  • ray : Ray to test.

def contains(

...)

contains(self: pyjet.BoundingBox2D, point: object) -> bool

Returns true if the input vector is inside of this box.

Parameters

  • point : Point to test.

def corner(

...)

corner(self: pyjet.BoundingBox2D, idx: int) -> pyjet.Vector2D

Returns corner position. Index starts from x-first order.

Parameters

  • idx : Index of the corner.

def diagonalLength(

...)

diagonalLength(self: pyjet.BoundingBox2D) -> float

Returns diagonal length of this box.

def diagonalLengthSquared(

...)

diagonalLengthSquared(self: pyjet.BoundingBox2D) -> float

Returns squared diagonal length of this box.

def expand(

...)

expand(self: pyjet.BoundingBox2D, delta: float) -> None

Expands this box by given delta to all direction.

If the width of the box was x, expand(y) will result a box with x+y+y width.

Parameters

  • delta : Amount to expand.

def intersects(

...)

intersects(self: pyjet.BoundingBox2D, ray: pyjet.Ray2D) -> bool

Returns true if the input ray is intersecting with this box.

Parameters

  • ray : Ray to test.

def isEmpty(

...)

isEmpty(self: pyjet.BoundingBox2D) -> bool

Returns true if the box is empty.

def length(

...)

length(self: pyjet.BoundingBox2D, axis: int) -> float

Returns length of the box in given axis.

Parameters

  • axis : 0 or 1.

def merge(

...)

merge(self: pyjet.BoundingBox2D, other: object) -> None

Merges this and other point or box.

Parameters

  • other : Other point or bounding box to test with.

def midPoint(

...)

midPoint(self: pyjet.BoundingBox2D) -> pyjet.Vector2D

Returns the mid-point of this box.

def overlaps(

...)

overlaps(self: pyjet.BoundingBox2D, other: pyjet.BoundingBox2D) -> bool

Returns true of this box and other box overlaps.

Parameters

  • other : Other bounding box to test with.

def reset(

...)

reset(self: pyjet.BoundingBox2D) -> None

Resets this box to initial state (min=infinite, max=-infinite).

class BoundingBox2F

2-D axis-aligned bounding box class (32-bit float).

Ancestors (in MRO)

  • BoundingBox2F
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var height

Height of the box.

var lowerCorner

Lower corner of the bounding box.

var upperCorner

Upper corner of the bounding box.

var width

Width of the box.

Methods

def __init__(

...)

init(self: pyjet.BoundingBox2F, *args) -> None

Constructs BoundingBox2F

This method constructs 2-D bounding box with lower and upper corners with 32-bit precision.

Parameters

  • *args : Lower and upper corner of the bounding box. If empty, empty box will be created. Must be size of 0 or 2.

def clamp(

...)

clamp(self: pyjet.BoundingBox2F, point: pyjet.Vector2F) -> pyjet.Vector2F

Returns the clamped point.

Parameters

  • point : Point to clamp.

def closestIntersection(

...)

closestIntersection(self: pyjet.BoundingBox2F, ray: pyjet.Ray2F) -> pyjet.BoundingBoxRayIntersection2F

Returns closest intersection for given ray.

Returns intersection.isIntersecting = true if the input ray is intersecting with this box. If interesects, intersection.tNear is assigned with distant to the closest intersecting point, and intersection.tFar with furthest.

Parameters

  • ray : Ray to test.

def contains(

...)

contains(self: pyjet.BoundingBox2F, point: object) -> bool

Returns true if the input vector is inside of this box.

Parameters

  • point : Point to test.

def corner(

...)

corner(self: pyjet.BoundingBox2F, idx: int) -> pyjet.Vector2F

Returns corner position. Index starts from x-first order.

Parameters

  • idx : Index of the corner.

def diagonalLength(

...)

diagonalLength(self: pyjet.BoundingBox2F) -> float

Returns diagonal length of this box.

def diagonalLengthSquared(

...)

diagonalLengthSquared(self: pyjet.BoundingBox2F) -> float

Returns squared diagonal length of this box.

def expand(

...)

expand(self: pyjet.BoundingBox2F, delta: float) -> None

Expands this box by given delta to all direction.

If the width of the box was x, expand(y) will result a box with x+y+y width.

Parameters

  • delta : Amount to expand.

def intersects(

...)

intersects(self: pyjet.BoundingBox2F, ray: pyjet.Ray2F) -> bool

Returns true if the input ray is intersecting with this box.

Parameters

  • ray : Ray to test.

def isEmpty(

...)

isEmpty(self: pyjet.BoundingBox2F) -> bool

Returns true if the box is empty.

def length(

...)

length(self: pyjet.BoundingBox2F, axis: int) -> float

Returns length of the box in given axis.

Parameters

  • axis : 0 or 1.

def merge(

...)

merge(self: pyjet.BoundingBox2F, other: object) -> None

Merges this and other point or box.

Parameters

  • other : Other point or bounding box to test with.

def midPoint(

...)

midPoint(self: pyjet.BoundingBox2F) -> pyjet.Vector2F

Returns the mid-point of this box.

def overlaps(

...)

overlaps(self: pyjet.BoundingBox2F, other: pyjet.BoundingBox2F) -> bool

Returns true of this box and other box overlaps.

Parameters

  • other : Other bounding box to test with.

def reset(

...)

reset(self: pyjet.BoundingBox2F) -> None

Resets this box to initial state (min=infinite, max=-infinite).

class BoundingBox3D

3-D axis-aligned bounding box class (64-bit float).

Ancestors (in MRO)

  • BoundingBox3D
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var depth

Depth of the box.

var height

Height of the box.

var lowerCorner

Lower corner of the bounding box.

var upperCorner

Upper corner of the bounding box.

var width

Width of the box.

Methods

def __init__(

...)

init(self: pyjet.BoundingBox3D, *args) -> None

Constructs BoundingBox3D

This method constructs 3-D bounding box with lower and upper corners with 64-bit precision.

Parameters

  • *args : Lower and upper corner of the bounding box. If empty, empty box will be created. Must be size of 0 or 2.

def clamp(

...)

clamp(self: pyjet.BoundingBox3D, point: pyjet.Vector3D) -> pyjet.Vector3D

Returns the clamped point.

Parameters

  • point : Point to clamp.

def closestIntersection(

...)

closestIntersection(self: pyjet.BoundingBox3D, ray: pyjet.Ray3D) -> pyjet.BoundingBoxRayIntersection3D

Returns closest intersection for given ray.

Returns intersection.isIntersecting = true if the input ray is intersecting with this box. If interesects, intersection.tNear is assigned with distant to the closest intersecting point, and intersection.tFar with furthest.

Parameters

  • ray : Ray to test.

def contains(

...)

contains(self: pyjet.BoundingBox3D, point: object) -> bool

Returns true if the input vector is inside of this box.

Parameters

  • point : Point to test.

def corner(

...)

corner(self: pyjet.BoundingBox3D, idx: int) -> pyjet.Vector3D

Returns corner position. Index starts from x-first order.

Parameters

  • idx : Index of the corner.

def diagonalLength(

...)

diagonalLength(self: pyjet.BoundingBox3D) -> float

Returns diagonal length of this box.

def diagonalLengthSquared(

...)

diagonalLengthSquared(self: pyjet.BoundingBox3D) -> float

Returns squared diagonal length of this box.

def expand(

...)

expand(self: pyjet.BoundingBox3D, delta: float) -> None

Expands this box by given delta to all direction.

If the width of the box was x, expand(y) will result a box with x+y+y width.

Parameters

  • delta : Amount to expand.

def intersects(

...)

intersects(self: pyjet.BoundingBox3D, ray: pyjet.Ray3D) -> bool

Returns true if the input ray is intersecting with this box.

Parameters

  • ray : Ray to test.

def isEmpty(

...)

isEmpty(self: pyjet.BoundingBox3D) -> bool

Returns true if the box is empty.

def length(

...)

length(self: pyjet.BoundingBox3D, axis: int) -> float

Returns length of the box in given axis.

Parameters

  • axis : 0, 1, or 2.

def merge(

...)

merge(self: pyjet.BoundingBox3D, other: object) -> None

Merges this and other point or box.

Parameters

  • other : Other point or bounding box to test with.

def midPoint(

...)

midPoint(self: pyjet.BoundingBox3D) -> pyjet.Vector3D

Returns the mid-point of this box.

def overlaps(

...)

overlaps(self: pyjet.BoundingBox3D, other: pyjet.BoundingBox3D) -> bool

Returns true of this box and other box overlaps.

Parameters

  • other : Other bounding box to test with.

def reset(

...)

reset(self: pyjet.BoundingBox3D) -> None

Resets this box to initial state (min=infinite, max=-infinite).

class BoundingBox3F

3-D axis-aligned bounding box class (32-bit float).

Ancestors (in MRO)

  • BoundingBox3F
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var depth

Depth of the box.

var height

Height of the box.

var lowerCorner

Lower corner of the bounding box.

var upperCorner

Upper corner of the bounding box.

var width

Width of the box.

Methods

def __init__(

...)

init(self: pyjet.BoundingBox3F, *args) -> None

Constructs BoundingBox3F

This method constructs 3-D bounding box with lower and upper corners with 32-bit precision.

Parameters

  • *args : Lower and upper corner of the bounding box. If empty, empty box will be created. Must be size of 0 or 2.

def clamp(

...)

clamp(self: pyjet.BoundingBox3F, point: pyjet.Vector3F) -> pyjet.Vector3F

Returns the clamped point.

Parameters

  • point : Point to clamp.

def closestIntersection(

...)

closestIntersection(self: pyjet.BoundingBox3F, ray: pyjet.Ray3F) -> pyjet.BoundingBoxRayIntersection3F

Returns closest intersection for given ray.

Returns intersection.isIntersecting = true if the input ray is intersecting with this box. If interesects, intersection.tNear is assigned with distant to the closest intersecting point, and intersection.tFar with furthest.

Parameters

  • ray : Ray to test.

def contains(

...)

contains(self: pyjet.BoundingBox3F, point: object) -> bool

Returns true if the input vector is inside of this box.

Parameters

  • point : Point to test.

def corner(

...)

corner(self: pyjet.BoundingBox3F, idx: int) -> pyjet.Vector3F

Returns corner position. Index starts from x-first order.

Parameters

  • idx : Index of the corner.

def diagonalLength(

...)

diagonalLength(self: pyjet.BoundingBox3F) -> float

Returns diagonal length of this box.

def diagonalLengthSquared(

...)

diagonalLengthSquared(self: pyjet.BoundingBox3F) -> float

Returns squared diagonal length of this box.

def expand(

...)

expand(self: pyjet.BoundingBox3F, delta: float) -> None

Expands this box by given delta to all direction.

If the width of the box was x, expand(y) will result a box with x+y+y width.

Parameters

  • delta : Amount to expand.

def intersects(

...)

intersects(self: pyjet.BoundingBox3F, ray: pyjet.Ray3F) -> bool

Returns true if the input ray is intersecting with this box.

Parameters

  • ray : Ray to test.

def isEmpty(

...)

isEmpty(self: pyjet.BoundingBox3F) -> bool

Returns true if the box is empty.

def length(

...)

length(self: pyjet.BoundingBox3F, axis: int) -> float

Returns length of the box in given axis.

Parameters

  • axis : 0, 1, or 2.

def merge(

...)

merge(self: pyjet.BoundingBox3F, other: object) -> None

Merges this and other point or box.

Parameters

  • other : Other point or bounding box to test with.

def midPoint(

...)

midPoint(self: pyjet.BoundingBox3F) -> pyjet.Vector3F

Returns the mid-point of this box.

def overlaps(

...)

overlaps(self: pyjet.BoundingBox3F, other: pyjet.BoundingBox3F) -> bool

Returns true of this box and other box overlaps.

Parameters

  • other : Other bounding box to test with.

def reset(

...)

reset(self: pyjet.BoundingBox3F) -> None

Resets this box to initial state (min=infinite, max=-infinite).

class BoundingBoxRayIntersection2D

2-D box-ray intersection result (64-bit float).

Ancestors (in MRO)

Instance variables

var isIntersecting

True if the box and ray intersects.

var tFar

Distance to the second (and the last) intersection point.

var tNear

Distance to the first intersection point.

class BoundingBoxRayIntersection2F

2-D box-ray intersection result (32-bit float).

Ancestors (in MRO)

Instance variables

var isIntersecting

True if the box and ray intersects.

var tFar

Distance to the second (and the last) intersection point.

var tNear

Distance to the first intersection point.

class BoundingBoxRayIntersection3D

3-D box-ray intersection result (64-bit float).

Ancestors (in MRO)

Instance variables

var isIntersecting

True if the box and ray intersects.

var tFar

Distance to the second (and the last) intersection point.

var tNear

Distance to the first intersection point.

class BoundingBoxRayIntersection3F

3-D box-ray intersection result (32-bit float).

Ancestors (in MRO)

Instance variables

var isIntersecting

True if the box and ray intersects.

var tFar

Distance to the second (and the last) intersection point.

var tNear

Distance to the first intersection point.

class Box2

2-D box geometry.

This class represents 2-D box geometry which extends Surface2 by overriding surface-related queries. This box implementation is an axis-aligned box that wraps lower-level primitive type, BoundingBox2D.

Ancestors (in MRO)

  • Box2
  • Surface2
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

Instance variables

var bound

var isNormalFlipped

Inheritance: Surface2.isNormalFlipped

var transform

Inheritance: Surface2.transform

Methods

def __init__(

...)

init(self: pyjet.Box2, lowerCorner: object=, upperCorner: object=, transform: pyjet.Transform2=, isNormalFlipped: bool=False) -> None

Constructs Box2

This method constructs Box2 with center, radius, height, transform, and normal direction (isNormalFlipped).

class Box3

3-D box geometry.

This class represents 3-D box geometry which extends Surface3 by overriding surface-related queries. This box implementation is an axis-aligned box that wraps lower-level primitive type, BoundingBox3D.

Ancestors (in MRO)

  • Box3
  • Surface3
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

Instance variables

var bound

var isNormalFlipped

Inheritance: Surface3.isNormalFlipped

var transform

Inheritance: Surface3.transform

Methods

def __init__(

...)

init(self: pyjet.Box3, lowerCorner: object=, upperCorner: object=, transform: pyjet.Transform3=, isNormalFlipped: bool=False) -> None

Constructs Box3

This method constructs Box3 with center, radius, height, transform, and normal direction (isNormalFlipped).

class CellCenteredScalarGrid2

2-D Cell-centered scalar grid structure.

This class represents 2-D cell-centered scalar grid which extends ScalarGrid2. As its name suggests, the class defines the data point at the center of a grid cell. Thus, the dimension of data points are equal to the dimension of the cells.

Ancestors (in MRO)

Instance variables

var dataOrigin

Returns data position for the grid point at (0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

var dataSize

Returns the actual data point size.

Methods

def __init__(

...)

init(self: pyjet.CellCenteredScalarGrid2, args, *kwargs) -> None

Constructs grid.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def dataAccessor(

...)

Inheritance: ScalarGrid2.dataAccessor

dataAccessor(self: pyjet.ScalarGrid2) -> pyjet.ArrayAccessor2D

Returns the data array accessor.

def dataPosition(

...)

Inheritance: ScalarGrid2.dataPosition

dataPosition(self: pyjet.ScalarGrid2) -> std::__1::function (unsigned long, unsigned long)>

Returns the function that maps data point to its position.

def deserialize(

...)

Inheritance: ScalarGrid2.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: ScalarGrid2.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def fill(

...)

Inheritance: ScalarGrid2.fill

fill(self: pyjet.ScalarGrid2, arg0: object) -> None

Fills the grid with given value or function.

def forEachDataPointIndex(

...)

Inheritance: ScalarGrid2.forEachDataPointIndex

forEachDataPointIndex(self: pyjet.ScalarGrid2, func: function) -> None

Invokes the given function func for each data point.

This function invokes the given function object func for each data point in serial manner. The input parameters are i and j indices of a data point. The order of execution is i-first, j-last.

def gradient(

...)

Inheritance: ScalarGrid2.gradient

gradient(self: pyjet.ScalarGrid2, x: object) -> pyjet.Vector2D

Returns the gradient vector at given position x.

def gradientAtDataPoint(

...)

Inheritance: ScalarGrid2.gradientAtDataPoint

gradientAtDataPoint(self: pyjet.ScalarGrid2, i: int, j: int) -> pyjet.Vector2D

Returns the gradient vector at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def laplacian(

...)

Inheritance: ScalarGrid2.laplacian

laplacian(self: pyjet.ScalarGrid2, x: object) -> float

Returns the Laplacian value at given position x.

def laplacianAtDataPoint(

...)

Inheritance: ScalarGrid2.laplacianAtDataPoint

laplacianAtDataPoint(self: pyjet.ScalarGrid2, i: int, j: int) -> float

Returns the Laplacian at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def resize(

...)

Inheritance: ScalarGrid2.resize

resize(self: pyjet.ScalarGrid2, args, *kwargs) -> None

Resizes the grid using given parameters.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def sample(

...)

Inheritance: ScalarGrid2.sample

sample(self: pyjet.ScalarGrid2, x: object) -> float

Returns sampled value at given position x.

def serialize(

...)

Inheritance: ScalarGrid2.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: ScalarGrid2.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

def set(

...)

set(self: pyjet.CellCenteredScalarGrid2, other: pyjet.CellCenteredScalarGrid2) -> None

Sets the contents with the given other grid.

Parameters

  • other : Other grid to copy from.

class CellCenteredScalarGrid3

3-D Cell-centered scalar grid structure.

This class represents 3-D cell-centered scalar grid which extends ScalarGrid3. As its name suggests, the class defines the data point at the center of a grid cell. Thus, the dimension of data points are equal to the dimension of the cells.

Ancestors (in MRO)

Instance variables

var dataOrigin

Returns data position for the grid point at (0, 0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

var dataSize

Returns the actual data point size.

Methods

def __init__(

...)

init(self: pyjet.CellCenteredScalarGrid3, args, *kwargs) -> None

Constructs grid.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def dataAccessor(

...)

Inheritance: ScalarGrid3.dataAccessor

dataAccessor(self: pyjet.ScalarGrid3) -> pyjet.ArrayAccessor3D

Returns the data array accessor.

def dataPosition(

...)

Inheritance: ScalarGrid3.dataPosition

dataPosition(self: pyjet.ScalarGrid3) -> std::__1::function (unsigned long, unsigned long, unsigned long)>

Returns the function that maps data point to its position.

def deserialize(

...)

Inheritance: ScalarGrid3.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: ScalarGrid3.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def fill(

...)

Inheritance: ScalarGrid3.fill

fill(self: pyjet.ScalarGrid3, arg0: object) -> None

Fills the grid with given value or function.

def forEachDataPointIndex(

...)

Inheritance: ScalarGrid3.forEachDataPointIndex

forEachDataPointIndex(self: pyjet.ScalarGrid3, func: function) -> None

Invokes the given function func for each data point.

This function invokes the given function object func for each data point in serial manner. The input parameters are i and j indices of a data point. The order of execution is i-first, j-last.

def gradient(

...)

Inheritance: ScalarGrid3.gradient

gradient(self: pyjet.ScalarGrid3, x: object) -> pyjet.Vector3D

Returns the gradient vector at given position x.

def gradientAtDataPoint(

...)

Inheritance: ScalarGrid3.gradientAtDataPoint

gradientAtDataPoint(self: pyjet.ScalarGrid3, i: int, j: int, k: int) -> pyjet.Vector3D

Returns the gradient vector at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def laplacian(

...)

Inheritance: ScalarGrid3.laplacian

laplacian(self: pyjet.ScalarGrid3, x: object) -> float

Returns the Laplacian value at given position x.

def laplacianAtDataPoint(

...)

Inheritance: ScalarGrid3.laplacianAtDataPoint

laplacianAtDataPoint(self: pyjet.ScalarGrid3, i: int, j: int, k: int) -> float

Returns the Laplacian at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def resize(

...)

Inheritance: ScalarGrid3.resize

resize(self: pyjet.ScalarGrid3, args, *kwargs) -> None

Resizes the grid using given parameters.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def sample(

...)

Inheritance: ScalarGrid3.sample

sample(self: pyjet.ScalarGrid3, x: object) -> float

Returns sampled value at given position x.

def serialize(

...)

Inheritance: ScalarGrid3.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: ScalarGrid3.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

def set(

...)

set(self: pyjet.CellCenteredScalarGrid3, other: pyjet.CellCenteredScalarGrid3) -> None

Sets the contents with the given other grid.

Parameters

  • other : Other grid to copy from.

class CellCenteredVectorGrid2

2-D Cell-centered vector grid structure.

This class represents 2-D cell-centered vector grid which extends CollocatedVectorGrid2. As its name suggests, the class defines the data point at the center of a grid cell. Thus, the dimension of data points are equal to the dimension of the cells.

Ancestors (in MRO)

Instance variables

var dataOrigin

Returns data position for the grid point at (0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

var dataSize

Returns the actual data point size.

Methods

def __init__(

...)

init(self: pyjet.CellCenteredVectorGrid2, args, *kwargs) -> None

Constructs grid.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def curl(

...)

Inheritance: CollocatedVectorGrid2.curl

curl(self: pyjet.CollocatedVectorGrid2, x: object) -> float

Returns curl at given position x.

def curlAtDataPoint(

...)

Inheritance: CollocatedVectorGrid2.curlAtDataPoint

curlAtDataPoint(self: pyjet.CollocatedVectorGrid2, i: int, j: int) -> float

Returns curl at data point location.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def dataAccessor(

...)

Inheritance: CollocatedVectorGrid2.dataAccessor

dataAccessor(self: pyjet.CollocatedVectorGrid2) -> jet::ArrayAccessor, 2ul>

Returns the data array accessor.

def dataPosition(

...)

Inheritance: CollocatedVectorGrid2.dataPosition

dataPosition(self: pyjet.CollocatedVectorGrid2) -> std::__1::function (unsigned long, unsigned long)>

Returns the function that maps data point to its position.

def deserialize(

...)

Inheritance: CollocatedVectorGrid2.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: CollocatedVectorGrid2.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def divergence(

...)

Inheritance: CollocatedVectorGrid2.divergence

divergence(self: pyjet.CollocatedVectorGrid2, x: object) -> float

Returns divergence at given position x.

def divergenceAtDataPoint(

...)

Inheritance: CollocatedVectorGrid2.divergenceAtDataPoint

divergenceAtDataPoint(self: pyjet.CollocatedVectorGrid2, i: int, j: int) -> float

Returns divergence at data point location.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def fill(

...)

fill(self: pyjet.CellCenteredVectorGrid2, arg0: object) -> None

Fills the grid with given value or function.

def forEachDataPointIndex(

...)

Inheritance: CollocatedVectorGrid2.forEachDataPointIndex

forEachDataPointIndex(self: pyjet.CollocatedVectorGrid2, func: function) -> None

Invokes the given function func for each data point.

This function invokes the given function object func for each data point in serial manner. The input parameters are i and j indices of a data point. The order of execution is i-first, j-last.

def sample(

...)

Inheritance: CollocatedVectorGrid2.sample

sample(self: pyjet.CollocatedVectorGrid2, x: object) -> pyjet.Vector2D

Returns sampled value at given position x.

def sampler(

...)

Inheritance: CollocatedVectorGrid2.sampler

sampler(self: pyjet.CollocatedVectorGrid2) -> std::__1::function (jet::Vector const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

def serialize(

...)

Inheritance: CollocatedVectorGrid2.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: CollocatedVectorGrid2.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

def set(

...)

set(self: pyjet.CellCenteredVectorGrid2, other: pyjet.CellCenteredVectorGrid2) -> None

Sets the contents with the given other grid.

Parameters

  • other : Other grid to copy from.

class CellCenteredVectorGrid3

3-D Cell-centered vector grid structure.

This class represents 3-D cell-centered vector grid which extends CollocatedVectorGrid3. As its name suggests, the class defines the data point at the center of a grid cell. Thus, the dimension of data points are equal to the dimension of the cells.

Ancestors (in MRO)

Instance variables

var dataOrigin

Returns data position for the grid point at (0, 0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

var dataSize

Returns the actual data point size.

Methods

def __init__(

...)

init(self: pyjet.CellCenteredVectorGrid3, args, *kwargs) -> None

Constructs grid.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def curl(

...)

Inheritance: CollocatedVectorGrid3.curl

curl(self: pyjet.CollocatedVectorGrid3, x: object) -> pyjet.Vector3D

Returns curl at given position x.

def curlAtDataPoint(

...)

Inheritance: CollocatedVectorGrid3.curlAtDataPoint

curlAtDataPoint(self: pyjet.CollocatedVectorGrid3, i: int, j: int, k: int) -> pyjet.Vector3D

Returns curl at data point location.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def dataAccessor(

...)

Inheritance: CollocatedVectorGrid3.dataAccessor

dataAccessor(self: pyjet.CollocatedVectorGrid3) -> jet::ArrayAccessor, 3ul>

Returns the data array accessor.

def dataPosition(

...)

Inheritance: CollocatedVectorGrid3.dataPosition

dataPosition(self: pyjet.CollocatedVectorGrid3) -> std::__1::function (unsigned long, unsigned long, unsigned long)>

Returns the function that maps data point to its position.

def deserialize(

...)

Inheritance: CollocatedVectorGrid3.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: CollocatedVectorGrid3.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def divergence(

...)

Inheritance: CollocatedVectorGrid3.divergence

divergence(self: pyjet.CollocatedVectorGrid3, x: object) -> float

Returns divergence at given position x.

def divergenceAtDataPoint(

...)

Inheritance: CollocatedVectorGrid3.divergenceAtDataPoint

divergenceAtDataPoint(self: pyjet.CollocatedVectorGrid3, i: int, j: int, k: int) -> float

Returns divergence at data point location.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def fill(

...)

fill(self: pyjet.CellCenteredVectorGrid3, arg0: object) -> None

Fills the grid with given value or function.

def forEachDataPointIndex(

...)

Inheritance: CollocatedVectorGrid3.forEachDataPointIndex

forEachDataPointIndex(self: pyjet.CollocatedVectorGrid3, func: function) -> None

Invokes the given function func for each data point.

This function invokes the given function object func for each data point in serial manner. The input parameters are i and j indices of a data point. The order of execution is i-first, j-last.

def sample(

...)

Inheritance: CollocatedVectorGrid3.sample

sample(self: pyjet.CollocatedVectorGrid3, x: object) -> pyjet.Vector3D

Returns sampled value at given position x.

def sampler(

...)

Inheritance: CollocatedVectorGrid3.sampler

sampler(self: pyjet.CollocatedVectorGrid3) -> std::__1::function (jet::Vector const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

def serialize(

...)

Inheritance: CollocatedVectorGrid3.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: CollocatedVectorGrid3.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

def set(

...)

set(self: pyjet.CellCenteredVectorGrid3, other: pyjet.CellCenteredVectorGrid3) -> None

Sets the contents with the given other grid.

Parameters

  • other : Other grid to copy from.

class Collider2

Abstract base class for generic 2-D collider object.

This class contains basic interfaces for colliders. Most of the functionalities are implemented within this class, except the member function Collider2::velocityAt. This class also let the subclasses to provide a Surface2 instance to define collider surface using Collider2::setSurface function.

Ancestors (in MRO)

  • Collider2
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

Instance variables

var frictionCoefficient

The friction coefficient.

This property specifies the friction coefficient to the collider. Any negative inputs will be clamped to zero.

var surface

The surface instance.

class Collider3

Abstract base class for generic 3-D collider object.

This class contains basic interfaces for colliders. Most of the functionalities are implemented within this class, except the member function Collider3::velocityAt. This class also let the subclasses to provide a Surface3 instance to define collider surface using Collider2::setSurface function.

Ancestors (in MRO)

  • Collider3
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

Instance variables

var frictionCoefficient

The friction coefficient.

This property specifies the friction coefficient to the collider. Any negative inputs will be clamped to zero.

var surface

The surface instance.

class CollocatedVectorGrid2

Abstract base class for 2-D collocated vector grid structure.

Ancestors (in MRO)

Methods

def curl(

...)

curl(self: pyjet.CollocatedVectorGrid2, x: object) -> float

Returns curl at given position x.

def curlAtDataPoint(

...)

curlAtDataPoint(self: pyjet.CollocatedVectorGrid2, i: int, j: int) -> float

Returns curl at data point location.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def dataAccessor(

...)

dataAccessor(self: pyjet.CollocatedVectorGrid2) -> jet::ArrayAccessor, 2ul>

Returns the data array accessor.

def dataPosition(

...)

dataPosition(self: pyjet.CollocatedVectorGrid2) -> std::__1::function (unsigned long, unsigned long)>

Returns the function that maps data point to its position.

def deserialize(

...)

Inheritance: VectorGrid2.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: VectorGrid2.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def divergence(

...)

divergence(self: pyjet.CollocatedVectorGrid2, x: object) -> float

Returns divergence at given position x.

def divergenceAtDataPoint(

...)

divergenceAtDataPoint(self: pyjet.CollocatedVectorGrid2, i: int, j: int) -> float

Returns divergence at data point location.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def forEachDataPointIndex(

...)

forEachDataPointIndex(self: pyjet.CollocatedVectorGrid2, func: function) -> None

Invokes the given function func for each data point.

This function invokes the given function object func for each data point in serial manner. The input parameters are i and j indices of a data point. The order of execution is i-first, j-last.

def sample(

...)

sample(self: pyjet.CollocatedVectorGrid2, x: object) -> pyjet.Vector2D

Returns sampled value at given position x.

def sampler(

...)

sampler(self: pyjet.CollocatedVectorGrid2) -> std::__1::function (jet::Vector const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

def serialize(

...)

Inheritance: VectorGrid2.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: VectorGrid2.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

class CollocatedVectorGrid3

Abstract base class for 3-D collocated vector grid structure.

Ancestors (in MRO)

Methods

def curl(

...)

curl(self: pyjet.CollocatedVectorGrid3, x: object) -> pyjet.Vector3D

Returns curl at given position x.

def curlAtDataPoint(

...)

curlAtDataPoint(self: pyjet.CollocatedVectorGrid3, i: int, j: int, k: int) -> pyjet.Vector3D

Returns curl at data point location.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def dataAccessor(

...)

dataAccessor(self: pyjet.CollocatedVectorGrid3) -> jet::ArrayAccessor, 3ul>

Returns the data array accessor.

def dataPosition(

...)

dataPosition(self: pyjet.CollocatedVectorGrid3) -> std::__1::function (unsigned long, unsigned long, unsigned long)>

Returns the function that maps data point to its position.

def deserialize(

...)

Inheritance: VectorGrid3.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: VectorGrid3.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def divergence(

...)

divergence(self: pyjet.CollocatedVectorGrid3, x: object) -> float

Returns divergence at given position x.

def divergenceAtDataPoint(

...)

divergenceAtDataPoint(self: pyjet.CollocatedVectorGrid3, i: int, j: int, k: int) -> float

Returns divergence at data point location.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def forEachDataPointIndex(

...)

forEachDataPointIndex(self: pyjet.CollocatedVectorGrid3, func: function) -> None

Invokes the given function func for each data point.

This function invokes the given function object func for each data point in serial manner. The input parameters are i and j indices of a data point. The order of execution is i-first, j-last.

def sample(

...)

sample(self: pyjet.CollocatedVectorGrid3, x: object) -> pyjet.Vector3D

Returns sampled value at given position x.

def sampler(

...)

sampler(self: pyjet.CollocatedVectorGrid3) -> std::__1::function (jet::Vector const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

def serialize(

...)

Inheritance: VectorGrid3.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: VectorGrid3.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

class ConstantScalarField2

2-D constant scalar field.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.ConstantScalarField2, value: float) -> None

Constructs a constant scalar field with given value.

def sample(

...)

sample(self: pyjet.ConstantScalarField2, x: object) -> float

Returns sampled value at given position x.

def sampler(

...)

sampler(self: pyjet.ConstantScalarField2) -> std::__1::function const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

class ConstantScalarField3

3-D constant scalar field.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.ConstantScalarField3, value: float) -> None

Constructs a constant scalar field with given value.

def sample(

...)

sample(self: pyjet.ConstantScalarField3, x: object) -> float

Returns sampled value at given position x.

def sampler(

...)

sampler(self: pyjet.ConstantScalarField3) -> std::__1::function const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

class ConstantVectorField2

2-D constant vector field.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.ConstantVectorField2, value: pyjet.Vector2D) -> None

Constructs a constant vector field with given value.

def sample(

...)

sample(self: pyjet.ConstantVectorField2, x: object) -> pyjet.Vector2D

Returns sampled value at given position x.

def sampler(

...)

sampler(self: pyjet.ConstantVectorField2) -> std::__1::function (jet::Vector const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

class ConstantVectorField3

3-D constant vector field.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.ConstantVectorField3, value: pyjet.Vector3D) -> None

Constructs a constant vector field with given value.

def sample(

...)

sample(self: pyjet.ConstantVectorField3, x: object) -> pyjet.Vector3D

Returns sampled value at given position x.

def sampler(

...)

sampler(self: pyjet.ConstantVectorField3) -> std::__1::function (jet::Vector const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

class CubicSemiLagrangian2

Implementation of 2-D cubic semi-Lagrangian advection solver.

This class implements 3rd-order cubic 2-D semi-Lagrangian advection solver.

Ancestors (in MRO)

Methods

def __init__(

...)

Inheritance: SemiLagrangian2.__init__

init(self: pyjet.CubicSemiLagrangian2) -> None

def solve(

...)

Inheritance: SemiLagrangian2.solve

solve(self: pyjet.SemiLagrangian2, input: pyjet.Grid2, flow: pyjet.VectorField2, dt: float, output: pyjet.Grid2, boundarySdf: pyjet.ScalarField2=) -> None

Computes semi-Lagrangian for given scalar grid.

This function computes semi-Lagrangian method to solve advection equation for given field input and underlying vector field flow that carries the input field. The solution after solving the equation for given time-step dt should be stored in field output. The boundary interface is given by a signed-distance field. The field is negative inside the boundary. By default, a constant field with max double value (kMaxD) is used, meaning no boundary.

Parameters

  • input : Input grid.
  • flow : Vector field that advects the input field.
  • dt : Time-step for the advection.
  • output : Output grid.
  • boundarySdf : Boundary interface defined by signed-distance field.

class CubicSemiLagrangian3

Implementation of 3-D cubic semi-Lagrangian advection solver.

This class implements 3rd-order cubic 3-D semi-Lagrangian advection solver.

Ancestors (in MRO)

Methods

def __init__(

...)

Inheritance: SemiLagrangian3.__init__

init(self: pyjet.CubicSemiLagrangian3) -> None

def solve(

...)

Inheritance: SemiLagrangian3.solve

solve(self: pyjet.SemiLagrangian3, input: pyjet.Grid3, flow: pyjet.VectorField3, dt: float, output: pyjet.Grid3, boundarySdf: pyjet.ScalarField3=) -> None

Computes semi-Lagrangian for given scalar grid.

This function computes semi-Lagrangian method to solve advection equation for given field input and underlying vector field flow that carries the input field. The solution after solving the equation for given time-step dt should be stored in field output. The boundary interface is given by a signed-distance field. The field is negative inside the boundary. By default, a constant field with max double value (kMaxD) is used, meaning no boundary.

Parameters

  • input : Input grid.
  • flow : Vector field that advects the input field.
  • dt : Time-step for the advection.
  • output : Output grid.
  • boundarySdf : Boundary interface defined by signed-distance field.

class CustomScalarField2

2-D scalar field with custom field function.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.CustomScalarField2, func: function, gradFunc: function=None, lapFunc: function=None) -> None

Constructs a field with given field, gradient, and Laplacian function.

def gradient(

...)

gradient(self: pyjet.CustomScalarField2, x: object) -> pyjet.Vector2D

Returns gradient at given position x.

def laplacian(

...)

laplacian(self: pyjet.CustomScalarField2, x: object) -> float

Returns Laplacian at given position x.

def sample(

...)

sample(self: pyjet.CustomScalarField2, x: object) -> float

Returns sampled value at given position x.

def sampler(

...)

sampler(self: pyjet.CustomScalarField2) -> std::__1::function const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

class CustomScalarField3

3-D scalar field with custom field function.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.CustomScalarField3, func: function, gradFunc: function=None, lapFunc: function=None) -> None

Constructs a field with given field, gradient, and Laplacian function.

def gradient(

...)

gradient(self: pyjet.CustomScalarField3, x: object) -> pyjet.Vector3D

Returns gradient at given position x.

def laplacian(

...)

laplacian(self: pyjet.CustomScalarField3, x: object) -> float

Returns Laplacian at given position x.

def sample(

...)

sample(self: pyjet.CustomScalarField3, x: object) -> float

Returns sampled value at given position x.

def sampler(

...)

sampler(self: pyjet.CustomScalarField3) -> std::__1::function const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

class CustomVectorField2

2-D vector field with custom field function.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.CustomVectorField2, func: function, divFunc: function=None, curlFunc: function=None) -> None

Constructs a field with given field, gradient, and Laplacian function.

def curl(

...)

curl(self: pyjet.CustomVectorField2, x: object) -> float

Returns curl at given position x.

def divergence(

...)

divergence(self: pyjet.CustomVectorField2, x: object) -> float

Returns divergence at given position x.

def sample(

...)

sample(self: pyjet.CustomVectorField2, x: object) -> pyjet.Vector2D

Returns sampled value at given position x.

def sampler(

...)

sampler(self: pyjet.CustomVectorField2) -> std::__1::function (jet::Vector const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

class CustomVectorField3

3-D vector field with custom field function.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.CustomVectorField3, func: function, divFunc: function=None, curlFunc: function=None) -> None

Constructs a field with given field, gradient, and Laplacian function.

def curl(

...)

curl(self: pyjet.CustomVectorField3, x: object) -> pyjet.Vector3D

Returns curl at given position x.

def divergence(

...)

divergence(self: pyjet.CustomVectorField3, x: object) -> float

Returns divergence at given position x.

def sample(

...)

sample(self: pyjet.CustomVectorField3, x: object) -> pyjet.Vector3D

Returns sampled value at given position x.

def sampler(

...)

sampler(self: pyjet.CustomVectorField3) -> std::__1::function (jet::Vector const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

class Cylinder3

Ancestors (in MRO)

Instance variables

var center

var height

var isNormalFlipped

Inheritance: Surface3.isNormalFlipped

var radius

var transform

Inheritance: Surface3.transform

Methods

def __init__(

...)

init(self: pyjet.Cylinder3, center: object=, radius: float=1.0, height: float=1.0, transform: pyjet.Transform3=, isNormalFlipped: bool=False) -> None

Constructs Cylinder3

This method constructs Cylinder3 with center, radius, height, transform, and normal direction (isNormalFlipped).

class EnoLevelSetSolver2

2-D third-order ENO-based iterative level set solver.

Ancestors (in MRO)

Instance variables

var maxCfl

Inheritance: IterativeLevelSetSolver2.maxCfl

The maximum CFL limit.

Methods

def extrapolate(

...)

Inheritance: IterativeLevelSetSolver2.extrapolate

extrapolate(self: pyjet.IterativeLevelSetSolver2, input: pyjet.Grid2, sdf: pyjet.ScalarGrid2, maxDistance: float, output: pyjet.Grid2) -> None

Extrapolates given field from negative to positive SDF region.

Parameters

  • input : Input field to be extrapolated.
  • sdf : Reference signed-distance field.
  • maxDistance : Max range of extrapolation.
  • output : Output field.

def reinitialize(

...)

Inheritance: IterativeLevelSetSolver2.reinitialize

reinitialize(self: pyjet.IterativeLevelSetSolver2, inputSdf: pyjet.ScalarGrid2, maxDistance: float, outputSdf: pyjet.ScalarGrid2) -> None

Reinitializes given scalar field to signed-distance field.

Parameters

  • inputSdf : Input signed-distance field which can be distorted.
  • maxDistance : Max range of reinitialization.
  • outputSdf : Output signed-distance field.

class EnoLevelSetSolver3

3-D third-order ENO-based iterative level set solver.

Ancestors (in MRO)

Instance variables

var maxCfl

Inheritance: IterativeLevelSetSolver3.maxCfl

The maximum CFL limit.

Methods

def extrapolate(

...)

Inheritance: IterativeLevelSetSolver3.extrapolate

extrapolate(self: pyjet.IterativeLevelSetSolver3, input: pyjet.Grid3, sdf: pyjet.ScalarGrid3, maxDistance: float, output: pyjet.Grid3) -> None

Extrapolates given field from negative to positive SDF region.

Parameters

  • input : Input field to be extrapolated.
  • sdf : Reference signed-distance field.
  • maxDistance : Max range of extrapolation.
  • output : Output field.

def reinitialize(

...)

Inheritance: IterativeLevelSetSolver3.reinitialize

reinitialize(self: pyjet.IterativeLevelSetSolver3, inputSdf: pyjet.ScalarGrid3, maxDistance: float, outputSdf: pyjet.ScalarGrid3) -> None

Reinitializes given scalar field to signed-distance field.

Parameters

  • inputSdf : Input signed-distance field which can be distorted.
  • maxDistance : Max range of reinitialization.
  • outputSdf : Output signed-distance field.

class FaceCenteredGrid2

2-D face-centered (a.k.a MAC or staggered) grid.

This class implements face-centered grid which is also known as marker-and-cell (MAC) or staggered grid. This vector grid stores each vector component at face center. Thus, u and v components are not collocated.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.FaceCenteredGrid2, args, *kwargs) -> None

Constructs grid.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def curl(

...)

curl(self: pyjet.FaceCenteredGrid2, x: object) -> float

Returns curl at given position x.

def curlAtCellCenter(

...)

curlAtCellCenter(self: pyjet.FaceCenteredGrid2, i: int, j: int) -> float

Returns curl at cell center.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def deserialize(

...)

Inheritance: VectorGrid2.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: VectorGrid2.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def divergence(

...)

divergence(self: pyjet.FaceCenteredGrid2, x: object) -> float

Returns divergence at given position x.

def divergenceAtCellCenter(

...)

divergenceAtCellCenter(self: pyjet.FaceCenteredGrid2, i: int, j: int) -> float

Returns divergence at cell center.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def fill(

...)

fill(self: pyjet.FaceCenteredGrid2, arg0: object) -> None

Fills the grid with given value or function.

def forEachUIndex(

...)

forEachUIndex(self: pyjet.FaceCenteredGrid2, func: function) -> None

Invokes the given function func for each u-data point.

This function invokes the given function object func for each u-data point in serial manner. The input parameters are i and j indices of a u-data point. The order of execution is i-first, j-last.

def forEachVIndex(

...)

forEachVIndex(self: pyjet.FaceCenteredGrid2, func: function) -> None

Invokes the given function func for each v-data point.

This function invokes the given function object func for each v-data point in serial manner. The input parameters are i and j indices of a v-data point. The order of execution is i-first, j-last.

def sample(

...)

sample(self: pyjet.FaceCenteredGrid2, x: object) -> pyjet.Vector2D

Returns sampled value at given position x.

def sampler(

...)

sampler(self: pyjet.FaceCenteredGrid2) -> Callable[[pyjet.Vector2D], pyjet.Vector2D]

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

def serialize(

...)

Inheritance: VectorGrid2.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: VectorGrid2.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

def set(

...)

set(self: pyjet.FaceCenteredGrid2, other: pyjet.FaceCenteredGrid2) -> None

Sets the contents with the given grid.

This method copies the given grid to this grid.

Parameters

  • other : Other grid to copy from.

def setU(

...)

setU(self: pyjet.FaceCenteredGrid2, i: int, j: int, val: float) -> None

Sets u-value at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • val : Value to set.

def setV(

...)

setV(self: pyjet.FaceCenteredGrid2, i: int, j: int, val: float) -> None

Sets v-value at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • val : Value to set.

def u(

...)

u(self: pyjet.FaceCenteredGrid2, i: int, j: int) -> float

Returns u-value at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def uAccessor(

...)

uAccessor(self: pyjet.FaceCenteredGrid2) -> pyjet.ArrayAccessor2D

Returns u data accessor.

def uOrigin(

...)

uOrigin(self: pyjet.FaceCenteredGrid2) -> pyjet.Vector2D

Returns u-data position for the grid point at (0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

def uPosition(

...)

uPosition(self: pyjet.FaceCenteredGrid2) -> Callable[[int, int], pyjet.Vector2D]

Returns function object that maps u data point to its actual position.

def uSize(

...)

uSize(self: pyjet.FaceCenteredGrid2) -> pyjet.Size2

Returns data size of the u component.

def v(

...)

v(self: pyjet.FaceCenteredGrid2, i: int, j: int) -> float

Returns v-value at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def vAccessor(

...)

vAccessor(self: pyjet.FaceCenteredGrid2) -> pyjet.ArrayAccessor2D

Returns v data accessor.

def vOrigin(

...)

vOrigin(self: pyjet.FaceCenteredGrid2) -> pyjet.Vector2D

Returns v-data position for the grid point at (0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

def vPosition(

...)

vPosition(self: pyjet.FaceCenteredGrid2) -> Callable[[int, int], pyjet.Vector2D]

Returns function object that maps v data point to its actual position.

def vSize(

...)

vSize(self: pyjet.FaceCenteredGrid2) -> pyjet.Size2

Returns data size of the v component.

def valueAtCellCenter(

...)

valueAtCellCenter(self: pyjet.FaceCenteredGrid2, i: int, j: int) -> pyjet.Vector2D

Returns interpolated value at cell center.

Parameters

  • i : Data point index i.
  • j : Data point index j.

class FaceCenteredGrid3

3-D face-centered (a.k.a MAC or staggered) grid.

This class implements face-centered grid which is also known as marker-and-cell (MAC) or staggered grid. This vector grid stores each vector component at face center. Thus, u, v, and w components are not collocated.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.FaceCenteredGrid3, args, *kwargs) -> None

Constructs grid.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def curl(

...)

curl(self: pyjet.FaceCenteredGrid3, x: object) -> pyjet.Vector3D

Returns curl at given position x.

def curlAtCellCenter(

...)

curlAtCellCenter(self: pyjet.FaceCenteredGrid3, i: int, j: int, k: int) -> pyjet.Vector3D

Returns curl at cell center.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def deserialize(

...)

Inheritance: VectorGrid3.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: VectorGrid3.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def divergence(

...)

divergence(self: pyjet.FaceCenteredGrid3, x: object) -> float

Returns divergence at given position x.

def divergenceAtCellCenter(

...)

divergenceAtCellCenter(self: pyjet.FaceCenteredGrid3, i: int, j: int, k: int) -> float

Returns divergence at cell center.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def fill(

...)

fill(self: pyjet.FaceCenteredGrid3, arg0: object) -> None

Fills the grid with given value or function.

def forEachUIndex(

...)

forEachUIndex(self: pyjet.FaceCenteredGrid3, func: function) -> None

Invokes the given function func for each u-data point.

This function invokes the given function object func for each u-data point in serial manner. The input parameters are i, j, and k indices of a u-data point. The order of execution is i-first, k-last.

def forEachVIndex(

...)

forEachVIndex(self: pyjet.FaceCenteredGrid3, func: function) -> None

Invokes the given function func for each v-data point.

This function invokes the given function object func for each v-data point in serial manner. The input parameters are i, j, and k indices of a u-data point. The order of execution is i-first, k-last.

def forEachWIndex(

...)

forEachWIndex(self: pyjet.FaceCenteredGrid3, func: function) -> None

Invokes the given function func for each w-data point.

This function invokes the given function object func for each w-data point in serial manner. The input parameters are i, j, and k indices of a u-data point. The order of execution is i-first, k-last.

def sample(

...)

sample(self: pyjet.FaceCenteredGrid3, x: object) -> pyjet.Vector3D

Returns sampled value at given position x.

def sampler(

...)

sampler(self: pyjet.FaceCenteredGrid3) -> Callable[[pyjet.Vector3D], pyjet.Vector3D]

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

def serialize(

...)

Inheritance: VectorGrid3.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: VectorGrid3.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

def set(

...)

set(self: pyjet.FaceCenteredGrid3, other: pyjet.FaceCenteredGrid3) -> None

Sets the contents with the given grid.

This method copies the given grid to this grid.

Parameters

  • other : Other grid to copy from.

def setU(

...)

setU(self: pyjet.FaceCenteredGrid3, i: int, j: int, k: int, val: float) -> None

Sets u-value at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.
  • val : Value to set.

def setV(

...)

setV(self: pyjet.FaceCenteredGrid3, i: int, j: int, k: int, val: float) -> None

Sets v-value at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.
  • val : Value to set.

def setW(

...)

setW(self: pyjet.FaceCenteredGrid3, i: int, j: int, k: int, val: float) -> None

Sets w-value at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.
  • val : Value to set.

def u(

...)

u(self: pyjet.FaceCenteredGrid3, i: int, j: int, k: int) -> float

Returns u-value at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def uAccessor(

...)

uAccessor(self: pyjet.FaceCenteredGrid3) -> pyjet.ArrayAccessor3D

Returns u data accessor.

def uOrigin(

...)

uOrigin(self: pyjet.FaceCenteredGrid3) -> pyjet.Vector3D

Returns u-data position for the grid point at (0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

def uPosition(

...)

uPosition(self: pyjet.FaceCenteredGrid3) -> Callable[[int, int, int], pyjet.Vector3D]

Returns function object that maps u data point to its actual position.

def uSize(

...)

uSize(self: pyjet.FaceCenteredGrid3) -> pyjet.Size3

Returns data size of the u component.

def v(

...)

v(self: pyjet.FaceCenteredGrid3, i: int, j: int, k: int) -> float

Returns v-value at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def vAccessor(

...)

vAccessor(self: pyjet.FaceCenteredGrid3) -> pyjet.ArrayAccessor3D

Returns v data accessor.

def vOrigin(

...)

vOrigin(self: pyjet.FaceCenteredGrid3) -> pyjet.Vector3D

Returns v-data position for the grid point at (0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

def vPosition(

...)

vPosition(self: pyjet.FaceCenteredGrid3) -> Callable[[int, int, int], pyjet.Vector3D]

Returns function object that maps v data point to its actual position.

def vSize(

...)

vSize(self: pyjet.FaceCenteredGrid3) -> pyjet.Size3

Returns data size of the v component.

def valueAtCellCenter(

...)

valueAtCellCenter(self: pyjet.FaceCenteredGrid3, i: int, j: int, k: int) -> pyjet.Vector3D

Returns interpolated value at cell center.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def w(

...)

w(self: pyjet.FaceCenteredGrid3, i: int, j: int, k: int) -> float

Returns v-value at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def wAccessor(

...)

wAccessor(self: pyjet.FaceCenteredGrid3) -> pyjet.ArrayAccessor3D

Returns w data accessor.

def wOrigin(

...)

wOrigin(self: pyjet.FaceCenteredGrid3) -> pyjet.Vector3D

Returns w-data position for the grid point at (0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

def wPosition(

...)

wPosition(self: pyjet.FaceCenteredGrid3) -> Callable[[int, int, int], pyjet.Vector3D]

Returns function object that maps w data point to its actual position.

def wSize(

...)

wSize(self: pyjet.FaceCenteredGrid3) -> pyjet.Size3

Returns data size of the w component.

class FdmCgSolver2

2-D finite difference-type linear system solver using conjugate gradient.

Ancestors (in MRO)

Instance variables

var lastNumberOfIterations

The last number of CG iterations the solver made.

var lastResidual

The last residual after the CG iterations.

var maxNumberOfIterations

Max number of CG iterations.

var tolerance

The max residual tolerance for the CG method.

Methods

def __init__(

...)

init(self: pyjet.FdmCgSolver2, maxNumberOfIterations: int, tolerance: float) -> None

class FdmCgSolver3

3-D finite difference-type linear system solver using conjugate gradient.

Ancestors (in MRO)

Instance variables

var lastNumberOfIterations

The last number of CG iterations the solver made.

var lastResidual

The last residual after the CG iterations.

var maxNumberOfIterations

Max number of CG iterations.

var tolerance

The max residual tolerance for the CG method.

Methods

def __init__(

...)

init(self: pyjet.FdmCgSolver3, maxNumberOfIterations: int, tolerance: float) -> None

class FdmGaussSeidelSolver2

2-D finite difference-type linear system solver using conjugate gradient.

Ancestors (in MRO)

Instance variables

var lastNumberOfIterations

The last number of CG iterations the solver made.

var lastResidual

The last residual after the CG iterations.

var maxNumberOfIterations

Max number of CG iterations.

var sorFactor

Returns the SOR (Successive Over Relaxation) factor.

var tolerance

The max residual tolerance for the CG method.

var useRedBlackOrdering

Returns true if red-black ordering is enabled.

Methods

def __init__(

...)

init(self: pyjet.FdmGaussSeidelSolver2, maxNumberOfIterations: int, residualCheckInterval: int, tolerance: float, sorFactor: float=1.0, useRedBlackOrdering: bool=False) -> None

class FdmGaussSeidelSolver3

3-D finite difference-type linear system solver using conjugate gradient.

Ancestors (in MRO)

Instance variables

var lastNumberOfIterations

The last number of CG iterations the solver made.

var lastResidual

The last residual after the CG iterations.

var maxNumberOfIterations

Max number of CG iterations.

var sorFactor

Returns the SOR (Successive Over Relaxation) factor.

var tolerance

The max residual tolerance for the CG method.

var useRedBlackOrdering

Returns true if red-black ordering is enabled.

Methods

def __init__(

...)

init(self: pyjet.FdmGaussSeidelSolver3, maxNumberOfIterations: int, residualCheckInterval: int, tolerance: float, sorFactor: float=1.0, useRedBlackOrdering: bool=False) -> None

class FdmIccgSolver2

2-D finite difference-type linear system solver using conjugate gradient.

Ancestors (in MRO)

Instance variables

var lastNumberOfIterations

The last number of ICCG iterations the solver made.

var lastResidual

The last residual after the ICCG iterations.

var maxNumberOfIterations

Max number of ICCG iterations.

var tolerance

The max residual tolerance for the ICCG method.

Methods

def __init__(

...)

init(self: pyjet.FdmIccgSolver2, maxNumberOfIterations: int, tolerance: float) -> None

class FdmIccgSolver3

3-D finite difference-type linear system solver using conjugate gradient.

Ancestors (in MRO)

Instance variables

var lastNumberOfIterations

The last number of ICCG iterations the solver made.

var lastResidual

The last residual after the ICCG iterations.

var maxNumberOfIterations

Max number of ICCG iterations.

var tolerance

The max residual tolerance for the ICCG method.

Methods

def __init__(

...)

init(self: pyjet.FdmIccgSolver3, maxNumberOfIterations: int, tolerance: float) -> None

class FdmJacobiSolver2

2-D finite difference-type linear system solver using conjugate gradient.

Ancestors (in MRO)

Instance variables

var lastNumberOfIterations

The last number of CG iterations the solver made.

var lastResidual

The last residual after the CG iterations.

var maxNumberOfIterations

Max number of CG iterations.

var tolerance

The max residual tolerance for the CG method.

Methods

def __init__(

...)

init(self: pyjet.FdmJacobiSolver2, maxNumberOfIterations: int, residualCheckInterval: int, tolerance: float) -> None

class FdmJacobiSolver3

3-D finite difference-type linear system solver using conjugate gradient.

Ancestors (in MRO)

Instance variables

var lastNumberOfIterations

The last number of CG iterations the solver made.

var lastResidual

The last residual after the CG iterations.

var maxNumberOfIterations

Max number of CG iterations.

var tolerance

The max residual tolerance for the CG method.

Methods

def __init__(

...)

init(self: pyjet.FdmJacobiSolver3, maxNumberOfIterations: int, residualCheckInterval: int, tolerance: float) -> None

class FdmLinearSystemSolver2

Abstract base class for 2-D finite difference-type linear system solver.

Ancestors (in MRO)

class FdmLinearSystemSolver3

Abstract base class for 3-D finite difference-type linear system solver.

Ancestors (in MRO)

class FdmMgSolver2

2-D finite difference-type linear system solver using multigrid.

Ancestors (in MRO)

Instance variables

var maxNumberOfLevels

Max number of multigrid levels.

var numberOfCoarsestIter

Number of iteration at coarsest step.

var numberOfCorrectionIter

Number of iteration at correction step.

var numberOfFinalIter

Number of iteration at final step.

var numberOfRestrictionIter

Number of iteration at restriction step.

var sorFactor

var useRedBlackOrdering

Methods

def __init__(

...)

init(self: pyjet.FdmMgSolver2, maxNumberOfLevels: int, numberOfRestrictionIter: int=5L, numberOfCorrectionIter: int=5L, numberOfCoarsestIter: int=20L, numberOfFinalIter: int=20L, maxTolerance: float=1e-09, sorFactor: float=1.5, useRedBlackOrdering: bool=False) -> None

class FdmMgSolver3

3-D finite difference-type linear system solver using multigrid.

Ancestors (in MRO)

Instance variables

var maxNumberOfLevels

Max number of multigrid levels.

var numberOfCoarsestIter

Number of iteration at coarsest step.

var numberOfCorrectionIter

Number of iteration at correction step.

var numberOfFinalIter

Number of iteration at final step.

var numberOfRestrictionIter

Number of iteration at restriction step.

var sorFactor

var useRedBlackOrdering

Methods

def __init__(

...)

init(self: pyjet.FdmMgSolver3, maxNumberOfLevels: int, numberOfRestrictionIter: int=5L, numberOfCorrectionIter: int=5L, numberOfCoarsestIter: int=20L, numberOfFinalIter: int=20L, maxTolerance: float=1e-09, sorFactor: float=1.5, useRedBlackOrdering: bool=False) -> None

class FdmMgpcgSolver2

2-D finite difference-type linear system solver using MGPCG.

Ancestors (in MRO)

Instance variables

var lastNumberOfIterations

The last number of MGPCG iterations the solver made.

var lastResidual

The last residual after the MGPCG iterations.

var maxNumberOfIterations

Max number of MGPCG iterations.

var sorFactor

var tolerance

The max residual tolerance for the MGPCG method.

var useRedBlackOrdering

Methods

def __init__(

...)

init(self: pyjet.FdmMgpcgSolver2, numberOfCgIter: int, maxNumberOfLevels: int, numberOfRestrictionIter: int=5L, numberOfCorrectionIter: int=5L, numberOfCoarsestIter: int=20L, numberOfFinalIter: int=20L, maxTolerance: float=1e-09, sorFactor: float=1.5, useRedBlackOrdering: bool=False) -> None

class FdmMgpcgSolver3

3-D finite difference-type linear system solver using MGPCG.

Ancestors (in MRO)

Instance variables

var lastNumberOfIterations

The last number of MGPCG iterations the solver made.

var lastResidual

The last residual after the MGPCG iterations.

var maxNumberOfIterations

Max number of MGPCG iterations.

var sorFactor

var tolerance

The max residual tolerance for the MGPCG method.

var useRedBlackOrdering

Methods

def __init__(

...)

init(self: pyjet.FdmMgpcgSolver3, numberOfCgIter: int, maxNumberOfLevels: int, numberOfRestrictionIter: int=5L, numberOfCorrectionIter: int=5L, numberOfCoarsestIter: int=20L, numberOfFinalIter: int=20L, maxTolerance: float=1e-09, sorFactor: float=1.5, useRedBlackOrdering: bool=False) -> None

class Field2

Abstract base class for 2-D fields.

Ancestors (in MRO)

  • Field2
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

class Field3

Abstract base class for 3-D fields.

Ancestors (in MRO)

  • Field3
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

class FlipSolver2

2-D Fluid-Implicit Particle (FLIP) implementation.

This class implements 2-D Fluid-Implicit Particle (FLIP) solver from the SIGGRAPH paper, Zhu and Bridson 2005. By transfering delta-velocity field from grid to particles, the FLIP solver achieves less viscous fluid flow compared to the original PIC method.

See: Zhu, Yongning, and Robert Bridson. "Animating sand as a fluid." ACM Transactions on Graphics (TOG). Vol. 24. No. 2. ACM, 2005.

Ancestors (in MRO)

Instance variables

var advectionSolver

Inheritance: PicSolver2.advectionSolver

The advection solver.

var closedDomainBoundaryFlag

Inheritance: PicSolver2.closedDomainBoundaryFlag

The closed domain boundary flag.

This flag is an integer which is bitwise-combination of DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_UP, and DIRECTION_BACK.

var collider

Inheritance: PicSolver2.collider

The collider.

var currentFrame

Inheritance: PicSolver2.currentFrame

var currentTimeInSeconds

Inheritance: PicSolver2.currentTimeInSeconds

var diffusionSolver

Inheritance: PicSolver2.diffusionSolver

The diffusion solver instance.

var emitter

Inheritance: PicSolver2.emitter

The emitter.

var gravity

Inheritance: PicSolver2.gravity

The gravity vector of the system.

var gridOrigin

Inheritance: PicSolver2.gridOrigin

The origin of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.origin., but provides a shortcut.

var gridSpacing

Inheritance: PicSolver2.gridSpacing

The grid spacing of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.gridSpacing., but provides a shortcut.

var isUsingFixedSubTimeSteps

Inheritance: PicSolver2.isUsingFixedSubTimeSteps

var maxCfl

Inheritance: PicSolver2.maxCfl

The max allowed CFL number.

var numberOfFixedSubTimeSteps

Inheritance: PicSolver2.numberOfFixedSubTimeSteps

var particleEmitter

Inheritance: PicSolver2.particleEmitter

Particle emitter property.

var particleSystemData

Inheritance: PicSolver2.particleSystemData

Returns particleSystemData.

var picBlendingFactor

The PIC blending factor.

This property specifies the PIC blending factor which mixes FLIP and PIC results when transferring velocity from grids to particles in order to reduce the noise. The factor can be a value between 0 and 1, where 0 means no blending and 1 means full PIC. Default is 0.

var pressureSolver

Inheritance: PicSolver2.pressureSolver

The pressure solver instance.

var resolution

Inheritance: PicSolver2.resolution

The resolution of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.resolution, but provides a shortcut.

var velocity

Inheritance: PicSolver2.velocity

The velocity field.

This property returns the velocity field from the grid system data. It is just a shortcut to the most commonly accessed data chunk.

var viscosityCoefficient

Inheritance: PicSolver2.viscosityCoefficient

The viscosity coefficient.

Methods

def __init__(

...)

Inheritance: PicSolver2.__init__

init(self: pyjet.FlipSolver2, args, *kwargs) -> None

Constructs FlipSolver2

This method constructs FlipSolver2 with resolution, gridSpacing, and gridOrigin.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def advanceSingleFrame(

...)

Inheritance: PicSolver2.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def cfl(

...)

Inheritance: PicSolver2.cfl

cfl(self: pyjet.GridFluidSolver2, timeIntervalInSeconds: float) -> float

Returns the CFL number from the current velocity field for given time interval.

Parameters

  • timeIntervalInSeconds : The time interval in seconds.

def resizeGrid(

...)

Inheritance: PicSolver2.resizeGrid

resizeGrid(self: pyjet.GridFluidSolver2, args, *kwargs) -> None

Resizes grid system data.

This function resizes grid system data. You can also resize the grid by calling resize function directly from GridFluidSolver2::gridSystemData(), but this function provides a shortcut for the same operation.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def update(

...)

Inheritance: PicSolver2.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class FlipSolver3

3-D Fluid-Implicit Particle (FLIP) implementation.

This class implements 3-D Fluid-Implicit Particle (FLIP) solver from the SIGGRAPH paper, Zhu and Bridson 2005. By transfering delta-velocity field from grid to particles, the FLIP solver achieves less viscous fluid flow compared to the original PIC method.

See: Zhu, Yongning, and Robert Bridson. "Animating sand as a fluid." ACM Transactions on Graphics (TOG). Vol. 24. No. 3. ACM, 2005.

Ancestors (in MRO)

Instance variables

var advectionSolver

Inheritance: PicSolver3.advectionSolver

The advection solver.

var closedDomainBoundaryFlag

Inheritance: PicSolver3.closedDomainBoundaryFlag

The closed domain boundary flag.

This flag is an integer which is bitwise-combination of DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_UP, DIRECTION_BACK, and DIRECTION_FRONT. Default is DIRECTION_ALL.

var collider

Inheritance: PicSolver3.collider

The collider.

var currentFrame

Inheritance: PicSolver3.currentFrame

var currentTimeInSeconds

Inheritance: PicSolver3.currentTimeInSeconds

var diffusionSolver

Inheritance: PicSolver3.diffusionSolver

The diffusion solver instance.

var emitter

Inheritance: PicSolver3.emitter

The emitter.

var gravity

Inheritance: PicSolver3.gravity

The gravity vector of the system.

var gridOrigin

Inheritance: PicSolver3.gridOrigin

The origin of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.origin., but provides a shortcut.

var gridSpacing

Inheritance: PicSolver3.gridSpacing

The grid spacing of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.gridSpacing., but provides a shortcut.

var isUsingFixedSubTimeSteps

Inheritance: PicSolver3.isUsingFixedSubTimeSteps

var maxCfl

Inheritance: PicSolver3.maxCfl

The max allowed CFL number.

var numberOfFixedSubTimeSteps

Inheritance: PicSolver3.numberOfFixedSubTimeSteps

var particleEmitter

Inheritance: PicSolver3.particleEmitter

Particle emitter property.

var particleSystemData

Inheritance: PicSolver3.particleSystemData

Returns particleSystemData.

var picBlendingFactor

The PIC blending factor.

This property specifies the PIC blending factor which mixes FLIP and PIC results when transferring velocity from grids to particles in order to reduce the noise. The factor can be a value between 0 and 1, where 0 means no blending and 1 means full PIC. Default is 0.

var pressureSolver

Inheritance: PicSolver3.pressureSolver

The pressure solver instance.

var resolution

Inheritance: PicSolver3.resolution

The resolution of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.resolution, but provides a shortcut.

var velocity

Inheritance: PicSolver3.velocity

The velocity field.

This property returns the velocity field from the grid system data. It is just a shortcut to the most commonly accessed data chunk.

var viscosityCoefficient

Inheritance: PicSolver3.viscosityCoefficient

The viscosity coefficient.

Methods

def __init__(

...)

Inheritance: PicSolver3.__init__

init(self: pyjet.FlipSolver3, args, *kwargs) -> None

Constructs FlipSolver3

This method constructs FlipSolver3 with resolution, gridSpacing, and gridOrigin.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def advanceSingleFrame(

...)

Inheritance: PicSolver3.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def cfl(

...)

Inheritance: PicSolver3.cfl

cfl(self: pyjet.GridFluidSolver3, timeIntervalInSeconds: float) -> float

Returns the CFL number from the current velocity field for given time interval.

Parameters

  • timeIntervalInSeconds : The time interval in seconds.

def resizeGrid(

...)

Inheritance: PicSolver3.resizeGrid

resizeGrid(self: pyjet.GridFluidSolver3, args, *kwargs) -> None

Resizes grid system data.

This function resizes grid system data. You can also resize the grid by calling resize function directly from GridFluidSolver2::gridSystemData(), but this function provides a shortcut for the same operation.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def update(

...)

Inheritance: PicSolver3.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class FmmLevelSetSolver2

2-D fast marching method (FMM) implementation.

This class implements 2-D FMM. First-order upwind-style differencing is used to solve the PDE.

  • See https://math.berkeley.edu/~sethian/2006/Explanations/fast_marching_explain.html
  • See Sethian, James A. "A fast marching level set method for monotonically advancing fronts." Proceedings of the National Academy of Sciences 93.4 (1996): 1591-1595.

Ancestors (in MRO)

Methods

def extrapolate(

...)

extrapolate(self: pyjet.FmmLevelSetSolver2, input: pyjet.Grid2, sdf: pyjet.ScalarGrid2, maxDistance: float, output: pyjet.Grid2) -> None

Extrapolates given field from negative to positive SDF region.

Parameters

  • input : Input field to be extrapolated.
  • sdf : Reference signed-distance field.
  • maxDistance : Max range of extrapolation.
  • output : Output field.

def reinitialize(

...)

reinitialize(self: pyjet.FmmLevelSetSolver2, inputSdf: pyjet.ScalarGrid2, maxDistance: float, outputSdf: pyjet.ScalarGrid2) -> None

Reinitializes given scalar field to signed-distance field.

Parameters

  • inputSdf : Input signed-distance field which can be distorted.
  • maxDistance : Max range of reinitialization.
  • outputSdf : Output signed-distance field.

class FmmLevelSetSolver3

3-D fast marching method (FMM) implementation.

This class implements 3-D FMM. First-order upwind-style differencing is used to solve the PDE.

  • See https://math.berkeley.edu/~sethian/2006/Explanations/fast_marching_explain.html
  • See Sethian, James A. "A fast marching level set method for monotonically advancing fronts." Proceedings of the National Academy of Sciences 93.4 (1996): 1591-1595.

Ancestors (in MRO)

Methods

def extrapolate(

...)

extrapolate(self: pyjet.FmmLevelSetSolver3, input: pyjet.Grid3, sdf: pyjet.ScalarGrid3, maxDistance: float, output: pyjet.Grid3) -> None

Extrapolates given field from negative to positive SDF region.

Parameters

  • input : Input field to be extrapolated.
  • sdf : Reference signed-distance field.
  • maxDistance : Max range of extrapolation.
  • output : Output field.

def reinitialize(

...)

reinitialize(self: pyjet.FmmLevelSetSolver3, inputSdf: pyjet.ScalarGrid3, maxDistance: float, outputSdf: pyjet.ScalarGrid3) -> None

Reinitializes given scalar field to signed-distance field.

Parameters

  • inputSdf : Input signed-distance field which can be distorted.
  • maxDistance : Max range of reinitialization.
  • outputSdf : Output signed-distance field.

class Frame

Representation of an animation frame.

This struct holds current animation frame index and frame interval in seconds.

Ancestors (in MRO)

  • Frame
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var index

Index of the frame

var timeIntervalInSeconds

Time interval of the frame in seconds

Methods

def __init__(

...)

init(self: pyjet.Frame, index: int=0L, timeIntervalInSeconds: float=0.016666666666666666) -> None

Constructs Frame

This method constructs Frame with index and time interval (in seconds).

Parameters

  • index : The index (default is 0).
  • timeIntervalInSeconds : The time interval in seconds (default is 1.0 / 60.0).

def advance(

...)

advance(self: pyjet.Frame, delta: int=1L) -> None

Advances multiple frames.

Parameters

  • delta : Number of frames to advance.

def timeInSeconds(

...)

timeInSeconds(self: pyjet.Frame) -> float

Elapsed time in seconds

class Grid2

Abstract base class for 2-D cartesian grid structure.

This class represents 2-D cartesian grid structure. This class is an abstract base class and does not store any data. The class only stores the shape of the grid. The grid structure is axis-aligned and can have different grid spacing per axis.

Ancestors (in MRO)

Methods

def deserialize(

...)

Inheritance: Serializable.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: Serializable.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def serialize(

...)

Inheritance: Serializable.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: Serializable.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

class Grid3

Abstract base class for 3-D cartesian grid structure.

This class represents 3-D cartesian grid structure. This class is an abstract base class and does not store any data. The class only stores the shape of the grid. The grid structure is axis-aligned and can have different grid spacing per axis.

Ancestors (in MRO)

Methods

def deserialize(

...)

Inheritance: Serializable.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: Serializable.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def serialize(

...)

Inheritance: Serializable.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: Serializable.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

class GridBackwardEulerDiffusionSolver2

2-D grid-based backward Euler diffusion solver.

This class implements 2-D grid-based forward Euler diffusion solver using second-order central differencing spatially. Since the method is following the implicit time-integration (i.e. backwardward Euler), larger time interval or diffusion coefficient can be used without breaking the result. Note, higher values for those parameters will still impact the accuracy of the result. To solve the backwardward Euler method, a linear system solver is used and incomplete Cholesky conjugate gradient method is used by default.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.GridBackwardEulerDiffusionSolver2) -> None

def solver(

...)

solver(self: pyjet.GridBackwardEulerDiffusionSolver2, source: pyjet.Grid2, diffusionCoefficient: float, timeIntervalInSeconds: float, dest: pyjet.Grid2, **kwargs) -> None

Solves diffusion equation for a scalar field.

Parameters

  • source : Input grid.
  • diffusionCoefficient : Amount of diffusion.
  • timeIntervalInSeconds : Small time-interval that diffusion occur.
  • dest : Output grid.
  • **kwargs :
    • Key boundarySdf : Shape of the solid boundary that is empty by default.
    • Key fluidSdf : Shape of the fluid boundary that is full by default.

class GridBackwardEulerDiffusionSolver3

3-D grid-based backward Euler diffusion solver.

This class implements 3-D grid-based forward Euler diffusion solver using second-order central differencing spatially. Since the method is following the implicit time-integration (i.e. backwardward Euler), larger time interval or diffusion coefficient can be used without breaking the result. Note, higher values for those parameters will still impact the accuracy of the result. To solve the backwardward Euler method, a linear system solver is used and incomplete Cholesky conjugate gradient method is used by default.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.GridBackwardEulerDiffusionSolver3) -> None

def solver(

...)

solver(self: pyjet.GridBackwardEulerDiffusionSolver3, source: pyjet.Grid3, diffusionCoefficient: float, timeIntervalInSeconds: float, dest: pyjet.Grid3, **kwargs) -> None

Solves diffusion equation for a scalar field.

Parameters

  • source : Input grid.
  • diffusionCoefficient : Amount of diffusion.
  • timeIntervalInSeconds : Small time-interval that diffusion occur.
  • dest : Output grid.
  • **kwargs :
    • Key boundarySdf : Shape of the solid boundary that is empty by default.
    • Key fluidSdf : Shape of the fluid boundary that is full by default.

class GridBlockedBoundaryConditionSolver2

Blocked 2-D boundary condition solver for grids.

This class constrains the velocity field by projecting the flow to the blocked representation of the collider. A collider is rasterized into voxels and each face of the collider voxels projects the velocity field onto its face. This implementation should pair up with GridSinglePhasePressureSolver2 since the pressure solver assumes blocked boundary representation as well.

Ancestors (in MRO)

Instance variables

var closedDomainBoundaryFlag

Inheritance: GridBoundaryConditionSolver2.closedDomainBoundaryFlag

Closed domain boundary flag.

var collider

Inheritance: GridBoundaryConditionSolver2.collider

Methods

def __init__(

...)

init(self: pyjet.GridBlockedBoundaryConditionSolver2) -> None

def constrainVelocity(

...)

constrainVelocity(self: pyjet.GridBlockedBoundaryConditionSolver2, velocity: pyjet.FaceCenteredGrid2, extrapolationDepth: int=5L) -> None

Constrains the velocity field to conform the collider boundary.

Parameters

  • velocity : Input and output velocity grid.
  • extrapolationDepth : Number of inner-collider grid cells that velocity will get extrapolated.

def updateCollider(

...)

Inheritance: GridBoundaryConditionSolver2.updateCollider

updateCollider(self: pyjet.GridBoundaryConditionSolver2, collider: pyjet.Collider2, gridSize: object, gridSpacing: object, gridOrigin: object) -> None

Applies new collider and build the internals.

This function is called to apply new collider and build the internal cache. To provide a hint to the cache, info for the expected velocity grid that will be constrained is provided.

Parameters

  • collider : New collider to apply.
  • gridSize : Size of the velocity grid to be constrained.
  • gridSpacing : Grid spacing of the velocity grid to be constrained.
  • gridOrigin : Origin of the velocity grid to be constrained.

class GridBlockedBoundaryConditionSolver3

Blocked 3-D boundary condition solver for grids.

This class constrains the velocity field by projecting the flow to the blocked representation of the collider. A collider is rasterized into voxels and each face of the collider voxels projects the velocity field onto its face. This implementation should pair up with GridSinglePhasePressureSolver3 since the pressure solver assumes blocked boundary representation as well.

Ancestors (in MRO)

Instance variables

var closedDomainBoundaryFlag

Inheritance: GridBoundaryConditionSolver3.closedDomainBoundaryFlag

Closed domain boundary flag.

var collider

Inheritance: GridBoundaryConditionSolver3.collider

Methods

def __init__(

...)

init(self: pyjet.GridBlockedBoundaryConditionSolver3) -> None

def constrainVelocity(

...)

constrainVelocity(self: pyjet.GridBlockedBoundaryConditionSolver3, velocity: pyjet.FaceCenteredGrid3, extrapolationDepth: int=5L) -> None

Constrains the velocity field to conform the collider boundary.

Parameters

  • velocity : Input and output velocity grid.
  • extrapolationDepth : Number of inner-collider grid cells that velocity will get extrapolated.

def updateCollider(

...)

Inheritance: GridBoundaryConditionSolver3.updateCollider

updateCollider(self: pyjet.GridBoundaryConditionSolver3, collider: pyjet.Collider3, gridSize: object, gridSpacing: object, gridOrigin: object) -> None

Applies new collider and build the internals.

This function is called to apply new collider and build the internal cache. To provide a hint to the cache, info for the expected velocity grid that will be constrained is provided.

Parameters

  • collider : New collider to apply.
  • gridSize : Size of the velocity grid to be constrained.
  • gridSpacing : Grid spacing of the velocity grid to be constrained.
  • gridOrigin : Origin of the velocity grid to be constrained.

class GridBoundaryConditionSolver2

Abstract base class for 2-D boundary condition solver for grids.

This is a helper class to constrain the 2-D velocity field with given collider object. It also determines whether to open any domain boundaries. To control the friction level, tune the collider parameter.

Ancestors (in MRO)

Instance variables

var closedDomainBoundaryFlag

Closed domain boundary flag.

var collider

Methods

def updateCollider(

...)

updateCollider(self: pyjet.GridBoundaryConditionSolver2, collider: pyjet.Collider2, gridSize: object, gridSpacing: object, gridOrigin: object) -> None

Applies new collider and build the internals.

This function is called to apply new collider and build the internal cache. To provide a hint to the cache, info for the expected velocity grid that will be constrained is provided.

Parameters

  • collider : New collider to apply.
  • gridSize : Size of the velocity grid to be constrained.
  • gridSpacing : Grid spacing of the velocity grid to be constrained.
  • gridOrigin : Origin of the velocity grid to be constrained.

class GridBoundaryConditionSolver3

Abstract base class for 3-D boundary condition solver for grids.

This is a helper class to constrain the 3-D velocity field with given collider object. It also determines whether to open any domain boundaries. To control the friction level, tune the collider parameter.

Ancestors (in MRO)

Instance variables

var closedDomainBoundaryFlag

Closed domain boundary flag.

var collider

Methods

def updateCollider(

...)

updateCollider(self: pyjet.GridBoundaryConditionSolver3, collider: pyjet.Collider3, gridSize: object, gridSpacing: object, gridOrigin: object) -> None

Applies new collider and build the internals.

This function is called to apply new collider and build the internal cache. To provide a hint to the cache, info for the expected velocity grid that will be constrained is provided.

Parameters

  • collider : New collider to apply.
  • gridSize : Size of the velocity grid to be constrained.
  • gridSpacing : Grid spacing of the velocity grid to be constrained.
  • gridOrigin : Origin of the velocity grid to be constrained.

class GridDiffusionSolver2

Abstract base class for 2-D grid-based diffusion equation solver.

This class provides functions to solve the diffusion equation for different types of fields. The target equation can be written as \f$\frac{\partial f}{\partial t} = \mu\nabla^2 f\f$ where \f$\mu\f$ is the diffusion coefficient. The field \f$f\f$ can be either scalar or vector field.

Ancestors (in MRO)

class GridDiffusionSolver3

Abstract base class for 3-D grid-based diffusion equation solver.

This class provides functions to solve the diffusion equation for different types of fields. The target equation can be written as \f$\frac{\partial f}{\partial t} = \mu\nabla^2 f\f$ where \f$\mu\f$ is the diffusion coefficient. The field \f$f\f$ can be either scalar or vector field.

Ancestors (in MRO)

class GridEmitter2

Abstract base class for 2-D grid-based emitters.

Ancestors (in MRO)

  • GridEmitter2
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

Methods

def setOnBeginUpdateCallback(

...)

setOnBeginUpdateCallback(self: pyjet.GridEmitter2, callback: function) -> None

Sets the callback function to be called when update is invoked.

The callback function takes current simulation time in seconds unit. Use this callback to track any motion or state changes related to this emitter.

Parameters

  • callback : The callback function.

def update(

...)

update(self: pyjet.GridEmitter2, currentTimeInSeconds: float, timeIntervalInSeconds: float) -> None

Updates the emitter state from currentTimeInSeconds to by timeIntervalInSeconds.

Parameters

  • currentTimeInSeconds : Starting time stamp.
  • timeIntervalInSeconds : Time-step to advance.

class GridEmitter3

Abstract base class for 3-D grid-based emitters.

Ancestors (in MRO)

  • GridEmitter3
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

Methods

def setOnBeginUpdateCallback(

...)

setOnBeginUpdateCallback(self: pyjet.GridEmitter3, callback: function) -> None

Sets the callback function to be called when update is invoked.

The callback function takes current simulation time in seconds unit. Use this callback to track any motion or state changes related to this emitter.

Parameters

  • callback : The callback function.

def update(

...)

update(self: pyjet.GridEmitter3, currentTimeInSeconds: float, timeIntervalInSeconds: float) -> None

Updates the emitter state from currentTimeInSeconds to by timeIntervalInSeconds.

Parameters

  • currentTimeInSeconds : Starting time stamp.
  • timeIntervalInSeconds : Time-step to advance.

class GridFluidSolver2

Abstract base class for grid-based 2-D fluid solver.

This is an abstract base class for grid-based 2-D fluid solver based on Jos Stam's famous 1999 paper - "Stable Fluids". This solver takes fractional step method as its foundation which is consisted of independent advection, diffusion, external forces, and pressure projection steps. Each step is configurable so that a custom step can be implemented. For example, if a user wants to change the advection solver to her/his own implementation, simply call setAdvectionSolver(newSolver).

Ancestors (in MRO)

Instance variables

var advectionSolver

The advection solver.

var closedDomainBoundaryFlag

The closed domain boundary flag.

This flag is an integer which is bitwise-combination of DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_UP, and DIRECTION_BACK.

var collider

The collider.

var currentFrame

Inheritance: PhysicsAnimation.currentFrame

var currentTimeInSeconds

Inheritance: PhysicsAnimation.currentTimeInSeconds

var diffusionSolver

The diffusion solver instance.

var emitter

The emitter.

var gravity

The gravity vector of the system.

var gridOrigin

The origin of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.origin., but provides a shortcut.

var gridSpacing

The grid spacing of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.gridSpacing., but provides a shortcut.

var isUsingFixedSubTimeSteps

Inheritance: PhysicsAnimation.isUsingFixedSubTimeSteps

var maxCfl

The max allowed CFL number.

var numberOfFixedSubTimeSteps

Inheritance: PhysicsAnimation.numberOfFixedSubTimeSteps

var pressureSolver

The pressure solver instance.

var resolution

The resolution of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.resolution, but provides a shortcut.

var velocity

The velocity field.

This property returns the velocity field from the grid system data. It is just a shortcut to the most commonly accessed data chunk.

var viscosityCoefficient

The viscosity coefficient.

Methods

def advanceSingleFrame(

...)

Inheritance: PhysicsAnimation.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def cfl(

...)

cfl(self: pyjet.GridFluidSolver2, timeIntervalInSeconds: float) -> float

Returns the CFL number from the current velocity field for given time interval.

Parameters

  • timeIntervalInSeconds : The time interval in seconds.

def resizeGrid(

...)

resizeGrid(self: pyjet.GridFluidSolver2, args, *kwargs) -> None

Resizes grid system data.

This function resizes grid system data. You can also resize the grid by calling resize function directly from GridFluidSolver2::gridSystemData(), but this function provides a shortcut for the same operation.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def update(

...)

Inheritance: PhysicsAnimation.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class GridFluidSolver3

Abstract base class for grid-based 3-D fluid solver.

This is an abstract base class for grid-based 3-D fluid solver based on Jos Stam's famous 1999 paper - "Stable Fluids". This solver takes fractional step method as its foundation which is consisted of independent advection, diffusion, external forces, and pressure projection steps. Each step is configurable so that a custom step can be implemented. For example, if a user wants to change the advection solver to her/his own implementation, simply call setAdvectionSolver(newSolver).

Ancestors (in MRO)

Instance variables

var advectionSolver

The advection solver.

var closedDomainBoundaryFlag

The closed domain boundary flag.

This flag is an integer which is bitwise-combination of DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_UP, DIRECTION_BACK, and DIRECTION_FRONT. Default is DIRECTION_ALL.

var collider

The collider.

var currentFrame

Inheritance: PhysicsAnimation.currentFrame

var currentTimeInSeconds

Inheritance: PhysicsAnimation.currentTimeInSeconds

var diffusionSolver

The diffusion solver instance.

var emitter

The emitter.

var gravity

The gravity vector of the system.

var gridOrigin

The origin of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.origin., but provides a shortcut.

var gridSpacing

The grid spacing of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.gridSpacing., but provides a shortcut.

var isUsingFixedSubTimeSteps

Inheritance: PhysicsAnimation.isUsingFixedSubTimeSteps

var maxCfl

The max allowed CFL number.

var numberOfFixedSubTimeSteps

Inheritance: PhysicsAnimation.numberOfFixedSubTimeSteps

var pressureSolver

The pressure solver instance.

var resolution

The resolution of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.resolution, but provides a shortcut.

var velocity

The velocity field.

This property returns the velocity field from the grid system data. It is just a shortcut to the most commonly accessed data chunk.

var viscosityCoefficient

The viscosity coefficient.

Methods

def advanceSingleFrame(

...)

Inheritance: PhysicsAnimation.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def cfl(

...)

cfl(self: pyjet.GridFluidSolver3, timeIntervalInSeconds: float) -> float

Returns the CFL number from the current velocity field for given time interval.

Parameters

  • timeIntervalInSeconds : The time interval in seconds.

def resizeGrid(

...)

resizeGrid(self: pyjet.GridFluidSolver3, args, *kwargs) -> None

Resizes grid system data.

This function resizes grid system data. You can also resize the grid by calling resize function directly from GridFluidSolver2::gridSystemData(), but this function provides a shortcut for the same operation.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def update(

...)

Inheritance: PhysicsAnimation.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class GridForwardEulerDiffusionSolver2

2-D grid-based forward Euler diffusion solver.

This class implements 2-D grid-based forward Euler diffusion solver using second-order central differencing spatially. Since the method is relying on explicit time-integration (i.e. forward Euler), the diffusion coefficient is limited by the time interval and grid spacing such as: \f$\mu < \frac{h}{12\Delta t} \f$ where \f$\mu\f$, \f$h\f$, and \f$\Delta t\f$ are the diffusion coefficient, grid spacing, and time interval, respectively.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.GridForwardEulerDiffusionSolver2) -> None

def solver(

...)

solver(self: pyjet.GridForwardEulerDiffusionSolver2, source: pyjet.Grid2, diffusionCoefficient: float, timeIntervalInSeconds: float, dest: pyjet.Grid2, **kwargs) -> None

Solves diffusion equation for a scalar field.

Parameters

  • source : Input grid.
  • diffusionCoefficient : Amount of diffusion.
  • timeIntervalInSeconds : Small time-interval that diffusion occur.
  • dest : Output grid.
  • **kwargs :
    • Key boundarySdf : Shape of the solid boundary that is empty by default.
    • Key fluidSdf : Shape of the fluid boundary that is full by default.

class GridForwardEulerDiffusionSolver3

3-D grid-based forward Euler diffusion solver.

This class implements 3-D grid-based forward Euler diffusion solver using second-order central differencing spatially. Since the method is relying on explicit time-integration (i.e. forward Euler), the diffusion coefficient is limited by the time interval and grid spacing such as: \f$\mu < \frac{h}{12\Delta t} \f$ where \f$\mu\f$, \f$h\f$, and \f$\Delta t\f$ are the diffusion coefficient, grid spacing, and time interval, respectively.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.GridForwardEulerDiffusionSolver3) -> None

def solver(

...)

solver(self: pyjet.GridForwardEulerDiffusionSolver3, source: pyjet.Grid3, diffusionCoefficient: float, timeIntervalInSeconds: float, dest: pyjet.Grid3, **kwargs) -> None

Solves diffusion equation for a scalar field.

Parameters

  • source : Input grid.
  • diffusionCoefficient : Amount of diffusion.
  • timeIntervalInSeconds : Small time-interval that diffusion occur.
  • dest : Output grid.
  • **kwargs :
    • Key boundarySdf : Shape of the solid boundary that is empty by default.
    • Key fluidSdf : Shape of the fluid boundary that is full by default.

class GridFractionalBoundaryConditionSolver2

Fractional 2-D boundary condition solver for grids.

This class constrains the velocity field by projecting the flow to the signed-distance field representation of the collider. This implementation should pair up with GridFractionalSinglePhasePressureSolver2 to provide sub-grid resolutional velocity projection.

Ancestors (in MRO)

Instance variables

var closedDomainBoundaryFlag

Inheritance: GridBoundaryConditionSolver2.closedDomainBoundaryFlag

Closed domain boundary flag.

var collider

Inheritance: GridBoundaryConditionSolver2.collider

var colliderSdf

Signed distance field of the collider.

var colliderVelocityField

Velocity field of the collider.

Methods

def __init__(

...)

init(self: pyjet.GridFractionalBoundaryConditionSolver2) -> None

def constrainVelocity(

...)

constrainVelocity(self: pyjet.GridFractionalBoundaryConditionSolver2, velocity: pyjet.FaceCenteredGrid2, extrapolationDepth: int=5L) -> None

Constrains the velocity field to conform the collider boundary.

Parameters

  • velocity : Input and output velocity grid.
  • extrapolationDepth : Number of inner-collider grid cells that velocity will get extrapolated.

def updateCollider(

...)

Inheritance: GridBoundaryConditionSolver2.updateCollider

updateCollider(self: pyjet.GridBoundaryConditionSolver2, collider: pyjet.Collider2, gridSize: object, gridSpacing: object, gridOrigin: object) -> None

Applies new collider and build the internals.

This function is called to apply new collider and build the internal cache. To provide a hint to the cache, info for the expected velocity grid that will be constrained is provided.

Parameters

  • collider : New collider to apply.
  • gridSize : Size of the velocity grid to be constrained.
  • gridSpacing : Grid spacing of the velocity grid to be constrained.
  • gridOrigin : Origin of the velocity grid to be constrained.

class GridFractionalBoundaryConditionSolver3

Fractional 3-D boundary condition solver for grids.

This class constrains the velocity field by projecting the flow to the signed-distance field representation of the collider. This implementation should pair up with GridFractionalSinglePhasePressureSolver3 to provide sub-grid resolutional velocity projection.

Ancestors (in MRO)

Instance variables

var closedDomainBoundaryFlag

Inheritance: GridBoundaryConditionSolver3.closedDomainBoundaryFlag

Closed domain boundary flag.

var collider

Inheritance: GridBoundaryConditionSolver3.collider

var colliderSdf

Signed distance field of the collider.

var colliderVelocityField

Velocity field of the collider.

Methods

def __init__(

...)

init(self: pyjet.GridFractionalBoundaryConditionSolver3) -> None

def constrainVelocity(

...)

constrainVelocity(self: pyjet.GridFractionalBoundaryConditionSolver3, velocity: pyjet.FaceCenteredGrid3, extrapolationDepth: int=5L) -> None

Constrains the velocity field to conform the collider boundary.

Parameters

  • velocity : Input and output velocity grid.
  • extrapolationDepth : Number of inner-collider grid cells that velocity will get extrapolated.

def updateCollider(

...)

Inheritance: GridBoundaryConditionSolver3.updateCollider

updateCollider(self: pyjet.GridBoundaryConditionSolver3, collider: pyjet.Collider3, gridSize: object, gridSpacing: object, gridOrigin: object) -> None

Applies new collider and build the internals.

This function is called to apply new collider and build the internal cache. To provide a hint to the cache, info for the expected velocity grid that will be constrained is provided.

Parameters

  • collider : New collider to apply.
  • gridSize : Size of the velocity grid to be constrained.
  • gridSpacing : Grid spacing of the velocity grid to be constrained.
  • gridOrigin : Origin of the velocity grid to be constrained.

class GridFractionalSinglePhasePressureSolver2

2-D fractional single-phase pressure solver.

This class implements 2-D fractional (or variational) single-phase pressure solver. It is called fractional because the solver encodes the boundaries to the grid cells like anti-aliased pixels, meaning that a grid cell will record the partially overlapping boundary as a fractional number. Alternative approach is to represent boundaries like Lego blocks which is the case for GridSinglePhasePressureSolver2. In addition, this class solves single-phase flow, solving the pressure for selected fluid region only and treat other area as an atmosphere region. Thus, the pressure outside the fluid will be set to a constant value and velocity field won't be altered. This solver also computes the fluid boundary in fractional manner, meaning that the solver tries to capture the subgrid structures. This class uses ghost fluid method for such calculation. \see Batty, Christopher, Florence Bertails, and Robert Bridson. "A fast variational framework for accurate solid-fluid coupling." ACM Transactions on Graphics (TOG). Vol. 26. No. 2. ACM, 2007. \see Enright, Doug, et al. "Using the particle level set method and a second order accurate pressure boundary condition for free surface flows." ASME/JSME 2002 4th Joint Fluids Summer Engineering Conference. American Society of Mechanical Engineers, 2002.

Ancestors (in MRO)

Instance variables

var linearSystemSolver

"The linear system solver."

Methods

def __init__(

...)

init(self: pyjet.GridFractionalSinglePhasePressureSolver2) -> None

class GridFractionalSinglePhasePressureSolver3

3-D fractional single-phase pressure solver.

This class implements 3-D fractional (or variational) single-phase pressure solver. It is called fractional because the solver encodes the boundaries to the grid cells like anti-aliased pixels, meaning that a grid cell will record the partially overlapping boundary as a fractional number. Alternative approach is to represent boundaries like Lego blocks which is the case for GridSinglePhasePressureSolver2. In addition, this class solves single-phase flow, solving the pressure for selected fluid region only and treat other area as an atmosphere region. Thus, the pressure outside the fluid will be set to a constant value and velocity field won't be altered. This solver also computes the fluid boundary in fractional manner, meaning that the solver tries to capture the subgrid structures. This class uses ghost fluid method for such calculation. \see Batty, Christopher, Florence Bertails, and Robert Bridson. "A fast variational framework for accurate solid-fluid coupling." ACM Transactions on Graphics (TOG). Vol. 26. No. 3. ACM, 2007. \see Enright, Doug, et al. "Using the particle level set method and a second order accurate pressure boundary condition for free surface flows." ASME/JSME 2003 4th Joint Fluids Summer Engineering Conference. American Society of Mechanical Engineers, 2003.

Ancestors (in MRO)

Instance variables

var linearSystemSolver

"The linear system solver."

Methods

def __init__(

...)

init(self: pyjet.GridFractionalSinglePhasePressureSolver3) -> None

class GridPressureSolver2

Abstract base class for 2-D grid-based pressure solver.

This class represents a 2-D grid-based pressure solver interface which can be used as a sub-step of GridFluidSolver2.

Ancestors (in MRO)

class GridPressureSolver3

Abstract base class for 3-D grid-based pressure solver.

This class represents a 3-D grid-based pressure solver interface which can be used as a sub-step of GridFluidSolver3.

Ancestors (in MRO)

class GridSinglePhasePressureSolver2

2-D single-phase pressure solver.

This class implements 2-D single-phase pressure solver. This solver encodes the boundaries like Lego blocks -- if a grid cell center is inside or outside the boundaries, it is either marked as occupied or not. In addition, this class solves single-phase flow, solving the pressure for selected fluid region only and treat other area as an atmosphere region. Thus, the pressure outside the fluid will be set to a constant value and velocity field won't be altered. This solver also computes the fluid boundary in block-like manner; If a grid cell is inside or outside the fluid, it is marked as either fluid or atmosphere. Thus, this solver in general, does not compute subgrid structure.

Ancestors (in MRO)

Instance variables

var linearSystemSolver

"The linear system solver."

Methods

def __init__(

...)

init(self: pyjet.GridSinglePhasePressureSolver2) -> None

class GridSinglePhasePressureSolver3

3-D single-phase pressure solver.

This class implements 3-D single-phase pressure solver. This solver encodes the boundaries like Lego blocks -- if a grid cell center is inside or outside the boundaries, it is either marked as occupied or not. In addition, this class solves single-phase flow, solving the pressure for selected fluid region only and treat other area as an atmosphere region. Thus, the pressure outside the fluid will be set to a constant value and velocity field won't be altered. This solver also computes the fluid boundary in block-like manner; If a grid cell is inside or outside the fluid, it is marked as either fluid or atmosphere. Thus, this solver in general, does not compute subgrid structure.

Ancestors (in MRO)

Instance variables

var linearSystemSolver

"The linear system solver."

Methods

def __init__(

...)

init(self: pyjet.GridSinglePhasePressureSolver3) -> None

class GridSmokeSolver2

2-D grid-based smoke solver.

This class extends GridFluidSolver2 to implement smoke simulation solver. It adds smoke density and temperature fields to define the smoke and uses buoyancy force to simulate hot rising smoke.

See Fedkiw, Ronald, Jos Stam, and Henrik Wann Jensen. "Visual simulation of smoke." Proceedings of the 28th annual conference on Computer graphics and interactive techniques. ACM, 2001.

Ancestors (in MRO)

Instance variables

var advectionSolver

Inheritance: GridFluidSolver2.advectionSolver

The advection solver.

var buoyancySmokeDensityFactor

The buoyancy factor which will be multiplied to the smoke density.

This class computes buoyancy by looking up the value of smoke density and temperature, compare them to the average values, and apply multiplier factor to the diff between the value and the average. That multiplier is defined for each smoke density and temperature separately For example, negative smoke density buoyancy factor means a heavier smoke should sink.

var buoyancyTemperatureFactor

The buoyancy factor which will be multiplied to the temperature.

This class computes buoyancy by looking up the value of smoke density and temperature, compare them to the average values, and apply multiplier factor to the diff between the value and the average. That multiplier is defined for each smoke density and temperature separately For example, negative smoke density buoyancy factor means a heavier smoke should sink.

var closedDomainBoundaryFlag

Inheritance: GridFluidSolver2.closedDomainBoundaryFlag

The closed domain boundary flag.

This flag is an integer which is bitwise-combination of DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_UP, and DIRECTION_BACK.

var collider

Inheritance: GridFluidSolver2.collider

The collider.

var currentFrame

Inheritance: GridFluidSolver2.currentFrame

var currentTimeInSeconds

Inheritance: GridFluidSolver2.currentTimeInSeconds

var diffusionSolver

Inheritance: GridFluidSolver2.diffusionSolver

The diffusion solver instance.

var emitter

Inheritance: GridFluidSolver2.emitter

The emitter.

var gravity

Inheritance: GridFluidSolver2.gravity

The gravity vector of the system.

var gridOrigin

Inheritance: GridFluidSolver2.gridOrigin

The origin of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.origin., but provides a shortcut.

var gridSpacing

Inheritance: GridFluidSolver2.gridSpacing

The grid spacing of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.gridSpacing., but provides a shortcut.

var isUsingFixedSubTimeSteps

Inheritance: GridFluidSolver2.isUsingFixedSubTimeSteps

var maxCfl

Inheritance: GridFluidSolver2.maxCfl

The max allowed CFL number.

var numberOfFixedSubTimeSteps

Inheritance: GridFluidSolver2.numberOfFixedSubTimeSteps

var pressureSolver

Inheritance: GridFluidSolver2.pressureSolver

The pressure solver instance.

var resolution

Inheritance: GridFluidSolver2.resolution

The resolution of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.resolution, but provides a shortcut.

var smokeDecayFactor

The smoke decay factor.

In addition to the diffusion, the smoke also can fade-out over time by setting the decay factor between 0 and 1.

var smokeDensity

Returns smoke density field.

var smokeDiffusionCoefficient

The smoke diffusion coefficient.

var smokeTemperatureDecayFactor

The temperature decay factor.

In addition to the diffusion, the temperature also can fade-out over time by setting the decay factor between 0 and 1.

var temperature

Returns temperature field.

var temperatureDiffusionCoefficient

The temperature diffusion coefficient.

var velocity

Inheritance: GridFluidSolver2.velocity

The velocity field.

This property returns the velocity field from the grid system data. It is just a shortcut to the most commonly accessed data chunk.

var viscosityCoefficient

Inheritance: GridFluidSolver2.viscosityCoefficient

The viscosity coefficient.

Methods

def __init__(

...)

Inheritance: PhysicsAnimation.__init__

init(self: pyjet.GridSmokeSolver2, args, *kwargs) -> None

Constructs GridSmokeSolver2

This method constructs GridSmokeSolver2 with resolution, gridSpacing, and gridOrigin.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def advanceSingleFrame(

...)

Inheritance: GridFluidSolver2.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def cfl(

...)

Inheritance: GridFluidSolver2.cfl

cfl(self: pyjet.GridFluidSolver2, timeIntervalInSeconds: float) -> float

Returns the CFL number from the current velocity field for given time interval.

Parameters

  • timeIntervalInSeconds : The time interval in seconds.

def resizeGrid(

...)

Inheritance: GridFluidSolver2.resizeGrid

resizeGrid(self: pyjet.GridFluidSolver2, args, *kwargs) -> None

Resizes grid system data.

This function resizes grid system data. You can also resize the grid by calling resize function directly from GridFluidSolver2::gridSystemData(), but this function provides a shortcut for the same operation.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def update(

...)

Inheritance: GridFluidSolver2.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class GridSmokeSolver3

3-D grid-based smoke solver.

This class extends GridFluidSolver3 to implement smoke simulation solver. It adds smoke density and temperature fields to define the smoke and uses buoyancy force to simulate hot rising smoke.

See Fedkiw, Ronald, Jos Stam, and Henrik Wann Jensen. "Visual simulation of smoke." Proceedings of the 28th annual conference on Computer graphics and interactive techniques. ACM, 2001.

Ancestors (in MRO)

Instance variables

var advectionSolver

Inheritance: GridFluidSolver3.advectionSolver

The advection solver.

var buoyancySmokeDensityFactor

The buoyancy factor which will be multiplied to the smoke density.

This class computes buoyancy by looking up the value of smoke density and temperature, compare them to the average values, and apply multiplier factor to the diff between the value and the average. That multiplier is defined for each smoke density and temperature separately For example, negative smoke density buoyancy factor means a heavier smoke should sink.

var buoyancyTemperatureFactor

The buoyancy factor which will be multiplied to the temperature.

This class computes buoyancy by looking up the value of smoke density and temperature, compare them to the average values, and apply multiplier factor to the diff between the value and the average. That multiplier is defined for each smoke density and temperature separately For example, negative smoke density buoyancy factor means a heavier smoke should sink.

var closedDomainBoundaryFlag

Inheritance: GridFluidSolver3.closedDomainBoundaryFlag

The closed domain boundary flag.

This flag is an integer which is bitwise-combination of DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_UP, DIRECTION_BACK, and DIRECTION_FRONT. Default is DIRECTION_ALL.

var collider

Inheritance: GridFluidSolver3.collider

The collider.

var currentFrame

Inheritance: GridFluidSolver3.currentFrame

var currentTimeInSeconds

Inheritance: GridFluidSolver3.currentTimeInSeconds

var diffusionSolver

Inheritance: GridFluidSolver3.diffusionSolver

The diffusion solver instance.

var emitter

Inheritance: GridFluidSolver3.emitter

The emitter.

var gravity

Inheritance: GridFluidSolver3.gravity

The gravity vector of the system.

var gridOrigin

Inheritance: GridFluidSolver3.gridOrigin

The origin of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.origin., but provides a shortcut.

var gridSpacing

Inheritance: GridFluidSolver3.gridSpacing

The grid spacing of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.gridSpacing., but provides a shortcut.

var isUsingFixedSubTimeSteps

Inheritance: GridFluidSolver3.isUsingFixedSubTimeSteps

var maxCfl

Inheritance: GridFluidSolver3.maxCfl

The max allowed CFL number.

var numberOfFixedSubTimeSteps

Inheritance: GridFluidSolver3.numberOfFixedSubTimeSteps

var pressureSolver

Inheritance: GridFluidSolver3.pressureSolver

The pressure solver instance.

var resolution

Inheritance: GridFluidSolver3.resolution

The resolution of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.resolution, but provides a shortcut.

var smokeDecayFactor

The smoke decay factor.

In addition to the diffusion, the smoke also can fade-out over time by setting the decay factor between 0 and 1.

var smokeDensity

Returns smoke density field.

var smokeDiffusionCoefficient

The smoke diffusion coefficient.

var smokeTemperatureDecayFactor

The temperature decay factor.

In addition to the diffusion, the temperature also can fade-out over time by setting the decay factor between 0 and 1.

var temperature

Returns temperature field.

var temperatureDiffusionCoefficient

The temperature diffusion coefficient.

var velocity

Inheritance: GridFluidSolver3.velocity

The velocity field.

This property returns the velocity field from the grid system data. It is just a shortcut to the most commonly accessed data chunk.

var viscosityCoefficient

Inheritance: GridFluidSolver3.viscosityCoefficient

The viscosity coefficient.

Methods

def __init__(

...)

Inheritance: PhysicsAnimation.__init__

init(self: pyjet.GridSmokeSolver3, args, *kwargs) -> None

Constructs GridSmokeSolver3

This method constructs GridSmokeSolver3 with resolution, gridSpacing, and gridOrigin.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def advanceSingleFrame(

...)

Inheritance: GridFluidSolver3.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def cfl(

...)

Inheritance: GridFluidSolver3.cfl

cfl(self: pyjet.GridFluidSolver3, timeIntervalInSeconds: float) -> float

Returns the CFL number from the current velocity field for given time interval.

Parameters

  • timeIntervalInSeconds : The time interval in seconds.

def resizeGrid(

...)

Inheritance: GridFluidSolver3.resizeGrid

resizeGrid(self: pyjet.GridFluidSolver3, args, *kwargs) -> None

Resizes grid system data.

This function resizes grid system data. You can also resize the grid by calling resize function directly from GridFluidSolver2::gridSystemData(), but this function provides a shortcut for the same operation.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def update(

...)

Inheritance: GridFluidSolver3.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class GridSystemData2

2-D grid system data.

This class is the key data structure for storing grid system data. To represent a grid system for fluid simulation, velocity field is defined as a face-centered (MAC) grid by default. It can also have additional scalar or vector attributes by adding extra data layer.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.GridSystemData2) -> None

def deserialize(

...)

Inheritance: Serializable.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: Serializable.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def serialize(

...)

Inheritance: Serializable.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: Serializable.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

class GridSystemData3

3-D grid system data.

This class is the key data structure for storing grid system data. To represent a grid system for fluid simulation, velocity field is defined as a face-centered (MAC) grid by default. It can also have additional scalar or vector attributes by adding extra data layer.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.GridSystemData3) -> None

def deserialize(

...)

Inheritance: Serializable.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: Serializable.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def serialize(

...)

Inheritance: Serializable.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: Serializable.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

class ImplicitSurface2

Abstract base class for 2-D implicit surface.

Ancestors (in MRO)

Instance variables

var isNormalFlipped

Inheritance: Surface2.isNormalFlipped

var transform

Inheritance: Surface2.transform

Methods

def signedDistance(

...)

signedDistance(self: pyjet.ImplicitSurface2, otherPoint: object) -> float

Returns signed distance from the given point otherPoint.

class ImplicitSurface3

Abstract base class for 3-D implicit surface.

Ancestors (in MRO)

Instance variables

var isNormalFlipped

Inheritance: Surface3.isNormalFlipped

var transform

Inheritance: Surface3.transform

Methods

def signedDistance(

...)

signedDistance(self: pyjet.ImplicitSurface3, otherPoint: object) -> float

Returns signed distance from the given point otherPoint.

class ImplicitTriangleMesh3

TriangleMesh3 to ImplicitSurface3 converter.

This class builds signed-distance field for given TriangleMesh3 instance so that it can be used as an ImplicitSurface3 instance. The mesh is discretize into a regular grid and the signed-distance is measured at each grid point. Thus, there is a sampling error and its magnitude depends on the grid resolution.

Ancestors (in MRO)

Instance variables

var grid

The grid data.

var isNormalFlipped

Inheritance: ImplicitSurface3.isNormalFlipped

var transform

Inheritance: ImplicitSurface3.transform

Methods

def __init__(

...)

init(self: pyjet.ImplicitTriangleMesh3, points: pyjet.TriangleMesh3, normals: int, uvs: float, transform: pyjet.Transform3=, isNormalFlipped: bool=False) -> None

Constructs a triangle with given points, normals, and uvs.

def signedDistance(

...)

Inheritance: ImplicitSurface3.signedDistance

signedDistance(self: pyjet.ImplicitSurface3, otherPoint: object) -> float

Returns signed distance from the given point otherPoint.

class IterativeLevelSetSolver2

Abstract base class for 2-D PDE-based iterative level set solver.

This class provides infrastructure for 2-D PDE-based iterative level set solver. Internally, the class implements upwind-style wave propagation and the inheriting classes must provide a way to compute the derivatives for given grid points.

  • See Osher, Stanley, and Ronald Fedkiw. Level set methods and dynamic implicit surfaces. Vol. 153. Springer Science & Business Media, 2006.

Ancestors (in MRO)

Instance variables

var maxCfl

The maximum CFL limit.

Methods

def extrapolate(

...)

extrapolate(self: pyjet.IterativeLevelSetSolver2, input: pyjet.Grid2, sdf: pyjet.ScalarGrid2, maxDistance: float, output: pyjet.Grid2) -> None

Extrapolates given field from negative to positive SDF region.

Parameters

  • input : Input field to be extrapolated.
  • sdf : Reference signed-distance field.
  • maxDistance : Max range of extrapolation.
  • output : Output field.

def reinitialize(

...)

reinitialize(self: pyjet.IterativeLevelSetSolver2, inputSdf: pyjet.ScalarGrid2, maxDistance: float, outputSdf: pyjet.ScalarGrid2) -> None

Reinitializes given scalar field to signed-distance field.

Parameters

  • inputSdf : Input signed-distance field which can be distorted.
  • maxDistance : Max range of reinitialization.
  • outputSdf : Output signed-distance field.

class IterativeLevelSetSolver3

Abstract base class for 3-D PDE-based iterative level set solver.

This class provides infrastructure for 3-D PDE-based iterative level set solver. Internally, the class implements upwind-style wave propagation and the inheriting classes must provide a way to compute the derivatives for given grid points.

  • See Osher, Stanley, and Ronald Fedkiw. Level set methods and dynamic implicit surfaces. Vol. 153. Springer Science & Business Media, 2006.

Ancestors (in MRO)

Instance variables

var maxCfl

The maximum CFL limit.

Methods

def extrapolate(

...)

extrapolate(self: pyjet.IterativeLevelSetSolver3, input: pyjet.Grid3, sdf: pyjet.ScalarGrid3, maxDistance: float, output: pyjet.Grid3) -> None

Extrapolates given field from negative to positive SDF region.

Parameters

  • input : Input field to be extrapolated.
  • sdf : Reference signed-distance field.
  • maxDistance : Max range of extrapolation.
  • output : Output field.

def reinitialize(

...)

reinitialize(self: pyjet.IterativeLevelSetSolver3, inputSdf: pyjet.ScalarGrid3, maxDistance: float, outputSdf: pyjet.ScalarGrid3) -> None

Reinitializes given scalar field to signed-distance field.

Parameters

  • inputSdf : Input signed-distance field which can be distorted.
  • maxDistance : Max range of reinitialization.
  • outputSdf : Output signed-distance field.

class LevelSetLiquidSolver2

Level set based 2-D liquid solver.

This class implements level set-based 2-D liquid solver. It defines the surface of the liquid using signed-distance field and use stable fluids framework to compute the forces.

  • See Enright, Douglas, Stephen Marschner, and Ronald Fedkiw. "Animation and rendering of complex water surfaces." ACM Transactions on Graphics (TOG). Vol. 21. No. 3. ACM, 2002.

Ancestors (in MRO)

Instance variables

var advectionSolver

Inheritance: GridFluidSolver2.advectionSolver

The advection solver.

var closedDomainBoundaryFlag

Inheritance: GridFluidSolver2.closedDomainBoundaryFlag

The closed domain boundary flag.

This flag is an integer which is bitwise-combination of DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_UP, and DIRECTION_BACK.

var collider

Inheritance: GridFluidSolver2.collider

The collider.

var currentFrame

Inheritance: GridFluidSolver2.currentFrame

var currentTimeInSeconds

Inheritance: GridFluidSolver2.currentTimeInSeconds

var diffusionSolver

Inheritance: GridFluidSolver2.diffusionSolver

The diffusion solver instance.

var emitter

Inheritance: GridFluidSolver2.emitter

The emitter.

var gravity

Inheritance: GridFluidSolver2.gravity

The gravity vector of the system.

var gridOrigin

Inheritance: GridFluidSolver2.gridOrigin

The origin of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.origin., but provides a shortcut.

var gridSpacing

Inheritance: GridFluidSolver2.gridSpacing

The grid spacing of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.gridSpacing., but provides a shortcut.

var isUsingFixedSubTimeSteps

Inheritance: GridFluidSolver2.isUsingFixedSubTimeSteps

var levelSetSolver

The level set solver.

var maxCfl

Inheritance: GridFluidSolver2.maxCfl

The max allowed CFL number.

var numberOfFixedSubTimeSteps

Inheritance: GridFluidSolver2.numberOfFixedSubTimeSteps

var pressureSolver

Inheritance: GridFluidSolver2.pressureSolver

The pressure solver instance.

var resolution

Inheritance: GridFluidSolver2.resolution

The resolution of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.resolution, but provides a shortcut.

var signedDistanceField

The signed-distance field.

var velocity

Inheritance: GridFluidSolver2.velocity

The velocity field.

This property returns the velocity field from the grid system data. It is just a shortcut to the most commonly accessed data chunk.

var viscosityCoefficient

Inheritance: GridFluidSolver2.viscosityCoefficient

The viscosity coefficient.

Methods

def __init__(

...)

Inheritance: PhysicsAnimation.__init__

init(self: pyjet.LevelSetLiquidSolver2, args, *kwargs) -> None

Constructs LevelSetLiquidSolver2

This method constructs LevelSetLiquidSolver2 with resolution, gridSpacing, and gridOrigin.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def advanceSingleFrame(

...)

Inheritance: GridFluidSolver2.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def cfl(

...)

Inheritance: GridFluidSolver2.cfl

cfl(self: pyjet.GridFluidSolver2, timeIntervalInSeconds: float) -> float

Returns the CFL number from the current velocity field for given time interval.

Parameters

  • timeIntervalInSeconds : The time interval in seconds.

def computeVolume(

...)

computeVolume(self: pyjet.LevelSetLiquidSolver2) -> float

Returns liquid volume measured by smeared Heaviside function.

This function measures the liquid volume using smeared Heaviside function. Thus, the estimated volume is an approximated quantity.

def resizeGrid(

...)

Inheritance: GridFluidSolver2.resizeGrid

resizeGrid(self: pyjet.GridFluidSolver2, args, *kwargs) -> None

Resizes grid system data.

This function resizes grid system data. You can also resize the grid by calling resize function directly from GridFluidSolver2::gridSystemData(), but this function provides a shortcut for the same operation.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def setIsGlobalCompensationEnabled(

...)

setIsGlobalCompensationEnabled(self: pyjet.LevelSetLiquidSolver2, isEnabled: bool) -> None

Enables (or disables) global compensation feature flag.

When isEnabled is true, the global compensation feature is enabled. The global compensation measures the volume at the beginning and the end of the time-step and adds the volume change back to the level-set field by globally shifting the front. \see Song, Oh-Young, Hyuncheol Shin, and Hyeong-Seok Ko. "Stable but nondissipative water." ACM Transactions on Graphics (TOG) 24, no. 1 (2005): 81-97.

def setMinReinitializeDistance(

...)

setMinReinitializeDistance(self: pyjet.LevelSetLiquidSolver2, arg0: float) -> None

Sets minimum reinitialization distance.

def update(

...)

Inheritance: GridFluidSolver2.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class LevelSetLiquidSolver3

Level set based 3-D liquid solver.

This class implements level set-based 3-D liquid solver. It defines the surface of the liquid using signed-distance field and use stable fluids framework to compute the forces.

  • See Enright, Douglas, Stephen Marschner, and Ronald Fedkiw. "Animation and rendering of complex water surfaces." ACM Transactions on Graphics (TOG). Vol. 21. No. 3. ACM, 2002.

Ancestors (in MRO)

Instance variables

var advectionSolver

Inheritance: GridFluidSolver3.advectionSolver

The advection solver.

var closedDomainBoundaryFlag

Inheritance: GridFluidSolver3.closedDomainBoundaryFlag

The closed domain boundary flag.

This flag is an integer which is bitwise-combination of DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_UP, DIRECTION_BACK, and DIRECTION_FRONT. Default is DIRECTION_ALL.

var collider

Inheritance: GridFluidSolver3.collider

The collider.

var currentFrame

Inheritance: GridFluidSolver3.currentFrame

var currentTimeInSeconds

Inheritance: GridFluidSolver3.currentTimeInSeconds

var diffusionSolver

Inheritance: GridFluidSolver3.diffusionSolver

The diffusion solver instance.

var emitter

Inheritance: GridFluidSolver3.emitter

The emitter.

var gravity

Inheritance: GridFluidSolver3.gravity

The gravity vector of the system.

var gridOrigin

Inheritance: GridFluidSolver3.gridOrigin

The origin of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.origin., but provides a shortcut.

var gridSpacing

Inheritance: GridFluidSolver3.gridSpacing

The grid spacing of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.gridSpacing., but provides a shortcut.

var isUsingFixedSubTimeSteps

Inheritance: GridFluidSolver3.isUsingFixedSubTimeSteps

var levelSetSolver

The level set solver.

var maxCfl

Inheritance: GridFluidSolver3.maxCfl

The max allowed CFL number.

var numberOfFixedSubTimeSteps

Inheritance: GridFluidSolver3.numberOfFixedSubTimeSteps

var pressureSolver

Inheritance: GridFluidSolver3.pressureSolver

The pressure solver instance.

var resolution

Inheritance: GridFluidSolver3.resolution

The resolution of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.resolution, but provides a shortcut.

var signedDistanceField

The signed-distance field.

var velocity

Inheritance: GridFluidSolver3.velocity

The velocity field.

This property returns the velocity field from the grid system data. It is just a shortcut to the most commonly accessed data chunk.

var viscosityCoefficient

Inheritance: GridFluidSolver3.viscosityCoefficient

The viscosity coefficient.

Methods

def __init__(

...)

Inheritance: PhysicsAnimation.__init__

init(self: pyjet.LevelSetLiquidSolver3, args, *kwargs) -> None

Constructs LevelSetLiquidSolver3

This method constructs LevelSetLiquidSolver3 with resolution, gridSpacing, and gridOrigin.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def advanceSingleFrame(

...)

Inheritance: GridFluidSolver3.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def cfl(

...)

Inheritance: GridFluidSolver3.cfl

cfl(self: pyjet.GridFluidSolver3, timeIntervalInSeconds: float) -> float

Returns the CFL number from the current velocity field for given time interval.

Parameters

  • timeIntervalInSeconds : The time interval in seconds.

def computeVolume(

...)

computeVolume(self: pyjet.LevelSetLiquidSolver3) -> float

Returns liquid volume measured by smeared Heaviside function.

This function measures the liquid volume using smeared Heaviside function. Thus, the estimated volume is an approximated quantity.

def resizeGrid(

...)

Inheritance: GridFluidSolver3.resizeGrid

resizeGrid(self: pyjet.GridFluidSolver3, args, *kwargs) -> None

Resizes grid system data.

This function resizes grid system data. You can also resize the grid by calling resize function directly from GridFluidSolver2::gridSystemData(), but this function provides a shortcut for the same operation.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def setIsGlobalCompensationEnabled(

...)

setIsGlobalCompensationEnabled(self: pyjet.LevelSetLiquidSolver3, isEnabled: bool) -> None

Enables (or disables) global compensation feature flag.

When isEnabled is true, the global compensation feature is enabled. The global compensation measures the volume at the beginning and the end of the time-step and adds the volume change back to the level-set field by globally shifting the front. \see Song, Oh-Young, Hyuncheol Shin, and Hyeong-Seok Ko. "Stable but nondissipative water." ACM Transactions on Graphics (TOG) 24, no. 1 (2005): 81-97.

def setMinReinitializeDistance(

...)

setMinReinitializeDistance(self: pyjet.LevelSetLiquidSolver3, arg0: float) -> None

Sets minimum reinitialization distance.

def update(

...)

Inheritance: GridFluidSolver3.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class LevelSetSolver2

Abstract base class for 2-D level set solver.

Ancestors (in MRO)

class LevelSetSolver3

Abstract base class for 3-D level set solver.

Ancestors (in MRO)

class Logging

Ancestors (in MRO)

  • Logging
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

class LoggingLevel

Ancestors (in MRO)

  • LoggingLevel
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Class variables

var ALL

var DEBUG

var ERROR

var INFO

var OFF

var WARN

Methods

def __init__(

...)

init(self: pyjet.LoggingLevel, arg0: int) -> None

class ParticleEmitter2

Abstract base class for 2-D particle emitter.

Ancestors (in MRO)

Instance variables

var target

The target particle system to emit.

Methods

def setOnBeginUpdateCallback(

...)

setOnBeginUpdateCallback(self: pyjet.ParticleEmitter2, arg0: std::__1::function) -> None

Sets the callback function to be called when update function is invoked.

The callback function takes current simulation time in seconds unit. Use this callback to track any motion or state changes related to this emitter.

def update(

...)

update(self: pyjet.ParticleEmitter2, currentTimeInSeconds: float, timeIntervalInSeconds: float) -> None

Updates the emitter state from currentTimeInSeconds to the following time-step.

class ParticleEmitter3

Abstract base class for 3-D particle emitter.

Ancestors (in MRO)

Instance variables

var target

The target particle system to emit.

Methods

def setOnBeginUpdateCallback(

...)

setOnBeginUpdateCallback(self: pyjet.ParticleEmitter3, arg0: std::__1::function) -> None

Sets the callback function to be called when update function is invoked.

The callback function takes current simulation time in seconds unit. Use this callback to track any motion or state changes related to this emitter.

def update(

...)

update(self: pyjet.ParticleEmitter3, currentTimeInSeconds: float, timeIntervalInSeconds: float) -> None

Updates the emitter state from currentTimeInSeconds to the following time-step.

class ParticleEmitterSet2

2-D particle-based emitter set.

Ancestors (in MRO)

Instance variables

var target

Inheritance: ParticleEmitter2.target

The target particle system to emit.

Methods

def __init__(

...)

init(self: pyjet.ParticleEmitterSet2, emitters: list) -> None

Constructs an emitter with sub-emitters.

def addEmitter(

...)

addEmitter(self: pyjet.ParticleEmitterSet2, emitter: pyjet.ParticleEmitter2) -> None

Adds sub-emitter.

def setOnBeginUpdateCallback(

...)

Inheritance: ParticleEmitter2.setOnBeginUpdateCallback

setOnBeginUpdateCallback(self: pyjet.ParticleEmitter2, arg0: std::__1::function) -> None

Sets the callback function to be called when update function is invoked.

The callback function takes current simulation time in seconds unit. Use this callback to track any motion or state changes related to this emitter.

def update(

...)

Inheritance: ParticleEmitter2.update

update(self: pyjet.ParticleEmitter2, currentTimeInSeconds: float, timeIntervalInSeconds: float) -> None

Updates the emitter state from currentTimeInSeconds to the following time-step.

class ParticleEmitterSet3

3-D particle-based emitter set.

Ancestors (in MRO)

Instance variables

var target

Inheritance: ParticleEmitter3.target

The target particle system to emit.

Methods

def __init__(

...)

init(self: pyjet.ParticleEmitterSet3, emitters: list) -> None

Constructs an emitter with sub-emitters.

def addEmitter(

...)

addEmitter(self: pyjet.ParticleEmitterSet3, emitter: pyjet.ParticleEmitter3) -> None

Adds sub-emitter.

def setOnBeginUpdateCallback(

...)

Inheritance: ParticleEmitter3.setOnBeginUpdateCallback

setOnBeginUpdateCallback(self: pyjet.ParticleEmitter3, arg0: std::__1::function) -> None

Sets the callback function to be called when update function is invoked.

The callback function takes current simulation time in seconds unit. Use this callback to track any motion or state changes related to this emitter.

def update(

...)

Inheritance: ParticleEmitter3.update

update(self: pyjet.ParticleEmitter3, currentTimeInSeconds: float, timeIntervalInSeconds: float) -> None

Updates the emitter state from currentTimeInSeconds to the following time-step.

class ParticleSystemData2

This class is the key data structure for storing particle system data. A single particle has position, velocity, and force attributes by default. But it can also have additional custom scalar or vector attributes.

Ancestors (in MRO)

Instance variables

var forces

Returns the force array (mutable).

var mass

The mass of a particle.

var neighborLists

The neighbor lists.

This property returns neighbor lists which is available after calling PointParallelHashGridSearcher2::buildNeighborLists. Each list stores indices of the neighbors.

var neighborSearcher

The neighbor searcher.

This property returns currently set neighbor searcher object. By default, PointParallelHashGridSearcher2 is used.

var numberOfParticles

The number of particles.

var positions

Returns the position array (mutable).

var radius

The radius of the particles.

var velocities

Returns the velocity array (mutable).

Methods

def __init__(

...)

init(self: pyjet.ParticleSystemData2, numberOfParticles: int=0L) -> None

Constructs particle system data with given number of particles.

def addParticle(

...)

addParticle(self: pyjet.ParticleSystemData2, newPosition: object, newVelocity: object=, newForce: object=) -> None

Adds a particle to the data structure.

This function will add a single particle to the data structure. For custom data layers, zeros will be assigned for new particles. However, this will invalidate neighbor searcher and neighbor lists. It is users responsibility to call ParticleSystemData2::buildNeighborSearcher and ParticleSystemData2::buildNeighborLists to refresh those data.

Parameters

  • newPosition : The new position.
  • newVelocity : The new velocity.
  • newForce : The new force.

def addParticles(

...)

addParticles(self: pyjet.ParticleSystemData2, arg0: list, arg1: list, arg2: list) -> None

Adds particles to the data structure.

This function will add particles to the data structure. For custom data layers, zeros will be assigned for new particles. However, this will invalidate neighbor searcher and neighbor lists. It is users responsibility to call ParticleSystemData2::buildNeighborSearcher and ParticleSystemData2::buildNeighborLists to refresh those data.

Parameters

  • newPositions : The new positions.
  • newVelocities : The new velocities.
  • newForces : The new forces.

def addScalarData(

...)

addScalarData(self: pyjet.ParticleSystemData2, initialVal: float=0.0) -> int

Adds a scalar data layer and returns its index.

This function adds a new scalar data layer to the system. It can be used for adding a scalar attribute, such as temperature, to the particles.

Parameters

  • initialVal : Initial value of the new scalar data.

def addVectorData(

...)

addVectorData(self: pyjet.ParticleSystemData2, initialVal: object=) -> int

Adds a vector data layer and returns its index.

This function adds a new vector data layer to the system. It can be used for adding a vector attribute, such as vortex, to the particles.

Parameters

  • initialVal : Initial value of the new vector data.

def deserialize(

...)

Inheritance: Serializable.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: Serializable.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def resize(

...)

resize(self: pyjet.ParticleSystemData2, newNumberOfParticles: int) -> None

Resizes the number of particles of the container.

This function will resize internal containers to store newly given number of particles including custom data layers. However, this will invalidate neighbor searcher and neighbor lists. It is users responsibility to call ParticleSystemData2::buildNeighborSearcher and ParticleSystemData2::buildNeighborLists to refresh those data.

Parameters

  • newNumberOfParticles : New number of particles.

def scalarDataAt(

...)

scalarDataAt(self: pyjet.ParticleSystemData2, arg0: int) -> pyjet.ArrayAccessor1D

Returns custom scalar data layer at given index (mutable).

def serialize(

...)

Inheritance: Serializable.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: Serializable.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

def set(

...)

set(self: pyjet.ParticleSystemData2, arg0: pyjet.ParticleSystemData2) -> None

Copies from other particle system data.

def vectorDataAt(

...)

vectorDataAt(self: pyjet.ParticleSystemData2, arg0: int) -> pyjet.ArrayAccessor1Vector2D

Returns custom vector data layer at given index (mutable).

class ParticleSystemData3

This class is the key data structure for storing particle system data. A single particle has position, velocity, and force attributes by default. But it can also have additional custom scalar or vector attributes.

Ancestors (in MRO)

Instance variables

var forces

Returns the force array (mutable).

var mass

The mass of a particle.

var neighborLists

The neighbor lists.

This property returns neighbor lists which is available after calling PointParallelHashGridSearcher2::buildNeighborLists. Each list stores indices of the neighbors.

var neighborSearcher

The neighbor searcher.

This property returns currently set neighbor searcher object. By default, PointParallelHashGridSearcher2 is used.

var numberOfParticles

The number of particles.

var positions

Returns the position array (mutable).

var radius

The radius of the particles.

var velocities

Returns the velocity array (mutable).

Methods

def __init__(

...)

init(self: pyjet.ParticleSystemData3, numberOfParticles: int=0L) -> None

Constructs particle system data with given number of particles.

def addParticle(

...)

addParticle(self: pyjet.ParticleSystemData3, newPosition: object, newVelocity: object=, newForce: object=) -> None

Adds a particle to the data structure.

This function will add a single particle to the data structure. For custom data layers, zeros will be assigned for new particles. However, this will invalidate neighbor searcher and neighbor lists. It is users responsibility to call ParticleSystemData3::buildNeighborSearcher and ParticleSystemData3::buildNeighborLists to refresh those data.

Parameters

  • newPosition : The new position.
  • newVelocity : The new velocity.
  • newForce : The new force.

def addParticles(

...)

addParticles(self: pyjet.ParticleSystemData3, arg0: list, arg1: list, arg2: list) -> None

Adds particles to the data structure.

This function will add particles to the data structure. For custom data layers, zeros will be assigned for new particles. However, this will invalidate neighbor searcher and neighbor lists. It is users responsibility to call ParticleSystemData3::buildNeighborSearcher and ParticleSystemData3::buildNeighborLists to refresh those data.

Parameters

  • newPositions : The new positions.
  • newVelocities : The new velocities.
  • newForces : The new forces.

def addScalarData(

...)

addScalarData(self: pyjet.ParticleSystemData3, initialVal: float=0.0) -> int

Adds a scalar data layer and returns its index.

This function adds a new scalar data layer to the system. It can be used for adding a scalar attribute, such as temperature, to the particles.

Parameters

  • initialVal : Initial value of the new scalar data.

def addVectorData(

...)

addVectorData(self: pyjet.ParticleSystemData3, initialVal: object=) -> int

Adds a vector data layer and returns its index.

This function adds a new vector data layer to the system. It can be used for adding a vector attribute, such as vortex, to the particles.

Parameters

  • initialVal : Initial value of the new vector data.

def deserialize(

...)

Inheritance: Serializable.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: Serializable.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def resize(

...)

resize(self: pyjet.ParticleSystemData3, newNumberOfParticles: int) -> None

Resizes the number of particles of the container.

This function will resize internal containers to store newly given number of particles including custom data layers. However, this will invalidate neighbor searcher and neighbor lists. It is users responsibility to call ParticleSystemData3::buildNeighborSearcher and ParticleSystemData3::buildNeighborLists to refresh those data.

Parameters

  • newNumberOfParticles : New number of particles.

def scalarDataAt(

...)

scalarDataAt(self: pyjet.ParticleSystemData3, arg0: int) -> pyjet.ArrayAccessor1D

Returns custom scalar data layer at given index (mutable).

def serialize(

...)

Inheritance: Serializable.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: Serializable.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

def set(

...)

set(self: pyjet.ParticleSystemData3, arg0: pyjet.ParticleSystemData3) -> None

Copies from other particle system data.

def vectorDataAt(

...)

vectorDataAt(self: pyjet.ParticleSystemData3, arg0: int) -> pyjet.ArrayAccessor1Vector3D

Returns custom vector data layer at given index (mutable).

class ParticleSystemSolver2

Basic 2-D particle system solver.

This class implements basic particle system solver. It includes gravity, air drag, and collision. But it does not compute particle-to-particle interaction. Thus, this solver is suitable for performing simple spray-like simulations with low computational cost. This class can be further extend to add more sophisticated simulations, such as SPH, to handle particle-to-particle intersection.

Ancestors (in MRO)

Instance variables

var collider

The collider.

var currentFrame

Inheritance: PhysicsAnimation.currentFrame

var currentTimeInSeconds

Inheritance: PhysicsAnimation.currentTimeInSeconds

var dragCoefficient

The drag coefficient.

The drag coefficient controls the amount of air-drag. The coefficient should be a positive number and 0 means no drag force.

var emitter

The emitter.

var gravity

The gravity.

var isUsingFixedSubTimeSteps

Inheritance: PhysicsAnimation.isUsingFixedSubTimeSteps

var numberOfFixedSubTimeSteps

Inheritance: PhysicsAnimation.numberOfFixedSubTimeSteps

var particleSystemData

The the particle system data.

This property returns the particle system data. The data is created when this solver is constructed and also owned by the solver.

var restitutionCoefficient

The restitution coefficient.

The restitution coefficient controls the bouncy-ness of a particle when it hits a collider surface. The range of the coefficient should be 0 to 1 -- 0 means no bounce back and 1 means perfect reflection.

var wind

The wind.

Wind can be applied to the particle system by setting a vector field to the solver.

Methods

def __init__(

...)

Inheritance: PhysicsAnimation.__init__

init(self: pyjet.ParticleSystemSolver2, radius: float=0.01, mass: float=0.01) -> None

Constructs a solver with particle parameters.

Parameters

  • radius : Radius of a particle in meters (default 1e-2).
  • mass : Mass of a particle in kg (default 1e-2).

def advanceSingleFrame(

...)

Inheritance: PhysicsAnimation.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def update(

...)

Inheritance: PhysicsAnimation.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class ParticleSystemSolver3

Basic 3-D particle system solver.

This class implements basic particle system solver. It includes gravity, air drag, and collision. But it does not compute particle-to-particle interaction. Thus, this solver is suitable for performing simple spray-like simulations with low computational cost. This class can be further extend to add more sophisticated simulations, such as SPH, to handle particle-to-particle intersection.

Ancestors (in MRO)

Instance variables

var collider

The collider.

var dragCoefficient

The drag coefficient.

The drag coefficient controls the amount of air-drag. The coefficient should be a positive number and 0 means no drag force.

var emitter

The emitter.

var gravity

The gravity.

var particleSystemData

The the particle system data.

This property returns the particle system data. The data is created when this solver is constructed and also owned by the solver.

var restitutionCoefficient

The restitution coefficient.

The restitution coefficient controls the bouncy-ness of a particle when it hits a collider surface. The range of the coefficient should be 0 to 1 -- 0 means no bounce back and 1 means perfect reflection.

var wind

The wind.

Wind can be applied to the particle system by setting a vector field to the solver.

Methods

def __init__(

...)

init(self: pyjet.ParticleSystemSolver3, radius: float=0.001, mass: float=0.001) -> None

Constructs a solver with particle parameters.

Parameters

  • radius : Radius of a particle in meters (default 1e-3).
  • mass : Mass of a particle in kg (default 1e-3).

class PciSphSolver2

2-D PCISPH solver.

This class implements 2-D predictive-corrective SPH solver. The main pressure solver is based on Solenthaler and Pajarola's 2009 SIGGRAPH paper. - See Solenthaler and Pajarola, Predictive-corrective incompressible SPH, ACM transactions on graphics (TOG). Vol. 28. No. 3. ACM, 2009.

Ancestors (in MRO)

Instance variables

var collider

Inheritance: SphSolver2.collider

The collider.

var currentFrame

Inheritance: SphSolver2.currentFrame

var currentTimeInSeconds

Inheritance: SphSolver2.currentTimeInSeconds

var dragCoefficient

Inheritance: SphSolver2.dragCoefficient

The drag coefficient.

The drag coefficient controls the amount of air-drag. The coefficient should be a positive number and 0 means no drag force.

var emitter

Inheritance: SphSolver2.emitter

The emitter.

var eosExponent

Inheritance: SphSolver2.eosExponent

The exponent part of the equation-of-state.

This function sets the exponent part of the equation-of-state. The value must be greater than 1.0, and smaller inputs will be clamped. Default is 7.

var gravity

Inheritance: SphSolver2.gravity

The gravity.

var isUsingFixedSubTimeSteps

Inheritance: SphSolver2.isUsingFixedSubTimeSteps

var maxDensityErrorRatio

The max allowed density error ratio.

This property sets the max allowed density error ratio during the PCISPH iteration. Default is 0.01 (1%). The input value should be positive.

var maxNumberOfIterations

The max number of PCISPH iterations.

This property sets the max number of PCISPH iterations. Default is 5.

var negativePressureScale

Inheritance: SphSolver2.negativePressureScale

The negative pressure scale.

This function sets the negative pressure scale. By setting the number between 0 and 1, the solver will scale the effect of negative pressure which can prevent the clumping of the particles near the surface. Input value outside 0 and 1 will be clamped within the range. Default is 0.

var numberOfFixedSubTimeSteps

Inheritance: SphSolver2.numberOfFixedSubTimeSteps

var particleSystemData

Inheritance: SphSolver2.particleSystemData

The the particle system data.

This property returns the particle system data. The data is created when this solver is constructed and also owned by the solver.

var pseudoViscosityCoefficient

Inheritance: SphSolver2.pseudoViscosityCoefficient

The pseudo viscosity coefficient.

This function sets the pseudo viscosity coefficient which applies additional pseudo-physical damping to the system. Default is 10.

var restitutionCoefficient

Inheritance: SphSolver2.restitutionCoefficient

The restitution coefficient.

The restitution coefficient controls the bouncy-ness of a particle when it hits a collider surface. The range of the coefficient should be 0 to 1 -- 0 means no bounce back and 1 means perfect reflection.

var speedOfSound

Inheritance: SphSolver2.speedOfSound

The speed of sound.

This function sets the speed of sound which affects the stiffness of the EOS and the time-step size. Higher value will make EOS stiffer and the time-step smaller. The input value must be higher than 0.0.

var sphSystemData

Inheritance: SphSolver2.sphSystemData

The SPH system data.

var timeStepLimitScale

Inheritance: SphSolver2.timeStepLimitScale

Multiplier that scales the max allowed time-step.

This function returns the multiplier that scales the max allowed time-step. When the scale is 1.0, the time-step is bounded by the speed of sound and max acceleration.

var viscosityCoefficient

Inheritance: SphSolver2.viscosityCoefficient

The viscosity coefficient.

var wind

Inheritance: SphSolver2.wind

The wind.

Wind can be applied to the particle system by setting a vector field to the solver.

Methods

def __init__(

...)

Inheritance: SphSolver2.__init__

init(self: pyjet.PciSphSolver2, targetDensity: float=1000.0, targetSpacing: float=0.1, relativeKernelRadius: float=1.8) -> None

Constructs a solver with target density, spacing, and relative kernel radius.

def advanceSingleFrame(

...)

Inheritance: SphSolver2.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def update(

...)

Inheritance: SphSolver2.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class PciSphSolver3

3-D PCISPH solver.

This class implements 3-D predictive-corrective SPH solver. The main pressure solver is based on Solenthaler and Pajarola's 2009 SIGGRAPH paper. - See Solenthaler and Pajarola, Predictive-corrective incompressible SPH, ACM transactions on graphics (TOG). Vol. 28. No. 3. ACM, 2009.

Ancestors (in MRO)

Instance variables

var collider

Inheritance: SphSolver3.collider

The collider.

var dragCoefficient

Inheritance: SphSolver3.dragCoefficient

The drag coefficient.

The drag coefficient controls the amount of air-drag. The coefficient should be a positive number and 0 means no drag force.

var emitter

Inheritance: SphSolver3.emitter

The emitter.

var eosExponent

Inheritance: SphSolver3.eosExponent

The exponent part of the equation-of-state.

This function sets the exponent part of the equation-of-state. The value must be greater than 1.0, and smaller inputs will be clamped. Default is 7.

var gravity

Inheritance: SphSolver3.gravity

The gravity.

var maxDensityErrorRatio

The max allowed density error ratio.

This property sets the max allowed density error ratio during the PCISPH iteration. Default is 0.01 (1%). The input value should be positive.

var maxNumberOfIterations

The max number of PCISPH iterations.

This property sets the max number of PCISPH iterations. Default is 5.

var negativePressureScale

Inheritance: SphSolver3.negativePressureScale

The negative pressure scale.

This function sets the negative pressure scale. By setting the number between 0 and 1, the solver will scale the effect of negative pressure which can prevent the clumping of the particles near the surface. Input value outside 0 and 1 will be clamped within the range. Default is 0.

var particleSystemData

Inheritance: SphSolver3.particleSystemData

The the particle system data.

This property returns the particle system data. The data is created when this solver is constructed and also owned by the solver.

var pseudoViscosityCoefficient

Inheritance: SphSolver3.pseudoViscosityCoefficient

The pseudo viscosity coefficient.

This function sets the pseudo viscosity coefficient which applies additional pseudo-physical damping to the system. Default is 10.

var restitutionCoefficient

Inheritance: SphSolver3.restitutionCoefficient

The restitution coefficient.

The restitution coefficient controls the bouncy-ness of a particle when it hits a collider surface. The range of the coefficient should be 0 to 1 -- 0 means no bounce back and 1 means perfect reflection.

var speedOfSound

Inheritance: SphSolver3.speedOfSound

The speed of sound.

This function sets the speed of sound which affects the stiffness of the EOS and the time-step size. Higher value will make EOS stiffer and the time-step smaller. The input value must be higher than 0.0.

var sphSystemData

Inheritance: SphSolver3.sphSystemData

The SPH system data.

var timeStepLimitScale

Inheritance: SphSolver3.timeStepLimitScale

Multiplier that scales the max allowed time-step.

This function returns the multiplier that scales the max allowed time-step. When the scale is 1.0, the time-step is bounded by the speed of sound and max acceleration.

var viscosityCoefficient

Inheritance: SphSolver3.viscosityCoefficient

The viscosity coefficient.

var wind

Inheritance: SphSolver3.wind

The wind.

Wind can be applied to the particle system by setting a vector field to the solver.

Methods

def __init__(

...)

Inheritance: SphSolver3.__init__

init(self: pyjet.PciSphSolver3, targetDensity: float=1000.0, targetSpacing: float=0.1, relativeKernelRadius: float=1.8) -> None

Constructs a solver with target density, spacing, and relative kernel radius.

class PhysicsAnimation

Ancestors (in MRO)

Instance variables

var currentFrame

var currentTimeInSeconds

var isUsingFixedSubTimeSteps

var numberOfFixedSubTimeSteps

Methods

def __init__(

...)

Inheritance: Animation.__init__

init(self: pyjet.PhysicsAnimation) -> None

def advanceSingleFrame(

...)

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def update(

...)

Inheritance: Animation.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class PicSolver2

Ancestors (in MRO)

Instance variables

var advectionSolver

Inheritance: GridFluidSolver2.advectionSolver

The advection solver.

var closedDomainBoundaryFlag

Inheritance: GridFluidSolver2.closedDomainBoundaryFlag

The closed domain boundary flag.

This flag is an integer which is bitwise-combination of DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_UP, and DIRECTION_BACK.

var collider

Inheritance: GridFluidSolver2.collider

The collider.

var currentFrame

Inheritance: GridFluidSolver2.currentFrame

var currentTimeInSeconds

Inheritance: GridFluidSolver2.currentTimeInSeconds

var diffusionSolver

Inheritance: GridFluidSolver2.diffusionSolver

The diffusion solver instance.

var emitter

Inheritance: GridFluidSolver2.emitter

The emitter.

var gravity

Inheritance: GridFluidSolver2.gravity

The gravity vector of the system.

var gridOrigin

Inheritance: GridFluidSolver2.gridOrigin

The origin of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.origin., but provides a shortcut.

var gridSpacing

Inheritance: GridFluidSolver2.gridSpacing

The grid spacing of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.gridSpacing., but provides a shortcut.

var isUsingFixedSubTimeSteps

Inheritance: GridFluidSolver2.isUsingFixedSubTimeSteps

var maxCfl

Inheritance: GridFluidSolver2.maxCfl

The max allowed CFL number.

var numberOfFixedSubTimeSteps

Inheritance: GridFluidSolver2.numberOfFixedSubTimeSteps

var particleEmitter

Particle emitter property.

var particleSystemData

Returns particleSystemData.

var pressureSolver

Inheritance: GridFluidSolver2.pressureSolver

The pressure solver instance.

var resolution

Inheritance: GridFluidSolver2.resolution

The resolution of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.resolution, but provides a shortcut.

var velocity

Inheritance: GridFluidSolver2.velocity

The velocity field.

This property returns the velocity field from the grid system data. It is just a shortcut to the most commonly accessed data chunk.

var viscosityCoefficient

Inheritance: GridFluidSolver2.viscosityCoefficient

The viscosity coefficient.

Methods

def __init__(

...)

Inheritance: PhysicsAnimation.__init__

init(self: pyjet.PicSolver2, args, *kwargs) -> None

Constructs PicSolver2

This method constructs PicSolver2 with resolution, gridSpacing, and gridOrigin.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def advanceSingleFrame(

...)

Inheritance: GridFluidSolver2.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def cfl(

...)

Inheritance: GridFluidSolver2.cfl

cfl(self: pyjet.GridFluidSolver2, timeIntervalInSeconds: float) -> float

Returns the CFL number from the current velocity field for given time interval.

Parameters

  • timeIntervalInSeconds : The time interval in seconds.

def resizeGrid(

...)

Inheritance: GridFluidSolver2.resizeGrid

resizeGrid(self: pyjet.GridFluidSolver2, args, *kwargs) -> None

Resizes grid system data.

This function resizes grid system data. You can also resize the grid by calling resize function directly from GridFluidSolver2::gridSystemData(), but this function provides a shortcut for the same operation.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def update(

...)

Inheritance: GridFluidSolver2.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class PicSolver3

Ancestors (in MRO)

Instance variables

var advectionSolver

Inheritance: GridFluidSolver3.advectionSolver

The advection solver.

var closedDomainBoundaryFlag

Inheritance: GridFluidSolver3.closedDomainBoundaryFlag

The closed domain boundary flag.

This flag is an integer which is bitwise-combination of DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_UP, DIRECTION_BACK, and DIRECTION_FRONT. Default is DIRECTION_ALL.

var collider

Inheritance: GridFluidSolver3.collider

The collider.

var currentFrame

Inheritance: GridFluidSolver3.currentFrame

var currentTimeInSeconds

Inheritance: GridFluidSolver3.currentTimeInSeconds

var diffusionSolver

Inheritance: GridFluidSolver3.diffusionSolver

The diffusion solver instance.

var emitter

Inheritance: GridFluidSolver3.emitter

The emitter.

var gravity

Inheritance: GridFluidSolver3.gravity

The gravity vector of the system.

var gridOrigin

Inheritance: GridFluidSolver3.gridOrigin

The origin of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.origin., but provides a shortcut.

var gridSpacing

Inheritance: GridFluidSolver3.gridSpacing

The grid spacing of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.gridSpacing., but provides a shortcut.

var isUsingFixedSubTimeSteps

Inheritance: GridFluidSolver3.isUsingFixedSubTimeSteps

var maxCfl

Inheritance: GridFluidSolver3.maxCfl

The max allowed CFL number.

var numberOfFixedSubTimeSteps

Inheritance: GridFluidSolver3.numberOfFixedSubTimeSteps

var particleEmitter

Particle emitter property.

var particleSystemData

Returns particleSystemData.

var pressureSolver

Inheritance: GridFluidSolver3.pressureSolver

The pressure solver instance.

var resolution

Inheritance: GridFluidSolver3.resolution

The resolution of the grid system data.

This function returns the resolution of the grid system data. This is equivalent to calling gridSystemData.resolution, but provides a shortcut.

var velocity

Inheritance: GridFluidSolver3.velocity

The velocity field.

This property returns the velocity field from the grid system data. It is just a shortcut to the most commonly accessed data chunk.

var viscosityCoefficient

Inheritance: GridFluidSolver3.viscosityCoefficient

The viscosity coefficient.

Methods

def __init__(

...)

Inheritance: PhysicsAnimation.__init__

init(self: pyjet.PicSolver3, args, *kwargs) -> None

Constructs PicSolver3

This method constructs PicSolver3 with resolution, gridSpacing, and gridOrigin.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def advanceSingleFrame(

...)

Inheritance: GridFluidSolver3.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def cfl(

...)

Inheritance: GridFluidSolver3.cfl

cfl(self: pyjet.GridFluidSolver3, timeIntervalInSeconds: float) -> float

Returns the CFL number from the current velocity field for given time interval.

Parameters

  • timeIntervalInSeconds : The time interval in seconds.

def resizeGrid(

...)

Inheritance: GridFluidSolver3.resizeGrid

resizeGrid(self: pyjet.GridFluidSolver3, args, *kwargs) -> None

Resizes grid system data.

This function resizes grid system data. You can also resize the grid by calling resize function directly from GridFluidSolver2::gridSystemData(), but this function provides a shortcut for the same operation.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def update(

...)

Inheritance: GridFluidSolver3.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class Plane2

2-D plane geometry.

This class represents 2-D plane geometry which extends Surface2 by overriding surface-related queries.

Ancestors (in MRO)

  • Plane2
  • Surface2
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

Instance variables

var isNormalFlipped

Inheritance: Surface2.isNormalFlipped

var normal

var point

var transform

Inheritance: Surface2.transform

Methods

def __init__(

...)

init(self: pyjet.Plane2, normal: object, point: object, transform: pyjet.Transform2=, isNormalFlipped: bool=False) -> None

Constructs a plane that cross point with surface normal.

class Plane3

3-D plane geometry.

This class represents 3-D plane geometry which extends Surface3 by overriding surface-related queries.

Ancestors (in MRO)

  • Plane3
  • Surface3
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

Instance variables

var isNormalFlipped

Inheritance: Surface3.isNormalFlipped

var normal

var point

var transform

Inheritance: Surface3.transform

Methods

def __init__(

...)

init(self: pyjet.Plane3, normal: object, point: object, transform: pyjet.Transform3=, isNormalFlipped: bool=False) -> None

Constructs a plane that cross point with surface normal.

class Point2UI

Ancestors (in MRO)

  • Point2UI
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var x

var y

Methods

def __init__(

...)

init(self: pyjet.Point2UI, x: int=0L, y: int=0L) -> None

Constructs Point2UI

This method constructs 2D point with x and y.

class Point3UI

Ancestors (in MRO)

  • Point3UI
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var x

var y

var z

Methods

def __init__(

...)

init(self: pyjet.Point3UI, x: int=0L, y: int=0L, z: int=0L) -> None

Constructs Point3UI

This method constructs 3D point with x, y, and z.

class PointParticleEmitter2

2-D point particle emitter.

Ancestors (in MRO)

Instance variables

var maxNumberOfNewParticlesPerSecond

The max number of new particles per second.

var maxNumberOfParticles

The max number of particles to be emitted.

Methods

def __init__(

...)

init(self: pyjet.PointParticleEmitter2, origin: object, direction: object, speed: float, spreadAngleInDegrees: float, maxNumOfNewParticlesPerSec: int, maxNumOfParticles: int, seed: int) -> None

Constructs an emitter that spawns particles from given origin, direction, speed, spread angle, max number of new particles per second, max total number of particles to be emitted, and random seed.

class PointParticleEmitter3

3-D point particle emitter.

Ancestors (in MRO)

Instance variables

var maxNumberOfNewParticlesPerSecond

The max number of new particles per second.

var maxNumberOfParticles

The max number of particles to be emitted.

Methods

def __init__(

...)

init(self: pyjet.PointParticleEmitter3, origin: object, direction: object, speed: float, spreadAngleInDegrees: float, maxNumOfNewParticlesPerSec: int, maxNumOfParticles: int, seed: int) -> None

Constructs an emitter that spawns particles from given origin, direction, speed, spread angle, max number of new particles per second, max total number of particles to be emitted, and random seed.

class PointsToImplicit2

Abstract base class for 2-D points-to-implicit converters.

Ancestors (in MRO)

Methods

def convert(

...)

convert(self: pyjet.PointsToImplicit2, points: list, output: pyjet.ScalarGrid2) -> None

Converts the given points to implicit surface scalar field.

Parameters

  • points : List of 2D vectors.
  • output : Scalar grid output.

class PointsToImplicit3

Abstract base class for 3-D points-to-implicit converters.

Ancestors (in MRO)

Methods

def convert(

...)

convert(self: pyjet.PointsToImplicit3, points: list, output: pyjet.ScalarGrid3) -> None

Converts the given points to implicit surface scalar field.

Parameters

  • points : List of 3D vectors.
  • output : Scalar grid output.

class QuaternionD

Ancestors (in MRO)

  • QuaternionD
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var w

var x

var y

var z

Methods

def __init__(

...)

init(self: pyjet.QuaternionD, w: float=1.0, x: float=0.0, y: float=0.0, z: float=0.0) -> None

Constructs QuaternionD.

This method constructs double-type quaternion with w, x, y, and z.

def angle(

...)

angle(self: pyjet.QuaternionD) -> float

def axis(

...)

axis(self: pyjet.QuaternionD) -> pyjet.Vector3D

def dot(

...)

dot(self: pyjet.QuaternionD, arg0: pyjet.QuaternionD) -> float

def inverse(

...)

inverse(self: pyjet.QuaternionD) -> pyjet.QuaternionD

def l2Norm(

...)

l2Norm(self: pyjet.QuaternionD) -> float

def normalize(

...)

normalize(self: pyjet.QuaternionD) -> None

def normalized(

...)

normalized(self: pyjet.QuaternionD) -> pyjet.QuaternionD

def rotate(

...)

rotate(self: pyjet.QuaternionD, other: object) -> pyjet.Vector3D

Returns this quaternion * other vector.

def setAxisAngle(

...)

setAxisAngle(self: pyjet.QuaternionD, axis: object, angle: float) -> None

Sets the quaternion with given rotation axis and angle.

def setFromTo(

...)

setFromTo(self: pyjet.QuaternionD, from: object, to: object) -> None

Sets the quaternion with from and to vectors.

def setIdentity(

...)

setIdentity(self: pyjet.QuaternionD) -> None

def setRotationBasis(

...)

setRotationBasis(self: pyjet.QuaternionD, basis0: object, basis1: object, basis2: object) -> None

Sets quaternion with three basis vectors.

class QuaternionF

Ancestors (in MRO)

  • QuaternionF
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var w

var x

var y

var z

Methods

def __init__(

...)

init(self: pyjet.QuaternionF, w: float=1.0, x: float=0.0, y: float=0.0, z: float=0.0) -> None

Constructs QuaternionF.

This method constructs float-type quaternion with w, x, y, and z.

def angle(

...)

angle(self: pyjet.QuaternionF) -> float

def axis(

...)

axis(self: pyjet.QuaternionF) -> pyjet.Vector3F

def dot(

...)

dot(self: pyjet.QuaternionF, arg0: pyjet.QuaternionF) -> float

def inverse(

...)

inverse(self: pyjet.QuaternionF) -> pyjet.QuaternionF

def l2Norm(

...)

l2Norm(self: pyjet.QuaternionF) -> float

def normalize(

...)

normalize(self: pyjet.QuaternionF) -> None

def normalized(

...)

normalized(self: pyjet.QuaternionF) -> pyjet.QuaternionF

def rotate(

...)

rotate(self: pyjet.QuaternionF, other: object) -> pyjet.Vector3F

Returns this quaternion * other vector.

def setAxisAngle(

...)

setAxisAngle(self: pyjet.QuaternionF, axis: object, angle: float) -> None

Sets the quaternion with given rotation axis and angle.

def setFromTo(

...)

setFromTo(self: pyjet.QuaternionF, from: object, to: object) -> None

Sets the quaternion with from and to vectors.

def setIdentity(

...)

setIdentity(self: pyjet.QuaternionF) -> None

def setRotationBasis(

...)

setRotationBasis(self: pyjet.QuaternionF, basis0: object, basis1: object, basis2: object) -> None

Sets quaternion with three basis vectors.

class Ray2D

Ancestors (in MRO)

  • Ray2D
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var direction

Direction of the ray.

var origin

Origin of the ray.

Methods

def __init__(

...)

init(self: pyjet.Ray2D, origin: object=, direction: object=) -> None

Constructs Ray2D

This method constructs 2D double ray with origin and direction.

class Ray2F

Ancestors (in MRO)

  • Ray2F
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var direction

Direction of the ray.

var origin

Origin of the ray.

Methods

def __init__(

...)

init(self: pyjet.Ray2F, origin: object=, direction: object=) -> None

Constructs Ray2F

This method constructs 2D float ray with origin and direction.

class Ray3D

Ancestors (in MRO)

  • Ray3D
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var direction

Direction of the ray.

var origin

Origin of the ray.

Methods

def __init__(

...)

init(self: pyjet.Ray3D, origin: object=, direction: object=) -> None

Constructs Ray3D

This method constructs 3D double ray with origin and direction.

class Ray3F

Ancestors (in MRO)

  • Ray3F
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var direction

Direction of the ray.

var origin

Origin of the ray.

Methods

def __init__(

...)

init(self: pyjet.Ray3F, origin: object=, direction: object=) -> None

Constructs Ray3F

This method constructs 3D float ray with origin and direction.

class RigidBodyCollider2

Ancestors (in MRO)

Instance variables

var angularVelocity

Angular velocity of the collider.

var frictionCoefficient

Inheritance: Collider2.frictionCoefficient

The friction coefficient.

This property specifies the friction coefficient to the collider. Any negative inputs will be clamped to zero.

var linearVelocity

Linear velocity of the collider.

var surface

Inheritance: Collider2.surface

The surface instance.

Methods

def __init__(

...)

init(self: pyjet.RigidBodyCollider2, surface: pyjet.Surface2, linearVelocity: object=, angularVelocity: float=0.0) -> None

Constructs RigidBodyCollider2

This method constructs RigidBodyCollider2 with surface, linear velocity, and angular velocity.

def velocityAt(

...)

velocityAt(self: pyjet.RigidBodyCollider2, point: object) -> pyjet.Vector2D

Returns the velocity of the collider at given point.

class RigidBodyCollider3

Ancestors (in MRO)

Instance variables

var angularVelocity

Angular velocity of the collider.

var frictionCoefficient

Inheritance: Collider3.frictionCoefficient

The friction coefficient.

This property specifies the friction coefficient to the collider. Any negative inputs will be clamped to zero.

var linearVelocity

Linear velocity of the collider.

var surface

Inheritance: Collider3.surface

The surface instance.

Methods

def __init__(

...)

init(self: pyjet.RigidBodyCollider3, surface: pyjet.Surface3, linearVelocity: object=, angularVelocity: object=) -> None

Constructs RigidBodyCollider3

This method constructs RigidBodyCollider3 with surface, linear velocity, and angular velocity.

def velocityAt(

...)

velocityAt(self: pyjet.RigidBodyCollider3, point: object) -> pyjet.Vector3D

Returns the velocity of the collider at given point.

class ScalarField2

Abstract base class for 2-D scalar field.

Ancestors (in MRO)

class ScalarField3

Abstract base class for 3-D scalar field.

Ancestors (in MRO)

class ScalarGrid2

Abstract base class for 2-D scalar grid structure.

Ancestors (in MRO)

Methods

def dataAccessor(

...)

dataAccessor(self: pyjet.ScalarGrid2) -> pyjet.ArrayAccessor2D

Returns the data array accessor.

def dataPosition(

...)

dataPosition(self: pyjet.ScalarGrid2) -> std::__1::function (unsigned long, unsigned long)>

Returns the function that maps data point to its position.

def deserialize(

...)

Inheritance: Grid2.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: Grid2.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def fill(

...)

fill(self: pyjet.ScalarGrid2, arg0: object) -> None

Fills the grid with given value or function.

def forEachDataPointIndex(

...)

forEachDataPointIndex(self: pyjet.ScalarGrid2, func: function) -> None

Invokes the given function func for each data point.

This function invokes the given function object func for each data point in serial manner. The input parameters are i and j indices of a data point. The order of execution is i-first, j-last.

def gradient(

...)

gradient(self: pyjet.ScalarGrid2, x: object) -> pyjet.Vector2D

Returns the gradient vector at given position x.

def gradientAtDataPoint(

...)

gradientAtDataPoint(self: pyjet.ScalarGrid2, i: int, j: int) -> pyjet.Vector2D

Returns the gradient vector at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def laplacian(

...)

laplacian(self: pyjet.ScalarGrid2, x: object) -> float

Returns the Laplacian value at given position x.

def laplacianAtDataPoint(

...)

laplacianAtDataPoint(self: pyjet.ScalarGrid2, i: int, j: int) -> float

Returns the Laplacian at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def resize(

...)

resize(self: pyjet.ScalarGrid2, args, *kwargs) -> None

Resizes the grid using given parameters.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def sample(

...)

sample(self: pyjet.ScalarGrid2, x: object) -> float

Returns sampled value at given position x.

def serialize(

...)

Inheritance: Grid2.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: Grid2.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

class ScalarGrid3

Abstract base class for 3-D scalar grid structure.

Ancestors (in MRO)

Methods

def dataAccessor(

...)

dataAccessor(self: pyjet.ScalarGrid3) -> pyjet.ArrayAccessor3D

Returns the data array accessor.

def dataPosition(

...)

dataPosition(self: pyjet.ScalarGrid3) -> std::__1::function (unsigned long, unsigned long, unsigned long)>

Returns the function that maps data point to its position.

def deserialize(

...)

Inheritance: Grid3.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: Grid3.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def fill(

...)

fill(self: pyjet.ScalarGrid3, arg0: object) -> None

Fills the grid with given value or function.

def forEachDataPointIndex(

...)

forEachDataPointIndex(self: pyjet.ScalarGrid3, func: function) -> None

Invokes the given function func for each data point.

This function invokes the given function object func for each data point in serial manner. The input parameters are i and j indices of a data point. The order of execution is i-first, j-last.

def gradient(

...)

gradient(self: pyjet.ScalarGrid3, x: object) -> pyjet.Vector3D

Returns the gradient vector at given position x.

def gradientAtDataPoint(

...)

gradientAtDataPoint(self: pyjet.ScalarGrid3, i: int, j: int, k: int) -> pyjet.Vector3D

Returns the gradient vector at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def laplacian(

...)

laplacian(self: pyjet.ScalarGrid3, x: object) -> float

Returns the Laplacian value at given position x.

def laplacianAtDataPoint(

...)

laplacianAtDataPoint(self: pyjet.ScalarGrid3, i: int, j: int, k: int) -> float

Returns the Laplacian at given data point.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def resize(

...)

resize(self: pyjet.ScalarGrid3, args, *kwargs) -> None

Resizes the grid using given parameters.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def sample(

...)

sample(self: pyjet.ScalarGrid3, x: object) -> float

Returns sampled value at given position x.

def serialize(

...)

Inheritance: Grid3.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: Grid3.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

class SemiLagrangian2

Implementation of 2-D semi-Lagrangian advection solver.

This class implements 2-D semi-Lagrangian advection solver. By default, the class implements 1st-order (linear) algorithm for the spatial interpolation. For the back-tracing, this class uses 2nd-order mid-point rule with adaptive time-stepping (CFL <= 1).

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.SemiLagrangian2) -> None

def solve(

...)

solve(self: pyjet.SemiLagrangian2, input: pyjet.Grid2, flow: pyjet.VectorField2, dt: float, output: pyjet.Grid2, boundarySdf: pyjet.ScalarField2=) -> None

Computes semi-Lagrangian for given scalar grid.

This function computes semi-Lagrangian method to solve advection equation for given field input and underlying vector field flow that carries the input field. The solution after solving the equation for given time-step dt should be stored in field output. The boundary interface is given by a signed-distance field. The field is negative inside the boundary. By default, a constant field with max double value (kMaxD) is used, meaning no boundary.

Parameters

  • input : Input grid.
  • flow : Vector field that advects the input field.
  • dt : Time-step for the advection.
  • output : Output grid.
  • boundarySdf : Boundary interface defined by signed-distance field.

class SemiLagrangian3

Implementation of 3-D semi-Lagrangian advection solver.

This class implements 3-D semi-Lagrangian advection solver. By default, the class implements 1st-order (linear) algorithm for the spatial interpolation. For the back-tracing, this class uses 3nd-order mid-point rule with adaptive time-stepping (CFL <= 1).

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.SemiLagrangian3) -> None

def solve(

...)

solve(self: pyjet.SemiLagrangian3, input: pyjet.Grid3, flow: pyjet.VectorField3, dt: float, output: pyjet.Grid3, boundarySdf: pyjet.ScalarField3=) -> None

Computes semi-Lagrangian for given scalar grid.

This function computes semi-Lagrangian method to solve advection equation for given field input and underlying vector field flow that carries the input field. The solution after solving the equation for given time-step dt should be stored in field output. The boundary interface is given by a signed-distance field. The field is negative inside the boundary. By default, a constant field with max double value (kMaxD) is used, meaning no boundary.

Parameters

  • input : Input grid.
  • flow : Vector field that advects the input field.
  • dt : Time-step for the advection.
  • output : Output grid.
  • boundarySdf : Boundary interface defined by signed-distance field.

class Serializable

Abstract base class for any serializable class.

Ancestors (in MRO)

  • Serializable
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

Methods

def deserialize(

...)

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def serialize(

...)

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

class Size2

Ancestors (in MRO)

  • Size2
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var x

var y

Methods

def __init__(

...)

init(self: pyjet.Size2, x: int=0L, y: int=0L) -> None

Constructs Size2

This method constructs 2D size with x and y.

class Size3

Ancestors (in MRO)

  • Size3
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var x

var y

var z

Methods

def __init__(

...)

init(self: pyjet.Size3, x: int=0L, y: int=0L, z: int=0L) -> None

Constructs Size3

This method constructs 3D size with x, y, and z.

class SphPointsToImplicit2

2-D points-to-implicit converter based on standard SPH kernel.

\see M\"uller, Matthias, David Charypar, and Markus Gross. "Particle-based fluid simulation for interactive applications." Proceedings of the 2003 ACM SIGGRAPH/Eurographics symposium on Computer animation. Eurographics Association, 2003.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.SphPointsToImplicit2, kernelRadius: float=1.0, cutOffDensity: float=0.5, isOutputSdf: bool=True) -> None

Constructs the converter with given kernel radius and cut-off density.

Parameters

  • kernelRadius : SPH kernel radius.
  • cutOffDensity : Iso-contour value.
  • isOutputSdf : True if the output should be signed-distance field.

def convert(

...)

Inheritance: PointsToImplicit2.convert

convert(self: pyjet.PointsToImplicit2, points: list, output: pyjet.ScalarGrid2) -> None

Converts the given points to implicit surface scalar field.

Parameters

  • points : List of 2D vectors.
  • output : Scalar grid output.

class SphPointsToImplicit3

3-D points-to-implicit converter based on standard SPH kernel.

\see M\"uller, Matthias, David Charypar, and Markus Gross. "Particle-based fluid simulation for interactive applications." Proceedings of the 2003 ACM SIGGRAPH/Eurographics symposium on Computer animation. Eurographics Association, 2003.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.SphPointsToImplicit3, kernelRadius: float=1.0, cutOffDensity: float=0.5, isOutputSdf: bool=True) -> None

Constructs the converter with given kernel radius and cut-off density.

Parameters

  • kernelRadius : SPH kernel radius.
  • cutOffDensity : Iso-contour value.
  • isOutputSdf : True if the output should be signed-distance field.

def convert(

...)

Inheritance: PointsToImplicit3.convert

convert(self: pyjet.PointsToImplicit3, points: list, output: pyjet.ScalarGrid3) -> None

Converts the given points to implicit surface scalar field.

Parameters

  • points : List of 3D vectors.
  • output : Scalar grid output.

class SphSolver2

2-D SPH solver.

This class implements 2-D SPH solver. The main pressure solver is based on equation-of-state (EOS). - See M{\"u}ller et al., Particle-based fluid simulation for interactive applications, SCA 2003. - See M. Becker and M. Teschner, Weakly compressible SPH for free surface flows, SCA 2007. - See Adams and Wicke, Meshless approximation methods and applications in physics based modeling and animation, Eurographics tutorials 2009.

Ancestors (in MRO)

Instance variables

var collider

Inheritance: ParticleSystemSolver2.collider

The collider.

var currentFrame

Inheritance: ParticleSystemSolver2.currentFrame

var currentTimeInSeconds

Inheritance: ParticleSystemSolver2.currentTimeInSeconds

var dragCoefficient

Inheritance: ParticleSystemSolver2.dragCoefficient

The drag coefficient.

The drag coefficient controls the amount of air-drag. The coefficient should be a positive number and 0 means no drag force.

var emitter

Inheritance: ParticleSystemSolver2.emitter

The emitter.

var eosExponent

The exponent part of the equation-of-state.

This function sets the exponent part of the equation-of-state. The value must be greater than 1.0, and smaller inputs will be clamped. Default is 7.

var gravity

Inheritance: ParticleSystemSolver2.gravity

The gravity.

var isUsingFixedSubTimeSteps

Inheritance: ParticleSystemSolver2.isUsingFixedSubTimeSteps

var negativePressureScale

The negative pressure scale.

This function sets the negative pressure scale. By setting the number between 0 and 1, the solver will scale the effect of negative pressure which can prevent the clumping of the particles near the surface. Input value outside 0 and 1 will be clamped within the range. Default is 0.

var numberOfFixedSubTimeSteps

Inheritance: ParticleSystemSolver2.numberOfFixedSubTimeSteps

var particleSystemData

Inheritance: ParticleSystemSolver2.particleSystemData

The the particle system data.

This property returns the particle system data. The data is created when this solver is constructed and also owned by the solver.

var pseudoViscosityCoefficient

The pseudo viscosity coefficient.

This function sets the pseudo viscosity coefficient which applies additional pseudo-physical damping to the system. Default is 10.

var restitutionCoefficient

Inheritance: ParticleSystemSolver2.restitutionCoefficient

The restitution coefficient.

The restitution coefficient controls the bouncy-ness of a particle when it hits a collider surface. The range of the coefficient should be 0 to 1 -- 0 means no bounce back and 1 means perfect reflection.

var speedOfSound

The speed of sound.

This function sets the speed of sound which affects the stiffness of the EOS and the time-step size. Higher value will make EOS stiffer and the time-step smaller. The input value must be higher than 0.0.

var sphSystemData

The SPH system data.

var timeStepLimitScale

Multiplier that scales the max allowed time-step.

This function returns the multiplier that scales the max allowed time-step. When the scale is 1.0, the time-step is bounded by the speed of sound and max acceleration.

var viscosityCoefficient

The viscosity coefficient.

var wind

Inheritance: ParticleSystemSolver2.wind

The wind.

Wind can be applied to the particle system by setting a vector field to the solver.

Methods

def __init__(

...)

Inheritance: ParticleSystemSolver2.__init__

init(self: pyjet.SphSolver2, targetDensity: float=1000.0, targetSpacing: float=0.1, relativeKernelRadius: float=1.8) -> None

Constructs a solver with target density, spacing, and relative kernel radius.

def advanceSingleFrame(

...)

Inheritance: ParticleSystemSolver2.advanceSingleFrame

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

def update(

...)

Inheritance: ParticleSystemSolver2.update

update(self: pyjet.Animation, frame: pyjet.Frame) -> None

Updates animation state for given frame.

Parameters

  • frame : Number of frames to advance.

class SphSolver3

3-D SPH solver.

This class implements 3-D SPH solver. The main pressure solver is based on equation-of-state (EOS). - See M{\"u}ller et al., Particle-based fluid simulation for interactive applications, SCA 2003. - See M. Becker and M. Teschner, Weakly compressible SPH for free surface flows, SCA 2007. - See Adams and Wicke, Meshless approximation methods and applications in physics based modeling and animation, Eurographics tutorials 2009.

Ancestors (in MRO)

Instance variables

var collider

Inheritance: ParticleSystemSolver3.collider

The collider.

var dragCoefficient

Inheritance: ParticleSystemSolver3.dragCoefficient

The drag coefficient.

The drag coefficient controls the amount of air-drag. The coefficient should be a positive number and 0 means no drag force.

var emitter

Inheritance: ParticleSystemSolver3.emitter

The emitter.

var eosExponent

The exponent part of the equation-of-state.

This function sets the exponent part of the equation-of-state. The value must be greater than 1.0, and smaller inputs will be clamped. Default is 7.

var gravity

Inheritance: ParticleSystemSolver3.gravity

The gravity.

var negativePressureScale

The negative pressure scale.

This function sets the negative pressure scale. By setting the number between 0 and 1, the solver will scale the effect of negative pressure which can prevent the clumping of the particles near the surface. Input value outside 0 and 1 will be clamped within the range. Default is 0.

var particleSystemData

Inheritance: ParticleSystemSolver3.particleSystemData

The the particle system data.

This property returns the particle system data. The data is created when this solver is constructed and also owned by the solver.

var pseudoViscosityCoefficient

The pseudo viscosity coefficient.

This function sets the pseudo viscosity coefficient which applies additional pseudo-physical damping to the system. Default is 10.

var restitutionCoefficient

Inheritance: ParticleSystemSolver3.restitutionCoefficient

The restitution coefficient.

The restitution coefficient controls the bouncy-ness of a particle when it hits a collider surface. The range of the coefficient should be 0 to 1 -- 0 means no bounce back and 1 means perfect reflection.

var speedOfSound

The speed of sound.

This function sets the speed of sound which affects the stiffness of the EOS and the time-step size. Higher value will make EOS stiffer and the time-step smaller. The input value must be higher than 0.0.

var sphSystemData

The SPH system data.

var timeStepLimitScale

Multiplier that scales the max allowed time-step.

This function returns the multiplier that scales the max allowed time-step. When the scale is 1.0, the time-step is bounded by the speed of sound and max acceleration.

var viscosityCoefficient

The viscosity coefficient.

var wind

Inheritance: ParticleSystemSolver3.wind

The wind.

Wind can be applied to the particle system by setting a vector field to the solver.

Methods

def __init__(

...)

Inheritance: ParticleSystemSolver3.__init__

init(self: pyjet.SphSolver3, targetDensity: float=1000.0, targetSpacing: float=0.1, relativeKernelRadius: float=1.8) -> None

Constructs a solver with target density, spacing, and relative kernel radius.

class SphSystemData2

2-D SPH particle system data.

This class extends ParticleSystemData2 to specialize the data model for SPH. It includes density and pressure array as a default particle attribute, and it also contains SPH utilities such as interpolation operator.

Ancestors (in MRO)

Instance variables

var densities

The density array accessor.

var forces

Inheritance: ParticleSystemData2.forces

Returns the force array (mutable).

var kernelRadius

The kernel radius in meters unit.

Sets the absolute kernel radius compared to the target particle spacing (i.e. relative kernel radius * target spacing). Once this function is called, hash grid and density should be updated using updateHashGrid() and updateDensities).

var mass

Inheritance: ParticleSystemData2.mass

The mass of a particle.

var neighborLists

Inheritance: ParticleSystemData2.neighborLists

The neighbor lists.

This property returns neighbor lists which is available after calling PointParallelHashGridSearcher2::buildNeighborLists. Each list stores indices of the neighbors.

var neighborSearcher

Inheritance: ParticleSystemData2.neighborSearcher

The neighbor searcher.

This property returns currently set neighbor searcher object. By default, PointParallelHashGridSearcher2 is used.

var numberOfParticles

Inheritance: ParticleSystemData2.numberOfParticles

The number of particles.

var positions

Inheritance: ParticleSystemData2.positions

Returns the position array (mutable).

var pressures

The pressure array accessor.

var radius

Inheritance: ParticleSystemData2.radius

The radius of the particles.

var relativeKernelRadius

The relative kernel radius.

The relative kernel radius compared to the target particle spacing (i.e. kernel radius / target spacing). Once this property has changed, hash grid and density should be updated using updateHashGrid() and updateDensities).

var targetDensity

The target density of this particle system.

var targetSpacing

The target particle spacing in meters.

Once this property has changed, hash grid and density should be updated using updateHashGrid() and updateDensities).

var velocities

Inheritance: ParticleSystemData2.velocities

Returns the velocity array (mutable).

Methods

def __init__(

...)

Inheritance: ParticleSystemData2.__init__

init(self: pyjet.SphSystemData2, numberOfParticles: int=0L) -> None

Constructs SPH system data with given number of particles.

def addParticle(

...)

Inheritance: ParticleSystemData2.addParticle

addParticle(self: pyjet.ParticleSystemData2, newPosition: object, newVelocity: object=, newForce: object=) -> None

Adds a particle to the data structure.

This function will add a single particle to the data structure. For custom data layers, zeros will be assigned for new particles. However, this will invalidate neighbor searcher and neighbor lists. It is users responsibility to call ParticleSystemData2::buildNeighborSearcher and ParticleSystemData2::buildNeighborLists to refresh those data.

Parameters

  • newPosition : The new position.
  • newVelocity : The new velocity.
  • newForce : The new force.

def addParticles(

...)

Inheritance: ParticleSystemData2.addParticles

addParticles(self: pyjet.ParticleSystemData2, arg0: list, arg1: list, arg2: list) -> None

Adds particles to the data structure.

This function will add particles to the data structure. For custom data layers, zeros will be assigned for new particles. However, this will invalidate neighbor searcher and neighbor lists. It is users responsibility to call ParticleSystemData2::buildNeighborSearcher and ParticleSystemData2::buildNeighborLists to refresh those data.

Parameters

  • newPositions : The new positions.
  • newVelocities : The new velocities.
  • newForces : The new forces.

def addScalarData(

...)

Inheritance: ParticleSystemData2.addScalarData

addScalarData(self: pyjet.ParticleSystemData2, initialVal: float=0.0) -> int

Adds a scalar data layer and returns its index.

This function adds a new scalar data layer to the system. It can be used for adding a scalar attribute, such as temperature, to the particles.

Parameters

  • initialVal : Initial value of the new scalar data.

def addVectorData(

...)

Inheritance: ParticleSystemData2.addVectorData

addVectorData(self: pyjet.ParticleSystemData2, initialVal: object=) -> int

Adds a vector data layer and returns its index.

This function adds a new vector data layer to the system. It can be used for adding a vector attribute, such as vortex, to the particles.

Parameters

  • initialVal : Initial value of the new vector data.

def buildNeighborLists(

...)

buildNeighborLists(self: pyjet.SphSystemData2) -> None

Builds neighbor lists with kernel radius.

def buildNeighborSearcher(

...)

buildNeighborSearcher(self: pyjet.SphSystemData2) -> None

Builds neighbor searcher with kernel radius.

def deserialize(

...)

Inheritance: ParticleSystemData2.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: ParticleSystemData2.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def resize(

...)

Inheritance: ParticleSystemData2.resize

resize(self: pyjet.ParticleSystemData2, newNumberOfParticles: int) -> None

Resizes the number of particles of the container.

This function will resize internal containers to store newly given number of particles including custom data layers. However, this will invalidate neighbor searcher and neighbor lists. It is users responsibility to call ParticleSystemData2::buildNeighborSearcher and ParticleSystemData2::buildNeighborLists to refresh those data.

Parameters

  • newNumberOfParticles : New number of particles.

def scalarDataAt(

...)

Inheritance: ParticleSystemData2.scalarDataAt

scalarDataAt(self: pyjet.ParticleSystemData2, arg0: int) -> pyjet.ArrayAccessor1D

Returns custom scalar data layer at given index (mutable).

def serialize(

...)

Inheritance: ParticleSystemData2.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: ParticleSystemData2.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

def set(

...)

Inheritance: ParticleSystemData2.set

set(self: pyjet.SphSystemData2, arg0: pyjet.SphSystemData2) -> None

Copies from other SPH system data.

def updateDensities(

...)

updateDensities(self: pyjet.SphSystemData2) -> None

Updates the density array with the latest particle positions.

def vectorDataAt(

...)

Inheritance: ParticleSystemData2.vectorDataAt

vectorDataAt(self: pyjet.ParticleSystemData2, arg0: int) -> pyjet.ArrayAccessor1Vector2D

Returns custom vector data layer at given index (mutable).

class SphSystemData3

3-D SPH particle system data.

This class extends ParticleSystemData3 to specialize the data model for SPH. It includes density and pressure array as a default particle attribute, and it also contains SPH utilities such as interpolation operator.

Ancestors (in MRO)

Instance variables

var densities

The density array accessor.

var forces

Inheritance: ParticleSystemData3.forces

Returns the force array (mutable).

var kernelRadius

The kernel radius in meters unit.

Sets the absolute kernel radius compared to the target particle spacing (i.e. relative kernel radius * target spacing). Once this function is called, hash grid and density should be updated using updateHashGrid() and updateDensities).

var mass

Inheritance: ParticleSystemData3.mass

The mass of a particle.

var neighborLists

Inheritance: ParticleSystemData3.neighborLists

The neighbor lists.

This property returns neighbor lists which is available after calling PointParallelHashGridSearcher2::buildNeighborLists. Each list stores indices of the neighbors.

var neighborSearcher

Inheritance: ParticleSystemData3.neighborSearcher

The neighbor searcher.

This property returns currently set neighbor searcher object. By default, PointParallelHashGridSearcher2 is used.

var numberOfParticles

Inheritance: ParticleSystemData3.numberOfParticles

The number of particles.

var positions

Inheritance: ParticleSystemData3.positions

Returns the position array (mutable).

var pressures

The pressure array accessor.

var radius

Inheritance: ParticleSystemData3.radius

The radius of the particles.

var relativeKernelRadius

The relative kernel radius.

The relative kernel radius compared to the target particle spacing (i.e. kernel radius / target spacing). Once this property has changed, hash grid and density should be updated using updateHashGrid() and updateDensities).

var targetDensity

The target density of this particle system.

var targetSpacing

The target particle spacing in meters.

Once this property has changed, hash grid and density should be updated using updateHashGrid() and updateDensities).

var velocities

Inheritance: ParticleSystemData3.velocities

Returns the velocity array (mutable).

Methods

def __init__(

...)

Inheritance: ParticleSystemData3.__init__

init(self: pyjet.SphSystemData3, numberOfParticles: int=0L) -> None

Constructs SPH system data with given number of particles.

def addParticle(

...)

Inheritance: ParticleSystemData3.addParticle

addParticle(self: pyjet.ParticleSystemData3, newPosition: object, newVelocity: object=, newForce: object=) -> None

Adds a particle to the data structure.

This function will add a single particle to the data structure. For custom data layers, zeros will be assigned for new particles. However, this will invalidate neighbor searcher and neighbor lists. It is users responsibility to call ParticleSystemData3::buildNeighborSearcher and ParticleSystemData3::buildNeighborLists to refresh those data.

Parameters

  • newPosition : The new position.
  • newVelocity : The new velocity.
  • newForce : The new force.

def addParticles(

...)

Inheritance: ParticleSystemData3.addParticles

addParticles(self: pyjet.ParticleSystemData3, arg0: list, arg1: list, arg2: list) -> None

Adds particles to the data structure.

This function will add particles to the data structure. For custom data layers, zeros will be assigned for new particles. However, this will invalidate neighbor searcher and neighbor lists. It is users responsibility to call ParticleSystemData3::buildNeighborSearcher and ParticleSystemData3::buildNeighborLists to refresh those data.

Parameters

  • newPositions : The new positions.
  • newVelocities : The new velocities.
  • newForces : The new forces.

def addScalarData(

...)

Inheritance: ParticleSystemData3.addScalarData

addScalarData(self: pyjet.ParticleSystemData3, initialVal: float=0.0) -> int

Adds a scalar data layer and returns its index.

This function adds a new scalar data layer to the system. It can be used for adding a scalar attribute, such as temperature, to the particles.

Parameters

  • initialVal : Initial value of the new scalar data.

def addVectorData(

...)

Inheritance: ParticleSystemData3.addVectorData

addVectorData(self: pyjet.ParticleSystemData3, initialVal: object=) -> int

Adds a vector data layer and returns its index.

This function adds a new vector data layer to the system. It can be used for adding a vector attribute, such as vortex, to the particles.

Parameters

  • initialVal : Initial value of the new vector data.

def buildNeighborLists(

...)

buildNeighborLists(self: pyjet.SphSystemData3) -> None

Builds neighbor lists with kernel radius.

def buildNeighborSearcher(

...)

buildNeighborSearcher(self: pyjet.SphSystemData3) -> None

Builds neighbor searcher with kernel radius.

def deserialize(

...)

Inheritance: ParticleSystemData3.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: ParticleSystemData3.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def resize(

...)

Inheritance: ParticleSystemData3.resize

resize(self: pyjet.ParticleSystemData3, newNumberOfParticles: int) -> None

Resizes the number of particles of the container.

This function will resize internal containers to store newly given number of particles including custom data layers. However, this will invalidate neighbor searcher and neighbor lists. It is users responsibility to call ParticleSystemData3::buildNeighborSearcher and ParticleSystemData3::buildNeighborLists to refresh those data.

Parameters

  • newNumberOfParticles : New number of particles.

def scalarDataAt(

...)

Inheritance: ParticleSystemData3.scalarDataAt

scalarDataAt(self: pyjet.ParticleSystemData3, arg0: int) -> pyjet.ArrayAccessor1D

Returns custom scalar data layer at given index (mutable).

def serialize(

...)

Inheritance: ParticleSystemData3.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: ParticleSystemData3.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

def set(

...)

Inheritance: ParticleSystemData3.set

set(self: pyjet.SphSystemData3, arg0: pyjet.SphSystemData3) -> None

Copies from other SPH system data.

def updateDensities(

...)

updateDensities(self: pyjet.SphSystemData3) -> None

Updates the density array with the latest particle positions.

def vectorDataAt(

...)

Inheritance: ParticleSystemData3.vectorDataAt

vectorDataAt(self: pyjet.ParticleSystemData3, arg0: int) -> pyjet.ArrayAccessor1Vector3D

Returns custom vector data layer at given index (mutable).

class Sphere2

Ancestors (in MRO)

Instance variables

var center

var isNormalFlipped

Inheritance: Surface2.isNormalFlipped

var radius

var transform

Inheritance: Surface2.transform

Methods

def __init__(

...)

init(self: pyjet.Sphere2, center: object=, radius: float=1.0, transform: pyjet.Transform2=, isNormalFlipped: bool=False) -> None

Constructs Sphere2.

This method constructs Sphere2 with center, radius, transform, and normal direction (isNormalFlipped).

class Sphere3

Ancestors (in MRO)

Instance variables

var center

var isNormalFlipped

Inheritance: Surface3.isNormalFlipped

var radius

var transform

Inheritance: Surface3.transform

Methods

def __init__(

...)

init(self: pyjet.Sphere3, center: object=, radius: float=1.0, transform: pyjet.Transform3=, isNormalFlipped: bool=False) -> None

Constructs Sphere3.

This method constructs Sphere3 with center, radius, transform, and normal direction (isNormalFlipped).

class SphericalPointsToImplicit2

2-D points-to-implicit converter based on simple sphere model.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.SphericalPointsToImplicit2, radius: float=1.0, isOutputSdf: bool=True) -> None

Constructs the converter with given sphere radius.

Parameters

  • radius : Sphere radius.
  • isOutputSdf : True if the output should be signed-distance field.

def convert(

...)

Inheritance: PointsToImplicit2.convert

convert(self: pyjet.PointsToImplicit2, points: list, output: pyjet.ScalarGrid2) -> None

Converts the given points to implicit surface scalar field.

Parameters

  • points : List of 2D vectors.
  • output : Scalar grid output.

class SphericalPointsToImplicit3

3-D points-to-implicit converter based on simple sphere model.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.SphericalPointsToImplicit3, radius: float=1.0, isOutputSdf: bool=True) -> None

Constructs the converter with given sphere radius.

Parameters

  • radius : Sphere radius.
  • isOutputSdf : True if the output should be signed-distance field.

def convert(

...)

Inheritance: PointsToImplicit3.convert

convert(self: pyjet.PointsToImplicit3, points: list, output: pyjet.ScalarGrid3) -> None

Converts the given points to implicit surface scalar field.

Parameters

  • points : List of 3D vectors.
  • output : Scalar grid output.

class Surface2

Ancestors (in MRO)

  • Surface2
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

Instance variables

var isNormalFlipped

var transform

class Surface3

Ancestors (in MRO)

  • Surface3
  • pybind11_builtins.pybind11_object_56
  • __builtin__.object

Instance variables

var isNormalFlipped

var transform

class SurfaceSet2

2-D surface set.

This class represents 2-D surface set which extends Surface2 by overriding surface-related queries. This is class can hold a collection of other surface instances.

Ancestors (in MRO)

Instance variables

var isNormalFlipped

Inheritance: Surface2.isNormalFlipped

var transform

Inheritance: Surface2.transform

Methods

def __init__(

...)

init(self: pyjet.SurfaceSet2, others: list=[], transform: pyjet.Transform2=, isNormalFlipped: bool=False) -> None

Constructs with a list of other surfaces.

def addSurface(

...)

addSurface(self: pyjet.SurfaceSet2, surface: pyjet.Surface2) -> None

Adds a surface instance.

def numberOfSurfaces(

...)

numberOfSurfaces(self: pyjet.SurfaceSet2) -> int

Returns the number of surfaces.

def surfaceAt(

...)

surfaceAt(self: pyjet.SurfaceSet2, i: int) -> pyjet.Surface2

Returns the i-th surface.

class SurfaceSet3

3-D surface set.

This class represents 3-D surface set which extends Surface3 by overriding surface-related queries. This is class can hold a collection of other surface instances.

Ancestors (in MRO)

Instance variables

var isNormalFlipped

Inheritance: Surface3.isNormalFlipped

var transform

Inheritance: Surface3.transform

Methods

def __init__(

...)

init(self: pyjet.SurfaceSet3, others: list=[], transform: pyjet.Transform3=, isNormalFlipped: bool=False) -> None

Constructs with a list of other surfaces.

def addSurface(

...)

addSurface(self: pyjet.SurfaceSet3, surface: pyjet.Surface3) -> None

Adds a surface instance.

def numberOfSurfaces(

...)

numberOfSurfaces(self: pyjet.SurfaceSet3) -> int

Returns the number of surfaces.

def surfaceAt(

...)

surfaceAt(self: pyjet.SurfaceSet3, i: int) -> pyjet.Surface3

Returns the i-th surface.

class SurfaceToImplicit2

2-D implicit surface wrapper for generic Surface2 instance.

This class represents 2-D implicit surface that converts Surface2 instance to an ImplicitSurface2 object. The conversion is made by evaluating closest point and normal from a given point for the given (explicit) surface. Thus, this conversion won't work for every single surfaces, especially TriangleMesh2. To use TriangleMesh2 as an ImplicitSurface2 instance, please take a look at ImplicitTriangleMesh2. Use this class only for the basic primitives such as Sphere2 or Box2.

Ancestors (in MRO)

Instance variables

var isNormalFlipped

Inheritance: ImplicitSurface2.isNormalFlipped

var surface

The raw surface instance.

var transform

Inheritance: ImplicitSurface2.transform

Methods

def __init__(

...)

init(self: pyjet.SurfaceToImplicit2, surface: pyjet.Surface2, transform: pyjet.Transform2=, isNormalFlipped: bool=False) -> None

Constructs an instance with generic Surface2 instance.

def signedDistance(

...)

Inheritance: ImplicitSurface2.signedDistance

signedDistance(self: pyjet.ImplicitSurface2, otherPoint: object) -> float

Returns signed distance from the given point otherPoint.

class SurfaceToImplicit3

3-D implicit surface wrapper for generic Surface3 instance.

This class represents 3-D implicit surface that converts Surface3 instance to an ImplicitSurface3 object. The conversion is made by evaluating closest point and normal from a given point for the given (explicit) surface. Thus, this conversion won't work for every single surfaces, especially TriangleMesh3. To use TriangleMesh3 as an ImplicitSurface3 instance, please take a look at ImplicitTriangleMesh3. Use this class only for the basic primitives such as Sphere3 or Box3.

Ancestors (in MRO)

Instance variables

var isNormalFlipped

Inheritance: ImplicitSurface3.isNormalFlipped

var surface

The raw surface instance.

var transform

Inheritance: ImplicitSurface3.transform

Methods

def __init__(

...)

init(self: pyjet.SurfaceToImplicit3, surface: pyjet.Surface3, transform: pyjet.Transform3=, isNormalFlipped: bool=False) -> None

Constructs an instance with generic Surface3 instance.

def signedDistance(

...)

Inheritance: ImplicitSurface3.signedDistance

signedDistance(self: pyjet.ImplicitSurface3, otherPoint: object) -> float

Returns signed distance from the given point otherPoint.

class Transform2

Ancestors (in MRO)

  • Transform2
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Methods

def __init__(

...)

init(self: pyjet.Transform2, translation: object=, orientation: float=0.0) -> None

Constructs Transform2

This method constructs 2D transform with translation and orientation.

class Transform3

Ancestors (in MRO)

  • Transform3
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Methods

def __init__(

...)

init(self: pyjet.Transform3, translation: object=, orientation: object=) -> None

Constructs Transform3

This method constructs 3D transform with translation and orientation.

class Triangle3

3-D triangle geometry.

This class represents 3-D triangle geometry which extends Surface3 by overriding surface-related queries.

Ancestors (in MRO)

Instance variables

var isNormalFlipped

Inheritance: Surface3.isNormalFlipped

var normals

var points

var transform

Inheritance: Surface3.transform

var uvs

Methods

def __init__(

...)

init(self: pyjet.Triangle3, points: list, normals: list, uvs: list, transform: pyjet.Transform3=, isNormalFlipped: bool=False) -> None

Constructs a triangle with given points, normals, and uvs.

class TriangleMesh3

3-D triangle mesh geometry.

This class represents 3-D triangle mesh geometry which extends Surface3 by overriding surface-related queries. The mesh structure stores point, normals, and UV coordinates.

Ancestors (in MRO)

Instance variables

var isNormalFlipped

Inheritance: Surface3.isNormalFlipped

var transform

Inheritance: Surface3.transform

Methods

def __init__(

...)

init(self: pyjet.TriangleMesh3, points: list=[], normals: list=[], uvs: list=[], pointIndices: list=[], normalIndices: list=[], uvIndices: list=[], transform: pyjet.Transform3=, isNormalFlipped: bool=False) -> None

Constructs mesh with points, normals, uvs, and their indices.

def addNormal(

...)

addNormal(self: pyjet.TriangleMesh3, n: object) -> None

Adds a normal.

def addPoint(

...)

addPoint(self: pyjet.TriangleMesh3, pt: object) -> None

Adds a point.

def addPointNormalTriangle(

...)

addPointNormalTriangle(self: pyjet.TriangleMesh3, newPointIndices: object, newNormalIndices: object) -> None

Adds a triangle with point and normal.

def addPointTriangle(

...)

addPointTriangle(self: pyjet.TriangleMesh3, newPointIndices: object) -> None

Adds a triangle with points.

def addPointUvNormalTriangle(

...)

addPointUvNormalTriangle(self: pyjet.TriangleMesh3, newPointIndices: object, newUvIndices: object, newNormalIndices: object) -> None

Adds a triangle with point, normal, and UV.

def addPointUvTriangle(

...)

addPointUvTriangle(self: pyjet.TriangleMesh3, newPointIndices: object, newUvIndices: object) -> None

Adds a triangle with point and UV.

def addTriangle(

...)

addTriangle(self: pyjet.TriangleMesh3, tri: pyjet.Triangle3) -> None

Add a triangle.

def addUv(

...)

addUv(self: pyjet.TriangleMesh3, uv: object) -> None

Adds a UV.

def area(

...)

area(self: pyjet.TriangleMesh3) -> float

Returns area of this mesh.

def clear(

...)

clear(self: pyjet.TriangleMesh3) -> None

Clears all content.

def hasNormals(

...)

hasNormals(self: pyjet.TriangleMesh3) -> bool

Returns true if the mesh has normals.

def hasUvs(

...)

hasUvs(self: pyjet.TriangleMesh3) -> bool

Returns true if the mesh has UV coordinates.

def normal(

...)

normal(self: pyjet.TriangleMesh3, i: int) -> pyjet.Vector3D

Returns i-th normal.

def normalIndexIndex(

...)

normalIndexIndex(self: pyjet.TriangleMesh3, i: int) -> pyjet.Point3UI

Returns i-th normalIndexIndex.

def numberOfNormals(

...)

numberOfNormals(self: pyjet.TriangleMesh3) -> int

Returns number of normals.

def numberOfPoints(

...)

numberOfPoints(self: pyjet.TriangleMesh3) -> int

Returns number of points.

def numberOfTriangles(

...)

numberOfTriangles(self: pyjet.TriangleMesh3) -> int

Returns number of triangles.

def numberOfUvs(

...)

numberOfUvs(self: pyjet.TriangleMesh3) -> int

Returns number of UV coordinates.

def point(

...)

point(self: pyjet.TriangleMesh3, i: int) -> pyjet.Vector3D

Returns i-th point.

def pointIndex(

...)

pointIndex(self: pyjet.TriangleMesh3, i: int) -> pyjet.Point3UI

Returns i-th pointIndex.

def readObj(

...)

readObj(self: pyjet.TriangleMesh3, filename: unicode) -> None

Reads the mesh in obj format from the file.

def rotate(

...)

rotate(self: pyjet.TriangleMesh3, rot: object) -> None

Rotates the mesh.

def scale(

...)

scale(self: pyjet.TriangleMesh3, factor: float) -> None

Scales the mesh by given factor.

def set(

...)

set(self: pyjet.TriangleMesh3, other: pyjet.TriangleMesh3) -> None

Copies the contents from other mesh.

def setAngleWeightedVertexNormal(

...)

setAngleWeightedVertexNormal(self: pyjet.TriangleMesh3) -> None

Sets angle weighted vertex normal.

def setFaceNormal(

...)

setFaceNormal(self: pyjet.TriangleMesh3) -> None

Sets entire normals to the face normals.

def setNormal(

...)

setNormal(self: pyjet.TriangleMesh3, i: int, n: pyjet.Vector3D) -> None

Sets i-th normal with pt.

def setNormalIndexIndex(

...)

setNormalIndexIndex(self: pyjet.TriangleMesh3, i: int, idx: pyjet.Point3UI) -> None

Sets i-th normalIndexIndex with idx.

def setPoint(

...)

setPoint(self: pyjet.TriangleMesh3, i: int, pt: pyjet.Vector3D) -> None

Sets i-th point with pt.

def setPointIndex(

...)

setPointIndex(self: pyjet.TriangleMesh3, i: int, idx: pyjet.Point3UI) -> None

Sets i-th pointIndex with idx.

def setUvIndexIndex(

...)

setUvIndexIndex(self: pyjet.TriangleMesh3, i: int, idx: pyjet.Point3UI) -> None

Sets i-th uvIndexIndex with idx.

def swap(

...)

swap(self: pyjet.TriangleMesh3, other: pyjet.TriangleMesh3) -> None

Swaps the contents with other mesh.

def translate(

...)

translate(self: pyjet.TriangleMesh3, t: object) -> None

Translates the mesh.

def triangle(

...)

triangle(self: pyjet.TriangleMesh3, i: int) -> pyjet.Triangle3

Returns i-th triangle.

def uvIndexIndex(

...)

uvIndexIndex(self: pyjet.TriangleMesh3, i: int) -> pyjet.Point3UI

Returns i-th uvIndexIndex.

def volume(

...)

volume(self: pyjet.TriangleMesh3) -> float

Returns volume of this mesh.

def writeObj(

...)

writeObj(self: pyjet.TriangleMesh3, filename: unicode) -> None

Writes the mesh in obj format to the file.

class UpwindLevelSetSolver2

2-D first-order upwind-based iterative level set solver.

Ancestors (in MRO)

Instance variables

var maxCfl

Inheritance: IterativeLevelSetSolver2.maxCfl

The maximum CFL limit.

Methods

def extrapolate(

...)

Inheritance: IterativeLevelSetSolver2.extrapolate

extrapolate(self: pyjet.IterativeLevelSetSolver2, input: pyjet.Grid2, sdf: pyjet.ScalarGrid2, maxDistance: float, output: pyjet.Grid2) -> None

Extrapolates given field from negative to positive SDF region.

Parameters

  • input : Input field to be extrapolated.
  • sdf : Reference signed-distance field.
  • maxDistance : Max range of extrapolation.
  • output : Output field.

def reinitialize(

...)

Inheritance: IterativeLevelSetSolver2.reinitialize

reinitialize(self: pyjet.IterativeLevelSetSolver2, inputSdf: pyjet.ScalarGrid2, maxDistance: float, outputSdf: pyjet.ScalarGrid2) -> None

Reinitializes given scalar field to signed-distance field.

Parameters

  • inputSdf : Input signed-distance field which can be distorted.
  • maxDistance : Max range of reinitialization.
  • outputSdf : Output signed-distance field.

class UpwindLevelSetSolver3

3-D first-order upwind-based iterative level set solver.

Ancestors (in MRO)

Instance variables

var maxCfl

Inheritance: IterativeLevelSetSolver3.maxCfl

The maximum CFL limit.

Methods

def extrapolate(

...)

Inheritance: IterativeLevelSetSolver3.extrapolate

extrapolate(self: pyjet.IterativeLevelSetSolver3, input: pyjet.Grid3, sdf: pyjet.ScalarGrid3, maxDistance: float, output: pyjet.Grid3) -> None

Extrapolates given field from negative to positive SDF region.

Parameters

  • input : Input field to be extrapolated.
  • sdf : Reference signed-distance field.
  • maxDistance : Max range of extrapolation.
  • output : Output field.

def reinitialize(

...)

Inheritance: IterativeLevelSetSolver3.reinitialize

reinitialize(self: pyjet.IterativeLevelSetSolver3, inputSdf: pyjet.ScalarGrid3, maxDistance: float, outputSdf: pyjet.ScalarGrid3) -> None

Reinitializes given scalar field to signed-distance field.

Parameters

  • inputSdf : Input signed-distance field which can be distorted.
  • maxDistance : Max range of reinitialization.
  • outputSdf : Output signed-distance field.

class Vector2D

Ancestors (in MRO)

  • Vector2D
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var x

var y

Methods

def __init__(

...)

init(self: pyjet.Vector2D, x: float=0.0, y: float=0.0) -> None

Constructs Vector2D.

This method constructs double-type 2-D vector with x and y.

def absmax(

...)

absmax(self: pyjet.Vector2D) -> float

def absmin(

...)

absmin(self: pyjet.Vector2D) -> float

def avg(

...)

avg(self: pyjet.Vector2D) -> float

def cross(

...)

cross(self: pyjet.Vector2D, arg0: object) -> float

def distanceSquaredTo(

...)

distanceSquaredTo(self: pyjet.Vector2D, arg0: object) -> float

def distanceTo(

...)

distanceTo(self: pyjet.Vector2D, arg0: object) -> float

def dominantAxis(

...)

dominantAxis(self: pyjet.Vector2D) -> int

def dot(

...)

dot(self: pyjet.Vector2D, arg0: object) -> float

def length(

...)

length(self: pyjet.Vector2D) -> float

def lengthSquared(

...)

lengthSquared(self: pyjet.Vector2D) -> float

def max(

...)

max(self: pyjet.Vector2D) -> float

def min(

...)

min(self: pyjet.Vector2D) -> float

def normalize(

...)

normalize(self: pyjet.Vector2D) -> None

def normalized(

...)

normalized(self: pyjet.Vector2D) -> pyjet.Vector2D

def projected(

...)

projected(self: pyjet.Vector2D, arg0: object) -> pyjet.Vector2D

def reflected(

...)

reflected(self: pyjet.Vector2D, arg0: object) -> pyjet.Vector2D

def setZero(

...)

setZero(self: pyjet.Vector2D) -> None

def subminantAxis(

...)

subminantAxis(self: pyjet.Vector2D) -> int

def sum(

...)

sum(self: pyjet.Vector2D) -> float

def tangential(

...)

tangential(self: pyjet.Vector2D) -> pyjet.Vector2D

class Vector2F

Ancestors (in MRO)

  • Vector2F
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var x

var y

Methods

def __init__(

...)

init(self: pyjet.Vector2F, x: float=0.0, y: float=0.0) -> None

Constructs Vector2F.

This method constructs float-type 2-D vector with x and y.

def absmax(

...)

absmax(self: pyjet.Vector2F) -> float

def absmin(

...)

absmin(self: pyjet.Vector2F) -> float

def avg(

...)

avg(self: pyjet.Vector2F) -> float

def cross(

...)

cross(self: pyjet.Vector2F, arg0: object) -> float

def distanceSquaredTo(

...)

distanceSquaredTo(self: pyjet.Vector2F, arg0: object) -> float

def distanceTo(

...)

distanceTo(self: pyjet.Vector2F, arg0: object) -> float

def dominantAxis(

...)

dominantAxis(self: pyjet.Vector2F) -> int

def dot(

...)

dot(self: pyjet.Vector2F, arg0: object) -> float

def length(

...)

length(self: pyjet.Vector2F) -> float

def lengthSquared(

...)

lengthSquared(self: pyjet.Vector2F) -> float

def max(

...)

max(self: pyjet.Vector2F) -> float

def min(

...)

min(self: pyjet.Vector2F) -> float

def normalize(

...)

normalize(self: pyjet.Vector2F) -> None

def normalized(

...)

normalized(self: pyjet.Vector2F) -> pyjet.Vector2F

def projected(

...)

projected(self: pyjet.Vector2F, arg0: object) -> pyjet.Vector2F

def reflected(

...)

reflected(self: pyjet.Vector2F, arg0: object) -> pyjet.Vector2F

def setZero(

...)

setZero(self: pyjet.Vector2F) -> None

def subminantAxis(

...)

subminantAxis(self: pyjet.Vector2F) -> int

def sum(

...)

sum(self: pyjet.Vector2F) -> float

def tangential(

...)

tangential(self: pyjet.Vector2F) -> pyjet.Vector2F

class Vector3D

Ancestors (in MRO)

  • Vector3D
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var x

var y

var z

Methods

def __init__(

...)

init(self: pyjet.Vector3D, x: float=0.0, y: float=0.0, z: float=0.0) -> None

Constructs Vector3D.

This method constructs double-type 3-D vector with x, y, and z.

def absmax(

...)

absmax(self: pyjet.Vector3D) -> float

def absmin(

...)

absmin(self: pyjet.Vector3D) -> float

def avg(

...)

avg(self: pyjet.Vector3D) -> float

def cross(

...)

cross(self: pyjet.Vector3D, arg0: object) -> pyjet.Vector3D

def distanceSquaredTo(

...)

distanceSquaredTo(self: pyjet.Vector3D, arg0: object) -> float

def distanceTo(

...)

distanceTo(self: pyjet.Vector3D, arg0: object) -> float

def dominantAxis(

...)

dominantAxis(self: pyjet.Vector3D) -> int

def dot(

...)

dot(self: pyjet.Vector3D, arg0: object) -> float

def length(

...)

length(self: pyjet.Vector3D) -> float

def lengthSquared(

...)

lengthSquared(self: pyjet.Vector3D) -> float

def max(

...)

max(self: pyjet.Vector3D) -> float

def min(

...)

min(self: pyjet.Vector3D) -> float

def normalize(

...)

normalize(self: pyjet.Vector3D) -> None

def normalized(

...)

normalized(self: pyjet.Vector3D) -> pyjet.Vector3D

def projected(

...)

projected(self: pyjet.Vector3D, arg0: object) -> pyjet.Vector3D

def reflected(

...)

reflected(self: pyjet.Vector3D, arg0: object) -> pyjet.Vector3D

def setZero(

...)

setZero(self: pyjet.Vector3D) -> None

def subminantAxis(

...)

subminantAxis(self: pyjet.Vector3D) -> int

def sum(

...)

sum(self: pyjet.Vector3D) -> float

def tangential(

...)

tangential(self: pyjet.Vector3D) -> Tuple[pyjet.Vector3D, pyjet.Vector3D]

class Vector3F

Ancestors (in MRO)

  • Vector3F
  • pybind11_builtins.pybind11_object_48
  • __builtin__.object

Instance variables

var x

var y

var z

Methods

def __init__(

...)

init(self: pyjet.Vector3F, x: float=0.0, y: float=0.0, z: float=0.0) -> None

Constructs Vector3F.

This method constructs float-type 3-D vector with x, y, and z.

def absmax(

...)

absmax(self: pyjet.Vector3F) -> float

def absmin(

...)

absmin(self: pyjet.Vector3F) -> float

def avg(

...)

avg(self: pyjet.Vector3F) -> float

def cross(

...)

cross(self: pyjet.Vector3F, arg0: object) -> pyjet.Vector3F

def distanceSquaredTo(

...)

distanceSquaredTo(self: pyjet.Vector3F, arg0: object) -> float

def distanceTo(

...)

distanceTo(self: pyjet.Vector3F, arg0: object) -> float

def dominantAxis(

...)

dominantAxis(self: pyjet.Vector3F) -> int

def dot(

...)

dot(self: pyjet.Vector3F, arg0: object) -> float

def length(

...)

length(self: pyjet.Vector3F) -> float

def lengthSquared(

...)

lengthSquared(self: pyjet.Vector3F) -> float

def max(

...)

max(self: pyjet.Vector3F) -> float

def min(

...)

min(self: pyjet.Vector3F) -> float

def normalize(

...)

normalize(self: pyjet.Vector3F) -> None

def normalized(

...)

normalized(self: pyjet.Vector3F) -> pyjet.Vector3F

def projected(

...)

projected(self: pyjet.Vector3F, arg0: object) -> pyjet.Vector3F

def reflected(

...)

reflected(self: pyjet.Vector3F, arg0: object) -> pyjet.Vector3F

def setZero(

...)

setZero(self: pyjet.Vector3F) -> None

def subminantAxis(

...)

subminantAxis(self: pyjet.Vector3F) -> int

def sum(

...)

sum(self: pyjet.Vector3F) -> float

def tangential(

...)

tangential(self: pyjet.Vector3F) -> Tuple[pyjet.Vector3F, pyjet.Vector3F]

class VectorField2

Abstract base class for 2-D vector field.

Ancestors (in MRO)

class VectorField3

Abstract base class for 3-D vector field.

Ancestors (in MRO)

class VectorGrid2

Abstract base class for 2-D vector grid structure.

Ancestors (in MRO)

Methods

def deserialize(

...)

Inheritance: Grid2.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: Grid2.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def serialize(

...)

Inheritance: Grid2.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: Grid2.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

class VectorGrid3

Abstract base class for 3-D vector grid structure.

Ancestors (in MRO)

Methods

def deserialize(

...)

Inheritance: Grid3.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: Grid3.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def serialize(

...)

Inheritance: Grid3.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: Grid3.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

class VertexCenteredScalarGrid2

2-D Cell-centered scalar grid structure.

This class represents 2-D cell-centered scalar grid which extends ScalarGrid2. As its name suggests, the class defines the data point at the center of a grid cell. Thus, the dimension of data points are equal to the dimension of the cells.

Ancestors (in MRO)

Instance variables

var dataOrigin

Returns data position for the grid point at (0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

var dataSize

Returns the actual data point size.

Methods

def __init__(

...)

init(self: pyjet.VertexCenteredScalarGrid2, args, *kwargs) -> None

Constructs grid.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def set(

...)

set(self: pyjet.VertexCenteredScalarGrid2, other: pyjet.VertexCenteredScalarGrid2) -> None

Sets the contents with the given other grid.

Parameters

  • other : Other grid to copy from.

class VertexCenteredScalarGrid3

3-D Cell-centered scalar grid structure.

This class represents 3-D cell-centered scalar grid which extends ScalarGrid3. As its name suggests, the class defines the data point at the center of a grid cell. Thus, the dimension of data points are equal to the dimension of the cells.

Ancestors (in MRO)

Instance variables

var dataOrigin

Returns data position for the grid point at (0, 0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

var dataSize

Returns the actual data point size.

Methods

def __init__(

...)

init(self: pyjet.VertexCenteredScalarGrid3, args, *kwargs) -> None

Constructs grid.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def set(

...)

set(self: pyjet.VertexCenteredScalarGrid3, other: pyjet.VertexCenteredScalarGrid3) -> None

Sets the contents with the given other grid.

Parameters

  • other : Other grid to copy from.

class VertexCenteredVectorGrid2

2-D Vertex-centered vector grid structure.

This class represents 2-D vertex-centered vector grid which extends CollocatedVectorGrid2. As its name suggests, the class defines the data point at the center of a grid vertex. Thus, the dimension of data points are equal to the dimension of the vertices.

Ancestors (in MRO)

Instance variables

var dataOrigin

Returns data position for the grid point at (0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

var dataSize

Returns the actual data point size.

Methods

def __init__(

...)

init(self: pyjet.VertexCenteredVectorGrid2, args, *kwargs) -> None

Constructs grid.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def curl(

...)

Inheritance: CollocatedVectorGrid2.curl

curl(self: pyjet.CollocatedVectorGrid2, x: object) -> float

Returns curl at given position x.

def curlAtDataPoint(

...)

Inheritance: CollocatedVectorGrid2.curlAtDataPoint

curlAtDataPoint(self: pyjet.CollocatedVectorGrid2, i: int, j: int) -> float

Returns curl at data point location.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def dataAccessor(

...)

Inheritance: CollocatedVectorGrid2.dataAccessor

dataAccessor(self: pyjet.CollocatedVectorGrid2) -> jet::ArrayAccessor, 2ul>

Returns the data array accessor.

def dataPosition(

...)

Inheritance: CollocatedVectorGrid2.dataPosition

dataPosition(self: pyjet.CollocatedVectorGrid2) -> std::__1::function (unsigned long, unsigned long)>

Returns the function that maps data point to its position.

def deserialize(

...)

Inheritance: CollocatedVectorGrid2.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: CollocatedVectorGrid2.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def divergence(

...)

Inheritance: CollocatedVectorGrid2.divergence

divergence(self: pyjet.CollocatedVectorGrid2, x: object) -> float

Returns divergence at given position x.

def divergenceAtDataPoint(

...)

Inheritance: CollocatedVectorGrid2.divergenceAtDataPoint

divergenceAtDataPoint(self: pyjet.CollocatedVectorGrid2, i: int, j: int) -> float

Returns divergence at data point location.

Parameters

  • i : Data point index i.
  • j : Data point index j.

def fill(

...)

fill(self: pyjet.VertexCenteredVectorGrid2, arg0: object) -> None

Fills the grid with given value or function.

def forEachDataPointIndex(

...)

Inheritance: CollocatedVectorGrid2.forEachDataPointIndex

forEachDataPointIndex(self: pyjet.CollocatedVectorGrid2, func: function) -> None

Invokes the given function func for each data point.

This function invokes the given function object func for each data point in serial manner. The input parameters are i and j indices of a data point. The order of execution is i-first, j-last.

def sample(

...)

Inheritance: CollocatedVectorGrid2.sample

sample(self: pyjet.CollocatedVectorGrid2, x: object) -> pyjet.Vector2D

Returns sampled value at given position x.

def sampler(

...)

Inheritance: CollocatedVectorGrid2.sampler

sampler(self: pyjet.CollocatedVectorGrid2) -> std::__1::function (jet::Vector const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

def serialize(

...)

Inheritance: CollocatedVectorGrid2.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: CollocatedVectorGrid2.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

def set(

...)

set(self: pyjet.VertexCenteredVectorGrid2, other: pyjet.VertexCenteredVectorGrid2) -> None

Sets the contents with the given other grid.

Parameters

  • other : Other grid to copy from.

class VertexCenteredVectorGrid3

3-D Vertex-centered vector grid structure.

This class represents 3-D vertex-centered vector grid which extends CollocatedVectorGrid3. As its name suggests, the class defines the data point at the center of a grid vertex. Thus, the dimension of data points are equal to the dimension of the vertices.

Ancestors (in MRO)

Instance variables

var dataOrigin

Returns data position for the grid point at (0, 0, 0).

Note that this is different from origin() since origin() returns the lower corner point of the bounding box.

var dataSize

Returns the actual data point size.

Methods

def __init__(

...)

init(self: pyjet.VertexCenteredVectorGrid3, args, *kwargs) -> None

Constructs grid.

Parameters

  • *args : resolution, gridSpacing, and gridOrigin arguments.
  • **kwargs
    • resolution : Grid resolution.
    • gridSpacing : Grid spacing.
    • gridOrigin : Origin point ot the grid.
    • domainSizeX : Domain size in x-direction.

def curl(

...)

Inheritance: CollocatedVectorGrid3.curl

curl(self: pyjet.CollocatedVectorGrid3, x: object) -> pyjet.Vector3D

Returns curl at given position x.

def curlAtDataPoint(

...)

Inheritance: CollocatedVectorGrid3.curlAtDataPoint

curlAtDataPoint(self: pyjet.CollocatedVectorGrid3, i: int, j: int, k: int) -> pyjet.Vector3D

Returns curl at data point location.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def dataAccessor(

...)

Inheritance: CollocatedVectorGrid3.dataAccessor

dataAccessor(self: pyjet.CollocatedVectorGrid3) -> jet::ArrayAccessor, 3ul>

Returns the data array accessor.

def dataPosition(

...)

Inheritance: CollocatedVectorGrid3.dataPosition

dataPosition(self: pyjet.CollocatedVectorGrid3) -> std::__1::function (unsigned long, unsigned long, unsigned long)>

Returns the function that maps data point to its position.

def deserialize(

...)

Inheritance: CollocatedVectorGrid3.deserialize

deserialize(self: pyjet.Serializable, buffer: List[int]) -> None

Deserializes this instance from the flat buffer.

def deserializeFromFile(

...)

Inheritance: CollocatedVectorGrid3.deserializeFromFile

deserializeFromFile(self: pyjet.Serializable, filename: unicode) -> None

Deserializes this instance from the flat buffer.

def divergence(

...)

Inheritance: CollocatedVectorGrid3.divergence

divergence(self: pyjet.CollocatedVectorGrid3, x: object) -> float

Returns divergence at given position x.

def divergenceAtDataPoint(

...)

Inheritance: CollocatedVectorGrid3.divergenceAtDataPoint

divergenceAtDataPoint(self: pyjet.CollocatedVectorGrid3, i: int, j: int, k: int) -> float

Returns divergence at data point location.

Parameters

  • i : Data point index i.
  • j : Data point index j.
  • k : Data point index k.

def fill(

...)

fill(self: pyjet.VertexCenteredVectorGrid3, arg0: object) -> None

Fills the grid with given value or function.

def forEachDataPointIndex(

...)

Inheritance: CollocatedVectorGrid3.forEachDataPointIndex

forEachDataPointIndex(self: pyjet.CollocatedVectorGrid3, func: function) -> None

Invokes the given function func for each data point.

This function invokes the given function object func for each data point in serial manner. The input parameters are i and j indices of a data point. The order of execution is i-first, j-last.

def sample(

...)

Inheritance: CollocatedVectorGrid3.sample

sample(self: pyjet.CollocatedVectorGrid3, x: object) -> pyjet.Vector3D

Returns sampled value at given position x.

def sampler(

...)

Inheritance: CollocatedVectorGrid3.sampler

sampler(self: pyjet.CollocatedVectorGrid3) -> std::__1::function (jet::Vector const&)>

Returns the sampler function.

This function returns the data sampler function object. The sampling function is linear.

def serialize(

...)

Inheritance: CollocatedVectorGrid3.serialize

serialize(self: pyjet.Serializable) -> List[int]

Serializes this instance into the flat buffer.

def serializeToFile(

...)

Inheritance: CollocatedVectorGrid3.serializeToFile

serializeToFile(self: pyjet.Serializable, filename: unicode) -> None

Serializes this instance into the file.

def set(

...)

set(self: pyjet.VertexCenteredVectorGrid3, other: pyjet.VertexCenteredVectorGrid3) -> None

Sets the contents with the given other grid.

Parameters

  • other : Other grid to copy from.

class VolumeGridEmitter2

2-D grid-based volumetric emitter.

Ancestors (in MRO)

Instance variables

var isOneShot

True if this emits only once.

var sourceRegion

Implicit surface which defines the source region.

Methods

def __init__(

...)

init(self: pyjet.VolumeGridEmitter2, sourceRegion: pyjet.Surface2, isOneShot: bool=True) -> None

Constructs an emitter with a source and is-one-shot flag.

def addSignedDistanceTarget(

...)

addSignedDistanceTarget(self: pyjet.VolumeGridEmitter2, scalarGridTarget: pyjet.ScalarGrid2) -> None

Adds signed-distance target to the scalar grid.

def addStepFunctionTarget(

...)

addStepFunctionTarget(self: pyjet.VolumeGridEmitter2, scalarGridTarget: pyjet.ScalarGrid2, minValue: float, maxValue: float) -> None

Adds step function target to the scalar grid.

Parameters

  • scalarGridTarget : The scalar grid target.
  • minValue : The minimum value of the step function.
  • maxValue : The maximum value of the step function.

def addTarget(

...)

addTarget(self: pyjet.VolumeGridEmitter2, scalarGridTarget: object, customMapper: function) -> None

Adds a scalar/vector grid target.

This function adds a custom target to the emitter. The first parameter defines which grid should it write to. The second parameter, customMapper, defines how to map signed-distance field from the volume geometry and location of the point to the final value that is going to be written to the target grid. The third parameter defines how to blend the old value from the target grid and the new value from the mapper function.

Parameters

  • gridTarget : The scalar/vector grid target.
  • customMapper : The custom mapper.

def setOnBeginUpdateCallback(

...)

Inheritance: GridEmitter2.setOnBeginUpdateCallback

setOnBeginUpdateCallback(self: pyjet.GridEmitter2, callback: function) -> None

Sets the callback function to be called when update is invoked.

The callback function takes current simulation time in seconds unit. Use this callback to track any motion or state changes related to this emitter.

Parameters

  • callback : The callback function.

def update(

...)

Inheritance: GridEmitter2.update

update(self: pyjet.GridEmitter2, currentTimeInSeconds: float, timeIntervalInSeconds: float) -> None

Updates the emitter state from currentTimeInSeconds to by timeIntervalInSeconds.

Parameters

  • currentTimeInSeconds : Starting time stamp.
  • timeIntervalInSeconds : Time-step to advance.

class VolumeGridEmitter3

3-D grid-based volumetric emitter.

Ancestors (in MRO)

Instance variables

var isOneShot

True if this emits only once.

var sourceRegion

Implicit surface which defines the source region.

Methods

def __init__(

...)

init(self: pyjet.VolumeGridEmitter3, sourceRegion: pyjet.Surface3, isOneShot: bool=True) -> None

Constructs an emitter with a source and is-one-shot flag.

def addSignedDistanceTarget(

...)

addSignedDistanceTarget(self: pyjet.VolumeGridEmitter3, scalarGridTarget: pyjet.ScalarGrid3) -> None

Adds signed-distance target to the scalar grid.

def addStepFunctionTarget(

...)

addStepFunctionTarget(self: pyjet.VolumeGridEmitter3, scalarGridTarget: pyjet.ScalarGrid3, minValue: float, maxValue: float) -> None

Adds step function target to the scalar grid.

Parameters

  • scalarGridTarget : The scalar grid target.
  • minValue : The minimum value of the step function.
  • maxValue : The maximum value of the step function.

def addTarget(

...)

addTarget(self: pyjet.VolumeGridEmitter3, scalarGridTarget: object, customMapper: function) -> None

Adds a scalar/vector grid target.

This function adds a custom target to the emitter. The first parameter defines which grid should it write to. The second parameter, customMapper, defines how to map signed-distance field from the volume geometry and location of the point to the final value that is going to be written to the target grid. The third parameter defines how to blend the old value from the target grid and the new value from the mapper function.

Parameters

  • gridTarget : The scalar/vector grid target.
  • customMapper : The custom mapper.

def setOnBeginUpdateCallback(

...)

Inheritance: GridEmitter3.setOnBeginUpdateCallback

setOnBeginUpdateCallback(self: pyjet.GridEmitter3, callback: function) -> None

Sets the callback function to be called when update is invoked.

The callback function takes current simulation time in seconds unit. Use this callback to track any motion or state changes related to this emitter.

Parameters

  • callback : The callback function.

def update(

...)

Inheritance: GridEmitter3.update

update(self: pyjet.GridEmitter3, currentTimeInSeconds: float, timeIntervalInSeconds: float) -> None

Updates the emitter state from currentTimeInSeconds to by timeIntervalInSeconds.

Parameters

  • currentTimeInSeconds : Starting time stamp.
  • timeIntervalInSeconds : Time-step to advance.

class VolumeParticleEmitter2

Ancestors (in MRO)

Instance variables

var target

Inheritance: ParticleEmitter2.target

The target particle system to emit.

Methods

def __init__(

...)

init(self: pyjet.VolumeParticleEmitter2, args, *kwargs) -> None

Constructs VolumeParticleEmitter2

This method constructs VolumeParticleEmitter2 with implicit surface, bounding box, particle spacing, initial velocity (optional), max number of particles (optional), jitter (optional), whether it's one shot or not (optional), whether it should allow overlapping or not (optional), and random seed (optional).

def setOnBeginUpdateCallback(

...)

Inheritance: ParticleEmitter2.setOnBeginUpdateCallback

setOnBeginUpdateCallback(self: pyjet.ParticleEmitter2, arg0: std::__1::function) -> None

Sets the callback function to be called when update function is invoked.

The callback function takes current simulation time in seconds unit. Use this callback to track any motion or state changes related to this emitter.

def update(

...)

Inheritance: ParticleEmitter2.update

update(self: pyjet.ParticleEmitter2, currentTimeInSeconds: float, timeIntervalInSeconds: float) -> None

Updates the emitter state from currentTimeInSeconds to the following time-step.

class VolumeParticleEmitter3

Ancestors (in MRO)

Instance variables

var target

Inheritance: ParticleEmitter3.target

The target particle system to emit.

Methods

def __init__(

...)

init(self: pyjet.VolumeParticleEmitter3, args, *kwargs) -> None

Constructs VolumeParticleEmitter3

This method constructs VolumeParticleEmitter3 with implicit surface, bounding box, particle spacing, initial velocity (optional), max number of particles (optional), jitter (optional), whether it's one shot or not (optional), whether it should allow overlapping or not (optional), and random seed (optional).

def setOnBeginUpdateCallback(

...)

Inheritance: ParticleEmitter3.setOnBeginUpdateCallback

setOnBeginUpdateCallback(self: pyjet.ParticleEmitter3, arg0: std::__1::function) -> None

Sets the callback function to be called when update function is invoked.

The callback function takes current simulation time in seconds unit. Use this callback to track any motion or state changes related to this emitter.

def update(

...)

Inheritance: ParticleEmitter3.update

update(self: pyjet.ParticleEmitter3, currentTimeInSeconds: float, timeIntervalInSeconds: float) -> None

Updates the emitter state from currentTimeInSeconds to the following time-step.

class ZhuBridsonPointsToImplicit2

2-D points-to-implicit converter based on Zhu and Bridson's method.

\see Zhu, Yongning, and Robert Bridson. "Animating sand as a fluid." ACM Transactions on Graphics (TOG). Vol. 24. No. 3. ACM, 2005.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.ZhuBridsonPointsToImplicit2, kernelRadius: float=1.0, cutOffThreshold: float=0.25, isOutputSdf: bool=True) -> None

Constructs the converter with given kernel radius and cut-off threshold.

Parameters

  • kernelRadius : Smoothing kernel radius.
  • cutOffThreshold : Iso-contour value.
  • isOutputSdf : True if the output should be signed-distance field.

def convert(

...)

Inheritance: PointsToImplicit2.convert

convert(self: pyjet.PointsToImplicit2, points: list, output: pyjet.ScalarGrid2) -> None

Converts the given points to implicit surface scalar field.

Parameters

  • points : List of 2D vectors.
  • output : Scalar grid output.

class ZhuBridsonPointsToImplicit3

3-D points-to-implicit converter based on Zhu and Bridson's method.

\see Zhu, Yongning, and Robert Bridson. "Animating sand as a fluid." ACM Transactions on Graphics (TOG). Vol. 24. No. 3. ACM, 2005.

Ancestors (in MRO)

Methods

def __init__(

...)

init(self: pyjet.ZhuBridsonPointsToImplicit3, kernelRadius: float=1.0, cutOffThreshold: float=0.25, isOutputSdf: bool=True) -> None

Constructs the converter with given kernel radius and cut-off threshold.

Parameters

  • kernelRadius : Smoothing kernel radius.
  • cutOffThreshold : Iso-contour value.
  • isOutputSdf : True if the output should be signed-distance field.

def convert(

...)

Inheritance: PointsToImplicit3.convert

convert(self: pyjet.PointsToImplicit3, points: list, output: pyjet.ScalarGrid3) -> None

Converts the given points to implicit surface scalar field.

Parameters

  • points : List of 3D vectors.
  • output : Scalar grid output.