Module pyjet

Fluid simulation engine for computer graphics applications

Functions

def marchingCubes(...)

marchingCubes(arg0: pyjet.ScalarGrid3, arg1: object, arg2: object, arg3: float, arg4: int, arg5: int) -> pyjet.TriangleMesh3

Computes marching cubes and extract triangle mesh from grid.

Classes

class AdvectionSolver2 (*args, **kwargs)

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

  • pybind11_builtins.pybind11_object

Subclasses

class AdvectionSolver3 (*args, **kwargs)

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

  • pybind11_builtins.pybind11_object

Subclasses

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.

init(self: pyjet.Animation) -> None

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

Methods

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.

init(self: pyjet.AnisotropicPointsToImplicit2, kernelRadius: float = 1.0, cutOffDensity: float = 0.5, positionSmoothingFactor: float = 0.5, minNumNeighbors: int = 8, 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.

Ancestors

Inherited members

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.

init(self: pyjet.AnisotropicPointsToImplicit3, kernelRadius: float = 1.0, cutOffDensity: float = 0.5, positionSmoothingFactor: float = 0.5, minNumNeighbors: int = 25, 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.

Ancestors

Inherited members

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.

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.

Ancestors

Inherited members

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.

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.

Ancestors

Inherited members

class ArrayAccessor1D (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object
class ArrayAccessor1F (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object
class ArrayAccessor1Vector2D (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object
class ArrayAccessor1Vector2F (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object
class ArrayAccessor1Vector3D (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object
class ArrayAccessor1Vector3F (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object
class ArrayAccessor1Vector4D (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object
class ArrayAccessor1Vector4F (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object
class ArrayAccessor2D (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object
class ArrayAccessor2F (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object
class ArrayAccessor3D (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object
class ArrayAccessor3F (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object
class BoundingBox2D (...)

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

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.

Ancestors

  • pybind11_builtins.pybind11_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 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).

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.

Ancestors

  • pybind11_builtins.pybind11_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 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).

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.

Ancestors

  • pybind11_builtins.pybind11_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 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).

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.

Ancestors

  • pybind11_builtins.pybind11_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 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 (*args, **kwargs)

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

Ancestors

  • pybind11_builtins.pybind11_object

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 (*args, **kwargs)

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

Ancestors

  • pybind11_builtins.pybind11_object

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 (*args, **kwargs)

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

Ancestors

  • pybind11_builtins.pybind11_object

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 (*args, **kwargs)

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

Ancestors

  • pybind11_builtins.pybind11_object

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.

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).

Ancestors

  • Surface2
  • pybind11_builtins.pybind11_object

Instance variables

var bound

(self: pyjet.Box2) -> pyjet.BoundingBox2D

Inherited members

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.

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).

Ancestors

  • Surface3
  • pybind11_builtins.pybind11_object

Instance variables

var bound

(self: pyjet.Box3) -> pyjet.BoundingBox3D

Inherited members

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.

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 at the grid.
    • domainSizeX : Domain size in x-direction.

Ancestors

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 set(...)

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

Sets the contents with the given other grid.

Parameters

  • other : Other grid to copy from.

Inherited members

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.

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 at the grid.
    • domainSizeX : Domain size in x-direction.

Ancestors

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 set(...)

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

Sets the contents with the given other grid.

Parameters

  • other : Other grid to copy from.

Inherited members

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.

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 at the grid.
    • domainSizeX : Domain size in x-direction.

Ancestors

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 fill(...)

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

Fills the grid with given value or function.

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.

Inherited members

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.

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 at the grid.
    • domainSizeX : Domain size in x-direction.

Ancestors

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 fill(...)

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

Fills the grid with given value or function.

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.

Inherited members

class Collider2 (*args, **kwargs)

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

  • pybind11_builtins.pybind11_object

Subclasses

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.

Methods

def velocityAt(...)

velocityAt(self: pyjet.Collider2, point: object) -> pyjet.Vector2D

Returns the velocity of the collider at given point.

class Collider3 (*args, **kwargs)

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

  • pybind11_builtins.pybind11_object

Subclasses

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.

Methods

def velocityAt(...)

velocityAt(self: pyjet.Collider3, point: object) -> pyjet.Vector3D

Returns the velocity of the collider at given point.

class ColliderSet2 (...)

Collection of 2-D colliders

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

Constructs ColliderSet2

This method constructs ColliderSet2 with other colliders.

Parameters

  • *args : List of other colliders. Must be size of 0 or 1.

Ancestors

  • Collider2
  • pybind11_builtins.pybind11_object

Instance variables

var numberOfColliders

Number of colliders.

Methods

def addCollider(...)

addCollider(self: pyjet.ColliderSet2, arg0: pyjet.Collider2) -> None

Adds a collider to the set.

def collider(...)

collider(self: pyjet.ColliderSet2, arg0: int) -> pyjet.Collider2

Returns collider at index i.

Inherited members

class ColliderSet3 (...)

Collection of 3-D colliders

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

Constructs ColliderSet3

This method constructs ColliderSet3 with other colliders.

Parameters

  • *args : List of other colliders. Must be size of 0 or 1.

Ancestors

  • Collider3
  • pybind11_builtins.pybind11_object

Instance variables

var numberOfColliders

Number of colliders.

Methods

def addCollider(...)

addCollider(self: pyjet.ColliderSet3, arg0: pyjet.Collider3) -> None

Adds a collider to the set.

def collider(...)

collider(self: pyjet.ColliderSet3, arg0: int) -> pyjet.Collider3

Returns collider at index i.

Inherited members

class CollocatedVectorGrid2 (*args, **kwargs)

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

Ancestors

Subclasses

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>

The data array accessor.

def dataPosition(...)

dataPosition(self: pyjet.CollocatedVectorGrid2) -> Callable[[int, int], pyjet.Vector2D]

The function that maps data point to its position.

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) -> Callable[[pyjet.Vector2D], pyjet.Vector2D]

Returns the sampler function.

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

Inherited members

class CollocatedVectorGrid3 (*args, **kwargs)

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

Ancestors

Subclasses

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>

The data array accessor.

def dataPosition(...)

dataPosition(self: pyjet.CollocatedVectorGrid3) -> Callable[[int, int, int], pyjet.Vector3D]

The function that maps data point to its position.

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) -> Callable[[pyjet.Vector3D], pyjet.Vector3D]

Returns the sampler function.

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

Inherited members

class ConstantScalarField2 (...)

2-D constant scalar field.

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

Constructs a constant scalar field with given value.

Ancestors

Methods

def sample(...)

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

Returns sampled value at given position x.

def sampler(...)

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

Returns the sampler function.

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

class ConstantScalarField3 (...)

3-D constant scalar field.

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

Constructs a constant scalar field with given value.

Ancestors

Methods

def sample(...)

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

Returns sampled value at given position x.

def sampler(...)

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

Returns the sampler function.

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

class ConstantVectorField2 (...)

2-D constant vector field.

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

Constructs a constant vector field with given value.

Ancestors

Methods

def sample(...)

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

Returns sampled value at given position x.

def sampler(...)

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

Returns the sampler function.

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

class ConstantVectorField3 (...)

3-D constant vector field.

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

Constructs a constant vector field with given value.

Ancestors

Methods

def sample(...)

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

Returns sampled value at given position x.

def sampler(...)

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

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.

init(self: pyjet.CubicSemiLagrangian2) -> None

Ancestors

Inherited members

class CubicSemiLagrangian3 (...)

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

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

init(self: pyjet.CubicSemiLagrangian3) -> None

Ancestors

Inherited members

class CustomScalarField2 (...)

2-D scalar field with custom field function.

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

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

Ancestors

Methods

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) -> Callable[[pyjet.Vector2D], float]

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.

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

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

Ancestors

Methods

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) -> Callable[[pyjet.Vector3D], float]

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.

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

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

Ancestors

Methods

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) -> Callable[[pyjet.Vector2D], pyjet.Vector2D]

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.

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

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

Ancestors

Methods

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) -> Callable[[pyjet.Vector3D], pyjet.Vector3D]

Returns the sampler function.

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

class Cylinder3 (...)

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).

Ancestors

  • Surface3
  • pybind11_builtins.pybind11_object

Instance variables

var center

(self: pyjet.Cylinder3) -> pyjet.Vector3D

var height

(self: pyjet.Cylinder3) -> float

var radius

(self: pyjet.Cylinder3) -> float

Inherited members

class EnoLevelSetSolver2 (*args, **kwargs)

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

Ancestors

Inherited members

class EnoLevelSetSolver3 (*args, **kwargs)

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

Ancestors

Inherited members

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.

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.

Ancestors

Methods

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 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 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

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]

The 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

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]

