public abstract class LCPSolverTestBase extends UnitTest
Modifier and Type | Method and Description |
---|---|
static void |
checkBLCPSolution(VectorNd z,
VectorNd w,
MatrixNd M,
VectorNd q,
VectorNd lo,
VectorNd hi,
int nub,
VectorNi state,
double tol) |
static void |
checkBLCPSolution(VectorNd z,
VectorNd w,
VectorNd lo,
VectorNd hi,
int nub,
VectorNi state,
double tol) |
static void |
checkLCPSolution(VectorNd z,
MatrixNd M,
VectorNd q,
VectorNi state,
double solverTol) |
static void |
checkLCPSolutionX(VectorNd z,
MatrixNd M,
VectorNd q,
int nub,
VectorNi state,
double tol) |
void |
clearPivotCount() |
abstract LCPSolver |
getSolver() |
void |
pegInHoleContactTests(int nz,
int nr,
int ntests,
boolean regularize) |
void |
printAndClearPivotCount(java.lang.String msg,
int ntests) |
void |
printPivotCount(java.lang.String msg,
int ntests) |
void |
randomBLCPTests(int ntests,
int msize,
boolean semiDefinite) |
void |
randomTests(int ntests,
int msize,
boolean semiDefinite) |
void |
randomTiming(int ntests,
int msize) |
void |
simpleContactTests(boolean regularize) |
void |
testPegInHoleContact(int nz,
int nr,
Vector3d force,
double mu,
boolean regularize)
Create a test case involving peg-in-hole contact with many contact
points and friction.
|
void |
testPegInHoleContactOld(Vector3d force,
double mu,
boolean regularize) |
void |
testPlanarContact(double ang,
boolean regularize)
Create a test case involving multi-point contact of a box on a plane.
|
void |
testPlanarFrictionContact(double ang,
double mu,
boolean regularize)
Create a test case involving multi-point contact of a box on a plane with
friction.
|
void |
testSinglePointFrictionContact(double ang,
double mu)
Create a test case involving a single point contact on a plane with
friction.
|
void |
testSolver(VectorNd z,
VectorNd w,
VectorNi state,
MatrixNd M,
VectorNd q,
VectorNd lo,
VectorNd hi,
int nub,
int size,
LCPSolver.Status expectedStatus) |
void |
testSolver(VectorNd z,
VectorNi state,
MatrixNd M,
VectorNd q,
LCPSolver.Status expectedStatus) |
void |
testSpecial(double[] Mvals,
double[] qvals) |
void |
testSpecial(double[] Mvals,
double[] qvals,
double[] loVals,
double[] hiVals,
int nub) |
check, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkNormedEquals, checkNormedEquals, getSilent, printUsageAndExit, runtest, setSilent, test
public abstract LCPSolver getSolver()
public void clearPivotCount()
public void printPivotCount(java.lang.String msg, int ntests)
public void printAndClearPivotCount(java.lang.String msg, int ntests)
public void testSpecial(double[] Mvals, double[] qvals)
public void testSpecial(double[] Mvals, double[] qvals, double[] loVals, double[] hiVals, int nub)
public void testSolver(VectorNd z, VectorNi state, MatrixNd M, VectorNd q, LCPSolver.Status expectedStatus)
public void testSolver(VectorNd z, VectorNd w, VectorNi state, MatrixNd M, VectorNd q, VectorNd lo, VectorNd hi, int nub, int size, LCPSolver.Status expectedStatus)
public void testPlanarContact(double ang, boolean regularize)
ang
- angle that the applied force makes with the planeregularize
- if true
, regularize the constraintspublic void testSinglePointFrictionContact(double ang, double mu)
public void testPlanarFrictionContact(double ang, double mu, boolean regularize)
ang
- angle that the applied force makes with the planemu
- friction coefficientregularize
- if true
, regularize the constraintspublic void testPegInHoleContact(int nz, int nr, Vector3d force, double mu, boolean regularize)
nz
- number of rings of contact points along znr
- number of contact points about each ringforce
- to apply to the center of the pegmu
- friction coefficientregularize
- if true
, regularize the constraintspublic void testPegInHoleContactOld(Vector3d force, double mu, boolean regularize)
public static void checkBLCPSolution(VectorNd z, VectorNd w, MatrixNd M, VectorNd q, VectorNd lo, VectorNd hi, int nub, VectorNi state, double tol)
public static void checkBLCPSolution(VectorNd z, VectorNd w, VectorNd lo, VectorNd hi, int nub, VectorNi state, double tol)
public static void checkLCPSolution(VectorNd z, MatrixNd M, VectorNd q, VectorNi state, double solverTol)
public static void checkLCPSolutionX(VectorNd z, MatrixNd M, VectorNd q, int nub, VectorNi state, double tol)
public void randomBLCPTests(int ntests, int msize, boolean semiDefinite)
public void randomTests(int ntests, int msize, boolean semiDefinite)
public void simpleContactTests(boolean regularize)
public void pegInHoleContactTests(int nz, int nr, int ntests, boolean regularize)
public void randomTiming(int ntests, int msize)