32 lflag.resize(numBulk);
44 const vector<OCP_DBL>& ziSkip)
57 const vector<OCP_DBL>& Niin,
61 if (fabs(1 -
P[n] / Pin) >=
minEigen[n] / 10) {
64 if (fabs(
T[n] - Tin) >=
minEigen[n] * 10) {
82 const vector<OCP_DBL>& Niin,
86 if (
IfSkip(Pin, Tin, Ntin, Niin, n)) {
99 const vector<OCP_DBL>& Niin,
105 if (
IfSkip(Pin, Tin, Ntin, Niin, n)) {
107 }
else if (np >= 2) {
AcceleratePVT class declaration.
unsigned int USI
Generic unsigned integer.
double OCP_DBL
Double precision.
unsigned int OCP_USI
Long unsigned integer.
unsigned int OCP_BOOL
OCP_BOOL in OCP.
OCP_BOOL ifSetup
Only one setup is needed.
vector< OCP_DBL > lminEigen
Last min eigenvalue.
USI numCom
Num of components used in phase equilibrium calculation.
USI CalFtypeFIM(const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL &Ntin, const vector< OCP_DBL > &Niin, const OCP_DBL *S, const USI &np, const OCP_USI &n) const
Calculate the ftype for FIM.
vector< OCP_DBL > P
Pressure at last step.
void UpdateLastTimeStep()
Update SkipStaAnaly term at last time step.
USI CalFtypeIMPEC(const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL &Ntin, const vector< OCP_DBL > &Niin, const OCP_USI &n)
Calculate the ftype for IMPEC.
vector< OCP_DBL > lT
Last T.
vector< OCP_BOOL > lflag
Last flag.
void Setup(const OCP_USI &numBulk, const USI &np, const USI &nc)
Allocate memory for SkipStaAnaly term.
vector< OCP_BOOL > flag
If true, skip will be test.
vector< OCP_DBL > zi
Mole fraction of components(for test) at last step.
OCP_BOOL ifUseSkip
If true, then Skip option will be used.
vector< OCP_DBL > minEigen
minimum eigenvalue used for testing skipping
USI numPhase
Num of phase used in phase equilibrium calculation.
vector< OCP_DBL > lP
Last P.
vector< OCP_DBL > lzi
Last zi.
void ResetToLastTimeStep()
Reset SkipStaAnaly term to last time step.
vector< OCP_DBL > T
Temperature at last step.
void AssignValue(const OCP_USI &n, const OCP_DBL &minEigenSkip, const OCP_DBL &PSkip, const OCP_DBL &TSkip, const vector< OCP_DBL > &ziSkip)
Update variables used for determine if skipping will happen.
OCP_BOOL IfSkip(const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL &Ntin, const vector< OCP_DBL > &Niin, const OCP_USI &n) const
Determine if skipping will happen.