The 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.

Inherited members

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.

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.

Ancestors

Methods

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 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 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

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]

The 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

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]

The 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

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]

The 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.

Inherited members

class FdmCgSolver2 (...)

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

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

Ancestors

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.

class FdmCgSolver3 (...)

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

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

Ancestors

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.

class FdmGaussSeidelSolver2 (...)

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

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

Ancestors

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.

class FdmGaussSeidelSolver3 (...)

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

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

Ancestors

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.

class FdmIccgSolver2 (...)

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

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

Ancestors

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.

class FdmIccgSolver3 (...)

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

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

Ancestors

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.

class FdmJacobiSolver2 (...)

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

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

Ancestors

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.

class FdmJacobiSolver3 (...)

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

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

Ancestors

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.

class FdmLinearSystemSolver2 (*args, **kwargs)

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

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

class FdmLinearSystemSolver3 (*args, **kwargs)

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

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

class FdmMgSolver2 (...)

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

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

Ancestors

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

(arg0: pyjet.FdmMgSolver2) -> float

var useRedBlackOrdering

(arg0: pyjet.FdmMgSolver2) -> bool

class FdmMgSolver3 (...)

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

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

Ancestors

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

(arg0: pyjet.FdmMgSolver3) -> float

var useRedBlackOrdering

(arg0: pyjet.FdmMgSolver3) -> bool

class FdmMgpcgSolver2 (...)

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

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

Ancestors

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

(arg0: pyjet.FdmMgpcgSolver2) -> float

var tolerance

The max residual tolerance for the MGPCG method.

var useRedBlackOrdering

(arg0: pyjet.FdmMgpcgSolver2) -> bool

