API Docs for: 0.3.0
Show:

GSSolver Class

Extends Solver

Iterative Gauss-Seidel constraint equation solver.

Constructor

GSSolver

(
  • [options]
)

Parameters:

  • [options] Object optional
    • iterations Number
    • timeStep Number
    • stiffness Number
    • relaxation Number
    • tolerance Number

Methods

addEquation

(
  • eq
)

Add an equation to be solved.

Parameters:

addEquations

(
  • eqs
)

Add equations. Same as .addEquation, but this time the argument is an array of Equations

Parameters:

  • eqs Array

removeAllEquations

()

Remove all currently added equations.

removeEquation

(
  • eq
)

Remove an equation.

Parameters:

solve

(
  • dt
  • world
)

Solve the system of equations

Parameters:

  • dt Number

    Time step

  • world World

    World to solve

Properties

equations

Array

Current equations in the solver.

relaxation

Number

Global equation relaxation.

stiffness

Number

Global equation stiffness.

useGlobalEquationParameters

Boolean

Whether to use .stiffness and .relaxation parameters from the Solver instead of each Equation individually.

useZeroRHS

Boolean

Set to true to set all right hand side terms to zero when solving. Can be handy for a few applications.