public class MurtyMechSolver
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CONTACT_SOLVE |
boolean |
debug |
static int |
NT_INACTIVE |
static int |
REBUILD_A |
static int |
SHOW_ALL |
static int |
SHOW_BLOCK_PIVOT_CHANGE |
static int |
SHOW_NONE |
static int |
SHOW_PIVOTS |
static int |
SHOW_RETURNS |
static int |
SHOW_TOL_UPDATE |
static int |
SHOW_VARIABLES |
boolean |
showAStructureChange |
boolean |
showRebuildReason |
Constructor and Description |
---|
MurtyMechSolver() |
Modifier and Type | Method and Description |
---|---|
LCPSolver.Status |
contactSolve(VectorNd vel,
VectorNd lam,
VectorNd the,
SparseBlockMatrix M,
int sizeM,
VectorNd bm,
int versionM,
SparseBlockMatrix GT,
VectorNd Rg,
VectorNd bg,
SparseBlockMatrix NT,
VectorNd Rn,
VectorNd bn,
VectorNi stateN) |
LCPSolver.Status |
contactSolve(VectorNd vel,
VectorNd lam,
VectorNd the,
SparseBlockMatrix M,
int sizeM,
VectorNd bm,
int versionM,
SparseBlockMatrix GT,
VectorNd Rg,
VectorNd bg,
SparseBlockMatrix NT,
VectorNd Rn,
VectorNd bn,
VectorNi stateN,
int flags) |
void |
dispose() |
void |
finalize() |
MatrixNd |
getA() |
java.lang.String |
getAConsString() |
boolean |
getAdaptivelyRebuildA()
Queries whether A should be adaptively rebuilt at the beginning of each
solve.
|
double |
getAvgAnalyzeTime() |
double |
getAvgFactorTime() |
double |
getAvgSolveTime() |
int |
getBlockPivotFailCount()
Returns the number of times that block pivoting failed during the most
recent solve.
|
boolean |
getBlockPivoting() |
int |
getDebug() |
static boolean |
getDefaultAdaptivelyRebuildA()
Queries the (static) default setting of
getAdaptivelyRebuildA() . |
int |
getHybridSolveCount()
Returns the current count of hybrid solve solutions.
|
boolean |
getHybridSolves()
Queries whether hybrid solves are enabled.
|
int |
getIterationCount()
Returns the number of iterations that were used in the most recent
solution operation.
|
int |
getIterationLimit()
Gets the iteration limit for this solver.
|
boolean |
getLastBlockPivoting() |
double |
getLastSolveTol() |
int |
getLastVersionM() |
boolean |
getNTFrictionActivity()
Queries whether the activity of
NT is fixed during friciton
solves. |
int |
getPivotCount()
Returns the number of pivots that were used in the most recent solution
operation.
|
double |
getRebuildARatio()
Queries the rebuild A ratio.
|
boolean |
getSilent() |
int |
getSolveCount()
Returns the number of solves of A that were used in the most recent
solution operation.
|
VectorNi |
getStateA() |
double |
getTolerance()
Returns the numeric tolerence for this solver.
|
int |
getTotalAnalyzeCount() |
int |
getTotalFactorCount() |
int |
getTotalSolveCount() |
boolean |
getUpdateABetweenSolves()
Queries whether the solver should attempt to update A, instead of always
rebuilding it, between solves.
|
VectorNd |
getW()
Returns the w vector associated with the most recent solve.
|
void |
initialize() |
boolean |
isAMatrixFactored() |
boolean |
isBLCPSupported() |
int |
numFailedPivots() |
void |
resetTimers() |
void |
resolveMG(VectorNd vel,
VectorNd lam,
VectorNd bm,
VectorNd bg) |
void |
setAdaptivelyRebuildA(boolean enable)
Sets whether A should be adaptively rebuilt at the beginning of each
solve.
|
void |
setBlockPivoting(boolean enable) |
void |
setDebug(int code) |
static void |
setDefaultAdaptivelyRebuildA(boolean enable)
Sets the (static) default setting of
getAdaptivelyRebuildA() . |
void |
setHybridSolves(boolean enable)
Enables hybrid solves.
|
void |
setIterationLimit(int limit)
Sets the iteration limit for this solver.
|
void |
setNTFrictionActivity(boolean enable)
Enables or disables activity of the
NT matrix during friction
solves, which occur in the friction iterations associated with solve() calls. |
void |
setRebuildARatio(double r)
Sets the rebuild A ratio
r . |
void |
setSilent(boolean code) |
void |
setSolver(DirectSolver solver) |
void |
setSolverType(SparseSolverId solverType) |
void |
setTolerance(double tol)
Sets the numeric tolerance for this solver.
|
void |
setUpdateABetweenSolves(boolean enable)
Sets whether the solver should attempt to update A, instead of always
rebuilding it, between solves.
|
LCPSolver.Status |
solve(VectorNd vel,
VectorNd lam,
VectorNd the,
VectorNd phi,
SparseBlockMatrix M,
int sizeM,
VectorNd bm,
int versionM,
SparseBlockMatrix GT,
VectorNd Rg,
VectorNd bg,
SparseBlockMatrix NT,
VectorNd Rn,
VectorNd bn,
VectorNi stateN,
SparseBlockMatrix DT,
VectorNd Rd,
VectorNd bd,
VectorNi stateD,
java.util.ArrayList<FrictionInfo> finfo) |
LCPSolver.Status |
solve(VectorNd vel,
VectorNd lam,
VectorNd the,
VectorNd phi,
SparseBlockMatrix M,
int sizeM,
VectorNd bm,
int versionM,
SparseBlockMatrix GT,
VectorNd Rg,
VectorNd bg,
SparseBlockMatrix NT,
VectorNd Rn,
VectorNd bn,
VectorNi stateN,
SparseBlockMatrix DT,
VectorNd Rd,
VectorNd bd,
VectorNi stateD,
java.util.ArrayList<FrictionInfo> finfo,
int frictionIters,
int flags) |
LCPSolver.Status |
solve(VectorNd vel,
VectorNd lam,
VectorNd the,
VectorNd phi,
SparseBlockMatrix M,
int sizeM,
VectorNd bm,
int versionM,
SparseBlockMatrix GT,
VectorNd Rg,
VectorNd bg,
SparseBlockMatrix NT,
VectorNd Rn,
VectorNd bn,
VectorNi stateN,
SparseBlockMatrix DT,
VectorNd Rd,
VectorNd bd,
VectorNi stateD,
VectorNd flim) |
LCPSolver.Status |
solve(VectorNd vel,
VectorNd lam,
VectorNd the,
VectorNd phi,
SparseBlockMatrix M,
int sizeM,
VectorNd bm,
int versionM,
SparseBlockMatrix GT,
VectorNd Rg,
VectorNd bg,
SparseBlockMatrix NT,
VectorNd Rn,
VectorNd bn,
VectorNi stateN,
SparseBlockMatrix DT,
VectorNd Rd,
VectorNd bd,
VectorNi stateD,
VectorNd flim,
int flags) |
void |
writeA(java.lang.String filename,
Matrix.WriteFormat wfmt) |
public boolean debug
public boolean showAStructureChange
public boolean showRebuildReason
public static int CONTACT_SOLVE
public static int NT_INACTIVE
public static int REBUILD_A
public static final int SHOW_NONE
public static final int SHOW_PIVOTS
public static final int SHOW_TOL_UPDATE
public static final int SHOW_BLOCK_PIVOT_CHANGE
public static final int SHOW_VARIABLES
public static final int SHOW_RETURNS
public static final int SHOW_ALL
public int getDebug()
public void setDebug(int code)
public boolean getSilent()
public void setSilent(boolean code)
public boolean getAdaptivelyRebuildA()
setAdaptivelyRebuildA(boolean)
.true
if A should be adaptively rebuiltpublic void setAdaptivelyRebuildA(boolean enable)
>=
half the average analyze time.enable
- if true
, A should be adaptively rebuiltpublic static boolean getDefaultAdaptivelyRebuildA()
getAdaptivelyRebuildA()
.getAdaptivelyRebuildA()
.public static void setDefaultAdaptivelyRebuildA(boolean enable)
getAdaptivelyRebuildA()
.enable
- new default setting for getAdaptivelyRebuildA()
.public boolean getUpdateABetweenSolves()
true
if A should be updated between solvespublic void setUpdateABetweenSolves(boolean enable)
enable
- if true
, A should be updated between solvespublic double getRebuildARatio()
setRebuildARatio(double)
.public void setRebuildARatio(double r)
r
. The A matrix will be rebuilt at the
start of a solve if sizeND/myAconsData.size() <=
r.r
- new rebuild A ratio.public void setSolverType(SparseSolverId solverType)
public void setSolver(DirectSolver solver)
public double getTolerance()
setTolerance(double)
public void setTolerance(double tol)
>=
0, as described in the class documentation. In particular, a
solution will be considered found whenever q' >=
-tol.tol
- new numeric tolerance. Negative numbers will be truncated to 0.getTolerance()
public boolean getBlockPivoting()
public void setBlockPivoting(boolean enable)
public boolean getLastBlockPivoting()
public double getLastSolveTol()
public int getLastVersionM()
public int numFailedPivots()
public int getIterationLimit()
public void setIterationLimit(int limit)
limit
- new iteration limitpublic int getIterationCount()
public int getPivotCount()
public int getBlockPivotFailCount()
public int getSolveCount()
public boolean getHybridSolves()
setHybridSolves(boolean)
.true
if hybrid solves are enabled.public int getHybridSolveCount()
public void setHybridSolves(boolean enable)
enable
- if true
, enables hybrid solvespublic boolean getNTFrictionActivity()
NT
is fixed during friciton
solves. See setNTFrictionActivity(boolean)
.true
if the activity of NT
is enabled
during friction solvespublic void setNTFrictionActivity(boolean enable)
NT
matrix during friction
solves, which occur in the friction iterations associated with solve()
calls. If actvity is disabled, the activity state of NT
will not be changed, and so those constraints will be treated as
bilateral. This will typically reduce the number of required pivots and
allow a faster solution, at the expense of some accuracy. The resulting
values of the
may also be negative. When updating friction
limits, negative values of NT
will be clipped to 0
.
The default value of this setting is true
.
enable
- if false
, disables the activity of NT
during friction solvespublic boolean isBLCPSupported()
public MatrixNd getA()
public void writeA(java.lang.String filename, Matrix.WriteFormat wfmt)
public LCPSolver.Status contactSolve(VectorNd vel, VectorNd lam, VectorNd the, SparseBlockMatrix M, int sizeM, VectorNd bm, int versionM, SparseBlockMatrix GT, VectorNd Rg, VectorNd bg, SparseBlockMatrix NT, VectorNd Rn, VectorNd bn, VectorNi stateN)
public LCPSolver.Status contactSolve(VectorNd vel, VectorNd lam, VectorNd the, SparseBlockMatrix M, int sizeM, VectorNd bm, int versionM, SparseBlockMatrix GT, VectorNd Rg, VectorNd bg, SparseBlockMatrix NT, VectorNd Rn, VectorNd bn, VectorNi stateN, int flags)
public LCPSolver.Status solve(VectorNd vel, VectorNd lam, VectorNd the, VectorNd phi, SparseBlockMatrix M, int sizeM, VectorNd bm, int versionM, SparseBlockMatrix GT, VectorNd Rg, VectorNd bg, SparseBlockMatrix NT, VectorNd Rn, VectorNd bn, VectorNi stateN, SparseBlockMatrix DT, VectorNd Rd, VectorNd bd, VectorNi stateD, java.util.ArrayList<FrictionInfo> finfo)
public LCPSolver.Status solve(VectorNd vel, VectorNd lam, VectorNd the, VectorNd phi, SparseBlockMatrix M, int sizeM, VectorNd bm, int versionM, SparseBlockMatrix GT, VectorNd Rg, VectorNd bg, SparseBlockMatrix NT, VectorNd Rn, VectorNd bn, VectorNi stateN, SparseBlockMatrix DT, VectorNd Rd, VectorNd bd, VectorNi stateD, java.util.ArrayList<FrictionInfo> finfo, int frictionIters, int flags)
public LCPSolver.Status solve(VectorNd vel, VectorNd lam, VectorNd the, VectorNd phi, SparseBlockMatrix M, int sizeM, VectorNd bm, int versionM, SparseBlockMatrix GT, VectorNd Rg, VectorNd bg, SparseBlockMatrix NT, VectorNd Rn, VectorNd bn, VectorNi stateN, SparseBlockMatrix DT, VectorNd Rd, VectorNd bd, VectorNi stateD, VectorNd flim)
public LCPSolver.Status solve(VectorNd vel, VectorNd lam, VectorNd the, VectorNd phi, SparseBlockMatrix M, int sizeM, VectorNd bm, int versionM, SparseBlockMatrix GT, VectorNd Rg, VectorNd bg, SparseBlockMatrix NT, VectorNd Rn, VectorNd bn, VectorNi stateN, SparseBlockMatrix DT, VectorNd Rd, VectorNd bd, VectorNi stateD, VectorNd flim, int flags)
public boolean isAMatrixFactored()
public VectorNd getW()
public void dispose()
public void finalize()
finalize
in class java.lang.Object
public double getAvgSolveTime()
public int getTotalSolveCount()
public double getAvgAnalyzeTime()
public int getTotalAnalyzeCount()
public double getAvgFactorTime()
public int getTotalFactorCount()
public void resetTimers()
public VectorNi getStateA()
public java.lang.String getAConsString()
public void initialize()