class FdmMgpcgSolver3 (...)

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

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

Ancestors

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

(arg0: pyjet.FdmMgpcgSolver3) -> float

var tolerance

The max residual tolerance for the MGPCG method.

var useRedBlackOrdering

(arg0: pyjet.FdmMgpcgSolver3) -> bool

class Field2 (*args, **kwargs)

Abstract base class for 2-D fields.

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

class Field3 (*args, **kwargs)

Abstract base class for 3-D fields.

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

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.

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.

Ancestors

Instance variables

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.

Inherited members

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.

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.

Ancestors

Instance variables

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.

Inherited members

class FmmLevelSetSolver2 (*args, **kwargs)

2-D fast marching method (FMM) implementation.

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

Ancestors

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 (*args, **kwargs)

3-D fast marching method (FMM) implementation.

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

Ancestors

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.

init(self: pyjet.Frame, index: int = 0, 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).

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var index

Index of the frame

var timeIntervalInSeconds

Time interval of the frame in seconds

Methods

def advance(...)

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

Advances multiple frames.

Parameters

  • delta : Number of frames to advance.
def timeInSeconds(...)

timeInSeconds(self: pyjet.Frame) -> float

Elapsed time in seconds

class Grid2 (*args, **kwargs)

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

Subclasses

Instance variables

var boundingBox

Bounding box of the entire grid.

var cellCenterPosition

Function that maps grid index to the cell-center position.

var gridSpacing

Spacing between grid points.

var origin

Origin of the grid.

var resolution

Resolution of the grid.

Methods

def forEachCellIndex(...)

forEachCellIndex(self: pyjet.Grid2, func: function) -> None

Invokes the given function func for each grid cell.

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

def hasSameShape(...)

hasSameShape(self: pyjet.Grid2, arg0: pyjet.Grid2) -> bool

Returns true if resolution, grid-spacing and origin are same.

def swap(...)

swap(self: pyjet.Grid2, arg0: pyjet.Grid2) -> None

Swaps the data with other grid.

Inherited members

class Grid3 (*args, **kwargs)

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

Subclasses

Instance variables

var boundingBox

Bounding box of the entire grid.

var cellCenterPosition

Function that maps grid index to the cell-center position.

var gridSpacing

Spacing between grid points.

var origin

Origin of the grid.

var resolution

Resolution of the grid.

Methods

def forEachCellIndex(...)

forEachCellIndex(self: pyjet.Grid3, func: function) -> None

Invokes the given function func for each grid cell.

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

def hasSameShape(...)

hasSameShape(self: pyjet.Grid3, arg0: pyjet.Grid3) -> bool

Returns true if resolution, grid-spacing and origin are same.

def swap(...)

swap(self: pyjet.Grid3, arg0: pyjet.Grid3) -> None

Swaps the data with other grid.

Inherited members

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.

init(self: pyjet.GridBackwardEulerDiffusionSolver2) -> None

Ancestors

Methods

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.

init(self: pyjet.GridBackwardEulerDiffusionSolver3) -> None

Ancestors

Methods

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.

init(self: pyjet.GridBlockedBoundaryConditionSolver2) -> None

Ancestors

Methods

def constrainVelocity(...)

constrainVelocity(self: pyjet.GridBlockedBoundaryConditionSolver2, velocity: pyjet.FaceCenteredGrid2, extrapolationDepth: int = 5) -> 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.

Inherited members

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.

init(self: pyjet.GridBlockedBoundaryConditionSolver3) -> None

Ancestors

Methods

def constrainVelocity(...)

constrainVelocity(self: pyjet.GridBlockedBoundaryConditionSolver3, velocity: pyjet.FaceCenteredGrid3, extrapolationDepth: int = 5) -> 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.

Inherited members

class GridBoundaryConditionSolver2 (*args, **kwargs)

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

  • pybind11_builtins.pybind11_object

Subclasses

Instance variables

var closedDomainBoundaryFlag

Closed domain boundary flag.

var collider

(arg0: pyjet.GridBoundaryConditionSolver2) -> pyjet.Collider2

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 (*args, **kwargs)

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

  • pybind11_builtins.pybind11_object

Subclasses

Instance variables

var closedDomainBoundaryFlag

Closed domain boundary flag.

var collider

(arg0: pyjet.GridBoundaryConditionSolver3) -> pyjet.Collider3

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 (*args, **kwargs)

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

  • pybind11_builtins.pybind11_object

Subclasses

class GridDiffusionSolver3 (*args, **kwargs)

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

  • pybind11_builtins.pybind11_object

Subclasses

class GridEmitter2 (*args, **kwargs)

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

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

Instance variables

var isEnabled

True/false if the emitter is enabled/disabled.

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 (*args, **kwargs)

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

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

Instance variables

var isEnabled

True/false if the emitter is enabled/disabled.

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 (*args, **kwargs)

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

Subclasses

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 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 gridSystemData

The grid system data.

This function returns the grid system data. The grid system data stores the core fluid flow fields such as velocity. By default, the data instance has velocity field only.

var maxCfl

The max allowed CFL number.

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 useCompressedLinearSystem

True if the solver is using compressed linear system.

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 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.

Inherited members

class GridFluidSolver3 (*args, **kwargs)

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

