maspack.solvers
Class LemkeContactSolver

java.lang.Object
  extended by maspack.solvers.LemkeSolverBase
      extended by maspack.solvers.LemkeContactSolver

public class LemkeContactSolver
extends LemkeSolverBase


Field Summary
 
Fields inherited from class maspack.solvers.LemkeSolverBase
AUTO_EPSILON, AUTOMATIC_PIVOT_LIMIT, BASIC, NEW, PIVOT_LIMIT_EXCEEDED, SHOW_BASIS, SHOW_COLS, SHOW_LEXICO_COLS, SHOW_STATS, SOLVED, UNBOUNDED_RAY, W_VAR, Z_VAR, Z0
 
Constructor Summary
LemkeContactSolver()
           
 
Method Summary
 boolean checkQv(double[] qv)
           
 void computeMvCol(double[] y, maspack.solvers.LemkeContactSolver.ContactVariable var)
           
 void computePivotKernel()
           
 void computeQv(double[] qv)
           
 java.lang.String getConfigString()
           
 int getNumFrictionDirections()
           
 boolean getReducibleSize()
           
 boolean getSmartDirections()
           
 boolean getVariableSize()
           
 boolean isFrictionEnabled()
           
 void setEpsilon(double eps)
           
 void setFrictionEnabled(boolean enable)
           
 void setNumFrictionDirections(int num)
           
 void setReducibleSize(boolean enable)
           
 void setSmartDirections(boolean enable)
           
 void setVariableSize(boolean enable)
           
 int solve(Twist tr, ContactInfo[] contacts, int ncontacts, SpatialInertia inertia, Twist tw, double restitution)
          Applies an impulse to a rigid body velocity to adjust for normal and frictional contact forces.
 int solve(Twist tr, ContactInfo[] contacts, int ncontacts, SpatialInertia inertia, Wrench wapplied, double restitution)
           
 void solveColumn(double[] y, Wrench vc, double[] b, Wrench bstar)
           
 
Methods inherited from class maspack.solvers.LemkeSolverBase
cycleCheckingEnabled, getEpsilon, getPivotCount, getPivotLimit, lexicoMinRatioTest, resetPivotCount, setCycleChecking, setDebug, setPivotCount, setPivotLimit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LemkeContactSolver

public LemkeContactSolver()
Method Detail

isFrictionEnabled

public boolean isFrictionEnabled()

setFrictionEnabled

public void setFrictionEnabled(boolean enable)

getNumFrictionDirections

public int getNumFrictionDirections()

setNumFrictionDirections

public void setNumFrictionDirections(int num)

setEpsilon

public void setEpsilon(double eps)

setVariableSize

public void setVariableSize(boolean enable)

getVariableSize

public boolean getVariableSize()

setReducibleSize

public void setReducibleSize(boolean enable)

getReducibleSize

public boolean getReducibleSize()

setSmartDirections

public void setSmartDirections(boolean enable)

getSmartDirections

public boolean getSmartDirections()

computePivotKernel

public void computePivotKernel()

solveColumn

public void solveColumn(double[] y,
                        Wrench vc,
                        double[] b,
                        Wrench bstar)

computeMvCol

public void computeMvCol(double[] y,
                         maspack.solvers.LemkeContactSolver.ContactVariable var)

checkQv

public boolean checkQv(double[] qv)

computeQv

public void computeQv(double[] qv)

solve

public int solve(Twist tr,
                 ContactInfo[] contacts,
                 int ncontacts,
                 SpatialInertia inertia,
                 Twist tw,
                 double restitution)
Applies an impulse to a rigid body velocity to adjust for normal and frictional contact forces.

Parameters:
tr - velocity with contact impulse added
contacts - provides information about the each contact
ncontacts - number of contacts
inertia - spatial inertia of the rigid body
tw - initial velocity of the rigid body
restitution - coefficent of restitution

solve

public int solve(Twist tr,
                 ContactInfo[] contacts,
                 int ncontacts,
                 SpatialInertia inertia,
                 Wrench wapplied,
                 double restitution)

getConfigString

public java.lang.String getConfigString()