#include <SimTKcpodes.h>
The class CPodes represents a single instance of a CPODES integrator, and handles the associated memory internally. Methods here are identical to the corresponding CPODES functions (with the "CPode" prefix removed) but are const-correct and use SimTK Vector & Real rather than Sundials N_Vector and realtype.
Public Types | |
enum | ODEType { UnspecifiedODEType = 0, ExplicitODE, ImplicitODE } |
enum | LinearMultistepMethod { UnspecifiedLinearMultistepMethod = 0, BDF, Adams } |
enum | NonlinearSystemIterationType { UnspecifiedNonlinearSystemIterationType = 0, Newton, Functional } |
enum | ToleranceType { UnspecifiedToleranceType = 0, ScalarScalar, ScalarVector, WeightFunction } |
enum | ProjectionNorm { UnspecifiedProjectionNorm = 0, L2Norm, ErrorNorm } |
enum | ConstraintLinearity { UnspecifiedConstraintLinearity = 0, Linear, Nonlinear } |
enum | ProjectionFactorizationType { UnspecifiedProjectionFactorizationType = 0, ProjectWithLU, ProjectWithQR, ProjectWithSchurComplement, ProjectWithQRPivot } |
enum | StepMode { UnspecifiedStepMode = 0, Normal, OneStep, NormalTstop, OneStepTstop } |
Public Member Functions | |
CPodes (ODEType ode=UnspecifiedODEType, LinearMultistepMethod lmm=UnspecifiedLinearMultistepMethod, NonlinearSystemIterationType nls=UnspecifiedNonlinearSystemIterationType) | |
~CPodes () | |
int | init (CPodesSystem &sys, Real t0, const Vector &y0, const Vector &yp0, ToleranceType tt, Real reltol, void *abstol) |
int | reInit (CPodesSystem &sys, Real t0, const Vector &y0, const Vector &yp0, ToleranceType tt, Real reltol, void *abstol) |
int | projInit (ProjectionNorm, ConstraintLinearity, const Vector &ctol) |
int | projDefine () |
int | quadInit (const Vector &q0) |
int | quadReInit (const Vector &q0) |
int | rootInit (int nrtfn) |
int | setErrHandlerFn () |
int | setEwtFn () |
int | dlsSetJacFn (void *jac, void *jac_data) |
int | dlsProjSetJacFn (void *jacP, void *jacP_data) |
int | step (Real tout, Real *tret, Vector &y_inout, Vector &yp_inout, StepMode=Normal) |
int | setErrFile (FILE *errfp) |
int | setMaxOrd (int maxord) |
int | setMaxNumSteps (long mxsteps) |
int | setMaxHnilWarns (int mxhnil) |
int | setStabLimDet (bool stldet) |
int | setInitStep (Real hin) |
int | setMinStep (Real hmin) |
int | setMaxStep (Real hmax) |
int | setStopTime (Real tstop) |
int | setMaxErrTestFails (int maxnef) |
int | setMaxNonlinIters (int maxcor) |
int | setMaxConvFails (int maxncf) |
int | setNonlinConvCoef (Real nlscoef) |
int | setProjUpdateErrEst (bool proj_err) |
int | setProjFrequency (long proj_freq) |
int | setProjTestCnstr (bool test_cnstr) |
int | setProjLsetupFreq (long proj_lset_freq) |
int | setProjNonlinConvCoef (Real prjcoef) |
int | setQuadErrCon (bool errconQ, int tol_typeQ, Real reltolQ, void *abstolQ) |
int | setTolerances (int tol_type, Real reltol, void *abstol) |
int | setRootDirection (std::vector< int > &rootdir) |
int | getDky (Real t, int k, Vector &dky) |
int | getQuad (Real t, Vector &yQout) |
int | getQuadDky (Real t, int k, Vector &dky) |
int | getWorkSpace (long *lenrw, long *leniw) |
int | getNumSteps (long *nsteps) |
int | getNumFctEvals (long *nfevals) |
int | getNumLinSolvSetups (long *nlinsetups) |
int | getNumErrTestFails (long *netfails) |
int | getLastOrder (int *qlast) |
int | getCurrentOrder (int *qcur) |
int | getNumStabLimOrderReds (long *nslred) |
int | getActualInitStep (Real *hinused) |
int | getLastStep (Real *hlast) |
int | getCurrentStep (Real *hcur) |
int | getCurrentTime (Real *tcur) |
int | getTolScaleFactor (Real *tolsfac) |
int | getErrWeights (Vector &eweight) |
int | getEstLocalErrors (Vector &ele) |
int | getNumGEvals (long *ngevals) |
int | getRootInfo (int *rootsfound) |
int | getIntegratorStats (long *nsteps, long *nfevals, long *nlinsetups, long *netfails, int *qlast, int *qcur, Real *hinused, Real *hlast, Real *hcur, Real *tcur) |
int | getNumNonlinSolvIters (long *nniters) |
int | getNumNonlinSolvConvFails (long *nncfails) |
int | getNonlinSolvStats (long *nniters, long *nncfails) |
int | getProjNumProj (long *nproj) |
int | getProjNumCnstrEvals (long *nce) |
int | getProjNumLinSolvSetups (long *nsetupsP) |
int | getProjNumFailures (long *nprf) |
int | getProjStats (long *nproj, long *nce, long *nsetupsP, long *nprf) |
int | getQuadNumFunEvals (long *nqevals) |
int | getQuadErrWeights (Vector &eQweight) |
char * | getReturnFlagName (int flag) |
int | dlsGetWorkSpace (long *lenrwLS, long *leniwLS) |
int | dlsGetNumJacEvals (long *njevals) |
int | dlsGetNumFctEvals (long *nfevalsLS) |
int | dlsGetLastFlag (int *flag) |
char * | dlsGetReturnFlagName (int flag) |
int | dlsProjGetNumJacEvals (long *njPevals) |
int | dlsProjGetNumFctEvals (long *ncevalsLS) |
int | lapackDense (int N) |
int | lapackBand (int N, int mupper, int mlower) |
int | lapackDenseProj (int Nc, int Ny, ProjectionFactorizationType) |
Static Public Attributes | |
static const int | Success = 0 |
static const int | TstopReturn = 1 |
static const int | RootReturn = 2 |
static const int | Warning = 99 |
static const int | TooMuchWork = -1 |
static const int | TooClose = -27 |
static const int | RecoverableError = 9999 |
static const int | UnrecoverableError = -9999 |
Friends | |
class | CPodesRep |
enum ODEType |
enum ToleranceType |
enum ProjectionNorm |
enum ConstraintLinearity |
enum StepMode |
CPodes | ( | ODEType | ode = UnspecifiedODEType , |
|
LinearMultistepMethod | lmm = UnspecifiedLinearMultistepMethod , |
|||
NonlinearSystemIterationType | nls = UnspecifiedNonlinearSystemIterationType | |||
) | [inline, explicit] |
~CPodes | ( | ) |
int init | ( | CPodesSystem & | sys, | |
Real | t0, | |||
const Vector & | y0, | |||
const Vector & | yp0, | |||
ToleranceType | tt, | |||
Real | reltol, | |||
void * | abstol | |||
) |
Referenced by OLDCPodesIntegrator::initialize().
int reInit | ( | CPodesSystem & | sys, | |
Real | t0, | |||
const Vector & | y0, | |||
const Vector & | yp0, | |||
ToleranceType | tt, | |||
Real | reltol, | |||
void * | abstol | |||
) |
int projInit | ( | ProjectionNorm | , | |
ConstraintLinearity | , | |||
const Vector & | ctol | |||
) |
int projDefine | ( | ) |
Referenced by OLDCPodesIntegrator::initialize().
int quadInit | ( | const Vector & | q0 | ) |
int quadReInit | ( | const Vector & | q0 | ) |
int rootInit | ( | int | nrtfn | ) |
int setErrHandlerFn | ( | ) |
int setEwtFn | ( | ) |
int dlsSetJacFn | ( | void * | jac, | |
void * | jac_data | |||
) |
int dlsProjSetJacFn | ( | void * | jacP, | |
void * | jacP_data | |||
) |
Referenced by OLDCPodesIntegrator::step().
int setErrFile | ( | FILE * | errfp | ) |
int setMaxOrd | ( | int | maxord | ) |
int setMaxNumSteps | ( | long | mxsteps | ) |
Referenced by OLDCPodesIntegrator::initialize().
int setMaxHnilWarns | ( | int | mxhnil | ) |
int setStabLimDet | ( | bool | stldet | ) |
int setInitStep | ( | Real | hin | ) |
int setMinStep | ( | Real | hmin | ) |
int setMaxStep | ( | Real | hmax | ) |
int setStopTime | ( | Real | tstop | ) |
int setMaxErrTestFails | ( | int | maxnef | ) |
int setMaxNonlinIters | ( | int | maxcor | ) |
int setMaxConvFails | ( | int | maxncf | ) |
int setNonlinConvCoef | ( | Real | nlscoef | ) |
Referenced by OLDCPodesIntegrator::initialize().
int setProjUpdateErrEst | ( | bool | proj_err | ) |
int setProjFrequency | ( | long | proj_freq | ) |
int setProjTestCnstr | ( | bool | test_cnstr | ) |
int setProjLsetupFreq | ( | long | proj_lset_freq | ) |
int setProjNonlinConvCoef | ( | Real | prjcoef | ) |
int setQuadErrCon | ( | bool | errconQ, | |
int | tol_typeQ, | |||
Real | reltolQ, | |||
void * | abstolQ | |||
) |
int setTolerances | ( | int | tol_type, | |
Real | reltol, | |||
void * | abstol | |||
) |
int setRootDirection | ( | std::vector< int > & | rootdir | ) |
int getDky | ( | Real | t, | |
int | k, | |||
Vector & | dky | |||
) |
int getQuad | ( | Real | t, | |
Vector & | yQout | |||
) |
int getQuadDky | ( | Real | t, | |
int | k, | |||
Vector & | dky | |||
) |
int getWorkSpace | ( | long * | lenrw, | |
long * | leniw | |||
) |
int getNumSteps | ( | long * | nsteps | ) |
int getNumFctEvals | ( | long * | nfevals | ) |
int getNumLinSolvSetups | ( | long * | nlinsetups | ) |
int getNumErrTestFails | ( | long * | netfails | ) |
int getLastOrder | ( | int * | qlast | ) |
int getCurrentOrder | ( | int * | qcur | ) |
int getNumStabLimOrderReds | ( | long * | nslred | ) |
int getActualInitStep | ( | Real * | hinused | ) |
int getLastStep | ( | Real * | hlast | ) |
int getCurrentStep | ( | Real * | hcur | ) |
Referenced by OLDCPodesIntegrator::getPredictedNextStep().
int getCurrentTime | ( | Real * | tcur | ) |
int getTolScaleFactor | ( | Real * | tolsfac | ) |
int getErrWeights | ( | Vector & | eweight | ) |
int getEstLocalErrors | ( | Vector & | ele | ) |
int getNumGEvals | ( | long * | ngevals | ) |
int getRootInfo | ( | int * | rootsfound | ) |
int getIntegratorStats | ( | long * | nsteps, | |
long * | nfevals, | |||
long * | nlinsetups, | |||
long * | netfails, | |||
int * | qlast, | |||
int * | qcur, | |||
Real * | hinused, | |||
Real * | hlast, | |||
Real * | hcur, | |||
Real * | tcur | |||
) |
int getNumNonlinSolvIters | ( | long * | nniters | ) |
int getNumNonlinSolvConvFails | ( | long * | nncfails | ) |
int getNonlinSolvStats | ( | long * | nniters, | |
long * | nncfails | |||
) |
int getProjNumProj | ( | long * | nproj | ) |
int getProjNumCnstrEvals | ( | long * | nce | ) |
int getProjNumLinSolvSetups | ( | long * | nsetupsP | ) |
int getProjNumFailures | ( | long * | nprf | ) |
int getProjStats | ( | long * | nproj, | |
long * | nce, | |||
long * | nsetupsP, | |||
long * | nprf | |||
) |
int getQuadNumFunEvals | ( | long * | nqevals | ) |
int getQuadErrWeights | ( | Vector & | eQweight | ) |
char* getReturnFlagName | ( | int | flag | ) |
int dlsGetWorkSpace | ( | long * | lenrwLS, | |
long * | leniwLS | |||
) |
int dlsGetNumJacEvals | ( | long * | njevals | ) |
int dlsGetNumFctEvals | ( | long * | nfevalsLS | ) |
int dlsGetLastFlag | ( | int * | flag | ) |
char* dlsGetReturnFlagName | ( | int | flag | ) |
int dlsProjGetNumJacEvals | ( | long * | njPevals | ) |
int dlsProjGetNumFctEvals | ( | long * | ncevalsLS | ) |
int lapackDense | ( | int | N | ) |
Referenced by OLDCPodesIntegrator::initialize().
int lapackBand | ( | int | N, | |
int | mupper, | |||
int | mlower | |||
) |
int lapackDenseProj | ( | int | Nc, | |
int | Ny, | |||
ProjectionFactorizationType | ||||
) |
friend class CPodesRep [friend] |
const int Success = 0 [static] |
const int TstopReturn = 1 [static] |
const int RootReturn = 2 [static] |
const int Warning = 99 [static] |
const int TooMuchWork = -1 [static] |
const int TooClose = -27 [static] |
const int RecoverableError = 9999 [static] |
const int UnrecoverableError = -9999 [static] |