Subclasses

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 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 gridSystemData

The grid system data.

This function returns the grid system data. The grid system data stores the core fluid flow fields such as velocity. By default, the data instance has velocity field only.

var maxCfl

The max allowed CFL number.

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 useCompressedLinearSystem

True if the solver is using compressed linear system.

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 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.

Inherited members

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.

init(self: pyjet.GridForwardEulerDiffusionSolver2) -> None

Ancestors

Methods

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.

init(self: pyjet.GridForwardEulerDiffusionSolver3) -> None

Ancestors

Methods

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.

init(self: pyjet.GridFractionalBoundaryConditionSolver2) -> None

Ancestors

Instance variables

var colliderSdf

Signed distance field of the collider.

var colliderVelocityField

Velocity field of the collider.

Methods

def constrainVelocity(...)

constrainVelocity(self: pyjet.GridFractionalBoundaryConditionSolver2, velocity: pyjet.FaceCenteredGrid2, extrapolationDepth: int = 5) -> 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.

Inherited members

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.

init(self: pyjet.GridFractionalBoundaryConditionSolver3) -> None

Ancestors

Instance variables

var colliderSdf

Signed distance field of the collider.

var colliderVelocityField

Velocity field of the collider.

Methods

def constrainVelocity(...)

constrainVelocity(self: pyjet.GridFractionalBoundaryConditionSolver3, velocity: pyjet.FaceCenteredGrid3, extrapolationDepth: int = 5) -> 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.

Inherited members

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.

init(self: pyjet.GridFractionalSinglePhasePressureSolver2) -> None

Ancestors

Instance variables

var linearSystemSolver

"The linear system solver."

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.

init(self: pyjet.GridFractionalSinglePhasePressureSolver3) -> None

Ancestors

Instance variables

var linearSystemSolver

"The linear system solver."

class GridPressureSolver2 (*args, **kwargs)

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

  • pybind11_builtins.pybind11_object

Subclasses

class GridPressureSolver3 (*args, **kwargs)

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

  • pybind11_builtins.pybind11_object

Subclasses

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.

init(self: pyjet.GridSinglePhasePressureSolver2) -> None

Ancestors

Instance variables

var linearSystemSolver

"The linear system solver."

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.

init(self: pyjet.GridSinglePhasePressureSolver3) -> None

Ancestors

Instance variables

var linearSystemSolver

"The linear system solver."

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.

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.

Ancestors

Instance variables

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 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.

Inherited members

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.

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.

Ancestors

Instance variables

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 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.

Inherited members

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.

init(self: pyjet.GridSystemData2) -> None

Ancestors

Instance variables

var boundingBox

Bounding box of the entire grid.

var gridSpacing

Spacing between grid points.

var origin

Origin of the grid.

var resolution

Resolution of the grid.

Inherited members

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.

init(self: pyjet.GridSystemData3) -> None

Ancestors

Instance variables

var boundingBox

Bounding box of the entire grid.

var gridSpacing

Spacing between grid points.

var origin

Origin of the grid.

var resolution

Resolution of the grid.

Inherited members

class ImplicitSurface2 (*args, **kwargs)

Abstract base class for 2-D implicit surface.

Ancestors

  • Surface2
  • pybind11_builtins.pybind11_object

Subclasses

Methods

def signedDistance(...)

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

Returns signed distance from the given point otherPoint.

Inherited members

class ImplicitSurface3 (*args, **kwargs)

Abstract base class for 3-D implicit surface.

Ancestors

  • Surface3
  • pybind11_builtins.pybind11_object

Subclasses

Methods

def signedDistance(...)

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

Returns signed distance from the given point otherPoint.

Inherited members

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.

init(self: pyjet.ImplicitTriangleMesh3, mesh: pyjet.TriangleMesh3, resolutionX: int = 32, margin: float = 0.2, transform: pyjet.Transform3 = , isNormalFlipped: bool = False) -> None

Constructs an ImplicitSurface3 with mesh and other grid parameters.

Ancestors

Instance variables

var grid

The grid data.

Inherited members

class IterativeLevelSetSolver2 (*args, **kwargs)

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

Subclasses

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 (*args, **kwargs)

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

Subclasses

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.

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.

Ancestors

Instance variables

var levelSetSolver

The level set solver.

var signedDistanceField

The signed-distance field.

Methods

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 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.

Inherited members

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.

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.

Ancestors

Instance variables

var levelSetSolver

The level set solver.

var signedDistanceField

The signed-distance field.

Methods

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 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.

Inherited members

class LevelSetSolver2 (*args, **kwargs)

Abstract base class for 2-D level set solver.

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

class LevelSetSolver3 (*args, **kwargs)

Abstract base class for 3-D level set solver.

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

class Logging (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object

Methods

def mute(...)

mute() -> None

def setLevel(...)

setLevel(arg0: pyjet.LoggingLevel) -> None

def unmute(...)

unmute() -> None

class LoggingLevel (...)

Members:

ALL

DEBUG

INFO

WARN

ERROR

OFF

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

Ancestors

  • pybind11_builtins.pybind11_object

Class variables

var ALL

Members:

ALL

DEBUG

INFO

WARN

ERROR

OFF

var DEBUG

Members:

ALL

DEBUG

INFO

WARN

ERROR

OFF

var ERROR

Members:

ALL

DEBUG

INFO

WARN

ERROR

OFF

var INFO

Members:

ALL

DEBUG

INFO

WARN

ERROR

OFF

var OFF

Members:

ALL

DEBUG

INFO

WARN

ERROR

OFF

var WARN

Members:

ALL

DEBUG

INFO

WARN

ERROR

OFF

Instance variables

var name

(arg0: pyjet.LoggingLevel) -> str

class ParticleEmitter2 (*args, **kwargs)

Abstract base class for 2-D particle emitter.

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

Instance variables

var isEnabled

True/false if the emitter is enabled/disabled.

var target

The target particle system to emit.

Methods

def setOnBeginUpdateCallback(...)

setOnBeginUpdateCallback(self: pyjet.ParticleEmitter2, arg0: Callable[[pyjet.ParticleEmitter2, float, float], None]) -> 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 (*args, **kwargs)

Abstract base class for 3-D particle emitter.

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

Instance variables

var isEnabled

True/false if the emitter is enabled/disabled.

var target

The target particle system to emit.

Methods

def setOnBeginUpdateCallback(...)

setOnBeginUpdateCallback(self: pyjet.ParticleEmitter3, arg0: Callable[[pyjet.ParticleEmitter3, float, float], None]) -> 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.

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

Constructs an emitter with sub-emitters.

Ancestors

Methods

def addEmitter(...)

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

Adds sub-emitter.

Inherited members

class ParticleEmitterSet3 (...)

3-D particle-based emitter set.

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

Constructs an emitter with sub-emitters.

Ancestors

Methods

def addEmitter(...)

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

Adds sub-emitter.

Inherited members

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.

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

Constructs particle system data with given number of particles.

Ancestors

Subclasses

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 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 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 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).

Inherited members

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.

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

Constructs particle system data with given number of particles.

Ancestors

Subclasses

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 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 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 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).

Inherited members

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.

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).

Ancestors

Subclasses

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.

Inherited members

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.

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).

Ancestors

Subclasses

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.

Inherited members

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.

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.

Ancestors

Instance variables

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.

Inherited members

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.

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.

Ancestors

Instance variables

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.

Inherited members

class PhysicsAnimation (...)

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.

init(self: pyjet.PhysicsAnimation) -> None

Ancestors

  • Animation
  • pybind11_builtins.pybind11_object

Subclasses

Instance variables

var currentFrame

(arg0: pyjet.PhysicsAnimation) -> pyjet.Frame

var currentTimeInSeconds

(arg0: pyjet.PhysicsAnimation) -> float

var isUsingFixedSubTimeSteps

(arg0: pyjet.PhysicsAnimation) -> bool

var numberOfFixedSubTimeSteps

(arg0: pyjet.PhysicsAnimation) -> int

Methods

def advanceSingleFrame(...)

advanceSingleFrame(self: pyjet.PhysicsAnimation) -> None

Inherited members

class PicSolver2 (...)

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).

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.

Ancestors

Subclasses

Instance variables

var particleEmitter

Particle emitter property.

var particleSystemData

Returns particleSystemData.

Inherited members

class PicSolver3 (...)

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).

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.

Ancestors

Subclasses

Instance variables

var particleEmitter

Particle emitter property.

var particleSystemData

Returns particleSystemData.

Inherited members

class Plane2 (...)

2-D plane geometry.

This class represents 2-D plane geometry which extends Surface2 by overriding surface-related queries.

init(self: pyjet.Plane2, normal: object, point: object, transform: pyjet.Transform2 = , isNormalFlipped: bool = False) -> None

Constructs a plane that cross point with surface normal.

Ancestors

  • Surface2
  • pybind11_builtins.pybind11_object

Instance variables

var normal

(self: pyjet.Plane2) -> pyjet.Vector2D

var point

(self: pyjet.Plane2) -> pyjet.Vector2D

Inherited members

class Plane3 (...)

3-D plane geometry.

This class represents 3-D plane geometry which extends Surface3 by overriding surface-related queries.

init(self: pyjet.Plane3, normal: object, point: object, transform: pyjet.Transform3 = , isNormalFlipped: bool = False) -> None

Constructs a plane that cross point with surface normal.

Ancestors

  • Surface3
  • pybind11_builtins.pybind11_object

Instance variables

var normal

(self: pyjet.Plane3) -> pyjet.Vector3D

var point

(self: pyjet.Plane3) -> pyjet.Vector3D

Inherited members

class Point2UI (...)

init(self: pyjet.Point2UI, x: int = 0, y: int = 0) -> None

Constructs Point2UI

This method constructs 2D point with x and y.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var x

(self: pyjet.Point2UI) -> int

var y

(self: pyjet.Point2UI) -> int

class Point3UI (...)

init(self: pyjet.Point3UI, x: int = 0, y: int = 0, z: int = 0) -> None

Constructs Point3UI

This method constructs 3D point with x, y, and z.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var x

(self: pyjet.Point3UI) -> int

var y

(self: pyjet.Point3UI) -> int

var z

(self: pyjet.Point3UI) -> int

class PointParticleEmitter2 (...)

2-D point particle emitter.

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.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var maxNumberOfNewParticlesPerSecond

The max number of new particles per second.

var maxNumberOfParticles

The max number of particles to be emitted.

class PointParticleEmitter3 (...)

3-D point particle emitter.

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.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var maxNumberOfNewParticlesPerSecond

The max number of new particles per second.

var maxNumberOfParticles

The max number of particles to be emitted.

class PointsToImplicit2 (*args, **kwargs)

Abstract base class for 2-D points-to-implicit converters.

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

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 (*args, **kwargs)

Abstract base class for 3-D points-to-implicit converters.

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

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 (...)

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.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var w

(self: pyjet.QuaternionD) -> float

var x

(self: pyjet.QuaternionD) -> float

var y

(self: pyjet.QuaternionD) -> float

var z

(self: pyjet.QuaternionD) -> float

Methods

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 (...)

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.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var w

(self: pyjet.QuaternionF) -> float

var x

(self: pyjet.QuaternionF) -> float

var y

(self: pyjet.QuaternionF) -> float

var z

(self: pyjet.QuaternionF) -> float

Methods

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 (...)

init(self: pyjet.Ray2D, origin: object = , direction: object = ) -> None

Constructs Ray2D

This method constructs 2D double ray with origin and direction.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var direction

Direction of the ray.

var origin

Origin of the ray.

class Ray2F (...)

init(self: pyjet.Ray2F, origin: object = , direction: object = ) -> None

Constructs Ray2F

This method constructs 2D float ray with origin and direction.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var direction

Direction of the ray.

var origin

Origin of the ray.

class Ray3D (...)

init(self: pyjet.Ray3D, origin: object = , direction: object = ) -> None

Constructs Ray3D

This method constructs 3D double ray with origin and direction.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var direction

Direction of the ray.

var origin

Origin of the ray.

class Ray3F (...)

init(self: pyjet.Ray3F, origin: object = , direction: object = ) -> None

Constructs Ray3F

This method constructs 3D float ray with origin and direction.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var direction

Direction of the ray.

var origin

Origin of the ray.

class RigidBodyCollider2 (...)

2-D rigid body collider class.

This class implements 2-D rigid body collider. The collider can only take rigid body motion with linear and rotational velocities.

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.

Ancestors

  • Collider2
  • pybind11_builtins.pybind11_object

Instance variables

var angularVelocity

Angular velocity of the collider.

var linearVelocity

Linear velocity of the collider.

Inherited members

class RigidBodyCollider3 (...)

3-D rigid body collider class.

This class implements 3-D rigid body collider. The collider can only take rigid body motion with linear and rotational velocities.

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.

Ancestors

  • Collider3
  • pybind11_builtins.pybind11_object

Instance variables

var angularVelocity

Angular velocity of the collider.

var linearVelocity

Linear velocity of the collider.

Inherited members

class ScalarField2 (*args, **kwargs)

Abstract base class for 2-D scalar field.

Ancestors

  • Field2
  • pybind11_builtins.pybind11_object

Subclasses

class ScalarField3 (*args, **kwargs)

Abstract base class for 3-D scalar field.

Ancestors

  • Field3
  • pybind11_builtins.pybind11_object

Subclasses

class ScalarGrid2 (*args, **kwargs)

Abstract base class for 2-D scalar grid structure.

Ancestors

Subclasses

Instance variables

var dataOrigin

Returns the origin of the grid data.

This function 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 size of the grid data.

This function returns the size of the grid data which is not necessarily equal to the grid resolution if the data is not stored at cell-center.

Methods

def clear(...)

clear(self: pyjet.ScalarGrid2) -> None

Clears the contents of the grid.

def clone(...)

clone(self: pyjet.ScalarGrid2) -> pyjet.ScalarGrid2

Returns the copy of the grid instance.

def dataAccessor(...)

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

The data array accessor.

def dataPosition(...)

dataPosition(self: pyjet.ScalarGrid2) -> Callable[[int, int], pyjet.Vector2D]

The function that maps data point to its position.

def fill(...)

fill(args, *kwargs) Overloaded function.

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

Fills the grid with given value.

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

Fills the grid with given 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.

Inherited members

class ScalarGrid3 (*args, **kwargs)

Abstract base class for 3-D scalar grid structure.

Ancestors

Subclasses

Instance variables

var dataOrigin

Returns the origin of the grid data.

This function 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 size of the grid data.

This function returns the size of the grid data which is not necessarily equal to the grid resolution if the data is not stored at cell-center.

Methods

def clear(...)

clear(self: pyjet.ScalarGrid3) -> None

Clears the contents of the grid.

def clone(...)

clone(self: pyjet.ScalarGrid3) -> pyjet.ScalarGrid3

Returns the copy of the grid instance.

def dataAccessor(...)

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

The data array accessor.

def dataPosition(...)

dataPosition(self: pyjet.ScalarGrid3) -> Callable[[int, int, int], pyjet.Vector3D]

The function that maps data point to its position.

def fill(...)

fill(args, *kwargs) Overloaded function.

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

Fills the grid with given value.

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

Fills the grid with given 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.

Inherited members

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).

init(self: pyjet.SemiLagrangian2) -> None

Ancestors

Subclasses

Methods

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).

init(self: pyjet.SemiLagrangian3) -> None

Ancestors

Subclasses

Methods

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 (*args, **kwargs)

Abstract base class for any serializable class.

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

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: str) -> 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: str) -> None

Serializes this instance into the file.

class Size2 (...)

init(self: pyjet.Size2, x: int = 0, y: int = 0) -> None

Constructs Size2

This method constructs 2D size with x and y.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var x

(self: pyjet.Size2) -> int

var y

(self: pyjet.Size2) -> int

class Size3 (...)

init(self: pyjet.Size3, x: int = 0, y: int = 0, z: int = 0) -> None

Constructs Size3

This method constructs 3D size with x, y, and z.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var x

(self: pyjet.Size3) -> int

var y

(self: pyjet.Size3) -> int

var z

(self: pyjet.Size3) -> int

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.

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.

Ancestors

Inherited members

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.

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.

Ancestors

Inherited members

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.

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.

Ancestors

Subclasses

Instance variables

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 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 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 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.

Inherited members

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.

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.

Ancestors

Subclasses

Instance variables

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 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 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 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.

Inherited members

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.

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

Constructs SPH system data with given number of particles.

Ancestors

Instance variables

var densities

The density array accessor.

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 pressures

The pressure array accessor.

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).

Methods

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 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.

Inherited members

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.

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

Constructs SPH system data with given number of particles.

Ancestors

Instance variables

var densities

The density array accessor.

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 pressures

The pressure array accessor.

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).

Methods

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 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.

Inherited members

class Sphere2 (...)

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).

Ancestors

  • Surface2
  • pybind11_builtins.pybind11_object

Instance variables

var center

(self: pyjet.Sphere2) -> pyjet.Vector2D

var radius

(self: pyjet.Sphere2) -> float

Inherited members

class Sphere3 (...)

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).

Ancestors

  • Surface3
  • pybind11_builtins.pybind11_object

Instance variables

var center

(self: pyjet.Sphere3) -> pyjet.Vector3D

var radius

(self: pyjet.Sphere3) -> float

Inherited members

class SphericalPointsToImplicit2 (...)

2-D points-to-implicit converter based on simple sphere model.

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.

Ancestors

Inherited members

class SphericalPointsToImplicit3 (...)

3-D points-to-implicit converter based on simple sphere model.

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.

Ancestors

Inherited members

class Surface2 (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

Instance variables

var isNormalFlipped

(self: pyjet.Surface2) -> bool

var transform

(self: pyjet.Surface2) -> pyjet.Transform2

class Surface3 (*args, **kwargs)

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

Instance variables

var isNormalFlipped

(self: pyjet.Surface3) -> bool

var transform

(self: pyjet.Surface3) -> pyjet.Transform3

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.

init(self: pyjet.SurfaceSet2, others: list = [], transform: pyjet.Transform2 = , isNormalFlipped: bool = False) -> None

Constructs with a list of other surfaces.

Ancestors

  • Surface2
  • pybind11_builtins.pybind11_object

Methods

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.

Inherited members

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.

init(self: pyjet.SurfaceSet3, others: list = [], transform: pyjet.Transform3 = , isNormalFlipped: bool = False) -> None

Constructs with a list of other surfaces.

Ancestors

  • Surface3
  • pybind11_builtins.pybind11_object

Methods

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.

Inherited members

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.

init(self: pyjet.SurfaceToImplicit2, surface: pyjet.Surface2, transform: pyjet.Transform2 = , isNormalFlipped: bool = False) -> None

Constructs an instance with generic Surface2 instance.

Ancestors

Instance variables

var surface

The raw surface instance.

Inherited members

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.

init(self: pyjet.SurfaceToImplicit3, surface: pyjet.Surface3, transform: pyjet.Transform3 = , isNormalFlipped: bool = False) -> None

Constructs an instance with generic Surface3 instance.

Ancestors

Instance variables

var surface

The raw surface instance.

Inherited members

class Transform2 (...)

init(self: pyjet.Transform2, translation: object = , orientation: float = 0.0) -> None

Constructs Transform2

This method constructs 2D transform with translation and orientation.

Ancestors

  • pybind11_builtins.pybind11_object
class Transform3 (...)

init(self: pyjet.Transform3, translation: object = , orientation: object = ) -> None

Constructs Transform3

This method constructs 3D transform with translation and orientation.

Ancestors

  • pybind11_builtins.pybind11_object
class Triangle3 (...)

3-D triangle geometry.

This class represents 3-D triangle geometry which extends Surface3 by overriding surface-related queries.

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.

Ancestors

  • Surface3
  • pybind11_builtins.pybind11_object

Instance variables

var normals

(self: pyjet.Triangle3) -> List[pyjet.Vector3D[3]]

var points

(self: pyjet.Triangle3) -> List[pyjet.Vector3D[3]]

var uvs

(self: pyjet.Triangle3) -> List[pyjet.Vector2D[3]]

Inherited members

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.

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.

Ancestors

  • Surface3
  • pybind11_builtins.pybind11_object

Methods

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: str) -> 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: str) -> None

Writes the mesh in obj format to the file.

Inherited members

class UpwindLevelSetSolver2 (*args, **kwargs)

2-D first-order upwind-based iterative level set solver.

Ancestors

Inherited members

class UpwindLevelSetSolver3 (*args, **kwargs)

3-D first-order upwind-based iterative level set solver.

Ancestors

Inherited members

class Vector2D (...)

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.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var x

(self: pyjet.Vector2D) -> float

var y

(self: pyjet.Vector2D) -> float

Methods

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 (...)

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.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var x

(self: pyjet.Vector2F) -> float

var y

(self: pyjet.Vector2F) -> float

Methods

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 (...)

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.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var x

(self: pyjet.Vector3D) -> float

var y

(self: pyjet.Vector3D) -> float

var z

(self: pyjet.Vector3D) -> float

Methods

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 (...)

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.

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var x

(self: pyjet.Vector3F) -> float

var y

(self: pyjet.Vector3F) -> float

var z

(self: pyjet.Vector3F) -> float

Methods

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 (*args, **kwargs)

Abstract base class for 2-D vector field.

Ancestors

  • Field2
  • pybind11_builtins.pybind11_object

Subclasses

class VectorField3 (*args, **kwargs)

Abstract base class for 3-D vector field.

Ancestors

  • Field3
  • pybind11_builtins.pybind11_object

Subclasses

class VectorGrid2 (*args, **kwargs)

Abstract base class for 2-D vector grid structure.

Ancestors

Subclasses

Inherited members

class VectorGrid3 (*args, **kwargs)

Abstract base class for 3-D vector grid structure.

Ancestors

Subclasses

Inherited members

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.

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 at the grid.
    • domainSizeX : Domain size in x-direction.

Ancestors

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 set(...)

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

Sets the contents with the given other grid.

Parameters

  • other : Other grid to copy from.

Inherited members

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.

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 at the grid.
    • domainSizeX : Domain size in x-direction.

Ancestors

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 set(...)

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

Sets the contents with the given other grid.

Parameters

  • other : Other grid to copy from.

Inherited members

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.

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 at the grid.
    • domainSizeX : Domain size in x-direction.

Ancestors

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 fill(...)

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

Fills the grid with given value or function.

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.

Inherited members

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.

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 at the grid.
    • domainSizeX : Domain size in x-direction.

Ancestors

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 fill(...)

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

Fills the grid with given value or function.

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.

Inherited members

class VolumeGridEmitter2 (...)

2-D grid-based volumetric emitter.

init(self: pyjet.VolumeGridEmitter2, sourceRegion: pyjet.Surface2, isOneShot: bool = True) -> None

Constructs an emitter with a source and is-one-shot flag.

Ancestors

Instance variables

var isOneShot

True if this emits only once.

var sourceRegion

Implicit surface which defines the source region.

Methods

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.

Inherited members

class VolumeGridEmitter3 (...)

3-D grid-based volumetric emitter.

init(self: pyjet.VolumeGridEmitter3, sourceRegion: pyjet.Surface3, isOneShot: bool = True) -> None

Constructs an emitter with a source and is-one-shot flag.

Ancestors

Instance variables

var isOneShot

True if this emits only once.

var sourceRegion

Implicit surface which defines the source region.

Methods

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.

Inherited members

class VolumeParticleEmitter2 (...)

Abstract base class for 2-D particle emitter.

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).

Parameters

  • implicitSurface : The implicit surface.
  • maxRegion: The max region.
  • spacing: The spacing between particles.
  • initialVel: The initial velocity.
  • maxNumberOfParticles: The max number of particles to be emitted.
  • jitter: The jitter amount between 0 and 1.
  • isOneShot: Set true if particles are emitted just once.
  • allowOverlapping: True if particles can be overlapped.
  • seed: The random seed.

Ancestors

Instance variables

var allowOverlapping

True if particles can be overlapped.

var angularVelocity

The angular velocity of the emitter.

var initialVelocity

The initial velocity of the particles.

var isOneShot

True if particles should be emitted just once.

var jitter

Jitter amount between 0 and 1.

var linearVelocity

The linear velocity of the emitter.

var maxNumberOfParticles

Max number of particles to be emitted.

var maxRegion

Max particle gen region.

var spacing

The spacing between particles.

var surface

Source surface.

Inherited members

class VolumeParticleEmitter3 (...)

Abstract base class for 3-D particle emitter.

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).

Parameters

  • implicitSurface : The implicit surface.
  • maxRegion: The max region.
  • spacing: The spacing between particles.
  • initialVel: The initial velocity.
  • maxNumberOfParticles: The max number of particles to be emitted.
  • jitter: The jitter amount between 0 and 1.
  • isOneShot: Set true if particles are emitted just once.
  • allowOverlapping: True if particles can be overlapped.
  • seed: The random seed.

Ancestors

Instance variables

var allowOverlapping

True if particles can be overlapped.

var angularVelocity

The angular velocity of the emitter.

var initialVelocity

The initial velocity of the particles.

var isOneShot

True if particles should be emitted just once.

var jitter

Jitter amount between 0 and 1.

var linearVelocity

The linear velocity of the emitter.

var maxNumberOfParticles

Max number of particles to be emitted.

var maxRegion

Max particle gen region.

var spacing

The spacing between particles.

var surface

Source surface.

Inherited members

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.

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.

Ancestors

Inherited members

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.

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.

Ancestors

Inherited members